-
Notifications
You must be signed in to change notification settings - Fork 7.6k
ESP32 v2.0.0-rc1 - Using W5500 driver from ESP-IDF and other devices via SPI.h at the same bus #5482
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
Comments
just a little push for this... Is it basically planned to also support SPI LAN modules in the final version 2.0? In the coding I saw with the condition on the DM9051 that there was a 'to do' note. I would also like to contribute with the implementation, but unfortunately I don't seem to have any more in-depth knowledge about the peculiarities in using SPI in ESP-IDF. Maybe a little hint could help. |
Yes - support of SPI-LAN would increase ESP possibilities a lot. The integrated ESP-WLAN + separate LAN-module (i.e. cheap and powerful Wiznet 5500) would deliver connections for nearly all cirumstances. Many people looking for that. Would be great to hear about your planning about SPI-LAN. How I can support you? |
As you can see above it already works with v2.0.0 RC1, if you use only the W5500 device on the SPI bus, using ESP-IDF. If you add another SPI device via Arduino-ESP32s SPI library the ESP crashes. I really would like to implement this in Arduino-ESP32s ETH library, but my skills in ESP-IDF are reaching there limits. Maybe @me-no-dev has a hint, how to do this!? |
Hello, as there was no answer in last 14 days, I'm closing the issue as expired to keep our backlog manageable. If it's still needed, please reopen the issue. Thanks for understanding. |
https://github.com/johnnytolengo/w5500lwip/ |
@VojtechBartoska Decoded backtrace:
|
thanks for testing @swbew, we will take a look. |
We got it working - will post the code soon |
https://github.com/mkrasselt1/esp32-lan-w5500
like this you can use all existing libraries for tcp stuff like async websocket client, mqtt and soon :) Note: this is only using the w5500 as a phy interface, tcp processing is completly done in the esp main processor -> no offloading at all |
hi @mkrasselt1 is this will work with Wifi too? mean wifi and eth work side by side together getting data in sync? instead of WIFI_OFF to WIFI_AP or STA? |
Hi @mkrasselt1 tested your codes not working and it trigger wdt on my end.
edit: |
Sadly not to my knowledge - because its replaces the output of the phy interface from. Wifi to able to reuse existing libraries - but - this should be possible by adding another interface to lwip stack - and the router. But we did not yet figured it out. |
I will look into this because it's working fine on multiple devices running 3.1.0 (yes we are a bit behind on this)) |
hi @mkrasselt1 i am able to initialize the module with ip, and dns works too. but wificlient are not connected to the w5500. wificlient.connect(url) return unable to reach error. i guess there is something missing on where to bridge/initialize the client to the w5500 class. do you have the details on that part? which client are you using to do a http call? |
Hello, I close this since this report contains a release that we no longer support. Please try newer versions and incase the issue persisted, feel free to reopen it. Thanks |
Description:
Hey Guys,
I'm trying to implement the esp-idf W5500 driver with lwip using 'direct access' to esp-idf in arduino-esp32. With ESP-IDF 4.4 comes the possibility to use SPI-Ethernet chips in lwip. Additionally I want to use a RC522 RFID-Reader, which is connected to the same SPI bus. For this I want to use the MFRC522 (Arduino) library from here: https://github.com/miguelbalboa/rfid via SPI.h library.
I took the example code from the ESP-IDF to initialize the W5500 from here:
https://github.com/espressif/esp-idf/blob/master/examples/ethernet/basic/main/ethernet_example_main.c
Using the W5500 as single device on the SPI bus, works like a charm. But as soon as I access my RC522 RFID reader via SPI.h, the ESP crashes after a few seconds (see test sketch below) with the following Serial output:
Decoded backtrace:
How can I get Ethernet working with the W5500 board via ESP-IDF while also using SPI.h from arduino-esp32 for RC522 (MFRC522) as a second SPI device on the same bus?
Is it planned to support SPI-Ethernet chips in ETH.h with the final release of arduino-esp32 v2.0.0?
Hardware/Environment:
Pins used for SPI:
MOSI: 23
MISO: 19
SCK: 18
SS_RFID: 5
SS_W5500: 15
INT_W5500: 25
Sketch:
The text was updated successfully, but these errors were encountered: