Skip to content
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

esp hosted fg error with -84 #242

Closed
gauthamikosanam opened this issue Jul 13, 2023 · 187 comments
Closed

esp hosted fg error with -84 #242

gauthamikosanam opened this issue Jul 13, 2023 · 187 comments

Comments

@gauthamikosanam
Copy link

Hi
I am using arm cortex a5d2x microprocessor as host and esp32 module as slave. In between this communication I am getting error.
I have used fg 0.0.5 version and compiled in kernel and flashed the respective binaries in esp 32 module.
Attaching the logs for both host and esp ,please let me know the solution.
host_fg.txt
esp_fg.txt
esp_sdio: probe of mmc0:0001:1 failed with error -84

@mantriyogesh
Copy link
Collaborator

Send us setup image.

Please go through https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/porting_guide.md to understand things required while porting sdio for FG software.

Is the NG worked earlier and FG only is not working?

@gauthamikosanam
Copy link
Author

Yes NG worked earlier now I want softap mode so I moved to FG.

@mantriyogesh
Copy link
Collaborator

mantriyogesh commented Jul 13, 2023

@gauthamikosanam
Copy link
Author

Can you please send the patch for esp hosted fg sdio timing -SDIO_SLAVE_TIMING_NSEND_PSAMPLE.
Beacuse I am only flashing the bin files to board.Not having the idea of the source code, please let me know that process.

@mantriyogesh
Copy link
Collaborator

Hello @gauthamikosanam

We used to provide the binaries as ESP side code was not open sourced.
Now you should not face issue doing that.
We have added simple scripts to setup environment & make the flashing as easy as possible.

SDIO setup document is at https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/SDIO_setup.md

Anyway, Please check the full FG documentation at https://github.com/espressif/esp-hosted/tree/master/esp_hosted_fg with keeping SDIO_only mode in mind.
Some of the earlier reported GitHub issues would have automatically resolved if the documentation was followed step wise and correctly.

We try to keep documentation as small as possible and up to date.

@gauthamikosanam
Copy link
Author

I have flashed the sdio only binary files to esp32 module and can you set the sdio timing to SDIO_SLAVE_TIMING_NSEND_PSAMPLE and send the patch,because previous also for NG you have send the patch for sdio timing.Then I can able to communicate between host and esp module.

@mantriyogesh
Copy link
Collaborator

Hello @gauthamikosanam ,
This time I am providing you patch.
gh_242_fg_sdio_np_timing.patch

Base Hosted git commit is expected to be 11e90f1
Please use same codebase & same git commit at both host and ESP.

@mantriyogesh
Copy link
Collaborator

please help close this issue.

@gauthamikosanam
Copy link
Author

Hi Yogesh,
I could not able to compile the source code,getting errors.Could you please send the bin files with respect to sdio timing ,will flash to the esp32 target board.
Attaching the error log.
CMakeOutput.log
CMakeError.log
gauthami@gauthami-Latitude-3420:~/esp-hosted-release-fg-v0.0.5/esp_hosted_fg/esp/esp_driver/network_adapter$ cmake .


                Building ESP-Hosted-FG Firmware version :: 0.0.5 

-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
CMake Error at /home/gauthami/esp-idf/tools/cmake/build.cmake:365 (message):
Failed to run Python dependency check. Python: python, Error: No such file
or directory
Call Stack (most recent call first):
/home/gauthami/esp-idf/tools/cmake/build.cmake:500 (__build_check_python)
/home/gauthami/esp-idf/tools/cmake/project.cmake:447 (idf_build_process)
CMakeLists.txt:14 (project)

-- Configuring incomplete, errors occurred!

@mantriyogesh
Copy link
Collaborator

As my earlier comment I had mentioned, please use base commit as 11e90f1

Can you show output of
$ cd
$ git branch
$ git log | head -5

Also, I see your current folder is <esp_hosted_fg/esp/esp_driver/network_adapter> which is not matched as per documentation. should have followed the exact steps.

Screenshot 2023-07-17 at 2 15 57 PM

@mantriyogesh
Copy link
Collaborator

also make sure you have C compiler installed where you are trying to build.

@gauthamikosanam
Copy link
Author

