ESP32 with W5500 Chip #227
Replies: 24 comments 84 replies
-
There are examples using W5500 module. This is example for ESP32 + W5500 using Ethernet client (basic client or non-secure client). This is suitable for ESP32 and ESP8266 that use the core SSL/TLS engine library. This is example for ESP32 + W5500 using Ethernet client + external SSL client. This is for Arduino devices that this library does not support natively but through external SSL client. I recommend the first one as it's not required external SSL client library. |
Beta Was this translation helpful? Give feedback.
-
You need to read comments in the examples carefully. |
Beta Was this translation helpful? Give feedback.
-
The problem is that we can not find any information about the pin out of the SPI BUS on this product. All examples provided by the manufacturer are using codes without defined SPI Pins. |
Beta Was this translation helpful? Give feedback.
-
If provided IP doesn't work, call begin with MAC address only. |
Beta Was this translation helpful? Give feedback.
-
I tried now to upload on a normal "ESP32 DOIT DevKit v1" with a W5500 Ethernet shield. Same results as before. and the NTP client is working also on the ESP32 DOIT DevKit v1 with W5500 Ethernet shield |
Beta Was this translation helpful? Give feedback.
-
Please make sure, you can run this example. The above example uses WiFIClient as a basic client which is similar to this example that you currently try that uses Ethernet client as basic client unless the network client. If it works, you have a problem to config internal W550 chip to work with its ESP32. It's not matter what you mention that the NTP example using Ethernet works because it connects to server via non-secure UDP but if you can't use your device to work with this library ethernet example, it means W5500 chip on your device may not have enough memory buffer or it's not config properly in Ethernet library. You should make sure you install Ethernet library v2 aka. Ethernet2 from Arduino. The rx buffer size of Ethernet module should set to 1k or more through the Ethernet library setting. This minimum buffer size of on-chip buffer is required to handle the encrypted SSL data which quite larger than non-secure data or plain text. This may relate to W5500 firmware, chip revision, and Ethernet library setting. |
Beta Was this translation helpful? Give feedback.
-
Wifi script is working fine. Ok i will research the Ethernet2 libary now |
Beta Was this translation helpful? Give feedback.
-
Normally the W5500 module can work with non-secure connection as it not required large memory buffer as in secure connection case. In secure connection, the ethernet chip should have large memory buffer to handle SSL cipher suite and data to be sent and received to/from SSL Client that used BearSSL (ESP8266) and mbedTLS (ESP32) as in this library. |
Beta Was this translation helpful? Give feedback.
-
This is the issue that you can found on the internet from many users that are trying to use W5500 with other microcontrollers, especially ESP32 and ESP8266 for HTTPS web client which may fail for the first time. If you can use these SSL client libraries to send the HTTP requests to secure server via port 443 using ESP32 and W5500 module, you can use this Email library too. Please see the example of these libraries and adapt it for your hardware. https://github.com/mobizt/ESP_SSLClient |
Beta Was this translation helpful? Give feedback.
-
I tried now https://github.com/OPEnSLab-OSU/EthernetLarge with #include <EthernetLarge.h> with the same result. It is also very strange that the serial monitor is outputting so less..... I will read your mentioned information now |
Beta Was this translation helpful? Give feedback.
-
I always get the same fault message during connection, even on without SSL examples like this one. I don't think that the SSL connection is the issue, but I don't think that the library is the issue as well, because other examples from other sources are working fine with the library |
Beta Was this translation helpful? Give feedback.
-
Is your ESP32 + W5500 works in this example? The things that OPEnSLab SSLClient can bother the user are it required trust anchors of mail server you want to connect to and does not work in ESP8266. There is no insecure mode to skip this as in other SSL clients. |
Beta Was this translation helpful? Give feedback.
-
I think you should remove the library and install the latest version via Library Manager (v2.7.9). This is because, the strange thing was detected. If you define this macro smtp.connectionRequestCallback(connectionRequestCallback);
smtp.connectionUpgradeRequestCallback(connectionUpgradeRequestCallback);
smtp.networkConnectionRequestCallback(networkConnection);
smtp.networkStatusRequestCallback(networkStatusRequestCallback); you should get debug message like this Connected with IP: xx.xx.xx.xx
> I: The Connection Request Callback is now optional.
Connecting to SMTP server...
> C: ESP Mail Client v2.7.9
> C: Wait for NTP server time synching
> W: UDP client is required for NTP server time synching based on your network type
e.g. WiFiUDP or EthernetUDP. Please call MailClient.setUDPClient(&udpClient, gmtOffset); to assign the UDP client.
Error, NTP server time synching timed out
> E: NTP server time synching timed out
> C: Connect to SMTP server
> C: Host > smtp.gmail.com
> C: Port > 465
> U: Connecting to server via custom Client... success.
> C: SMTP server connected
SMTP server connected, wait for greeting... |
Beta Was this translation helpful? Give feedback.
-
I create a simple test sketch for ESP32 Gmail SMTP server connection testing using This test will show what' s wrong with your library installation, settings and network interfaces. You can test it and post all Serial messages here. Before test, please change
|
Beta Was this translation helpful? Give feedback.
-
So... I deleted the library folder and downloaded 2.7.9 from the library manager... Here are the results. It's quite interesting. I think we might found the issue There are issues on TEST 1-1 and TEST 1-2 Looks like there might be an issue on ESP_SSLClient and the Built-in SSL client on Ethernet connection
|
Beta Was this translation helpful? Give feedback.
-
Solution might be to use the SSL Client from the test 1-0 |
Beta Was this translation helpful? Give feedback.
-
Good news. For the TEST 0-0 and TEST 1-0, which OPEnSLab' SSLClient shows error Actually, in TEST 1-2, it still needs And these lines in the test sketch should be deleted. Serial.println("> E: Please remove ENABLE_CUSTOM_CLIENT Macro from src/ESP_Mail_FS.h");
goto exit; And TEST 1-2 should be ok now with error |
Beta Was this translation helpful? Give feedback.
-
I think I used your fork library during the tests. Ok I will double check this on test 1-2 |
Beta Was this translation helpful? Give feedback.
-
Hello my friend, I modified your test code to send an email for testing. Problem is, I can not make it work on wifi with the first SSL Client. Its working on ethernet. This is what I get on Wifi
Sometimes I get this on Ethernet as well very strange. Internet seems to work well, I did a speedtest on https://www.speedtest.net/de Here is the code
|
Beta Was this translation helpful? Give feedback.
-
Do you have any idea what this fault message on IMAP call could be? SMTP is working perfectly
My code is quite long, so if you need I can provide |
Beta Was this translation helpful? Give feedback.
-
I updated now to 2.7.10 and get the same result. Its stuck on Check capability and gets an Error, connection closed.
I already implemented three callbacks as you teach me before, but get the same results. Its connecting but doesn't pass the capability.
SMTP works fine |
Beta Was this translation helpful? Give feedback.
-
Everything is working fine for now. Thank you so much for your support. Me and my team, we will donate you something at the end of our project !! |
Beta Was this translation helpful? Give feedback.
-
I refered this discussion and leaned a lot. Thank you !
in Test 1-1, I faced error msg as below,
ini file in platform.io is here [env:esp32dev] |
Beta Was this translation helpful? Give feedback.
-
Hi, once again :D
I hope that I dont bother you too much...
Sorry for the stupid question but is it possible to get it working on Ethernet with an esp32 and w5500 chip?
We are quite fixed on our hardware/chip choices because of this beauty.
https://www.industrialshields.com/shop/product/034001000200-esp32-plc-21-2801#attr=165,491,2238,2304,2305
We are trying for days to get it working with our esp32 and Ethernet, but but it doesn't seem to work. We tried a ntp server script only and it worked fine.
Any ideas or suggestions? Maybe some common issues if you will.
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions