Closed pasco1995 closed 3 months ago
Additional Info:
Thanks a lot, for sharing all the detailed logs. I will check these and get back to you.
I had checked the logs and I could see that you face error in reading data from sdio , 'Rx large packet' with increasing length.
Bootup event (first host rx) and get mac seems passed (subsequent SDIO rx/tx passed)
Is this wpa_supplicant your only one instance?
How is your setup connected? With Jumper wires? How big is length? Setup picture?
External pull-ups connected? Please refer to Porting_Guide for general precautions to be taken while porting
most importantly, host is going to check how much data the slave has written. It will issue get_read_len before actual read, where you see changing, gradually increasing read length. But has the slave actually written that much and that big packets? host: https://github.com/espressif/esp-hosted/blob/043e95e2f6fa67b8e232f26a4ea93a2cef07190d/esp_hosted_ng/host/sdio/esp_sdio.c#L392
Once (2) is confirmed, Does the host tx reach to the ESP, I do not see that in esp logs. Can you please verify rx / tx both sides are fine?
slave tx:
slave rx:
host tx:
esp_info("new tx\n");
esp_hex_dump("host tx: ", tx_skb->data, tx_skb->len);
host rx:
esp_info("new rx\n");
esp_hex_dump("host rx: ", skb->data, len+offset);
Thanks for your reply!
(1) yes, the wpa_supplicant is the only instance.
(2) yes, jumper wires (~ 6 cm).
(3) yes, pullups are present with 47 kOhm each (Data 0 - 3, CMD).
(4) (5) I activated the logs for host and slave. It seems that slave really sends that much data (while scan request) :
Hello @pasco1995 ,
As you are using jumper wires and SDIO faces signal integrity issues while working on wires, can you please try below:
Use SDIO in 1-bit mode.
Lower the SDIO freq to 5MHz
You can use module parameter clockspeed
in MHz, also to do this:
https://github.com/espressif/esp-hosted/blob/3d4f2f7b5913e951a3af2083c117a88d3638e429/esp_hosted_ng/host/main.c#L36
https://github.com/espressif/esp-hosted/blob/3d4f2f7b5913e951a3af2083c117a88d3638e429/esp_hosted_ng/host/sdio/esp_sdio.c#L804
You can try a workaround in another branch, feature/esp_as_host_mcu
, to mandate, send or receive always receive 1 block at a time.
Although it is not Linux branch, the SDIO driver should logically be similar.
https://github.com/espressif/esp-hosted/blob/504f4f203c27d5a9e5e3bb1b34f7101e43cd8f59/host/port/esp_hosted_config.h#L141-L142
Try in this order and stop once working: (1) only, (2) only, (1) & (2) together, (3) only (1) (2) & (3) together
Hi @mantriyogesh,
alle the logs above are captured with clockspeed=1
.
How do I configure the 1 bit mode ? Do I have to change the ESP32 software or just on the Linux side (device tree pin configuration, kernel module).
Only device tree at Linux.
bus-width = <1>;
https://wiki.st.com/stm32mpu/wiki/SDMMC_device_tree_configuration#
Hi @mantriyogesh
the 1 bit Mode ist working!
The iperf speed is not changing with the clock, which is little surprising.
Can you please try the Raw_TP_Testing.md test for tx and rx?
Here are the logs:
The throughput from Host to ESP is higher. (Comparable with ESP32 SPI throughput)
Host tx would be always little higher than host rx. But the difference you experience is extremely huge. There is some issue in sdio host rx.
Possibly, the isr performing slow for your Linux base sdio driver?
Do you have analyser?
Hi @mantriyogesh,
we made some progress - the 4 bit mode ist working on our selfmade PCB! But we got no better performance results. Is is the same as for the 1 bit mode - around 1.2 Mbit/s @10MHz (measured wir iperf).
One single time we reached a performance of 7.5 Mbit/s @10MHz (measured with iperf). I changed the device tree, and added cap-sdio-irq;
to the sdmmc node:
&sdmmc2{
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc2_pins_mx>;
pinctrl-1 = <&sdmmc2_opendrain_pins_mx>;
pinctrl-2 = <&sdmmc2_sleep_pins_mx>;
status = "okay";
broken-cd;
bus-width = <4>;
vmmc-supply = <&v3v3>;
cap-sdio-irq;
esp32:esp_sdio@0{
compatible = "espressif,esp_sdio";
};
};
The strange thing about that, this worked only once. After I rmmod and insmod the kernel module with same arguments. I only got this logs (without espsta0 as interface showing up):
sudo insmod /home/kernel_modules/esp32_sdio.ko resetpin=62 clockspeed=10
[ 82.691686] esp32_sdio: probe of mmc0:0001:1 failed with error -110
[ 82.696794] esp32_sdio: probe of mmc0:0001:2 failed with error -110
[ 83.042408] mmc0: card 0001 removed
[ 84.292159] mmc0: queuing unknown CIS tuple 0x01 [d9 01 ff] (3 bytes)
[ 84.305669] mmc0: queuing unknown CIS tuple 0x1a [01 01 00 02 07] (5 bytes)
[ 84.314419] mmc0: queuing unknown CIS tuple 0x1b [c1 41 30 30 ff ff ff ff] (8 bytes)
[ 84.328001] mmc0: new SDIO card at address 0001
[ 84.337087] esp32_sdio:esp_probe: ESP network device detected
[ 84.349005] esp32_sdio:esp_probe: Hz: 10000000, min: 24438, max: 30000000
[ 84.349043] esp32_sdio:esp_probe: SDIO: 10 MHz
[ 84.356389] esp32_sdio:get_firmware_data: Rx Pre ====== 0
[ 84.366627] esp32_sdio:get_firmware_data: Rx Pos ====== 0
[ 84.370853] esp32_sdio:get_firmware_data: Tx Pre ====== 0
[ 84.377700] esp32_sdio:get_firmware_data: Tx Pos ====== 10
[ 84.382957] esp32_sdio:esp_probe: after init context
[ 84.383308] esp32_sdio:esp_probe: ESP SDIO probe completed
[ 84.398944] esp32_sdio: probe of mmc0:0001:2 failed with error -22
Without the cap-sdio-irq
setting in device tree I get following logs:
sudo insmod /home/kernel_modules/esp32_sdio.ko resetpin=62 clockspeed=10
[ 46.697603] esp32_sdio: loading out-of-tree module taints kernel.
[ 46.921780] esp32_sdio: probe of mmc0:0001:1 failed with error -110
[ 46.927745] esp32_sdio: probe of mmc0:0001:2 failed with error -110
[ 47.042319] mmc0: card 0001 removed
[ 48.286297] mmc0: queuing unknown CIS tuple 0x01 [d9 01 ff] (3 bytes)
[ 48.298381] mmc0: queuing unknown CIS tuple 0x1a [01 01 00 02 07] (5 bytes)
[ 48.309646] mmc0: queuing unknown CIS tuple 0x1b [c1 41 30 30 ff ff ff ff] (8 bytes)
[ 48.323200] mmc0: new SDIO card at address 0001
[ 48.331975] esp32_sdio:esp_probe: ESP network device detected
[ 48.345840] esp32_sdio:esp_probe: Hz: 10000000, min: 24438, max: 30000000
[ 48.345876] esp32_sdio:esp_probe: SDIO: 10 MHz
[ 48.353480] esp32_sdio:get_firmware_data: Rx Pre ====== 0
[ 48.363587] esp32_sdio:get_firmware_data: Rx Pos ====== 0
[ 48.367857] esp32_sdio:get_firmware_data: Tx Pre ====== 0
[ 48.374994] esp32_sdio:get_firmware_data: Tx Pos ====== 10
[ 48.379175] esp32_sdio:esp_probe: after init context
[ 48.379568] esp32_sdio:esp_probe: ESP SDIO probe completed
[ 48.397931] esp32_sdio: probe of mmc0:0001:2 failed with error -22
[ 48.951516] esp32_sdio:process_event_esp_bootup: Bootup Event tag: 3
[ 48.956576] esp32_sdio:esp_validate_chipset: Chipset=ESP32 ID=00 detected over SDIO
[ 48.964529] esp32_sdio:process_event_esp_bootup: Bootup Event tag: 0
[ 48.970542] esp32_sdio:process_event_esp_bootup: Bootup Event tag: 1
[ 48.977442] esp32_sdio:process_fw_data: ESP chipset's last reset cause:
[ 48.983586] esp32_sdio:print_reset_reason: POWERON_RESET
[ 48.988788] esp32_sdio:check_esp_version: ESP Firmware version: 1.0.3
[ 48.999759] esp32_sdio:esp_reg_notifier: Driver init is ongoing
[ 49.351141] esp32_sdio:init_bt: ESP Bluetooth init
[ 49.362156] esp32_sdio:print_capabilities: Capabilities: 0x1d. Features supported are:
[ 49.368652] esp32_sdio:print_capabilities: * WLAN on SDIO
[ 49.374345] esp32_sdio:print_capabilities: * BT/BLE
[ 49.379302] esp32_sdio:print_capabilities: - HCI over SDIO
[ 49.385290] esp32_sdio:print_capabilities: - BT/BLE dual mode
[ 49.900545] esp32_sdio:esp_set_mac_address: 372 1e:07:f7:c9:c9:11
[...]
-> espsta0 is showing up as interface.
You might have to check your base Linux kernel driver for your SoC, how cap-sdio-irq
is handled.
Another property we recommend using,broken-cd
.
Have you enabled any debug logging? High debug prints (at esp and/or host) would slow down throughput a lot.
in general, if the ISR is hooked to Linux SDIO driver, should register the ISR handler by defaultt. See https://github.com/espressif/esp-hosted/blob/040cfdb35db4270c443146b19febf6c59266d419/esp_hosted_ng/host/sdio/esp_sdio.c#L698-L708
Here, esp_handle_isr() is responsible for handling interrupts on SDIO D1 line.
Hi,
I found the bug in the PL18x Driver, which I am using for MMC/SDIO Communication with the ESP32.
When setting the cap-sdio-irq
setting in the device tree, the driver sets the config MMC_CAP2_SDIO_IRQ_NOTHREAD
to true. Therefore, there is no thread created for the handling of the interrupts. When disabling MMC_CAP2_SDIO_IRQ_NOTHREAD
the thread is created and performance is as expected (between 10 and 12 Mbit/s).
Thank you @mantriyogesh for your help and support!
Happy to help. :-)
Although, the Over-The-Air throughput is depending upon a lot of factors, a generally good OTA performance should exceed than the throughput numbers you have reached.
Throughput improvements:
What is SDIO clock you are using? Current stable sdio clock can be found out using:
$ sudo cat /sys/kernel/debug/mmc1/ios
The debug prints disabled (specially per packet prints)
Hi @mantriyogesh,
the clockspeed is at 50 MHz and Logs are all disabled - in kernel module and esp firmware.
I'm using STM32MP135f-dk Development Board with ESP32 as Wifi Module. I removed the Murata Wifi/BT Module (sdmmc2 in Device Tree) and attached the ESP32 with Data[0-3], CMD, CLK, Reset, GND. ESP32 is powered via MicroUSB Cable,
Currently im using the master Branch of ESP-Hosted NG with deactivated bluetooth. I tested with RaspberryPi (3 B+) with same ESP32 SW (Wifi over SDIO) and it worked correctly.
On the STM32 Board, when it comes to scanning request, the reading of data packets fail. Du you have any advice?
Here are the logs:
ESP32 logs
``` I (30) boot: ESP-IDF d3c99ed3-dirty 2nd stage bootloader I (30) boot: compile time Feb 23 2024 10:39:08 I (30) boot: Multicore bootloader I (35) boot: chip revision: v3.0 I (38) boot.esp32: SPI Speed : 40MHz I (43) boot.esp32: SPI Mode : DIO I (48) boot.esp32: SPI Flash Size : 4MB I (52) boot: Enabling RNG early entropy source... I (58) boot: Partition Table: I (61) boot: ## Label Usage Type ST Offset Length I (68) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (76) boot: 1 otadata OTA data 01 00 0000d000 00002000 I (83) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (91) boot: 3 factory factory app 00 00 00010000 00100000 I (98) boot: 4 ota_0 OTA app 00 10 00110000 00100000 I (106) boot: 5 ota_1 OTA app 00 11 00210000 00100000 I (113) boot: End of partition table I (118) boot: Defaulting to factory image I (122) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1e5d4h (124372) map I (176) esp_image: segment 1: paddr=0002e5fc vaddr=3ffb0000 size=01a1ch ( 6684) load I (179) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=70460h (459872) map I (348) esp_image: segment 3: paddr=000a0488 vaddr=3ffb1a1c size=01d70h ( 7536) load I (351) esp_image: segment 4: paddr=000a2200 vaddr=40080000 size=15d34h ( 89396) load I (401) boot: Loaded app from partition at offset 0x10000 I (401) boot: Disabling RNG early entropy source... I (413) cpu_start: Multicore app I (413) cpu_start: Pro cpu up. I (414) cpu_start: Starting app cpu, entry point is 0x400813f8 I (0) cpu_start: App cpu up. I (433) cpu_start: Pro cpu start user code I (433) cpu_start: cpu freq: 240000000 Hz I (433) cpu_start: Application information: I (438) cpu_start: Project name: network_adapter I (444) cpu_start: App version: release/ng-v1.0.2-188-gcdd6cb6- I (451) cpu_start: Compile time: Feb 23 2024 10:39:16 I (457) cpu_start: ELF file SHA256: 8e92ab07016559e6... I (463) cpu_start: ESP-IDF: d3c99ed3-dirty I (468) cpu_start: Min chip rev: v0.0 I (473) cpu_start: Max chip rev: v3.99 I (478) cpu_start: Chip rev: v3.0 I (483) heap_init: Initializing. RAM available for dynamic allocation: I (490) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (496) heap_init: At 3FFC1650 len 0001E9B0 (122 KiB): DRAM I (502) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (509) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (515) heap_init: At 40095D34 len 0000A2CC (40 KiB): IRAM I (523) spi_flash: detected chip: gd I (525) spi_flash: flash io: dio W (529) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (543) app_start: Starting scheduler on CPU0 I (548) app_start: Starting scheduler on CPU1 I (548) main_task: Started on CPU0 I (558) main_task: Calling app_main() I (561) stats: ********************************************************************* I (569) stats: ESP-Hosted Firmware version :: 1.0.3 I (578) stats: Transport used :: SDIO only I (586) stats: ********************************************************************* I (595) FW_MAIN: Supported features are: I (599) FW_MAIN: - WLAN over SDIO I (603) FW_MAIN: Capabilities: 0x1 I (639) wifi:wifi driver task: 3ffc7a24, prio:23, stack:6656, core=1 I (641) wifi:wifi firmware version: fddc5e5 I (642) wifi:wifi certification version: v7.0 I (643) wifi:config NVS flash: disabled I (646) wifi:config nano formating: disabled I (650) wifi:Init data frame dynamic rx buffer num: 40 I (655) wifi:Init management frame dynamic rx buffer num: 40 I (660) wifi:Init management short buffer num: 32 I (665) wifi:Init dynamic tx buffer num: 64 I (669) wifi:Init static rx buffer size: 1600 I (673) wifi:Init static rx buffer num: 16 I (676) wifi:Init dynamic rx buffer num: 40 I (681) wifi_init: rx ba win: 32 I (684) wifi_init: tcpip mbox: 32 I (688) wifi_init: udp mbox: 6 I (692) wifi_init: tcp mbox: 6 I (696) wifi_init: tcp tx win: 5744 I (700) wifi_init: tcp rx win: 5744 I (704) wifi_init: tcp mss: 1440 I (708) wifi_init: WiFi IRAM OP enabled I (712) wifi_init: WiFi RX IRAM OP enabled I (718) FW_SDIO_SLAVE: Using SDIO interface I (723) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (1400) FW_MAIN: Start Data Path I (1732) FW_SDIO_SLAVE: last reset cause: 10x I (1749) FW_MAIN: Initial set up done I (1749) main_task: Returned from app_main() I (1921) H -> S: 0x3ffb45ac 01 00 00 00 00 00 00 00 |........| I (1921) FW_MAIN: INIT Interface command I (1925) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 I (2020) wifi:mode : sta (e0:e2:e6:7b:d5:88) I (2021) wifi:enable tsf I (2021) FW_CMD: Wifi Sta mode set I (2100) H -> S: 0x3ffb4dac 03 00 00 00 00 00 00 00 |........| I (2100) FW_MAIN: Get MAC command ```Host Boot Logs
``` NOTICE: CPU: STM32MP135F Rev.Y NOTICE: Model: STMicroelectronics STM32MP135F-DK Discovery Board, NGW tfa NOTICE: Board: MB1635 Var1.0 Rev.E-02 INFO: PMIC version = 0x21 INFO: Reset reason (0x34): INFO: Pad Reset from NRST INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe0000 INFO: FCONF: Reading firmware configuration information for: stm32mp_io INFO: Using SDMMC INFO: Instance 1 INFO: Boot used partition fsbl1 NOTICE: BL2: v2.8-stm32mp1-r1.0(debug):() NOTICE: BL2: Built : 10:10:03, Feb 8 2024 INFO: BL2: Doing platform setup INFO: RAM: DDR3-1066 bin F 1x4Gb 533MHz v1.53 INFO: Memory size = 0x20000000 (512 MB) INFO: BL2: Loading image id 1 INFO: Loading image id=1 at address 0x30006000 INFO: Image id=1 loaded: 0x30006000 - 0x30006236 INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x30006000 INFO: FCONF: Reading firmware configuration information for: mce_config INFO: FCONF: Reading firmware configuration information for: dyn_cfg INFO: FCONF: Reading firmware configuration information for: stm32mp1_firewall INFO: BL2: Loading image id 4 INFO: Loading image id=4 at address 0xde000000 INFO: Image id=4 loaded: 0xde000000 - 0xde00001c INFO: OPTEE ep=0xde000000 INFO: OPTEE header info: INFO: magic=0x4554504f INFO: version=0x2 INFO: arch=0x0 INFO: flags=0x0 INFO: nb_images=0x1 INFO: BL2: Loading image id 8 INFO: Loading image id=8 at address 0xde000000 INFO: Image id=8 loaded: 0xde000000 - 0xde0693a8 INFO: BL2: Loading image id 2 INFO: Loading image id=2 at address 0xc0400000 INFO: Image id=2 loaded: 0xc0400000 - 0xc040f8f0 INFO: BL2: Skip loading image id 16 INFO: BL2: Loading image id 5 INFO: Loading image id=5 at address 0xc0000000 INFO: Image id=5 loaded: 0xc0000000 - 0xc00e866c NOTICE: BL2: Booting BL32 INFO: Entry point address = 0xde000000 INFO: SPSR = 0x1d3 I/TC: Early console on UART#4 I/TC: I/TC: Embedded DTB found I/TC: OP-TEE version: Unknown_3.19 (gcc version 12.2.0 (GCC)) #1 Thu Feb 8 10:20:40 UTC 2024 arm I/TC: WARNING: This OP-TEE configuration might be insecure! I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html I/TC: Primary CPU initializing I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp135f-dk.dts I/TC: DTB enables console (non-secure) I/TC: Primary CPU switching to normal world boot optee optee: OP-TEE: revision 3.19 U-Boot 2022.10-stm32mp-r1 (Oct 03 2022 - 19:25:32 +0000) CPU: STM32MP135F Rev.Y Model: STMicroelectronics STM32MP135F-DK Discovery Board Board: stm32mp1 in trusted mode (st,stm32mp135f-dk) Board: MB1635 Var1.0 Rev.E-02 DRAM: 512 MiB optee optee: OP-TEE: revision 3.19 Clocks: - MPU : 1000 MHz - AXI : 266.500 MHz - PER : 24 MHz - DDR : 533 MHz Core: 260 devices, 40 uclasses, devicetree: board WDT: Started watchdog with servicing (32s timeout) NAND: 0 MiB MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1 Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: eth0: eth1@5800a000, eth1: eth2@5800e000 Hit any key to stop autoboot: 0 Boot over mmc0! switch to partitions #0, OK mmc0 is current device Scanning mmc 0:8... Found /mmc0_extlinux/stm32mp135f-dk_extlinux.conf Retrieving file: /mmc0_extlinux/stm32mp135f-dk_extlinux.conf Retrieving file: /splash_landscape.bmp Select the boot mode 1: OpenSTLinux 2: stm32mp135f-ngw-mx Enter choice: 2 2: stm32mp135f-ngw-mx Retrieving file: /uImage Retrieving file: /st-image-resize-initrd append: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200 Retrieving file: /stm32mp135f-ngw-mx.dtb ## Booting kernel from Legacy Image at c2000000 ... Image Name: Linux-6.1.28 Created: 2023-05-11 14:04:52 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 8213192 Bytes = 7.8 MiB Load Address: c2000040 Entry Point: c2000040 Verifying Checksum ... OK ## Flattened Device Tree blob at c4000000 Booting using the fdt blob at 0xc4000000 XIP Kernel Image Loading Ramdisk to cfa0c000, end cffffcd7 ... OK Loading Device Tree to cf9fa000, end cfa0b3bf ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 6.1.28 (oe-user@oe-host) (arm-ostl-linux-gnueabi-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT Thu May 11 14:04:52 UTC 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: STMicroelectronics STM32MP135F-DK STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mp1-v23.06.21 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 64 MiB at 0xd8800000 [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000c0000000-0x00000000dcffffff] [ 0.000000] HighMem [mem 0x00000000dd000000-0x00000000dfffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00000000c0000000-0x00000000dcdfffff] [ 0.000000] node 0: [mem 0x00000000dce00000-0x00000000dcfeffff] [ 0.000000] node 0: [mem 0x00000000dcff0000-0x00000000dcffffff] [ 0.000000] node 0: [mem 0x00000000dd000000-0x00000000dfffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000dfffffff] [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.0 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: MIGRATE_INFO_TYPE not supported. [ 0.000000] psci: SMC Calling Convention v1.1 [ 0.000000] percpu: Embedded 17 pages/cpu s38228 r8192 d23212 u69632 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130028 [ 0.000000] Kernel command line: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200 [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] Memory: 377044K/524288K available (12288K kernel code, 1371K rwdata, 3636K rodata, 1024K init, 235K bss, 81708K reserved, 65536K cma-reserved, 0K highmem) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] trace event string verifier disabled [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Tracing variant of 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] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000018] Switching to timer-based delay loop, resolution 41ns [ 0.000793] Console: colour dummy device 80x30 [ 0.000860] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.000882] pid_max: default: 32768 minimum: 301 [ 0.001165] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.001193] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.002372] CPU: Testing write buffer coherency: ok [ 0.002908] /cpus/cpu@0 missing clock-frequency property [ 0.002952] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.004739] cblist_init_generic: Setting adjustable number of callback queues. [ 0.004761] cblist_init_generic: Setting shift to 0 and lim to 1. [ 0.005006] cblist_init_generic: Setting shift to 0 and lim to 1. [ 0.005273] Setting up static identity map for 0xc0100000 - 0xc0100060 [ 0.005589] rcu: Hierarchical SRCU implementation. [ 0.005602] rcu: Max phase no-delay instances is 1000. [ 0.007233] smp: Bringing up secondary CPUs ... [ 0.007251] smp: Brought up 1 node, 1 CPU [ 0.007263] SMP: Total of 1 processors activated (48.00 BogoMIPS). [ 0.007273] CPU: All CPU(s) started in SVC mode. [ 0.008244] devtmpfs: initialized [ 0.022658] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.022989] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.023025] futex hash table entries: 256 (order: 2, 16384 bytes, linear) [ 0.025903] pinctrl core: initialized pinctrl subsystem [ 0.028152] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.030793] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.032364] thermal_sys: Registered thermal governor 'step_wise' [ 0.032527] cpuidle: using governor menu [ 0.032857] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 0 [ 0.032879] hw-breakpoint: CPU 0 failed to disable vector catch [ 0.033367] Serial: AMBA PL011 UART driver [ 0.036373] stm32-pm-domain pm_domain: domain core-ret-power-domain registered [ 0.036409] stm32-pm-domain pm_domain: subdomain core-power-domain registered [ 0.036418] stm32-pm-domain pm_domain: domains probed [ 0.046906] /soc/interrupt-controller@5000d000: bank0 [ 0.046941] /soc/interrupt-controller@5000d000: bank1 [ 0.046955] /soc/interrupt-controller@5000d000: bank2 [ 0.051112] platform 49000000.usb: Fixed dependency cycle(s) with /soc/i2c@40012000/typec@53/connector [ 0.055719] platform 5a000000.dcmipp: Fixed dependency cycle(s) with /soc/etzpc@5c007000/i2c@4c006000/stmipi@14 [ 0.062591] platform 5a001000.display-controller: Fixed dependency cycle(s) with /panel-rgb [ 0.077215] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible. [ 0.096750] SCSI subsystem initialized [ 0.097716] usbcore: registered new interface driver usbfs [ 0.097783] usbcore: registered new interface driver hub [ 0.097863] usbcore: registered new device driver usb [ 0.098358] pps_core: LinuxPPS API ver. 1 registered [ 0.098372] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo GiomettiHost Logs (after starting esp_32_sdio.ko)
``` insmod esp32_sdio.ko clockspeed=1 [ 93.028756] mmc1: card 0001 removed [ 93.070334] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 93.095966] mmc1: error -84 whilst initialising SDIO card [ 93.106526] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 93.126536] mmc1: error -84 whilst initialising MMC card [ 93.165161] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 93.185739] mmc1: error -84 whilst initialising SDIO card [ 93.198637] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 93.218582] mmc1: error -84 whilst initialising MMC card [ 93.258849] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 93.280758] mmc1: error -84 whilst initialising SDIO card [ 94.319415] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 94.361461] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 94.368244] mmci-pl18x 58007000.mmc: exceeding card's volts [ 94.419131] mmc1: error -84 whilst initialising SDIO card [ 94.430656] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 94.465723] mmc1: error -84 whilst initialising MMC card [ 95.540909] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 95.563036] mmc1: error -110 whilst initialising SDIO card [ 95.604357] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 95.611225] mmci-pl18x 58007000.mmc: exceeding card's volts [ 95.631924] mmc1: error -84 whilst initialising SDIO card [ 95.639991] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 95.646743] mmci-pl18x 58007000.mmc: no support for card's volts [ 95.658060] mmc1: error -22 whilst initialising MMC card [ 95.698294] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 95.705022] mmci-pl18x 58007000.mmc: exceeding card's volts [ 95.807442] mmc1: error -84 whilst initialising SDIO card [ 96.586659] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 96.593498] mmci-pl18x 58007000.mmc: exceeding card's volts [ 96.662075] mmc1: error -84 whilst initialising MMC card [ 96.706605] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 96.744721] mmc1: error -84 whilst initialising SDIO card [ 96.772055] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 96.797864] mmc1: error -84 whilst initialising MMC card [ 97.859865] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 97.880931] mmc1: error -84 whilst initialising SDIO card [ 97.888999] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 97.907938] mmc1: error -84 whilst initialising MMC card [ 97.944868] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 97.968994] mmc1: error -84 whilst initialising SDIO card [ 97.981609] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 98.001374] mmc1: error -84 whilst initialising MMC card [ 98.043113] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 98.049944] mmci-pl18x 58007000.mmc: exceeding card's volts [ 98.171837] mmc1: error -84 whilst initialising SDIO card [ 98.187291] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 98.218207] mmc1: error -84 whilst initialising MMC card [ 98.261519] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 98.328018] mmc1: error -84 whilst initialising SDIO card [ 98.348031] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 98.354796] mmci-pl18x 58007000.mmc: exceeding card's volts [ 98.616704] mmc1: error -84 whilst initialising MMC card [ 99.700785] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 99.707613] mmci-pl18x 58007000.mmc: exceeding card's volts [ 99.729777] mmc1: error -110 whilst initialising SDIO card [ 99.737783] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 99.756152] mmc1: error -110 whilst initialising MMC card [ 99.795836] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 99.802690] mmci-pl18x 58007000.mmc: exceeding card's volts [ 99.837357] mmc1: error -84 whilst initialising SDIO card [ 99.844455] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 99.865906] mmc1: error -84 whilst initialising MMC card [ 99.904994] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 99.927737] mmc1: error -84 whilst initialising SDIO card [ 100.287174] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 101.396802] mmc1: error -84 whilst initialising MMC card [ 101.436940] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 101.476109] mmc1: error -84 whilst initialising SDIO card [ 101.487970] mmci-pl18x 58007000.mmc: card claims to support voltages below defined range [ 101.494881] mmci-pl18x 58007000.mmc: exceeding card's volts [ 101.545815] mmc1: error -84 whilst initialising MMC card [ 102.676577] mmc1: queuing unknown CIS tuple 0x01 [d9 01 ff] (3 bytes) [ 102.691868] mmc1: queuing unknown CIS tuple 0x1a [01 01 00 02 07] (5 bytes) [ 102.700706] mmc1: queuing unknown CIS tuple 0x1b [c1 41 30 30 ff ff ff ff] (8 bytes) [ 102.715557] mmc1: new SDIO card at address 0001 [ 102.727190] esp32_sdio:esp_probe: ESP network device detected [ 102.747180] esp32_sdio:esp_probe: Hz: 1000000, min: 24438, max: 50000000 [ 102.747220] esp32_sdio:esp_probe: SDIO: 1 MHz [ 102.752816] esp32_sdio:get_firmware_data: Rx Pre ====== 0 [ 102.765106] esp32_sdio:get_firmware_data: Rx Pos ====== 0 [ 102.775713] esp32_sdio:get_firmware_data: Tx Pre ====== 0 [ 102.781769] esp32_sdio:get_firmware_data: Tx Pos ====== 10 [ 102.786004] esp32_sdio:esp_probe: after init context [ 102.788063] esp32_sdio:esp_probe: ESP SDIO probe completed [ 102.803017] esp32_sdio: probe of mmc1:0001:2 failed with error -22 [ 103.137076] esp32_sdio:read_packet: Len from Slave: 35 [ 103.137351] next rx pkt-> [ 103.143663] spi_rx: 9d468b64: 03 00 00 00 17 00 0c 00 00 00 00 00 01 00 10 00 ................ [ 103.156093] spi_rx: 722d9f26: 0f 00 00 00 03 01 00 00 01 01 01 07 01 00 03 10 ................ [ 103.164967] spi_rx: c458e52e: 00 00 00 ... [ 103.173726] esp32_sdio:process_event_esp_bootup: Bootup Event tag: 3 [ 103.178916] esp32_sdio:esp_validate_chipset: Chipset=ESP32 ID=00 detected over SDIO [ 103.186532] esp32_sdio:process_event_esp_bootup: Bootup Event tag: 0 [ 103.192755] esp32_sdio:process_event_esp_bootup: Bootup Event tag: 1 [ 103.199145] esp32_sdio:process_fw_data: ESP chipset's last reset cause: [ 103.205654] esp32_sdio:print_reset_reason: RTCWDT_RTC_RESET [ 103.211345] esp32_sdio:check_esp_version: ESP Firmware version: 1.0.3 [ 103.217883] esp_commands_setup:1550 exiting [ 103.222282] esp32_sdio:esp_reg_notifier: Driver init is ongoing [ 103.228299] cmd_init_interface:1239 [ 103.231305] cmd_init_interface:1258 [ 103.234859] wait_and_decode_cmd_resp:187 [ 103.256016] esp_cmd_work:326 [ 103.417066] esp32_sdio:read_packet: Len from Slave: 20 [ 103.417312] next rx pkt-> [ 103.423763] spi_rx: 879647c9: 00 00 02 00 08 00 0c 00 00 00 00 00 01 02 00 00 ................ [ 103.435803] spi_rx: e1b60f04: 00 00 00 00 .... [ 103.443585] cmd_init_interface:1260 exiting [ 103.446670] wait_and_decode_cmd_resp:187 [ 103.453097] esp_cmd_work:326 [ 103.507057] esp32_sdio:read_packet: Len from Slave: 28 [ 103.507316] next rx pkt-> [ 103.513771] spi_rx: 879647c9: 00 00 02 00 10 00 0c 00 00 00 00 00 03 02 06 00 ................ [ 103.525611] spi_rx: e1b60f04: 00 00 00 00 e0 e2 e6 7b d5 88 00 00 .......{.... [ 103.535790] esp32_sdio:print_capabilities: Capabilities: 0x1. Features supported are: [ 103.542511] esp32_sdio:print_capabilities: * WLAN on SDIO [ 103.557314] esp_cmd_work:326 ```Host Logs (ifconfig)
``` ifconfig espsta0 up ifconfig end0 Link encap:Ethernet HWaddr 10:E7:7A:E3:5E:F9 inet addr:172.18.0.187 Bcast:172.18.0.255 Mask:255.255.255.0 inet6 addr: fe80::12e7:7aff:fee3:5ef9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3233 errors:0 dropped:787 overruns:0 frame:0 TX packets:179 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:377771 (368.9 KiB) TX bytes:37802 (36.9 KiB) Interrupt:50 Base address:0x4000 end1 Link encap:Ethernet HWaddr 10:E7:7A:E3:5E:FA UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:52 espsta0 Link encap:Ethernet HWaddr E0:E2:E6:7B:D5:88 inet6 addr: fe80::e2e2:e6ff:fe7b:d588/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:18 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:208 errors:0 dropped:0 overruns:0 frame:0 TX packets:208 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13949 (13.6 KiB) TX bytes:13949 (13.6 KiB) usb0 Link encap:Ethernet HWaddr 6A:CF:6B:E3:EE:6C UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) ```Host Logs (wpa_supplicant)
``` wpa_supplicant -i espsta0 -D nl80211 -c /etc/wpa_passphrase.conf -B Successfully initialized wpa_supplicant [ 2013.434617] esp_cmd_work:326 [ 2013.436242] wait_and_decode_cmd_resp:187 [ 2013.497831] esp32_sdio:read_packet: Len from Slave: 20 [ 2013.498073] next rx pkt-> [ 2013.504386] spi_rx: 4376eee9: 00 00 02 00 08 00 0c 00 00 00 00 00 04 02 00 00 ................ [ 2013.516713] spi_rx: 538dd6e9: 00 00 00 00 .... [ 2013.524993] cmd_scan_request:1416 exiting [ 2013.530627] esp_cmd_work:326 [ 2013.532264] esp32_sdio:read_packet: Len from Slave: 256 [ 2013.533290] esp32_sdio:read_packet: Failed to read data - -84 [0 - 256] [ 2013.547631] esp32_sdio:read_packet: Len from Slave: 512 [ 2013.548972] esp32_sdio:read_packet: Failed to read data - -84 [1 - 512] [ 2013.562022] esp32_sdio:read_packet: Len from Slave: 743 [ 2013.563360] esp32_sdio:read_packet: Failed to read data - -84 [1 - 512] [ 2013.576422] esp32_sdio:read_packet: Len from Slave: 1001 [ 2013.577785] esp32_sdio:read_packet: Failed to read data - -84 [1 - 512] [ 2013.589090] esp32_sdio:read_packet: Len from Slave: 1245 [ 2013.590443] esp32_sdio:read_packet: Failed to read data - -84 [2 - 1024] [ 2013.604680] esp32_sdio:read_packet: Len from Slave: 1499 [ 2013.606045] esp32_sdio:read_packet: Failed to read data - -84 [2 - 1024] [ 2013.619441] esp32_sdio:read_packet: Len from Slave: 1743 [ 2013.620809] esp32_sdio:read_packet: Failed to read data - -84 [3 - 1536] [ 2013.634072] esp32_sdio:read_packet: Len from Slave: 1997 [ 2013.635434] esp32_sdio:read_packet: Failed to read data - -84 [3 - 1536] [ 2013.648701] esp32_sdio:read_packet: Len from Slave: 2228 [ 2013.648737] esp32_sdio:read_packet: Rx large packet: 2228 [ 2013.661396] esp32_sdio:read_packet: Failed to read data - -84 [4 - 2048] [ 2013.668568] esp32_sdio:read_packet: Len from Slave: 2453 [ 2013.668605] esp32_sdio:read_packet: Rx large packet: 2453 [ 2013.681023] esp32_sdio:read_packet: Failed to read data - -84 [4 - 2048] [ 2013.688481] esp32_sdio:read_packet: Len from Slave: 2717 [ 2013.688568] esp32_sdio:read_packet: Rx large packet: 2717 [ 2013.701930] esp32_sdio:read_packet: Failed to read data - -84 [5 - 2560] [ 2013.709163] esp32_sdio:read_packet: Len from Slave: 2977 [ 2013.709197] esp32_sdio:read_packet: Rx large packet: 2977 [ 2013.721654] esp32_sdio:read_packet: Failed to read data - -84 [5 - 2560] [ 2014.107762] esp32_sdio:read_packet: Len from Slave: 3206 [ 2014.107805] esp32_sdio:read_packet: Rx large packet: 3206 [ 2014.120770] esp32_sdio:read_packet: Failed to read data - -84 [6 - 3072] [ 2014.707802] esp32_sdio:read_packet: Len from Slave: 3445 [ 2014.707847] esp32_sdio:read_packet: Rx large packet: 3445 [ 2014.722665] esp32_sdio:read_packet: Failed to read data - -84 [6 - 3072] [ 2014.730355] esp32_sdio:read_packet: Len from Slave: 3680 [ 2014.730396] esp32_sdio:read_packet: Rx large packet: 3680 [ 2014.743492] esp32_sdio:read_packet: Failed to read data - -84 [7 - 3584] [ 2014.750785] esp32_sdio:read_packet: Len from Slave: 3917 [ 2014.750821] esp32_sdio:read_packet: Rx large packet: 3917 [ 2014.763379] esp32_sdio:read_packet: Failed to read data - -84 [7 - 3584] [ 2014.770561] esp32_sdio:read_packet: Len from Slave: 4140 [ 2014.770594] esp32_sdio:read_packet: Rx large packet: 4140 [ 2014.782997] esp32_sdio:read_packet: Failed to read data - -84 [8 - 4096] [ 2014.791446] esp32_sdio:read_packet: Len from Slave: 4350 [ 2014.791478] esp32_sdio:read_packet: Rx large packet: 4350 [ 2014.804194] esp32_sdio:read_packet: Failed to read data - -84 [8 - 4096] [ 2014.827831] esp32_sdio:read_packet: Len from Slave: 4612 [ 2014.827874] esp32_sdio:read_packet: Rx large packet: 4612 [ 2014.840838] esp32_sdio:read_packet: Failed to read data - -84 [9 - 4608] [ 2015.907793] esp32_sdio:read_packet: Len from Slave: 4628 [ 2015.907836] esp32_sdio:read_packet: Rx large packet: 4628 [ 2015.922677] esp32_sdio:read_packet: Failed to read data - -84 [9 - 4608] ```