Hi Yogesh,
I have taken the esp hosted fg 0.0.5 version firmware.
esp hosted fg
I have flashed the bin files to board-esp hosted fg 0.0.5.tgz
I have taken the source code.tar.gz for esp32 driver.
is this process correct? I am unable to understand how to take same git base 11e90f1 for host and esp.

@mantriyogesh
Copy link
Collaborator

ESP-Hosted-FG building procedure.
This is all well documented. I am repeating here.

  1. Checkout ESP-Hosted in new directory, say slave_hosted_25jul23
  2. git checkout 11e90f1
  3. git submodule update --init --recursive
  4. scp this code base dir slave_hosted_25jul23 to host with name say host_hosted_25jul23
  5. in slave_hosted_25jul23, follow documentation to flash the ESP firmware using source compilation in above image. Please spare some time to check the documentation, repeating the documentation as comment really does not make any sense (again and again)
  6. in host_hosted_25jul23, check rpi_init.sh if port is needed. Porting guide is at https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/porting_guide.md
    Unless it is ported correctly, kernel module will not work.
  7. build kernel module using rpi_init.sh (check documentation)

@gauthamikosanam
Copy link
Author

Hi yogesh,
I have taken the git checkout of 11e90f1 and tried to compile the driver of fg esp32 getting error.
/home/wifi/esp_slave_hosted/esp_hosted_fg/host/linux/host_driver/esp32/sdio/esp_sdio.c:457:22: error: passing argument 1 of 'sdio_release_host' from incompatible pointer type [-Werror=incompatible-pointer-types]
RELEASE_SDIO_HOST(context);
^
/home/wifi/esp_slave_hosted/esp_hosted_fg/host/linux/host_driver/esp32/sdio/esp_sdio.c:54:50: note: in definition of macro 'RELEASE_SDIO_HOST'
#define RELEASE_SDIO_HOST(x) sdio_release_host(x)
^
In file included from /home/wifi/esp_slave_hosted/esp_hosted_fg/host/linux/host_driver/esp32/sdio/esp_sdio.c:22:0:
/home/yocto/build/tmp/work-shared/rugged-board-a5d2x-sd1/kernel-source/include/linux/mmc/sdio_func.h:118:13: note: expected 'struct sdio_func *' but argument is of type 'struct esp_sdio_context *'
extern void sdio_release_host(struct sdio_func *func);

Any suggestion for this error?

@mantriyogesh
Copy link
Collaborator

This is fixed on master, please do git pull

@gauthamikosanam
Copy link
Author

Done with git pull,still I am getting the errors.
/home/wifi/esp_slave_hosted/esp_hosted_fg/host/linux/host_driver/esp32/sdio/esp_sdio.c:76:31: error: 'ESP_DEVICE_ID_2' undeclared here (not in a function); did you mean 'ESP_DEVICE_ID_1'?
{ SDIO_DEVICE(ESP_VENDOR_ID, ESP_DEVICE_ID_2) },
^
/home/yocto/build/tmp/work-shared/rugged-board-a5d2x-sd1/kernel-source/include/linux/mmc/sdio_func.h:97:31: note: in definition of macro 'SDIO_DEVICE'
.vendor = (vend), .device = (dev)
I included the header file esp_sdio_decl.h still getting error.

@mantriyogesh
Copy link
Collaborator

mantriyogesh commented Jul 27, 2023

Have you taken

if [ "$IF_TYPE" == "sdio" ] ; then
# SDIO Kernel driver registration varies for ESP32 and ESP32-C6 slave chipsets
select_esp_slave
fi

into consideration from rpi_init.sh?

Ignore above comment.

I am surprised how one symbol is visible and other is not.
Are there any local changes?

@gauthamikosanam
Copy link
Author

No local changes , I am compiling the host_driver/esp32/Makefile
In Makefile I am using,
CR_C := arm-linux-gnueabihf-
all:
make ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) -C /home/yocto/build/tmp/work/rugged_board_a5d2x_sd1-poky-linux-musleabi/linux-rba5d2x/4.9-r0/build M=$(PWD) modules

@mantriyogesh
Copy link
Collaborator

Question remains the same,

