-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel5.4.3, ESP32 WRoom 32UE ,use esp-hosted-release-v0.3 sdio wifi #212
Comments
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? |
i have use same verion, esp_hosted_firmware_esp32_sdio_uart_v0.3 and esp-hosted-release-v0.3, |
Can you tell me kernel ,esp32 sdio work time sequence? |
Okay. 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. 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. 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 Display: MYIR-LCD-7-800x480 (800x480) NAND read: device 0 offset 0x600000, size 0xa00000 NAND read: device 0 offset 0x1000000, size 0x100000 Flattened Device Tree blob at 83000000Booting using the fdt blob at 0x83000000 Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 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:~# dmesg | grep usdhc Below is the esp side log |
So from your log, I still suspect if the SDIO is detected or not. 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. imx8mm-evk.dts
imx8mm-evk.dtsi
|
To add further,
Your expected host side log (without even loading ESP32 host kernel module):
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. Once the kernel module loaded, you can see ESP has reset (using resetpin). Host will show log similar to:
mmc instance will vary. |
Hello @shihui2014 Were you manage to get CIS & first event like above? |
hello @mantriyogesh |
1 similar comment
hello @mantriyogesh |
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 |
okey, |
Okay, that will be easy to integrate actually. But even in that case, the underlying sdio hardware still needs to be configured (#212 (comment) is still applicable) |
hi,I have obtained the following information from dmesg! |
hi,@mantriyogesh ,thank you for your support, |
esp_sdio: probe of mmc1:0001:2 failed with error -22 What is concerning, |
What is output of
at ESP (if building from source) and Host side? Can you use current master at both sides, ESP and host side? esp-hosted/esp_hosted_fg/esp/esp_driver/network_adapter/main/sdio_slave_api.c Lines 183 to 202 in 81778f6
You can tune timing there. |
Are you able to check ahead if you are able connect to AP (using demo app)?
|
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. |
yes, NAND read: device 0 offset 0x600000, size 0xa00000 NAND read: device 0 offset 0x1000000, size 0x100000 Flattened Device Tree blob at 83000000Booting using the fdt blob at 0x83000000 Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 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 |
hi @mantriyogesh you say “connect to AP (using demo app)?” |
connect to ap use by “esp-hosted-release-fg-v0.0.5\esp_hosted_fg\host\linux\host_control\ c_support ”? |
I don't see your ESP full log. |
Yes you can use C demo app from esp_hosted_fg\host\linux\host_control\c_support. |
An error occurred while compiling c_support and esp log is : rst:0x1 (POWERON_RESET),boot:0x2b (HSPI_FLASH_BOOT) rst:0x10 (RTCWDT_RTC_RESET),boot:0x3b (SPI_FAST_FLASH_BOOT) |
I have already set CONFIG_SUPPORT_ESP_SERIAL = y and esp32 log is : kernel log is: rst:0x1 (POWERON_RESET),boot:0x3b (SPI_FAST_FLASH_BOOT) |
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. If you need binaries only, Let me know. |
Regarding #212 (comment), Can you please localise by adding prints in esp_sdio.c, which call fails? |
for the err esp_sdio: probe of mmc1:0001:1 failed with error -16 I (627) spi_flash: flash io: dio |
great! everything looks great. proceed ahead with c demo app. |
But it doesn't seem to be running
|
shows your sdio is fine. 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 |
I don't understand what you mean? |
I know that you are not using Raspberry Pi. Where you have ESP-Hosted cloned, please update submodules as shown command in picture. rpi_init,sh is of course Raspberry Pi specific. But when you still need to port it as per your platform. For UART, you may need to port rpi_init.sh to make you SoC UART GPIOs in correct alternate function. |
root@myd-y6ull14x14:~# ./test.out For example, Requested operation complete ^C Requested operation complete |
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 |
hi,@mantriyogesh I scanned the wifi ssid using c_support!Thank you very much! |
okey, |
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. |
Does wpa_supplicant or iw be supported? |
You can use ESP-Hosted-NG flavour for that. |
okey,thanks a lot! |
Can you tell me how to connect wifi using c demo?the cmd is?c_demo.md It's not clear! |
I already know! |
How can a client obtain an ip address in AP mode? |
I used the command./test.out softap_start, but the client couldn't get the ip from wifi |
Dhcp software remains out of scope as every linux may have diff software. Anyway example of dnsmasq is provided as example Please check docs. |
okey,
i find by dnsmasq |
hello @mantriyogesh |
Download mode selection depends on GPIO0 pin, EN pin. Please check some details and known ways to handle this behaviour. Also please have a look at 'strapping pins' in esp32 datasheet. |
Hello @shihui2014 is the problem solved? Strapping pins if need to be used, need to pull them up. Check specific Technical Reference manual for more info of pin. These limitations will not happen if strapping pins are avoided. |
insmod esp32_sdio.ko,can not run esp_probe function
i have update dtsi
&usdhc2 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
max-frequency = <50000000>;
pinctrl-0 = <&pinctrl_usdhc2_alt &pinctrl_wifi>;// &pinctrl_wifi
bus-width = <4>;
// 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_DATA18__USDHC2_CMD 0x17051
MX6UL_PAD_LCD_DATA19__USDHC2_CLK 0x17051
MX6UL_PAD_LCD_DATA20__USDHC2_DATA0 0x17051
MX6UL_PAD_LCD_DATA21__USDHC2_DATA1 0x17051
MX6UL_PAD_LCD_DATA22__USDHC2_DATA2 0x17051
MX6UL_PAD_LCD_DATA23__USDHC2_DATA3 0x17051
>;
};
and menuconfig MMC/SD/SDIO card support (MMC [=y])
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
The text was updated successfully, but these errors were encountered: