Home › Forums › The libraries hosted on the site › EMailSender send email with attachments › esp32 with w5500 constantly rebooting
Tagged: esp32 w5500
- This topic has 15 replies, 2 voices, and was last updated 3 years, 8 months ago by
Renzo Mischianti.
-
AuthorPosts
-
-
2 September 2021 at 10:17 #14168
“EMailSender::Response resp = emailSend.send” causes my esp32 / w5500 to repeatedly reboot. If I comment it out, the reboots stop.
Connection: ESTABLISHED Got IP address: 10.0.160.182 /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1442 (xQueueGenericReceive)- assert failed! abort() was called at PC 0x40088301 on core 1 Backtrace: 0x4008be30:0x3ffb1780 0x4008c061:0x3ffb17a0 0x40088301:0x3ffb17c0 0x401291ca:0x3ffb1800 0x401293ca:0x3ffb1820 0x4011b82c:0x3ffb1840 0x4011b895:0x3ffb1860 0x40118a32:0x3ffb1880 0x401178bc:0x3ffb18a0 0x4011b0b0:0x3ffb18e0 0x400d447c:0x3ffb1900 0x400d41fa:0x3ffb1b70 0x400d42f5:0x3ffb1ba0 0x400d2475:0x3ffb1bc0 0x400d360a:0x3ffb1e80 0x400d362b:0x3ffb1eb0 0x400d3647:0x3ffb1ee0 0x400d1df2:0x3ffb1f30 0x400d9c9f:0x3ffb1fb0 0x40088615:0x3ffb1fd0 Rebooting...
-
2 September 2021 at 17:12 #14173
Hi SSpence,
can you share your code and post the EMailSenderKey config.
I never test that configuration, we are going to check the issue.
Bye Renzo -
3 September 2021 at 07:28 #14187
-
3 September 2021 at 07:35 #14191
ino attached. emailsenderkey below because it won’t attach for security reasons
/* * EMail Sender Arduino, esp8266 and esp32 library to send email * * AUTHOR: Renzo Mischianti * VERSION: 2.3.0 * * http://mischianti.org/ * * The MIT License (MIT) * * Copyright (c) 2017 Renzo Mischianti www.mischianti.org All right reserved. * * You may copy, alter and reuse this code in any way you like, but please leave * reference to www.mischianti.org in your comments if you redistribute this code. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef EMailSenderKey_h #define EMailSenderKey_h // Uncomment if you use esp8266 core <= 2.4.2 //#define ARDUINO_ESP8266_RELEASE_2_4_2 #define ENABLE_ATTACHMENTS // Uncomment to enable printing out nice debug messages. //#define EMAIL_SENDER_DEBUG // Define where debug output will be printed. #define DEBUG_PRINTER Serial #define STORAGE_SPIFFS (0) #define STORAGE_LITTLEFS (1) #define STORAGE_FFAT (2) #define NETWORK_ESP8266_ASYNC (0) #define NETWORK_ESP8266 (1) #define NETWORK_ESP8266_242 (6) #define NETWORK_W5100 (2) #define NETWORK_ENC28J60 (3) #define NETWORK_ESP32 (4) #define NETWORK_ESP32_ETH (5) #define NETWORK_WiFiNINA (7) #ifndef DEFAULT_EMAIL_NETWORK_TYPE_ESP8266 #define DEFAULT_EMAIL_NETWORK_TYPE_ESP8266 NETWORK_ESP8266 #define DEFAULT_INTERNAL_ESP8266_STORAGE STORAGE_SPIFFS #endif #ifndef DEFAULT_EMAIL_NETWORK_TYPE_ESP32 #define DEFAULT_EMAIL_NETWORK_TYPE_ESP32 NETWORK_ESP32 #define DEFAULT_INTERNAL_ESP32_STORAGE STORAGE_SPIFFS #endif #ifndef DEFAULT_EMAIL_NETWORK_TYPE_ARDUINO #define DEFAULT_EMAIL_NETWORK_TYPE_ARDUINO NETWORK_W5100 #endif #ifndef DEFAULT_EMAIL_NETWORK_TYPE_ARDUINO_SAMD #define DEFAULT_EMAIL_NETWORK_TYPE_SAMD NETWORK_WiFiNINA #endif #define SD_CS_PIN 4 //#define STORAGE_INTERNAL_FORCE_DISABLE //#define STORAGE_SD_FORCE_DISABLE #endif
Attachments:
You must be logged in to view attached files. -
3 September 2021 at 07:54 #14193
Hi SSpence,
you must configure correctly the device here first#ifndef DEFAULT_EMAIL_NETWORK_TYPE_ESP32 #define DEFAULT_EMAIL_NETWORK_TYPE_ESP32 NETWORK_ESP32 #define DEFAULT_INTERNAL_ESP32_STORAGE STORAGE_SPIFFS #endif
I think you must select one of
#define NETWORK_W5100 (2) #define NETWORK_ENC28J60 (3) #define NETWORK_ESP32_ETH (5)
based on the library you select to control w5500.
You can find some information here.
Bye Renzo
-
4 September 2021 at 09:22 #14248
so, using the esp32 and the w5500, I would choose what option, and // comment out the others?
-
4 September 2021 at 09:37 #14249
in my sketch, can I add the following lines:
#define DEFAULT_EMAIL_NETWORK_TYPE_ESP32 NETWORK_ESP32
#define NETWORK_ESP32_ETH (5)
and not touch the emailsenderkey.h file?
-
4 September 2021 at 15:46 #14250
Exception stack trace decoder shows the following:
Decoding stack results
0x4008be30: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 155
0x4008c061: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 170
0x40088301: xQueueGenericReceive at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c line 1442
0x4012947e: sys_mutex_lock at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c line 78
0x4012967e: sys_arch_protect at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c line 469
0x4011bae0: do_memp_malloc_pool at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/memp.c line 302
0x4011bb49: memp_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/memp.c line 398
0x40118ce6: netconn_alloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_msg.c line 742
0x40117b70: netconn_new_with_proto_and_callback at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_lib.c line 133
0x4011b364: lwip_socket at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/sockets.c line 1587
0x400d46d8: start_ssl_client(sslclient_context*, char const*, unsigned int, int, char const*, char const*, char const*, char const*, char const*) at C:\Users\Student01\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure\src\ssl_client.cpp line 61
0x400d4456: WiFiClientSecure::connect(char const*, unsigned short, char const*, char const*, char const*) at C:\Users\Student01\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure\src\WiFiClientSecure.cpp line 129
0x400d4551: WiFiClientSecure::connect(char const*, unsigned short) at C:\Users\Student01\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure\src\WiFiClientSecure.cpp line 111
0x400d2525: EMailSender::send(char const**, unsigned char, unsigned char, unsigned char, EMailSender::EMailMessage&, EMailSender::Attachments) at C:\Users\Student01\Documents\Arduino\libraries\EMailSender\EMailSender.cpp line 396
0x400d384a: EMailSender::send(char const**, unsigned char, unsigned char, EMailSender::EMailMessage&, EMailSender::Attachments) at C:\Users\Student01\Documents\Arduino\libraries\EMailSender\EMailSender.cpp line 351
0x400d3875: EMailSender::send(char const**, unsigned char, EMailSender::EMailMessage&, EMailSender::Attachments) at C:\Users\Student01\Documents\Arduino\libraries\EMailSender\EMailSender.cpp line 346
0x400d38a1: EMailSender::send(char const*, EMailSender::EMailMessage&, EMailSender::Attachments) at C:\Users\Student01\Documents\Arduino\libraries\EMailSender\EMailSender.cpp line 341
0x400d1e36: setup() at C:\Users\Student01\Documents\Arduino\EMailSenderEsp32GMailTestETH/EMailSenderEsp32GMailTestETH.ino line 58
0x400d9f53: loopTask(void*) at C:\Users\Student01\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\main.cpp line 14
0x40088615: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143-
This reply was modified 1 year, 9 months ago by
Renzo Mischianti.
-
This reply was modified 1 year, 9 months ago by
-
4 September 2021 at 15:58 #14252
emailsender.h has the following:
#elif(EMAIL_NETWORK_TYPE == NETWORK_ESP32_ETH)
#include <ETH.h>
#define EMAIL_NETWORK_CLASS WiFiClient
#define EMAIL_NETWORK_SERVER_CLASS WiFiServerwhy? if it’s ethernet, why is wifi being called?
-
4 September 2021 at 17:19 #14253
Hi sspence,
no, you must change EMailSenderKey.h with#ifndef DEFAULT_EMAIL_NETWORK_TYPE_ESP32 #define DEFAULT_EMAIL_NETWORK_TYPE_ESP32 NETWORK_ESP32_ETH #define DEFAULT_INTERNAL_ESP32_STORAGE STORAGE_SPIFFS #endif
The Client and Server are correct..
https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/ETH_LAN8720/ETH_LAN8720.inoBye Renzo
-
5 September 2021 at 07:56 #14254
Progress:
Connection: ESTABLISHED
Got IP address: 10.0.160.182
Sending status:
Connection: ESTABLISHED
Got IP address: 10.0.160.182
Sending status:
0
2
Could not connect to mail serverAt least it compiles ….
-
5 September 2021 at 08:07 #14255
It’s not connecting to my gmail account. It used to connect. email address and password have not changed. Gmail gave me an unknown device, access blocked message. I told it it was me. I’m no longer getting security messages, but there’s still no connection. gmail account set to allow insecure connections, no 2 factor.
-
6 September 2021 at 10:09 #14270
“<b>Telnet smtp.gmail.com 465” from the same network works fine, with no errors.</b>
-
6 September 2021 at 11:43 #14275
Hi SSpence,
you can’t use GMail directly, you must follow these steps
Configure GMail for EMailSenderGive me a feedback.
Bye Renzo -
6 September 2021 at 11:47 #14276
I’ve been using gmail for months. It’s been configured for unsecure, no 2 factor. It was working until I switched from wifi to ethernet. now it no longer works.
-
6 September 2021 at 12:18 #14283
I search a bit and seems the problem is that Ethernet not support SSL natively, so I think you must use service like SendGrid.
Bye Renzo
-
-
AuthorPosts
- You must be logged in to reply to this topic.