static const struct sdio_device_id esp_devices[] = {
{ SDIO_DEVICE(ESP_VENDOR_ID, ESP_DEVICE_ID_1) },
{ SDIO_DEVICE(ESP_VENDOR_ID, ESP_DEVICE_ID_2) },

In above code,
how ESP_VENDOR_ID and ESP_DEVICE_ID_1 is visible and ESP_DEVICE_ID_2 is not visible?

#if defined(CONFIG_TARGET_ESP32C6)
#define ESP_VENDOR_ID 0x0092
#define ESP_DEVICE_ID_1 0x6666
#define ESP_DEVICE_ID_2 0x7777
#elif defined(CONFIG_TARGET_ESP32)
#define ESP_VENDOR_ID 0x6666
#define ESP_DEVICE_ID_1 0x2222
#define ESP_DEVICE_ID_2 0x3333
#else
#error "SDIO not supported for selected ESP device"
#endif

@mantriyogesh
Copy link
Collaborator

please post your rpi_init.sh output

Use

$ bash -x rpi_init.sh 

@gauthamikosanam
Copy link
Author

Getting ESP_VENDOR_ID,ESP_DEVICE_ID_1 and ESP_DEVICE_ID_2 errors
/home/wifi/esp_slave_hosted/esp_hosted_fg/host/linux/host_driver/esp32/sdio/esp_sdio_decl.h:91:2: error: #error "SDIO not supported for selected ESP device"
#error "SDIO not supported for selected ESP device"
root@0d4c4bb56531:/home/wifi/esp_slave_hosted/esp_hosted_fg/host/linux/host_control# bash -x rpi_init.sh

  • RESETPIN=
  • BT_INIT_SET=0
  • TEST_RAW_TP=0
  • IF_TYPE=sdio
  • MODULE_NAME=esp32_sdio.ko
  • ESP_SLAVE_CHIPSET=
  • parse_arguments
  • '[' '' '!=' '' ']'
  • '[' sdio = '' ']'
  • '[' sdio == sdio ']'
  • select_esp_slave
  • case $ESP_SLAVE_CHIPSET in
  • echo '***** Err: Please set expected ESP slave chipset ****'
    ***** Err: Please set expected ESP slave chipset ****
  • exit 1

@gauthamikosanam
Copy link
Author

In rpi_init.sh file kept esp slave chipset to esp32 and run the command bash -x rpi_init.sh
Attaching the output.
fg log.txt

@mantriyogesh
Copy link
Collaborator

#242 (comment)
Is the error self explanatory?

**** Err: Please set expected ESP slave chipset **** in rpi_init.sh.

Apart from that,
make[3]: /usr/bin/arm-linux-gnueabihf-gcc: Command not found
make[3]: /usr/bin/arm-linux-gnueabihf-gcc: Command not found
make[3]: /usr/bin/arm-linux-gnueabihf-gcc: Command not found
make[3]: /usr/bin/arm-linux-gnueabihf-gcc: Command not found
make[3]: /usr/bin/arm-linux-gnueabihf-gcc: Command not found

etc errors are reported, take care of them, to choose correct paths for cross comiplation.
https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/porting_guide.md#23-cross-compilation -> there are two parts, please check the documentation again.

@gauthamikosanam
Copy link
Author

Hi Yogesh,
Compiled the driver but not inserting the driver getting error.
esp_sdio: probe of mmc0:0001:1 failed with error -110
esp_sdio: probe of mmc0:0001:2 failed with error -110
Attaching the logs of both host and esp.
esp fg.txt
host_log.txt

@mantriyogesh
Copy link
Collaborator

mantriyogesh commented Jul 28, 2023

Check suggestions in old bug of yours and try again. Specially wrt timings

@gauthamikosanam
Copy link
Author

How can I change the sdio timings?

@mantriyogesh
Copy link
Collaborator

Have you checked this comment: #242 (comment)?
Let us know once followed porting guide. your answers should lie in there.

@gauthamikosanam
Copy link
Author

Hi Yogesh,
root@0d4c4bb56531:/home/wifi/esp_slave_hosted/esp_hosted_fg/esp/esp_driver/network_adapter/main# git branch

  • (HEAD detached from 11e90f1)
    I changed this line in main/sdio_slave_api.c file
  • ESP_LOGI(TAG, "%s: ESP32 SDIO timing: %u\n", func, config.timing);
  • ESP_LOGI(TAG, "%s: Base Hosted expected: 11e90f1\nESP32 SDIO timing: %u\n", func, config.timing);
    After that cmake I did.
    root@0d4c4bb56531:/home/wifi/esp_slave_hosted/esp_hosted_fg/esp/esp_driver# cmake .
    HEAD is now at 0702eda Merge branch 'bugfix/sdio_claim_release_macros_ym2_26jul' into 'master'
    fatal: reference is not a tree: cbce221e88d52665523093b2b6dd0ebe3f1243f1
    fatal: reference is not a tree: 91dc99a3ce09b66c51b8be884e2ed6b6e1558747
    Unable to checkout 'cbce221e88d52665523093b2b6dd0ebe3f1243f1' in submodule path 'esp-idf'
    Unable to checkout '91dc99a3ce09b66c51b8be884e2ed6b6e1558747' in submodule path '../../../esp_hosted_ng/esp/esp_driver/esp-idf'
    fatal: reference is not a tree: d037ec89546fad14b5c4d5456c2e23a71e554966
    fatal: reference is not a tree: ddd61e9a276926496437665dd217cba2850db6b9
    fatal: reference is not a tree: b207a7da7a9758dbccea0dba1023fd36c47b3e65
    fatal: reference is not a tree: 9478bc510fa9fc792d98efbc80dc547b97a13b99
    fatal: reference is not a tree: eeecc49ce8af123cf8ad40efdb9673e37b56230f
    fatal: reference is not a tree: 998e05636344949ba219e8ac56feb733e27bf5d2
    fatal: reference is not a tree: da0306da9b882c4bbd4c6ed5ee497c5c0e9945c4
    fatal: reference is not a tree: d348621ca93571343a56862df7de4ff3bc9b5667
    fatal: reference is not a tree: 269a58f18597aedec31c439e34cdaea47229dda3
    fatal: reference is not a tree: 65b3c0857c9f207dcb0b646f2b4ebd8e5edf83c1
    fatal: reference is not a tree: dffabb067fb3c39f486033d2e47eb4b1416f0c82
    fatal: reference is not a tree: 785e946222f6c6ab453d7d47c15c551d4a181f79
    fatal: reference is not a tree: 5beae143700db54c6e9bd4b15a568abe2f305723
    fatal: reference is not a tree: 0dbb3f71c5f6fae3747a9d935372773762baf852
    fatal: reference is not a tree: 7d2bf62b7e6afaf38153041a9d53c21aeeca9a25
    Unable to checkout 'd037ec89546fad14b5c4d5456c2e23a71e554966' in submodule path 'components/bootloader/subproject/components/micro-ecc/micro-ecc'
    Unable to checkout 'ddd61e9a276926496437665dd217cba2850db6b9' in submodule path 'components/bt/controller/lib_esp32c6/esp32c6-bt-lib'
    Unable to checkout 'b207a7da7a9758dbccea0dba1023fd36c47b3e65' in submodule path 'components/bt/controller/lib_esp32h2/esp32h2-bt-lib'
    Unable to checkout '9478bc510fa9fc792d98efbc80dc547b97a13b99' in submodule path 'components/bt/host/nimble/nimble'
    Unable to checkout 'eeecc49ce8af123cf8ad40efdb9673e37b56230f' in submodule path 'components/cmock/CMock'
    Unable to checkout '998e05636344949ba219e8ac56feb733e27bf5d2' in submodule path 'components/esp_phy/lib'
    Unable to checkout 'da0306da9b882c4bbd4c6ed5ee497c5c0e9945c4' in submodule path 'components/esp_wifi/lib'
    Unable to checkout 'd348621ca93571343a56862df7de4ff3bc9b5667' in submodule path 'components/json/cJSON'
    Unable to checkout '269a58f18597aedec31c439e34cdaea47229dda3' in submodule path 'components/lwip/lwip'
    Unable to checkout '65b3c0857c9f207dcb0b646f2b4ebd8e5edf83c1' in submodule path 'components/mbedtls/mbedtls'
    Unable to checkout 'dffabb067fb3c39f486033d2e47eb4b1416f0c82' in submodule path 'components/mqtt/esp-mqtt'
    Unable to checkout '785e946222f6c6ab453d7d47c15c551d4a181f79' in submodule path 'components/openthread/lib'
    Unable to checkout '5beae143700db54c6e9bd4b15a568abe2f305723' in submodule path 'components/openthread/openthread'
    Unable to checkout '0dbb3f71c5f6fae3747a9d935372773762baf852' in submodule path 'components/spiffs/spiffs'
    Unable to checkout '7d2bf62b7e6afaf38153041a9d53c21aeeca9a25' in submodule path 'components/unity/unity'
    Detecting the Python interpreter
    Checking "python3" ...
    Checking "python" ...
    "python" has been detected
    Checking Python compatibility
    Traceback (most recent call last):
    File "/home/wifi/esp_slave_hosted/esp_hosted_fg/esp/esp_driver/esp-idf/tools/python_version_checker.py", line 45, in
    check()
    File "/home/wifi/esp_slave_hosted/esp_hosted_fg/esp/esp_driver/esp-idf/tools/python_version_checker.py", line 39, in check
    _ver_to_str(OLDEST_PYTHON_SUPPORTED), _ver_to_str(sys.version_info[:3])
    RuntimeError: ESP-IDF supports Python 3.7 or newer but you are using Python 2.7.12. Please upgrade your installation as described in the documentation.
Setup Done

-- Configuring done
-- Generating done
-- Build files have been written to: /home/wifi/esp_slave_hosted/esp_hosted_fg/esp/esp_driver
Then again whatever changes i made in main/sdio_slave_api.c file, that line is not there.
After cmake how to flash the bin files of sdio only to board. Where is the path?

@mantriyogesh
Copy link
Collaborator

  1. Is your development machine internet connected?
  2. Cmake cleans all changed file as it is said in the documentation. You can change and git add and commit locally to save the changes.

Alternatively, if you plan to reuse existing IDF, you can change the sdio file with changed timing. And in existing IDF environment, $ idf.py flash monitor

We will take this input to improve to allow changed files in cmake.

@gauthamikosanam
Copy link
Author

gauthamikosanam commented Aug 3, 2023

Hi @mantriyogesh ,

Is your development machine internet connected?

--> it is connected internet. not sure what is the dependency.
Cmake cleans all changed file as it is said in the documentation. You can change and git add and commit locally to save the changes.
--> i am simply given "Cmake", after that local changes not found.

Alternatively, if you plan to reuse existing IDF, you can change the sdio file with changed timing. And in existing IDF environment, $ idf.py flash monitor
Getting this error.
gauthami@gauthami-Latitude-3420:~/esp_slave_hosted/esp_hosted_fg/esp/esp_driver/esp-idf$ . ./export.sh
Detecting the Python interpreter
Checking "python3" ...
Python 3.8.10
"python3" has been detected
Checking Python compatibility
Checking other ESP-IDF version.
Using a supported version of tool cmake found in PATH: 3.16.3.
However the recommended version is 3.24.0.
Adding ESP-IDF tools to PATH...
Using a supported version of tool cmake found in PATH: 3.16.3.
However the recommended version is 3.24.0.
Checking if Python packages are up to date...
Constraint file: /home/gauthami/.espressif/espidf.constraints.v5.2.txt
Requirement files:

  • /home/gauthami/esp_slave_hosted/esp_hosted_fg/esp/esp_driver/esp-idf/tools/requirements/requirements.core.txt
    Python being checked: /home/gauthami/.espressif/python_env/idf5.2_py3.8_env/bin/python
    The following Python requirements are not satisfied:
    Requirement 'esptool==4.7.dev1,~=4.5' was not met. Installed version: 4.7.dev1
    To install the missing packages, please run "install.sh"
    Diagnostic information:
    IDF_PYTHON_ENV_PATH: /home/gauthami/.espressif/python_env/idf5.2_py3.8_env
    Python interpreter used: /home/gauthami/.espressif/python_env/idf5.2_py3.8_env/bin/python

Done with git add and commit
root@0d4c4bb56531:/home/wifi/esp_slave_hosted/esp_hosted_fg/esp/esp_driver/network_adapter/main# git add sdio_slave_api.c
root@0d4c4bb56531:/home/wifi/esp_slave_hosted/esp_hosted_fg/esp/esp_driver/network_adapter/main# git commit -m "Modified SDIO timing"
[detached HEAD 1c3009c] Modified SDIO timing
1 file changed, 4 insertions(+), 4 deletions(-)

#if defined(CONFIG_IDF_TARGET_ESP32)
.timing = SDIO_SLAVE_TIMING_NSEND_PSAMPLE,
#endif

@gauthamik9
Copy link

gauthamik9 commented Sep 18, 2023

For 1-bit sdio,changed the boot/config file and run the hsot to esp rawtp, this is the log.

esp flashed with fg-->np timing-->host to esp
Host -->5910e160
clock speed-->5 * 100000

rasp log
esp log

esp flashed with fg-->np timing-->host to esp
Host -->5910e160
clock speed-->5 * 1000000

esp log
rasp log

@mantriyogesh
Copy link
Collaborator

Also send in opposite directions (ESP to Host)

@gauthamik9
Copy link

gauthamik9 commented Sep 18, 2023

For 1-bit sdio,
esp flashed with fg-->np timing-->esp to host
Host -->5910e160
clock speed-->5 * 1000000

esp log
rasp log

esp flashed with fg-->np timing-->esp to host
Host -->5910e160
clock speed-->5 * 100000

rasp log
esp log

@mantriyogesh
Copy link
Collaborator

[ 183.618165] esp_handle_isr: CMD53 read/write error at 137 and
[ 214.219235] read_packet: Failed to read data - -84 [2 - 1024]

tells that your sdio is not stable.
SDIO is working fine, but some times it faces timing issues.
This can be solved with PCB only.
SDIO faces signal integrity issues when wires used.

With wires:

  1. verify if ext pull-ups are connected to all exp lines.
  2. use better quality wires
  3. use smaller length wires (as much small as you can)
  4. try to increase drive strength of sdio pins at slave after sdio init is done.
gpio_set_drive_capability(<SLAVE_GPIO_NUMBER>, GPIO_DRIVE_CAP_3);
  1. connect as many grounds in between slave to host as possible, this would reduce some timing issues.

What happens if you do not use np timings? does it work or fail?

@gauthamik9
Copy link

What happens if you do not use np timings? does it work or fail?
Need to check from my end and let you know, meanwhile I will try to change the wires and check again.

@mantriyogesh
Copy link
Collaborator

also connect as many grounds you can connect.

What all the lines for 1 bit mode are connected?

@gauthamik9
Copy link

What all the lines for 1 bit mode are connected?
Dat0,Dat1,clk,cmd,EN pin of esp,GND.

@mantriyogesh
Copy link
Collaborator

okay. seems fine. DAT3 at slave has to be pulled-up (see reference : https://github.com/espressif/esp-idf/blob/master/examples/peripherals/sdio/README.md), which I suppose you have pulled-up.

Did you connect as many ground as possible? ESP32 has 3 grounds. can be all connected to different pins of host ground.
Host would have many grounds anyway.

@gauthamik9
Copy link

gauthamik9 commented Sep 18, 2023

I connected 3 grounds now.
DAT3 is pulled up only.
1-bit sdio

If I connect clock spped ->5 * 1000000
then in between getting read data error from host side so changed the clock speed.

esp flashed with fg-->np timing-->esp to host
Host -->5910e160
clock speed-->5 * 100000

rasp log
esp log

esp flashed with fg-->np timing-->host to esp
Host -->5910e160
clock speed-->5 * 1000000

rasp log
esp log

@gauthamik9
Copy link

4- bit sdio log.
esp flashed with fg-->np timing-->host to esp
Host -->5910e160
clock speed-->5 * 1000000

log.zip

@gauthamik9
Copy link

I tried again with
Host-->8cb1ccb
Esp-->2023.08.08_gh242_sdio_timingchange_ESP32_sdio

Not able to connect,it is showing obtaining ip address,but it is again restarting the node.

log.zip

@mantriyogesh
Copy link
Collaborator

unless the raw throughput works reliably, doesn't make any sense to run any other scenarios.
rx and tx should just work reliably on raw throughput mode first.

once you fix the timing, clock etc run tx and rx reliably, then can try the scenario.

@mantriyogesh
Copy link
Collaborator

Also it should be really easy to get the pcb done with external pull-ups on board.
Can you get it once you have base running?

@mantriyogesh
Copy link
Collaborator

Focus on getting 1 bit mode up. with wires setup, that would be baseline I can think of.
4 bit mode may face issues of signal integrity on sdio if used with wires.

@gauthamik9
Copy link

I tested the Fg station mode it is working.
Host-->8cb1ccb
Esp-->2023.08.08_gh242_sdio_timingchange_ESP32_sdio

log.zip

Since station mode is working can you please let me know the soft ap mode also.

@mantriyogesh
Copy link
Collaborator

if you are sure raw throughput works with rx and tx, then only proceed.
Print the rx and tx messages on transport both sides in softap.

If the transport is fine, issue is in networking.

@gauthamik9
Copy link

gauthamik9 commented Sep 18, 2023

When I connect to the mobile, could not connect to network, pop up message I am receiving.
Any suggestion?

@mantriyogesh
Copy link
Collaborator

There are two possibilities:

  1. msg dropped on transport

  2. Msg dropped because mobile could not be admitted with IP, so mobile dropped the wifi and other wifi might be available.

  3. Localise on Transport :
    Print the Rx and TX msgs on transport. If transport is fine, check networking.

  4. Localise on networking
    a. You can also check dnsmasq logs if DHCP failing for mobile. And debug dnsmasq if config or anything incorrect
    b.

  • Better, You can eliminate networking altogether by assignment of static IP to your mobile (laptop is easier for such cases)
  • Kill dnsmasq, assign static IP to your espap0 and once ap admits the station, just check ping on static IPs.

If this works, you would be sure if Hosted layer is fine.
Later you can hook dnsmasq again on your own.

You can also take wifi sniffer log, which will tell info abt over the air msgs.

@gauthamik9
Copy link

Hi Yogesh,
I have assign the static i to espap0 as 192.168.4.5.
ping 192.168.4.5
It is pinging.
But I want to work this module as hotspot, in which configuration i need to put the mode and not able to connect to the module.

@mantriyogesh
Copy link
Collaborator

But I want to work this module as hotspot, in which configuration i need to put the mode and not able to connect to the module

I did not quite understand what you meant.

It is pinging.

Is it pinging from mobile (station) connected to AP in static IP reliably?

@mantriyogesh
Copy link
Collaborator

But I want to work this module as hotspot, in which configuration i need to put the mode and not able to connect to the module

you meant using FG with softap, I assume. Sure.
But before moving to DHCP, it is very important to test reliability/ stability of the system.

Once static IP works reliable, DHCP should be easy task to be done. There are many DHCP server providers, you can choose any one based on its software availability and support on your platform.

@gauthamik9
Copy link

Hi Yogesh,
I tried with FG firmware, first I have configured as station mode. In that Mode it is in both station and softAp mode was set.
Connected with near by router and it is pinging.After that kept static ip 192.168.4.5 then with that ip entered in mobile phone Wifi is connected and it was showing no Internet.
But If I ping that static ip address , it is pinging.

@mantriyogesh
Copy link
Collaborator

Okay. I am not sure about your use case for Softap mode.
Use cases may vary a lot, depending upon the final product idea of the user/customer.

Anyway, from static IP side perspective, everything you have tested, seems to be okay.
DHCP server is higher layer for ESP-Hosted. You can integrate the DHCP server software over network interface espap0, if you wish to, which is supported software on your platform.

@gauthamik9
Copy link

Is there any possibilty to use wpa_supplicant process in FG driver?
Currently we are handling in API in raspberry pi.
In NG driver we used wpa supplicant command to connect station mode,in the similar way is it possible in FG driver also?

@mantriyogesh
Copy link
Collaborator

This is where functionality difference.
in NG, wpa_supplicant is used from host and wifi driver used from slave.
in FG, we keep all wifi (including esp_supplicant & wifi driver) at slave side.

FG is way to use/maintain Wi-Fi right through application using APIs/function-calls.
NG is way to use Wi-Fi using wpa_supplicant.

To answer to your question, No we don't have so, as it is designed in that way.

@gauthamik9
Copy link

Hi Yogesh,
Where can I found the cmsis_os.h header file in FG firmware.
I am trying to add the application c_support folder in my arm processor.

@mantriyogesh
Copy link
Collaborator

I assume this thread is resolved. Can you please file another issue for this?

To answer the question you had raised, Can you please let us know the host type you are using? Linux / MCU? By arm processor, I am biased toward Linux based host. In case of Linux based hosts, cmsis_os.h should not be needed at all. That is only required for MCU based hosts.

Where can I found the cmsis_os.h header file in FG firmware.
FG firmware (or slave software) would not be using such file. Are you referring to host?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants