Open shihui2014 opened 1 year ago
Hello @shihui2014 ,
Thank you for using ESP-HOSTED.
As I see you are using 0.3, I recommend using latest release, 0.0.5.
Can you please confirm the source code git commit you are using for 0.3, at ESP side and Host side? Host and ESP side code is expected to be on same commit. If in case you are using released ESP binaries, 'source code.zip' from assets on same page is expected to be used for host side kernel module building.
i have use same verion, esp_hosted_firmware_esp32_sdio_uart_v0.3 and esp-hosted-release-v0.3, the pin cmd and all the data(dat0-dat3) mast 10K pullups?
Can you tell me kernel ,esp32 sdio work time sequence?
Okay. In your case, pull ups are required (mandatory) for sdio. See the [details)[https://docs.espressif.com/projects/esp-idf/en/v4.1/api-reference/peripherals/sd_pullup_requirements.html).
Can you help to provide logs at host (/var/log/kern.log or dmesg or /var/log/messages) and commands run at host and their output.
Kernel 5.4.3 should be okay. Can you please elaborate 'sdio work time sequence'?
Some milestones:
CIS and bootup logs can be referred from https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/SDIO_setup.md#3-checking-the-setup-for-sdio
Getting platform configured is prerequisite for esp hosted kernel driver to work. we can help you in the process, but it largely remains outsides the scope of esp_hosted.
If you are no position to add pull ups, you can use alternative transport, spi, where pull ups are not required.
thanks for your reply,Below is the kernel5.4.3 log and we have add external pull ups Loading Environment from NAND... *** Warning - bad CRC, using default environment
Display: MYIR-LCD-7-800x480 (800x480) Video: 800x480x16 In: serial Out: serial Err: serial Net: Warning: ethernet@02188000 (eth0) using random MAC address - 66:63:3a:14:e0:9f eth0: ethernet@02188000 [PRIME] Fastboot: Normal Normal Boot Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x600000, size 0xa00000 10485760 bytes read: OK
NAND read: device 0 offset 0x1000000, size 0x100000 1048576 bytes read: OK Kernel image @ 0x80800000 [ 0x000000 - 0x83ee60 ]
Booting using the fdt blob at 0x83000000 Using Device Tree in place at 83000000, end 8300bca9 Modify /soc/aips-bus@2200000/epdc@228c000:status disabled ft_system_setup for mx6
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.4.3-g9c2490a-dirty (wt@ubuntu) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Thu Jun 9 18:15:48 PDT 2022 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Freescale i.MX6 ULL 14x14 MYiR Board [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 32 MiB at 0x8e000000 [ 0.000000] percpu: Embedded 15 pages/cpu s32076 r8192 d21172 u61440 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 65024 [ 0.000000] Kernel command line: console=ttymxc0,115200 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs mtdparts=gpmi-nand:5m(boot),1m(env),10m(kernel),1m(dtb),-(rootfs) [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 208284K/262144K available (11264K kernel code, 727K rwdata, 4060K rodata, 1024K init, 430K bss, 21092K reserved, 32768K cma-reserved, 0K highmem) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x2c8/0x468 with crng_init=0 [ 0.000000] Switching to timer-based delay loop, resolution 41ns [ 0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.000055] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.003077] Console: colour dummy device 80x30 [ 0.003148] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.003184] pid_max: default: 32768 minimum: 301 [ 0.003483] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.003520] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.005051] CPU: Testing write buffer coherency: ok [ 0.005734] CPU0: update cpu_capacity 1024 [ 0.005765] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.060581] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.080553] rcu: Hierarchical SRCU implementation. [ 0.120722] smp: Bringing up secondary CPUs ... [ 0.120758] smp: Brought up 1 node, 1 CPU [ 0.120780] SMP: Total of 1 processors activated (48.00 BogoMIPS). [ 0.120796] CPU: All CPU(s) started in SVC mode. [ 0.121631] devtmpfs: initialized [ 0.133343] Duplicate name in timing0, renamed to "-porch#1" [ 0.133552] Duplicate name in timing1, renamed to "-porch#1" [ 0.137260] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.138200] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.138254] futex hash table entries: 256 (order: 2, 16384 bytes, linear) [ 0.141136] pinctrl core: initialized pinctrl subsystem [ 0.143451] NET: Registered protocol family 16 [ 0.166678] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.169281] cpuidle: using governor menu [ 0.186693] vdd3p0: supplied by regulator-dummy [ 0.188066] cpu: supplied by regulator-dummy [ 0.189367] vddsoc: supplied by regulator-dummy [ 0.213865] No ATAGs? [ 0.214001] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.214039] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.218389] imx6ul-pinctrl 20e0000.iomuxc: no groups defined in /soc/aips-bus@2000000/iomuxc@20e0000/gpmi-nand-1 [ 0.218432] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver [ 0.219680] imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver [ 0.222693] imx mu driver is registered. [ 0.223745] imx rpmsg driver is registered. [ 0.326201] regulator@2 GPIO handle specifies active low - ignored [ 0.329098] vgaarb: loaded [ 0.330948] SCSI subsystem initialized [ 0.333267] usbcore: registered new interface driver usbfs [ 0.333393] usbcore: registered new interface driver hub [ 0.333610] usbcore: registered new device driver usb [ 0.337272] i2c i2c-1: IMX I2C adapter registered [ 0.338087] imx-i2c 21a8000.i2c: can't get pinctrl, bus recovery not supported [ 0.338822] i2c i2c-2: IMX I2C adapter registered [ 0.339753] mc: Linux media interface: v0.10 [ 0.339871] videodev: Linux video capture interface: v2.00 [ 0.340008] pps_core: LinuxPPS API ver. 1 registered [ 0.340026] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 0.340081] PTP clock support registered [ 0.343265] MIPI CSI2 driver module loaded [ 0.343400] Advanced Linux Sound Architecture Driver Initialized. [ 0.345208] Bluetooth: Core ver 2.22 [ 0.345356] NET: Registered protocol family 31 [ 0.345378] Bluetooth: HCI device and connection manager initialized [ 0.345417] Bluetooth: HCI socket layer initialized [ 0.345443] Bluetooth: L2CAP socket layer initialized [ 0.345496] Bluetooth: SCO socket layer initialized [ 0.346737] clocksource: Switched to clocksource mxc_timer1 [ 0.347060] VFS: Disk quotas dquot_6.6.0 [ 0.347219] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.370272] thermal_sys: Registered thermal governor 'step_wise' [ 0.370915] NET: Registered protocol family 2 [ 0.372242] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 0.372316] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.372389] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.372479] TCP: Hash tables configured (established 2048 bind 2048) [ 0.372693] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.372760] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.373137] NET: Registered protocol family 1 [ 0.404656] RPC: Registered named UNIX socket transport module. [ 0.404691] RPC: Registered udp transport module. [ 0.404709] RPC: Registered tcp transport module. [ 0.404727] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.416106] PCI: CLS 0 bytes, default 64 [ 0.417881] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available [ 0.421475] Bus freq driver module loaded [ 0.424207] Initialise system trusted keyrings [ 0.424761] workingset: timestamp_bits=30 max_order=16 bucket_order=0 [ 0.449871] NFS: Registering the id_resolver key type [ 0.449946] Key type id_resolver registered [ 0.449966] Key type id_legacy registered [ 0.450069] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. [ 0.451203] fuse: init (API version 7.31) [ 0.541147] Key type asymmetric registered [ 0.541180] Asymmetric key parser 'x509' registered [ 0.541253] io scheduler mq-deadline registered [ 0.541274] io scheduler kyber registered [ 0.550044] pwm-backlight backlight-display: backlight-display supply power not found, using dummy regulator [ 0.550244] of_pwm_get(): can't parse "pwms" property [ 0.550281] pwm-backlight backlight-display: unable to request PWM [ 0.550498] pwm-backlight: probe of backlight-display failed with error -2 [ 0.554440] mxsfb 21c8000.lcdif: 21c8000.lcdif supply lcd not found, using dummy regulator [ 0.554655] mxsfb 21c8000.lcdif: failed to find display phandle [ 0.554689] mxsfb 21c8000.lcdif: Failed to initialize fbinfo: -2 [ 0.554989] mxsfb: probe of 21c8000.lcdif failed with error -2 [ 0.564598] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2 [ 0.564639] imx-sdma 20ec000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin [ 0.569771] mxs-dma 1804000.dma-apbh: initialized [ 0.577620] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 22, base_baud = 5000000) is a IMX [ 1.334569] printk: console [ttymxc0] enabled [ 1.341289] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 65, base_baud = 5000000) is a IMX [ 1.351827] 21f0000.serial: ttymxc3 at MMIO 0x21f0000 (irq = 66, base_baud = 5000000) is a IMX [ 1.396097] imx_rngc 2284000.rng: Freescale RNGC registered. [ 1.402604] imx sema4 driver is registered. [ 1.443325] brd: module loaded [ 1.467216] loop: module loaded [ 1.473107] imx ahci driver is registered. [ 1.480642] imx6ul-pinctrl 20e0000.iomuxc: invalid function iomuxc in map table [ 1.490188] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda [ 1.496589] nand: Micron MT29F2G08ABAEAWP [ 1.500707] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 1.509526] Bad block table found at page 131008, version 0x01 [ 1.515706] Bad block table found at page 130944, version 0x01 [ 1.522070] 5 cmdlinepart partitions found on MTD device gpmi-nand [ 1.528345] Creating 5 MTD partitions on "gpmi-nand": [ 1.533444] 0x000000000000-0x000000500000 : "boot" [ 1.548704] 0x000000500000-0x000000600000 : "env" [ 1.568658] 0x000000600000-0x000001000000 : "kernel" [ 1.588669] 0x000001000000-0x000001100000 : "dtb" [ 1.608642] 0x000001100000-0x000010000000 : "rootfs" [ 1.628666] gpmi-nand 1806000.gpmi-nand: driver registered. [ 1.640626] libphy: Fixed MDIO Bus: probed [ 1.646046] CAN device driver interface [ 1.719094] pps pps0: new PPS source ptp0 [ 1.723678] fec 20b4000.ethernet: Invalid MAC address: 00:00:00:00:00:00 [ 1.730558] fec 20b4000.ethernet: Using random MAC address: ba:c6:f8:0e:cf:15 [ 1.738608] libphy: fec_enet_mii_bus: probed [ 1.747670] fec 20b4000.ethernet eth0: registered PHC device 0 [ 1.819019] pps pps1: new PPS source ptp1 [ 1.825620] fec 2188000.ethernet eth1: registered PHC device 1 [ 1.832390] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 1.838341] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 1.845415] PPP generic driver version 2.4.2 [ 1.850309] PPP BSD Compression module registered [ 1.855059] PPP Deflate Compression module registered [ 1.860237] PPP MPPE Compression module registered [ 1.865064] NET: Registered protocol family 24 [ 1.869809] usbcore: registered new interface driver r8152 [ 1.875464] usbcore: registered new interface driver lan78xx [ 1.881476] usbcore: registered new interface driver asix [ 1.887104] usbcore: registered new interface driver ax88179_178a [ 1.893321] usbcore: registered new interface driver cdc_ether [ 1.899374] usbcore: registered new interface driver smsc95xx [ 1.905244] usbcore: registered new interface driver net1080 [ 1.911075] usbcore: registered new interface driver cdc_subset [ 1.917165] usbcore: registered new interface driver zaurus [ 1.922864] usbcore: registered new interface driver MOSCHIP usb-ethernet driver [ 1.930496] usbcore: registered new interface driver cdc_ncm [ 1.936300] usbcore: registered new interface driver qmi_wwan_q [ 1.942398] usbcore: registered new interface driver qmi_wwan [ 1.948322] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.954884] ehci-pci: EHCI PCI platform driver [ 1.959511] ehci-mxc: Freescale On-Chip EHCI Host driver [ 1.965743] usbcore: registered new interface driver cdc_wdm [ 1.971684] usbcore: registered new interface driver usb-storage [ 1.978010] usbcore: registered new interface driver usbserial_generic [ 1.984642] usbserial: USB Serial support registered for generic [ 1.990834] usbcore: registered new interface driver option [ 1.996515] usbserial: USB Serial support registered for GSM modem (1-port) [ 2.008190] imx_usb 2184000.usb: No over current polarity defined [ 2.014467] imx_usb 2184000.usb: 2184000.usb supply vbus not found, using dummy regulator [ 2.217420] random: fast init done [ 2.649860] mxs_phy 20c9000.usbphy: Data pin can't make good contact. [ 2.669275] imx_usb 2184200.usb: 2184200.usb supply vbus not found, using dummy regulator [ 2.682225] ci_hdrc ci_hdrc.1: EHCI Host Controller [ 2.687322] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1 [ 2.716844] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00 [ 2.722746] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04 [ 2.731189] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 2.738503] usb usb1: Product: EHCI Host Controller [ 2.743420] usb usb1: Manufacturer: Linux 5.4.3-g9c2490a-dirty ehci_hcd [ 2.750106] usb usb1: SerialNumber: ci_hdrc.1 [ 2.755967] hub 1-0:1.0: USB hub found [ 2.760032] hub 1-0:1.0: 1 port detected [ 2.780315] input: 20cc000.snvs:snvs-powerkey as /devices/soc0/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0 [ 2.801100] edt_ft5x06 1-0038: touchscreen probe failed [ 2.807593] imx6ul-pinctrl 20e0000.iomuxc: pin MX6UL_PAD_GPIO1_IO02 already requested by 20e0000.iomuxc; cannot claim for 2040000.tsc [ 2.819827] imx6ul-pinctrl 20e0000.iomuxc: pin-25 (2040000.tsc) status -22 [ 2.826808] imx6ul-pinctrl 20e0000.iomuxc: could not request pin 25 (MX6UL_PAD_GPIO1_IO02) from group tscgrp on device 20e0000.iomuxc [ 2.838974] imx6ul-tsc 2040000.tsc: Error applying setting, reverse things back [ 2.846346] imx6ul-tsc: probe of 2040000.tsc failed with error -22 [ 2.859207] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0 [ 2.865703] i2c /dev entries driver [ 2.872296] ov2659 1-0030: link-frequencies property not found or too many [ 2.879347] ov2659 1-0030: platform data not specified [ 2.884597] ov2659: probe of 1-0030 failed with error -22 [ 2.892885] pxp-v4l2 pxp_v4l2: initialized [ 2.902634] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0) [ 2.910207] Bluetooth: HCI UART driver ver 2.3 [ 2.914705] Bluetooth: HCI UART protocol H4 registered [ 2.919970] Bluetooth: HCI UART protocol BCSP registered [ 2.925403] Bluetooth: HCI UART protocol LL registered [ 2.930715] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 2.937133] Bluetooth: HCI UART protocol Marvell registered [ 2.942884] usbcore: registered new interface driver btusb [ 2.950613] sdhci: Secure Digital Host Controller Interface driver [ 2.956948] sdhci: Copyright(c) Pierre Ossman [ 2.961336] sdhci-pltfm: SDHCI platform and OF driver helper [ 3.012457] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA [ 3.024816] caam-snvs 20cc000.caam-snvs: can't get snvs clock [ 3.030990] caam-snvs 20cc000.caam-snvs: violation handlers armed - init state [ 3.047321] usbcore: registered new interface driver usbhid [ 3.053076] usbhid: USB HID core driver [ 3.070096] wm8904 1-001a: 1-001a supply DCVDD not found, using dummy regulator [ 3.078087] wm8904 1-001a: 1-001a supply DBVDD not found, using dummy regulator [ 3.085884] wm8904 1-001a: 1-001a supply AVDD not found, using dummy regulator [ 3.093793] wm8904 1-001a: 1-001a supply CPVDD not found, using dummy regulator [ 3.101511] wm8904 1-001a: 1-001a supply MICVDD not found, using dummy regulator [ 3.109908] wm8904 1-001a: Failed to read ID register: -6 [ 3.123664] fsl-sai 202c000.sai: failed to get mclk0 clock: -2 [ 3.135167] imx-wm8904 sound: cpu dai phandle missing or invalid [ 3.141660] imx-wm8904: probe of sound failed with error -22 [ 3.147872] NET: Registered protocol family 26 [ 3.154271] NET: Registered protocol family 10 [ 3.171641] Segment Routing with IPv6 [ 3.175834] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 3.184065] NET: Registered protocol family 17 [ 3.188943] can: controller area network core (rev 20170425 abi 9) [ 3.195525] NET: Registered protocol family 29 [ 3.200294] can: raw protocol (rev 20170425) [ 3.204777] can: broadcast manager protocol (rev 20170425 t) [ 3.210714] can: netlink gateway (rev 20190810) max_hops=1 [ 3.217067] Bluetooth: RFCOMM TTY layer initialized [ 3.222523] Bluetooth: RFCOMM socket layer initialized [ 3.228126] Bluetooth: RFCOMM ver 1.11 [ 3.232034] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.237477] Bluetooth: BNEP filters: protocol multicast [ 3.242760] Bluetooth: BNEP socket layer initialized [ 3.248042] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 3.254012] Bluetooth: HIDP socket layer initialized [ 3.259313] Key type dns_resolver registered [ 3.290233] Registering SWP/SWPB emulation handler [ 3.295954] Loading compiled-in X.509 certificates [ 3.346283] imx_thermal tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C [ 3.357172] ubi0: default fastmap pool size: 95 [ 3.361743] ubi0: default fastmap WL pool size: 47 [ 3.366552] ubi0: attaching mtd4 [ 4.510717] ubi0: scanning is finished [ 4.529890] ubi0: attached mtd4 (name "rootfs", size 239 MiB) [ 4.535694] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes [ 4.543075] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 [ 4.550177] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 [ 4.557206] ubi0: good PEBs: 1908, bad PEBs: 4, corrupted PEBs: 0 [ 4.563322] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128 [ 4.570648] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 4048816808 [ 4.579839] ubi0: available PEBs: 0, total reserved PEBs: 1908, PEBs reserved for bad PEB handling: 36 [ 4.589222] ubi0: background thread "ubi_bgt0d" started, PID 118 [ 4.595935] gpio-keys gpio-keys: Button without keycode [ 4.601345] gpio-keys: probe of gpio-keys failed with error -22 [ 4.607499] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:12:24 UTC (744) [ 4.617278] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.630818] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.637869] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 4.646517] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db [ 4.654758] ALSA device list: [ 4.658017] No soundcards found. [ 4.663094] UBIFS (ubi0:0): Mounting in unauthenticated mode [ 4.753007] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs", R/O mode [ 4.761530] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes [ 4.771538] UBIFS (ubi0:0): FS size: 235413504 bytes (224 MiB, 1854 LEBs), journal size 11808768 bytes (11 MiB, 93 LEBs) [ 4.782809] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB) [ 4.789726] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 3590AA13-E4FE-44EC-B840-F12B012BF79D, small LPT model [ 4.803440] VFS: Mounted root (ubifs filesystem) readonly on device 0:14. [ 4.811519] devtmpfs: mounted [ 4.817246] Freeing unused kernel memory: 1024K [ 4.822275] Run /sbin/init as init process [ 5.214666] systemd[1]: System time before build time, advancing clock. [ 5.320730] systemd[1]: systemd 243+ running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid) [ 5.345051] systemd[1]: Detected architecture arm.
Welcome to NXP i.MX Release Distro 5.4-zeus (zeus)!
[ 5.403358] systemd[1]: Set hostname to
NXP i.MX Release Distro 5.4-zeus myd-y6ull14x14 ttymxc0
myd-y6ull14x14 login: root (automatic login)
root@myd-y6ull14x14:~# root@myd-y6ull14x14:~# ls app myd-y6ull-gpmi-weim.dtb rtu_lk.log tool web_lk.log esp32_sdio.ko myir_start_service.sh ssh_lk.log update_success root@myd-y6ull14x14:~# insmod esp32_sdio.ko [ 34.949496] drivers/net/wireless/esp32/main.c:648 esp32 222 hello esp_init. [ 34.956500] drivers/net/wireless/esp32/main.c:595ESP32: Resetpin of Host is 68 [ 34.974523] drivers/net/wireless/esp32/main.c:608ESP32: Triggering ESP reset. [ 35.004043] drivers/net/wireless/esp32/esp_sdio.c:791 esp32 esp_init_interface_layer: [ 35.021292] drivers/net/wireless/esp32/esp_sdio.c:802 esp32 sdio_register_driver ret:0 [ 35.029675] drivers/net/wireless/esp32/main.c:662 esp32 esp_init_interface_layer ret:0. root@myd-y6ull14x14:~# [ 35.046930] ltemodule-pwr: disabling [ 35.050730] wifi-pwr: disabling [ 35.053891] can-3v3: disabling
root@myd-y6ull14x14:~# dmesg | grep usdhc [ 3.012457] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
Below is the esp side log I (580) cpu_start: Starting scheduler on PRO CPU. I (586) NETWORK_ADAPTER: I (586) NETWORK_ADAPTER: ESP-Hosted Firmware version :: 0.3 I (596) NETWORK_ADAPTER: Transport used :: SDIO I (606) NETWORK_ADAPTER: I (616) NETWORK_ADAPTER: Supported features are: I (626) NETWORK_ADAPTER: - WLAN over SDIO I (626) NETWORK_ADAPTER: - BT/BLE I (636) NETWORK_ADAPTER: - HCI Over UART I (636) NETWORK_ADAPTER: - BT/BLE dual mode I (646) BTDM_INIT: BT controller compile version [4bc0a8e] I (646) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (756) phy: phy_version: 4390, 6b3c1f2, Sep 10 2020, 15:09:07, 0, 0 I (1226) SDIO_SLAVE: Using SDIO interface I (1236) wifi:wifi driver task: 3ffde798, prio:23, stack:6656, core=0 I (1236) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1236) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1246) wifi:wifi firmware version: 6e1f9e4 I (1246) wifi:config NVS flash: disabled I (1256) wifi:config nano formating: disabled I (1256) wifi:Init data frame dynamic rx buffer num: 32 I (1266) wifi:Init management frame dynamic rx buffer num: 32 I (1266) wifi:Init management short buffer num: 32 I (1276) wifi:Init dynamic tx buffer num: 32 I (1276) wifi:Init static rx buffer size: 1600 I (1276) wifi:Init static rx buffer num: 10 I (1286) wifi:Init dynamic rx buffer num: 32 I (1296) wifi:mode : null I (1296) NETWORK_ADAPTER: Initial set up done
So from your log, I still suspect if the SDIO is detected or not. I would suggest to verify your device tree.
If the connections are correct and ESP is flashed with SDIO firmware, Host should detect the ESP SDIO first.
I am attaching working reference NXP imx 8mm (imx8mm-lpddr4-evk) dts for your reference. We are not expert of device tree, but we believe below files may point you in better direction.
To add further, After doing:
Your expected host side log (without even loading ESP32 host kernel module):
/var/log/kern.log
or /var/log/messages
or dmesg
would contain:
[ 77.649578] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[ 77.657019] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[ 77.660243] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[ 77.662448] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[ 77.662545] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[ 77.662643] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[ 77.664445] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[ 77.664541] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[ 77.664637] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[ 77.664832] mmc1: new SDIO card at address 0001
Once you have detected the SDIO, then, you would want to port rpi_init.sh script as per your host (porting guide mentions this). This should be simple enough. then you can load the esp32_sdio.ko driver with 'resetpin' configured using ported rpi_init.sh.
Once the kernel module loaded, you can see ESP has reset (using resetpin). Host will show log similar to:
[ 77.665287] esp_probe: ESP network device detected
[ 77.877892] Features supported are:
[ 77.877901] * WLAN
[ 77.877906] * BT/BLE
[ 77.877911] - HCI over SDIO
[ 77.877916] - BT/BLE dual mode
[ 78.096179] esp_sdio: probe of mmc1:0001:2 failed with error -22
mmc instance will vary.
Hello @shihui2014
Were you manage to get CIS & first event like above?
hello @mantriyogesh I haven't got this infomation。
hello @mantriyogesh I haven't got this infomation。
I think you can cross check your Linux SoC MMC config (Device Tree). We cannot assess your Device Tree to be correct or not (It varies from SoC to SoC)
If that is correct, ESP is connected correctly with expected pull-ups & ESP flashed with correct(matching) firmware, then you can expect the CIS prints.
You can also verify if (1) CIS is originated from ESP or not by shut the power to ESP -> No CIS for mmcX. (2) Power ESP -> CIS for mmcX printed in host log.
Make sure you reboot host to check CIS prints in both above tests (If device tree is not correctly configured/supported to poll the SD MMC hardware detection)
host log could be one from /var/log/messages
or /var/log/kern/log
or dmesg
command.
okey, I'm going to use ESP-Hosted-FG-release 0.0.5,
Okay, that will be easy to integrate actually. You can embed your expected calls right from application.
But even in that case, the underlying sdio hardware still needs to be configured (https://github.com/espressif/esp-hosted/issues/212#issuecomment-1469472003 is still applicable)
hi,I have obtained the following information from dmesg! [ 142.959567] mmc1: queuing unknown CIS tuple 0x01 (3 bytes) [ 142.979684] mmc1: queuing unknown CIS tuple 0x1a (5 bytes) [ 142.990920] mmc1: queuing unknown CIS tuple 0x1b (8 bytes) [ 142.999253] drivers/net/wireless/esp32/esp_sdio.c:736 Enter [ 143.004870] drivers/net/wireless/esp32/esp_sdio.c:737 Class=0 [ 143.014081] drivers/net/wireless/esp32/esp_sdio.c:738 sdio vendor ID: 0x6666 [ 143.023016] drivers/net/wireless/esp32/esp_sdio.c:739 sdio device ID: 0x2222 [ 143.031704] drivers/net/wireless/esp32/esp_sdio.c:740 Function#: 1 [ 143.039495] esp_probe: ESP network device detected [ 143.045161] [ 143.045161] Received INIT event from ESP32 peripheral [ 143.045174] EVENT: 0 [ 143.059163] ESP peripheral capabilities: 0x1b [ 143.063550] Features supported are: [ 143.096948] drivers/net/wireless/esp32/esp_sdio.c:736 Enter [ 143.126903] WLAN [ 143.129122] BT/BLE [ 143.131488] - HCI over UART [ 143.134634] - BT/BLE dual mode [ 143.143276] drivers/net/wireless/esp32/esp_sdio.c:737 Class=2 [ 143.169340] drivers/net/wireless/esp32/esp_sdio.c:738 sdio vendor ID: 0x6666 [ 143.176421] drivers/net/wireless/esp32/esp_sdio.c:739 sdio device ID: 0x3333 [ 143.196884] EVENT: 3 [ 143.223037] drivers/net/wireless/esp32/esp_sdio.c:740 Function#: 2 [ 143.242039] esp_sdio: probe of mmc1:0001:2 failed with error -22 [ 143.271008] drivers/net/wireless/esp32/esp_sdio.c:805 esp32 sdio_register_driver ret:0 root@myd-y6ull14x14:~# [ 144.395119] process_rx_packet, Dropping unsupported serial frame
hi,@mantriyogesh ,thank you for your support, When see this information,"esp_sdio: probe of mmc1:0001:2 failed with error -22 ", What should I do next?
esp_sdio: probe of mmc1:0001:2 failed with error -22 can be ignored. we don't use function 2 so returns.
What is concerning, process_rx_packet, Dropping unsupported serial frame
What is output of
$ git log --oneline | head -2
at ESP (if building from source) and Host side? It should be https://github.com/espressif/esp-hosted/commit/d30942e7d863a78c1ea2d13c0f964529ff542fef
Can you use current master at both sides, ESP and host side? https://github.com/espressif/esp-hosted/blob/81778f63a9d84fa46f8a907078f9e2681b391bf5/esp_hosted_fg/esp/esp_driver/network_adapter/main/sdio_slave_api.c#L183-L202 You can tune timing there.
Are you able to check ahead if you are able connect to AP (using demo app)? Capture logs at both, ESP and Host.
I visit the website" https://github.com/espressif/esp-hosted/releases " and download ESP-Hosted-FG-release_0.0.5.tgz ,esp-hosted-release-fg-v0.0.5.zip
yes perfect. Can you try this and get logs at both sides?
yes, esp32's log I (69918) wifi:wifi driver task: 3ffdb308, prio:23, stack:6656, core=1 I (69918) wifi:wifi firmware version: 03528e0 I (69920) wifi:wifi certification version: v7.0 I (69920) wifi:config NVS flash: disabled I (69924) wifi:config nano formating: disabled I (69926) wifi:Init data frame dynamic rx buffer num: 32 I (69930) wifi:Init management frame dynamic rx buffer num: 32 I (69936) wifi:Init management short buffer num: 32 I (69938) wifi:Init dynamic tx buffer num: 64 I (69942) wifi:Init static I (69944) NETWORK_ADAPTER: Start Data Path rx buffer size: 1600 I (69950) wifi:Init static rx buffer num: 16 I (69952) wifi:Init dynamic rx buffer num: 32 I (69956) wifi_init: rx ba win: 6 I (69958) wifi_init: tcpip mbox: 32 I (69962) wifi_init: udp mbox: 6 I (69966) wifi_init: tcp mbox: 6 I (69968) wifi_init: tcp tx win: 5744 I (69972) wifi_init: tcp rx win: 5744 I (69976) wifi_init: tcp mss: 1440 I (69978) wifi_init: WiFi IRAM OP enabled I (69982) wifi_init: WiFi RX IRAM OP enabled I (69988) wifi:mode : null I (69990) NETWORK_ADAPTER: Initial set up done I (70992) slave_ctrl: event ESPInit kernel'e log Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x600000, size 0xa00000 10485760 bytes read: OK
NAND read: device 0 offset 0x1000000, size 0x100000 1048576 bytes read: OK Kernel image @ 0x80800000 [ 0x000000 - 0x83f710 ]
Booting using the fdt blob at 0x83000000 Using Device Tree in place at 83000000, end 8300bcd4 Modify /soc/aips-bus@2200000/epdc@228c000:status disabled ft_system_setup for mx6
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.4.3-gc724a73-dirty (root@ubuntu) (gcc version 9.2.0 (GCC)) #2 SMP PREEMPT Wed Mar 15 17:12:38 +08 2023 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Freescale i.MX6 ULL 14x14 MYiR Board [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] Reserved memory: created CMA memory pool at 0x88000000, size 128 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] percpu: Embedded 15 pages/cpu s32076 r8192 d21172 u61440 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 65024 [ 0.000000] Kernel command line: console=ttymxc0,115200 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs mtdparts=gpmi-nand:5m(boot),1m(env),10m(kernel),1m(dtb),-(rootfs) [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 109784K/262144K available (11264K kernel code, 728K rwdata, 4060K rodata, 1024K init, 430K bss, 21288K reserved, 131072K cma-reserved, 0K highmem) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x2c8/0x468 with crng_init=0 [ 0.000000] Switching to timer-based delay loop, resolution 41ns [ 0.000015] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.000055] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.003081] Console: colour dummy device 80x30 [ 0.003150] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.003182] pid_max: default: 32768 minimum: 301 [ 0.003483] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.003516] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.005079] CPU: Testing write buffer coherency: ok [ 0.005801] CPU0: update cpu_capacity 1024 [ 0.005832] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.060577] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.080551] rcu: Hierarchical SRCU implementation. [ 0.120719] smp: Bringing up secondary CPUs ... [ 0.120753] smp: Brought up 1 node, 1 CPU [ 0.120775] SMP: Total of 1 processors activated (48.00 BogoMIPS). [ 0.120792] CPU: All CPU(s) started in SVC mode. [ 0.121641] devtmpfs: initialized [ 0.137049] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.137997] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.138047] futex hash table entries: 256 (order: 2, 16384 bytes, linear) [ 0.147991] pinctrl core: initialized pinctrl subsystem [ 0.150382] NET: Registered protocol family 16 [ 0.176971] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.179551] cpuidle: using governor menu [ 0.196856] vdd3p0: supplied by regulator-dummy [ 0.198257] cpu: supplied by regulator-dummy [ 0.199647] vddsoc: supplied by regulator-dummy [ 0.224127] No ATAGs? [ 0.224260] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.224298] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.228698] imx6ul-pinctrl 20e0000.iomuxc: no groups defined in /soc/aips-bus@2000000/iomuxc@20e0000/gpmi-nand-1 [ 0.228741] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver [ 0.230063] imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver [ 0.233132] imx mu driver is registered. [ 0.234186] imx rpmsg driver is registered. [ 0.336207] regulator@2 GPIO handle specifies active low - ignored [ 0.339199] vgaarb: loaded [ 0.341128] SCSI subsystem initialized [ 0.343364] usbcore: registered new interface driver usbfs [ 0.343496] usbcore: registered new interface driver hub [ 0.343705] usbcore: registered new device driver usb [ 0.347359] i2c i2c-1: IMX I2C adapter registered [ 0.348144] imx-i2c 21a8000.i2c: can't get pinctrl, bus recovery not supported [ 0.348897] i2c i2c-2: IMX I2C adapter registered [ 0.349797] mc: Linux media interface: v0.10 [ 0.349910] videodev: Linux video capture interface: v2.00 [ 0.350048] pps_core: LinuxPPS API ver. 1 registered [ 0.350066] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 0.350118] PTP clock support registered [ 0.353291] MIPI CSI2 driver module loaded [ 0.353425] Advanced Linux Sound Architecture Driver Initialized. [ 0.355198] Bluetooth: Core ver 2.22 [ 0.355333] NET: Registered protocol family 31 [ 0.355353] Bluetooth: HCI device and connection manager initialized [ 0.355389] Bluetooth: HCI socket layer initialized [ 0.355416] Bluetooth: L2CAP socket layer initialized [ 0.355472] Bluetooth: SCO socket layer initialized [ 0.356726] clocksource: Switched to clocksource mxc_timer1 [ 0.357074] VFS: Disk quotas dquot_6.6.0 [ 0.357229] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.380195] thermal_sys: Registered thermal governor 'step_wise' [ 0.380849] NET: Registered protocol family 2 [ 0.382150] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 0.382225] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.382294] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.382383] TCP: Hash tables configured (established 2048 bind 2048) [ 0.382581] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.382645] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.383028] NET: Registered protocol family 1 [ 0.414572] RPC: Registered named UNIX socket transport module. [ 0.414608] RPC: Registered udp transport module. [ 0.414624] RPC: Registered tcp transport module. [ 0.414638] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.426047] PCI: CLS 0 bytes, default 64 [ 0.427880] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available [ 0.431482] Bus freq driver module loaded [ 0.434300] Initialise system trusted keyrings [ 0.434856] workingset: timestamp_bits=30 max_order=16 bucket_order=0 [ 0.459691] NFS: Registering the id_resolver key type [ 0.459762] Key type id_resolver registered [ 0.459780] Key type id_legacy registered [ 0.459880] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. [ 0.461024] fuse: init (API version 7.31) [ 0.552612] Key type asymmetric registered [ 0.552643] Asymmetric key parser 'x509' registered [ 0.552717] io scheduler mq-deadline registered [ 0.552738] io scheduler kyber registered [ 0.561471] pwm-backlight backlight-display: backlight-display supply power not found, using dummy regulator [ 0.567317] mxsfb 21c8000.lcdif: 21c8000.lcdif supply lcd not found, using dummy regulator [ 0.685612] Console: switching to colour frame buffer device 100x30 [ 0.780968] mxsfb 21c8000.lcdif: initialized [ 0.791527] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2 [ 0.791567] imx-sdma 20ec000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin [ 0.796007] mxs-dma 1804000.dma-apbh: initialized [ 0.803695] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 22, base_baud = 5000000) is a IMX [ 1.535214] printk: console [ttymxc0] enabled [ 1.541853] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 65, base_baud = 5000000) is a IMX [ 1.552472] 21f0000.serial: ttymxc3 at MMIO 0x21f0000 (irq = 66, base_baud = 5000000) is a IMX [ 1.596592] imx_rngc 2284000.rng: Freescale RNGC registered. [ 1.603250] imx sema4 driver is registered. [ 1.644313] brd: module loaded [ 1.670176] loop: module loaded [ 1.676314] imx ahci driver is registered. [ 1.683634] imx6ul-pinctrl 20e0000.iomuxc: invalid function iomuxc in map table [ 1.693140] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda [ 1.699612] nand: Micron MT29F2G08ABAEAWP [ 1.703658] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 1.712479] Bad block table found at page 131008, version 0x01 [ 1.718715] Bad block table found at page 130944, version 0x01 [ 1.725014] 5 cmdlinepart partitions found on MTD device gpmi-nand [ 1.731381] Creating 5 MTD partitions on "gpmi-nand": [ 1.736476] 0x000000000000-0x000000500000 : "boot" [ 1.748975] 0x000000500000-0x000000600000 : "env" [ 1.768750] 0x000000600000-0x000001000000 : "kernel" [ 1.788692] 0x000001000000-0x000001100000 : "dtb" [ 1.808711] 0x000001100000-0x000010000000 : "rootfs" [ 1.828987] gpmi-nand 1806000.gpmi-nand: driver registered. [ 1.840597] libphy: Fixed MDIO Bus: probed [ 1.846864] CAN device driver interface [ 1.919441] pps pps0: new PPS source ptp0 [ 1.925380] fec 20b4000.ethernet: Invalid MAC address: 00:00:00:00:00:00 [ 1.932269] fec 20b4000.ethernet: Using random MAC address: 16:da:4b:52:4a:a4 [ 1.940593] libphy: fec_enet_mii_bus: probed [ 1.948938] fec 20b4000.ethernet eth0: registered PHC device 0 [ 2.028930] pps pps1: new PPS source ptp1 [ 2.036991] fec 2188000.ethernet eth1: registered PHC device 1 [ 2.043624] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 2.049579] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 2.056638] PPP generic driver version 2.4.2 [ 2.061541] PPP BSD Compression module registered [ 2.066288] PPP Deflate Compression module registered [ 2.071462] PPP MPPE Compression module registered [ 2.076288] NET: Registered protocol family 24 [ 2.081127] usbcore: registered new interface driver r8152 [ 2.086927] usbcore: registered new interface driver lan78xx [ 2.092738] usbcore: registered new interface driver asix [ 2.098329] usbcore: registered new interface driver ax88179_178a [ 2.104532] usbcore: registered new interface driver cdc_ether [ 2.110593] usbcore: registered new interface driver smsc95xx [ 2.116458] usbcore: registered new interface driver net1080 [ 2.122304] usbcore: registered new interface driver cdc_subset [ 2.128392] usbcore: registered new interface driver zaurus [ 2.134072] usbcore: registered new interface driver MOSCHIP usb-ethernet driver [ 2.141675] usbcore: registered new interface driver cdc_ncm [ 2.147659] usbcore: registered new interface driver qmi_wwan_q [ 2.153705] usbcore: registered new interface driver qmi_wwan [ 2.159549] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.166102] ehci-pci: EHCI PCI platform driver [ 2.170814] ehci-mxc: Freescale On-Chip EHCI Host driver [ 2.177101] usbcore: registered new interface driver cdc_wdm [ 2.182927] usbcore: registered new interface driver usb-storage [ 2.189294] usbcore: registered new interface driver usbserial_generic [ 2.195931] usbserial: USB Serial support registered for generic [ 2.202129] usbcore: registered new interface driver option [ 2.207851] usbserial: USB Serial support registered for GSM modem (1-port) [ 2.219231] imx_usb 2184000.usb: No over current polarity defined [ 2.225530] imx_usb 2184000.usb: 2184000.usb supply vbus not found, using dummy regulator [ 2.284115] random: fast init done [ 2.861348] mxs_phy 20c9000.usbphy: Data pin can't make good contact. [ 2.881163] imx_usb 2184200.usb: 2184200.usb supply vbus not found, using dummy regulator [ 2.894429] ci_hdrc ci_hdrc.1: EHCI Host Controller [ 2.899499] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1 [ 2.936853] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00 [ 2.942758] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04 [ 2.951147] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 2.958442] usb usb1: Product: EHCI Host Controller [ 2.963349] usb usb1: Manufacturer: Linux 5.4.3-gc724a73-dirty ehci_hcd [ 2.970095] usb usb1: SerialNumber: ci_hdrc.1 [ 2.976123] hub 1-0:1.0: USB hub found [ 2.980210] hub 1-0:1.0: 1 port detected [ 3.000442] input: 20cc000.snvs:snvs-powerkey as /devices/soc0/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0 [ 3.021157] edt_ft5x06 1-0038: touchscreen probe failed [ 3.027638] imx6ul-pinctrl 20e0000.iomuxc: pin MX6UL_PAD_GPIO1_IO02 already requested by 20e0000.iomuxc; cannot claim for 2040000.tsc [ 3.039868] imx6ul-pinctrl 20e0000.iomuxc: pin-25 (2040000.tsc) status -22 [ 3.046906] imx6ul-pinctrl 20e0000.iomuxc: could not request pin 25 (MX6UL_PAD_GPIO1_IO02) from group tscgrp on device 20e0000.iomuxc [ 3.059073] imx6ul-tsc 2040000.tsc: Error applying setting, reverse things back [ 3.066445] imx6ul-tsc: probe of 2040000.tsc failed with error -22 [ 3.079028] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0 [ 3.085521] i2c /dev entries driver [ 3.092623] link-frequencies 0 value 70000000 [ 3.217146] ov2659 1-0030: Sensor soft reset failed [ 3.224841] pxp-v4l2 pxp_v4l2: initialized [ 3.234568] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0) [ 3.242244] Bluetooth: HCI UART driver ver 2.3 [ 3.246930] Bluetooth: HCI UART protocol H4 registered [ 3.252105] Bluetooth: HCI UART protocol BCSP registered [ 3.257643] Bluetooth: HCI UART protocol LL registered [ 3.262879] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 3.269296] Bluetooth: HCI UART protocol Marvell registered [ 3.275036] usbcore: registered new interface driver btusb [ 3.282691] sdhci: Secure Digital Host Controller Interface driver [ 3.289020] sdhci: Copyright(c) Pierre Ossman [ 3.293405] sdhci-pltfm: SDHCI platform and OF driver helper [ 3.345472] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA [ 3.357897] caam-snvs 20cc000.caam-snvs: can't get snvs clock [ 3.363982] caam-snvs 20cc000.caam-snvs: violation handlers armed - init state [ 3.378429] usbcore: registered new interface driver usbhid [ 3.384055] usbhid: USB HID core driver [ 3.394062] mmc1: queuing unknown CIS tuple 0x01 (3 bytes) [ 3.409909] wm8904 1-001a: 1-001a supply DCVDD not found, using dummy regulator [ 3.417862] wm8904 1-001a: 1-001a supply DBVDD not found, using dummy regulator [ 3.425472] wm8904 1-001a: 1-001a supply AVDD not found, using dummy regulator [ 3.433158] wm8904 1-001a: 1-001a supply CPVDD not found, using dummy regulator [ 3.440868] wm8904 1-001a: 1-001a supply MICVDD not found, using dummy regulator [ 3.449426] wm8904 1-001a: Failed to read ID register: -6 [ 3.456597] mmc1: queuing unknown CIS tuple 0x1a (5 bytes) [ 3.467108] fsl-sai 202c000.sai: failed to get mclk0 clock: -2 [ 3.477017] mmc1: queuing unknown CIS tuple 0x1b (8 bytes) [ 3.485031] imx-wm8904 sound: failed to find codec platform device [ 3.494576] mmc1: queuing unknown CIS tuple 0x80 (1 bytes) [ 3.500223] imx-wm8904: probe of sound failed with error -22 [ 3.506327] mmc1: queuing unknown CIS tuple 0x81 (1 bytes) [ 3.512108] NET: Registered protocol family 26 [ 3.517231] mmc1: queuing unknown CIS tuple 0x82 (1 bytes) [ 3.524074] NET: Registered protocol family 10 [ 3.531610] mmc1: queuing unknown CIS tuple 0x80 (1 bytes) [ 3.539169] mmc1: queuing unknown CIS tuple 0x81 (1 bytes) [ 3.544899] mmc1: queuing unknown CIS tuple 0x82 (1 bytes) [ 3.551694] Segment Routing with IPv6 [ 3.555564] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 3.562211] mmc1: new SDIO card at address 0001 [ 3.568385] NET: Registered protocol family 17 [ 3.572903] can: controller area network core (rev 20170425 abi 9) [ 3.580406] NET: Registered protocol family 29 [ 3.585035] can: raw protocol (rev 20170425) [ 3.589415] can: broadcast manager protocol (rev 20170425 t) [ 3.595124] can: netlink gateway (rev 20190810) max_hops=1 [ 3.601305] Bluetooth: RFCOMM TTY layer initialized [ 3.606254] Bluetooth: RFCOMM socket layer initialized [ 3.611684] Bluetooth: RFCOMM ver 1.11 [ 3.615496] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.621014] Bluetooth: BNEP filters: protocol multicast [ 3.626292] Bluetooth: BNEP socket layer initialized [ 3.631336] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 3.637333] Bluetooth: HIDP socket layer initialized [ 3.642485] Key type dns_resolver registered [ 3.680157] Registering SWP/SWPB emulation handler [ 3.686116] Loading compiled-in X.509 certificates [ 3.734136] imx_thermal tempmon: Industrial CPU temperature grade - max:115C critical:110C passive:105C [ 3.744860] ubi0: default fastmap pool size: 95 [ 3.749553] ubi0: default fastmap WL pool size: 47 [ 3.754366] ubi0: attaching mtd4 [ 4.898346] ubi0: scanning is finished [ 4.925044] ubi0: attached mtd4 (name "rootfs", size 239 MiB) [ 4.930951] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes [ 4.937888] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 [ 4.944695] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 [ 4.951773] ubi0: good PEBs: 1908, bad PEBs: 4, corrupted PEBs: 0 [ 4.957923] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128 [ 4.965165] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 2410973462 [ 4.974385] ubi0: available PEBs: 0, total reserved PEBs: 1908, PEBs reserved for bad PEB handling: 36 [ 4.983778] ubi0: background thread "ubi_bgt0d" started, PID 118 [ 4.991047] input: gpio-keys as /devices/soc0/gpio-keys/input/input2 [ 4.998686] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:00:01 UTC (1) [ 5.008229] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 5.021845] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 5.028870] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 5.037952] ALSA device list: [ 5.040949] No soundcards found. [ 5.045466] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db [ 5.053855] UBIFS (ubi0:0): Mounting in unauthenticated mode [ 5.096633] UBIFS (ubi0:0): recovery needed [ 5.203699] UBIFS (ubi0:0): recovery deferred [ 5.208456] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs", R/O mode [ 5.216821] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes [ 5.226805] UBIFS (ubi0:0): FS size: 235413504 bytes (224 MiB, 1854 LEBs), journal size 11808768 bytes (11 MiB, 93 LEBs) [ 5.238060] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB) [ 5.244898] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 700A3DC8-7317-40CD-8DB3-9C433550637C, small LPT model [ 5.257339] VFS: Mounted root (ubifs filesystem) readonly on device 0:14. [ 5.264966] devtmpfs: mounted [ 5.270733] Freeing unused kernel memory: 1024K [ 5.275755] Run /sbin/init as init process [ 5.660813] systemd[1]: System time before build time, advancing clock. [ 5.765396] systemd[1]: systemd 243+ running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid) [ 5.789936] systemd[1]: Detected architecture arm.
Welcome to NXP i.MX Release Distro 5.4-zeus (zeus)!
[ 5.854673] systemd[1]: Set hostname to
NXP i.MX Release Distro 5.4-zeus myd-y6ull14x14 ttymxc0
myd-y6ull14x14 login: [ 35.046928] can-3v3: disabling
myd-y6ull14x14 login: root root@myd-y6ull14x14:~# ls esp32_sdio.ko root@myd-y6ull14x14:~# insmod esp32_sdio.ko [ 76.372806] mmc1: queuing unknown CIS tuple 0x01 (3 bytes) [ 76.394998] mmc1: queuing unknown CIS tuple 0x1a (5 bytes) [ 76.404555] mmc1: queuing unknown CIS tuple 0x1b (8 bytes) [ 76.415528] drivers/net/wireless/esp32/esp_sdio.c:736 Enter [ 76.432062] drivers/net/wireless/esp32/esp_sdio.c:737 Class=0 [ 76.440496] drivers/net/wireless/esp32/esp_sdio.c:738 sdio vendor ID: 0x6666 [ 76.449256] drivers/net/wireless/esp32/esp_sdio.c:739 sdio device ID: 0x2222 [ 76.456333] drivers/net/wireless/esp32/esp_sdio.c:740 Function#: 1 [ 76.465053] esp_probe: ESP network device detected [ 76.472193] [ 76.472193] Received INIT event from ESP32 peripheral [ 76.472210] EVENT: 0 [ 76.484663] ESP peripheral capabilities: 0x1b [ 76.517068] drivers/net/wireless/esp32/esp_sdio.c:736 Enter [ 76.522680] drivers/net/wireless/esp32/esp_sdio.c:737 Class=2 [ 76.538922] Features supported are: [ 76.542447] WLAN [ 76.544639] BT/BLE [ 76.576919] - HCI over UART [ 76.580094] - BT/BLE dual mode [ 76.583504] EVENT: 3 [ 76.589477] drivers/net/wireless/esp32/esp_sdio.c:738 sdio vendor ID: 0x6666 [ 76.596557] drivers/net/wireless/esp32/esp_sdio.c:739 sdio device ID: 0x3333 [ 76.644527] drivers/net/wireless/esp32/esp_sdio.c:740 Function#: 2 [ 76.664339] esp_sdio: probe of mmc1:0001:2 failed with error -22 [ 76.698803] drivers/net/wireless/esp32/esp_sdio.c:805 esp32 sdio_register_driver ret:0 root@myd-y6ull14x14:~# [ 77.820534] process_rx_packet, Dropping unsupported serial frame
hi @mantriyogesh you say “connect to AP (using demo app)?” the demo app is?
connect to ap use by “esp-hosted-release-fg-v0.0.5\esp_hosted_fg\host\linux\host_control\ c_support ”? may i use “c_support” only?Because my board has no python environment。
I don't see your ESP full log. Can you please help to get ESP log from flashing till end? I suspect you are still using old release.
Yes you can use C demo app from esp_hosted_fg\host\linux\host_control\c_support.
An error occurred while compiling c_support fatal error: protobuf-c/protobuf-c.h: No such file or directory file protobuf-c/protobuf-c/protobuf-c.c is not exist。
and esp log is : ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x2b (HSPI_FLASH_BOOT) invalid header: 0xffffffff invalid header: 0xffffffff invalid header: 0xffffffff invalid header: 0xffffffff invalid header: 0xffffffff invalid header: 0xffffffff invalid header: 0xffffffff invalid header: 0xffffffff ets Jul 29 2019 12:21:46
rst:0x10 (RTCWDT_RTC_RESET),boot:0x3b (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:7012 load:0x40078000,len:15384 load:0x40080400,len:3816 entry 0x40080648 I (28) boot: ESP-IDF v5.0-beta1-742-g7bd5af7f1e 2nd stage bootloader I (28) boot: compile time 09:35:03 I (28) boot: chip revision: V300 I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (39) boot.esp32: SPI Speed : 40MHz I (44) boot.esp32: SPI Mode : DIO I (49) boot.esp32: SPI Flash Size : 4MB I (53) boot: Enabling RNG early entropy source... I (59) boot: Partition Table: I (62) boot: ## Label Usage Type ST Offset Length I (69) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (77) boot: 1 otadata OTA data 01 00 0000d000 00002000 I (84) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (92) boot: 3 factory factory app 00 00 00010000 00100000 I (99) boot: 4 ota_0 OTA app 00 10 00110000 00100000 I (107) boot: 5 ota_1 OTA app 00 11 00210000 00100000 I (114) boot: End of partition table I (119) boot: Defaulting to factory image I (123) boot_comm: chip revision: 3, min. application chip revision: 0 I (130) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=288ach (166060) map I (199) esp_image: segment 1: paddr=000388d4 vaddr=3ffbdb60 size=05864h ( 22628) load I (208) esp_image: segment 2: paddr=0003e140 vaddr=40080000 size=01ed8h ( 7896) load I (212) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=9d014h (643092) map I (448) esp_image: segment 4: paddr=000dd03c vaddr=40081ed8 size=1c044h (114756) load I (495) esp_image: segment 5: paddr=000f9088 vaddr=50000000 size=00010h ( 16) load I (511) boot: Loaded app from partition at offset 0x10000 I (511) boot: Disabling RNG early entropy source... I (522) cpu_start: Pro cpu up. I (523) cpu_start: Starting app cpu, entry point is 0x400813dc I (0) cpu_start: App cpu up. I (539) cpu_start: Pro cpu start user code I (539) cpu_start: cpu freq: 240000000 Hz I (539) cpu_start: Application information: I (544) cpu_start: Project name: network_adapter I (549) cpu_start: App version: e0bb23b I (554) cpu_start: Compile time: Oct 21 2022 09:34:49 I (560) cpu_start: ELF file SHA256: 985ab6d0449645a0... I (566) cpu_start: ESP-IDF: v5.0-beta1-742-g7bd5af7f1e I (573) heap_init: Initializing. RAM available for dynamic allocation: I (580) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM I (586) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM I (592) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM I (598) heap_init: At 3FFCCA28 len 000135D8 (77 KiB): DRAM I (605) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (611) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (617) heap_init: At 4009DF1C len 000020E4 (8 KiB): IRAM I (625) spi_flash: detected chip: gd I (628) spi_flash: flash io: dio W (632) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (646) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (660) NETWORK_ADAPTER: I (666) NETWORK_ADAPTER: ESP-Hosted-FG Firmware version :: 0.0.5 I (674) NETWORK_ADAPTER: Transport used :: SDIO + UART I (682) NETWORK_ADAPTER: I (690) NETWORK_ADAPTER: Supported features are: I (694) NETWORK_ADAPTER: - WLAN over SDIO I (698) ESP_BT: - BT/BLE I (700) ESP_BT: - HCI Over UART I (702) ESP_BT: - BT/BLE dual mode I (706) NETWORK_ADAPTER: capabilities: 0x1b I (718) BTDM_INIT: BT controller compile version [8020d24] I (720) system_api: Base MAC address is not set I (722) system_api: read default base MAC address from EFUSE I (728) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 I (1054) NETWORK_ADAPTER: ESP Bluetooth MAC addr: b8:d6:1a:6c:69:6a I (1056) SDIO_SLAVE: Using SDIO interface
fatal error: protobuf-c/protobuf-c.h: No such file or directory file protobuf-c/protobuf-c/protobuf-c.c is not exist。
Missed this documentation step:
I will update the code likewise, but CONFIG_SUPPORT_ESP_SERIAL is mandatory. https://github.com/espressif/esp-hosted/blob/81778f63a9d84fa46f8a907078f9e2681b391bf5/esp_hosted_fg/host/linux/host_driver/esp32/Makefile#L1
I have already set CONFIG_SUPPORT_ESP_SERIAL = y
and esp32 log is : root@myd-y6ull14x14:~# insmod esp32_sdio.ko [ 34.381029] esp_reset, ESP32: Resetpin of Host is 68 [ 34.455773] esp_sdio: probe of mmc1:0001:1 failed with error -16 [ 34.462340] esp_sdio: probe of mmc1:0001:2 failed with error -16 [ 34.479966] drivers/net/wireless/esp32/esp_sdio.c:806 esp32 sdio_register_driver ret:0 root@myd-y6ull14x14:~# [ 35.047012] can-3v3: disabling
kernel log is: . I (659) NETWORK_ADAPTER: I (665) NETWORK_ADAPTER: ESP-Hosted-FG Firmware version :: 0.0.5 I (673) NETWORK_ADAPTER: Transport used :: SDIO + UART I (681) NETWORK_ADAPTER: I (689) NETWORK_ADAPTER: Supported features are: I (693) NETWORK_ADAPTER: - WLAN over SDIO I (697) ESP_BT: - BT/BLE I (699) ESP_BT: - HCI Over UART I (701) ESP_BT: - BT/BLE dual mode I (705) NETWORK_ADAPTER: capabilities: 0x1b I (717) BTDM_INIT: BT controller compile version [8020d24] I (719) system_api: Base MAC address is not set I (721) system_api: read default base MAC address from EFUSE I (727) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 I (1055) NETWORK_ADAPTER: ESP Bluetooth MAC addr: b8:d6:1a:6c:69:6a I (1057) SDIO_SLAVE: Using SDIO interface ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x3b (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:7012 load:0x40078000,len:15384 load:0x40080400,len:3816 entry 0x40080648 I (27) boot: ESP-IDF v5.0-beta1-742-g7bd5af7f1e 2nd stage bootloader I (27) boot: compile time 09:35:03 I (28) boot: chip revision: V300 I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (39) boot.esp32: SPI Speed : 40MHz I (44) boot.esp32: SPI Mode : DIO I (48) boot.esp32: SPI Flash Size : 4MB I (53) boot: Enabling RNG early entropy source... I (58) boot: Partition Table: I (62) boot: ## Label Usage Type ST Offset Length I (69) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (77) boot: 1 otadata OTA data 01 00 0000d000 00002000 I (84) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (92) boot: 3 factory factory app 00 00 00010000 00100000 I (99) boot: 4 ota_0 OTA app 00 10 00110000 00100000 I (106) boot: 5 ota_1 OTA app 00 11 00210000 00100000 I (114) boot: End of partition table I (118) boot: Defaulting to factory image I (123) boot_comm: chip revision: 3, min. application chip revision: 0 I (130) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=288ach (166060) map I (199) esp_image: segment 1: paddr=000388d4 vaddr=3ffbdb60 size=05864h ( 22628) load I (208) esp_image: segment 2: paddr=0003e140 vaddr=40080000 size=01ed8h ( 7896) load I (211) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=9d014h (643092) map I (447) esp_image: segment 4: paddr=000dd03c vaddr=40081ed8 size=1c044h (114756) load I (495) esp_image: segment 5: paddr=000f9088 vaddr=50000000 size=00010h ( 16) load I (510) boot: Loaded app from partition at offset 0x10000 I (510) boot: Disabling RNG early entropy source... I (522) cpu_start: Pro cpu up. I (522) cpu_start: Starting app cpu, entry point is 0x400813dc I (0) cpu_start: App cpu up. I (538) cpu_start: Pro cpu start user code I (538) cpu_start: cpu freq: 240000000 Hz I (539) cpu_start: Application information: I (543) cpu_start: Project name: network_adapter I (549) cpu_start: App version: e0bb23b I (554) cpu_start: Compile time: Oct 21 2022 09:34:49 I (560) cpu_start: ELF file SHA256: 985ab6d0449645a0... I (566) cpu_start: ESP-IDF: v5.0-beta1-742-g7bd5af7f1e I (573) heap_init: Initializing. RAM available for dynamic allocation: I (580) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM I (586) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM I (592) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM I (598) heap_init: At 3FFCCA28 len 000135D8 (77 KiB): DRAM I (604) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (611) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (617) heap_init: At 4009DF1C len 000020E4 (8 KiB): IRAM I (624) spi_flash: detected chip: gd I (627) spi_flash: flash io: dio W (631) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (646) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (659) NETWORK_ADAPTER: I (665) NETWORK_ADAPTER: ESP-Hosted-FG Firmware version :: 0.0.5 I (673) NETWORK_ADAPTER: Transport used :: SDIO + UART I (681) NETWORK_ADAPTER: I (689) NETWORK_ADAPTER: Supported features are: I (693) NETWORK_ADAPTER: - WLAN over SDIO I (697) ESP_BT: - BT/BLE I (699) ESP_BT: - HCI Over UART I (701) ESP_BT: - BT/BLE dual mode I (705) NETWORK_ADAPTER: capabilities: 0x1b I (717) BTDM_INIT: BT controller compile version [8020d24] I (719) system_api: Base MAC address is not set I (721) system_api: read default base MAC address from EFUSE I (727) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 I (1061) NETWORK_ADAPTER: ESP Bluetooth MAC addr: b8:d6:1a:6c:69:6a I (1061) SDIO_SLAVE: Using SDIO interface
Hello @mantriyogesh Why do the following errors occur? insmod esp32_sdio.ko [ 1104.401391] esp_sdio: probe of mmc1:0001:1 failed with error -16 [ 1104.407978] esp_sdio: probe of mmc1:0001:2 failed with error -16
Log at host,
Dropping unsupported serial frame
can only comes at line 423:
Have you checked the file mentioned in https://github.com/espressif/esp-hosted/issues/212#issuecomment-1471255862
You might want to re-run rpi_init.sh (unload and cleanup the kernel driver and rebuild and load it back after above changes) Revert any timing related changes if you have done at ESP side.
i have define CONFIG_SUPPORT_ESP_SERIAL =1 in esp.h so line 423,will not appear, Now the question is [ 1104.401391] esp_sdio: probe of mmc1:0001:1 failed with error -16 [ 1104.407978] esp_sdio: probe of mmc1:0001:2 failed with error -16
my makefile is , obj-$(CONFIG_WLAN_VENDOR_ESP32) += esp32_sdio.o esp32_sdio-objs:=esp_sdio.o esp_bt.o main.o esp_sdio_api.o esp_stats.o esp_serial.o esp_rb.o and i have define CONFIG_SUPPORT_ESP_SERIAL =1 in esp.h ,This works the same way as CONFIG_SUPPORT_ESP_SERIAL = y
Current code changes please? $ git status $ git diff
Both ESP and Host side?
Also are you getting first event at Host (host log) will tell. It will be important to understand if the esp_probe is being called or not and where it is failing. similar issue and some explanation with logs addition: https://github.com/espressif/esp-hosted/issues/198#issuecomment-1463210942
I have used the latest code for esp side ,but where can i download esp bins file for host side?
esp bins file for host side
0.0.5 work with latest current master 81778f6
But as you need might want to change the timing, You will need to flash from source. It is easy to flash using source (and much usable as well).
If you need binaries only, Let me know. I will get you FG 0.0.5 based binaries with timing adjusted (as above mentioned in https://github.com/espressif/esp-hosted/issues/212#issuecomment-1469789618)
Regarding https://github.com/espressif/esp-hosted/issues/212#issuecomment-1471382604, Can you please localise by adding prints in esp_sdio.c, which call fails? Is the esp_probe() even entered once after loading module?
for the err esp_sdio: probe of mmc1:0001:1 failed with error -16 Refer to this address https://github.com/espressif/esp-hosted/issues/198#issuecomment-1463210942 ihave add log kernel log is : [ 47.200294] mmc1: queuing unknown CIS tuple 0x01 (3 bytes) [ 47.222244] mmc1: queuing unknown CIS tuple 0x1a (5 bytes) [ 47.234302] mmc1: queuing unknown CIS tuple 0x1b (8 bytes) [ 47.244269] esp_probe:741 [ 47.248749] esp_probe: ESP network device detected [ 47.255570] init_sdio_func:659 sdio_enable_func:ret:0 [ 47.264732] init_sdio_func:666 sdio_claim_irq:ret:0 [ 47.271818] [ 47.271818] Received INIT event from ESP32 peripheral [ 47.271834] EVENT: 0 [ 47.284631] esp_probe:749 init_sdio_func ret:2130723472 [ 47.290082] ESP peripheral capabilities: 0x1b [ 47.294453] Features supported are: [ 47.301294] init_context:317 [ 47.304636] esp_probe:756 init_context ret:0 [ 47.311408] WLAN [ 47.313625] BT/BLE [ 47.315992] - HCI over UART [ 47.357081] esp_probe:741 [ 47.359777] esp_sdio: probe of mmc1:0001:2 failed with error -22 [ 47.381836] - BT/BLE dual mode [ 47.385276] EVENT: 3 root@myd-y6ull14x14:~# esp side log is
I (627) spi_flash: flash io: dio W (631) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (646) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (659) NETWORK_ADAPTER: I (665) NETWORK_ADAPTER: ESP-Hosted-FG Firmware version :: 0.0.5 I (673) NETWORK_ADAPTER: Transport used :: SDIO + UART I (681) NETWORK_ADAPTER: I (689) NETWORK_ADAPTER: Supported features are: I (693) NETWORK_ADAPTER: - WLAN over SDIO I (697) ESP_BT: - BT/BLE I (699) ESP_BT: - HCI Over UART I (701) ESP_BT: - BT/BLE dual mode I (705) NETWORK_ADAPTER: capabilities: 0x1b I (717) BTDM_INIT: BT controller compile version [8020d24] I (719) system_api: Base MAC address is not set I (721) system_api: read default base MAC address from EFUSE I (727) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 I (1053) NETWORK_ADAPTER: ESP Bluetooth MAC addr: b8:d6:1a:6c:69:6a I (1053) SDIO_SLAVE: Using SDIO interface I (3688187) wifi:wifi driver task: 3ffdb308, prio:23, stack:6656, core=1 I (3688187) wifi:wifi firmware version: 03528e0 I (3688189) wifi:wifi certification version: v7.0 I (3688189) wifi:config NVS flash: disabled I (3688193) wifi:config nano formating: disabled I (3688197) wifi:Init data frame dynamic rx buffer num: 32 I (3688201) wifi:Init management frame dynamic rx buffer num: 32 I (3688205) wifi:Init management short buffer num: 32 I (3688209) wifi:Init dynamic tx buffer num: 64 I (3688213) wifi:Init static rx buffer size: 1600 I (3688217) wifi:Init static rx buffer num: 16 I (3688219) wifi:Init dynamic rx buffer num: 32 I (3688223) wifi_init: rx ba win: 6 I (3688225) wifi_init: tcpip mbox: 32 I (3688229) wifi_init: udp mbox: 6 I (3688233) wifi_init: tcp mbox: 6 I (3688235) wifi_init: tcp tx win: 5744 I (3688239) wifi_init: tcp rx win: 5744 I (3688243) wifi_init: tcp mss: 1440I (3688247) NETWORK_ADAPTER: Start Data Path m I (3688251) wifi_init: WiFi IRAM OP enabled I (3688255) wifi_init: WiFi RX IRAM OP enabled I (3688261) wifi:mode : null I (3688261) NETWORK_ADAPTER: Initial set up done I (3689265) slave_ctrl: event ESPInit
great! everything looks great. proceed ahead with c demo app.
But it doesn't seem to be running
printk(KERN_INFO "%s: ESP network device detected\n", func);
context = init_sdio_func(func);
printk(KERN_INFO "%s:%u init_sdio_func ret:%d\n",__func__,__LINE__,context);
if (!context) {
return -ENOMEM;
}
[ 47.304636] esp_probe:756 init_context ret:0
[ 47.311408] * WLAN
[ 47.313625] * BT/BLE
[ 47.315992] - HCI over UART
[ 47.357081] esp_probe:741
[ 47.359777] esp_sdio: probe of mmc1:0001:2 failed with error -22
[ 47.381836] - BT/BLE dual mode
[ 47.385276] EVENT: 3
shows your sdio is fine. It has received the init event as well.
Have you ported the rpi_init.sh to your platform as per stated in porting)guide?
esp_hosted_fg\host\linux\host_control\c_support
Makefile
SRC += $(DIR_COMMON)/protobuf-c/protobuf-c/protobuf-c.c
the file protobuf-c.c dos not exist,so i can't compile c_support
I don't understand what you mean? I'm not using Raspberry-PI, so I can't use./rpi_init.sh directly on my board I need to compile c_support first, then download it to the board and run c_support, protobuf-c.c was missing when I compiled c_support
I know that you are not using Raspberry Pi. But to build the code, you will still need full esp-hosted repo. That includes submodules.
Where you have ESP-Hosted cloned, please update submodules as shown command in picture. You should be able to find protobuf-c.c file after updating submodule.
rpi_init,sh is of course Raspberry Pi specific. But when you still need to port it as per your platform. Basically, remove the things that are raspberry Pi specific but keep generic linux. As I see you are interested in UART, still I suggest you to first get SDIO only working.
For UART, you may need to port rpi_init.sh to make you SoC UART GPIOs in correct alternate function. Please check https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/porting_guide.md#122-rpi_initsh
root@myd-y6ull14x14:~# ./test.out sudo ./test.out [ set_sta_mac_addr || get_sta_mac_addr || set_softap_mac_addr || get_softap_mac_addr || get_ap_scan_list || sta_connect || get_sta_config || sta_disconnect || set_wifi_mode || get_wifi_mode || reset_softap_vendor_ie || set_softap_vendor_ie || softap_start || get_softap_config || softap_connected_sta_list || softap_stop || set_wifi_powersave_mode || get_wifi_powersave_mode || set_wifi_max_tx_power || get_wifi_curr_tx_power || ota <ESP 'network_adapter.bin' path> ]
For example, sudo ./test.out set_sta_mac_addr root@myd-y6ull14x14:~# ./test.out get_wifi_mode Enable heartbeat with duration 20 Heartbeat operation successful wifi mode is : none
Requested operation complete Sleeping for some time just to showcase heartbeat 2021-12-07 11:33:25 > App EVENT: Heartbeat event [1]
^C Clean-up and exit Disable Heartbeat Heartbeat operation successful root@myd-y6ull14x14:~# ./test.out get_ap_scan_list Enable heartbeat with duration 20 Heartbeat operation successful Number of available APs is 1 0) ssid "zhoudaye" bssid "f0:b4:29:6e:bc:f6" rssi "-91" channel "2" auth mode "4"
Requested operation complete Sleeping for some time just to showcase heartbeat 2021-12-07 11:34:24 > App EVENT: Heartbeat event [1] 2021-12-07 11:34:49 > App EVENT: Heartbeat event [1] Disable Heartbeat
Great. You can now integrate the APIs into your application and control the ESP-Hosted right through your application.
Please do check ctrl_apis.md and serial_apis.md for all APIs from https://github.com/espressif/esp-hosted/tree/master/esp_hosted_fg/docs/common
hi,@mantriyogesh I scanned the wifi ssid using c_support!Thank you very much!
okey, Is ap hotspot supported?
Yes it is. You can check all supported APIs in ctrl_api.md.
If the things are as per your expectation, please help to close the issue. Should you face anymore problems please re-open the same issue.
insmod esp32_sdio.ko,can not run esp_probe function i have update dtsi &usdhc2 {
address-cells = <1>;
// no-1-8-v; / force 3.3V VIO / non-removable; pm-ignore-notify; cap-power-off-card; // /delete-property/ wakeup-source; status = "okay";
esp32: esp32@1 { reg = <1>; compatible = "esp32_sdio"; gpios = <&gpio3 4 GPIO_ACTIVE_LOW>; }; }; pinctrl_wifi: wifigrp { fsl,pins = < MX6UL_PAD_LCD_RESET__GPIO3_IO04 0x1b0b0
pinctrl_usdhc2_alt: usdhc2grp_alt { fsl,pins = < MX6UL_PAD_LCD_DATA18USDHC2_CMD 0x17051 MX6UL_PAD_LCD_DATA19USDHC2_CLK 0x17051 MX6UL_PAD_LCD_DATA20USDHC2_DATA0 0x17051 MX6UL_PAD_LCD_DATA21USDHC2_DATA1 0x17051 MX6UL_PAD_LCD_DATA22USDHC2_DATA2 0x17051 MX6UL_PAD_LCD_DATA23USDHC2_DATA3 0x17051
insmod esp32_sio.ko can restart esp32 ,because i have config static int resetpin = 68; the esp32 log is I (647) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (757) phy: phy_version: 4390, 6b3c1f2, Sep 10 2020, 15:09:07, 0, 0 I (1227) SDIO_SLAVE: Using SDIO interface I (1247) wifi:wifi driver task: 3ffde798, prio:23, stack:6656, core=0 I (1247) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1247) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1257) wifi:wifi firmware version: 6e1f9e4 I (1257) wifi:config NVS flash: disabled I (1267) wifi:config nano formating: disabled I (1267) wifi:Init data frame dynamic rx buffer num: 32 I (1277) wifi:Init management frame dynamic rx buffer num: 32 I (1277) wifi:Init management short buffer num: 32 I (1287) wifi:Init dynamic tx buffer num: 32 I (1287) wifi:Init static rx buffer size: 1600 I (1287) wifi:Init static rx buffer num: 10 I (1297) wifi:Init dynamic rx buffer num: 32 I (1307) wifi:mode : null I (1307) NETWORK_ADAPTER: Initial set up done kernel log dmesg |grep usdh [2.313463] mmcl: SDHCI ontroller on 2194000.usdhc [2194000.usdhc] using ADMA and /sys/bus/sdio/devices nothing