Amazon IOT disconnects and won't reconnect
Amazon IOT disconnects and won't reconnect
I can send and receive messages from cloud until it drops then it won't reconnect. Some times it will stay connected for hours
I (2761787) wifi: bcn_timout,ap_probe_send_start
I (2764297) wifi: ap_probe_send over, resett wifi status to disassoc
I (2764297) wifi: state: run -> init (100)
I (2764297) wifi: pm stop, total sleep time: 2234832424 us / 2396858473 us
I (2764297) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
E (2766637) aws_iot: failed! mbedtls_ssl_write returned -0x4e
E (2766647) aws_iot: failed! mbedtls_ssl_write returned -0x4e
W (2766647) AIOT: MQTT Disconnect
I (2766647) AIOT: Auto Reconnect is enabled, Reconnecting attempt will start now
I (2766847) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
I (2766847) wifi: state: init -> auth (b0)
I (2766847) wifi: state: auth -> assoc (0)
I (2766857) wifi: state: assoc -> run (10)
I (2766887) wifi: connected with AirLinksys24G, channel 10, bssid = 60:38:e0:99:9d:35
I (2766887) wifi: pm start, type: 1
I (2767867) event: sta ip: 192.168.1.135, mask: 255.255.255.0, gw: 192.168.1.1
E (2862327) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (2952507) aws_iot: failed! mbedtls_ssl_setup returned -0x7f00
E (3048037) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (3143577) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (3238777) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
I (2761787) wifi: bcn_timout,ap_probe_send_start
I (2764297) wifi: ap_probe_send over, resett wifi status to disassoc
I (2764297) wifi: state: run -> init (100)
I (2764297) wifi: pm stop, total sleep time: 2234832424 us / 2396858473 us
I (2764297) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
E (2766637) aws_iot: failed! mbedtls_ssl_write returned -0x4e
E (2766647) aws_iot: failed! mbedtls_ssl_write returned -0x4e
W (2766647) AIOT: MQTT Disconnect
I (2766647) AIOT: Auto Reconnect is enabled, Reconnecting attempt will start now
I (2766847) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
I (2766847) wifi: state: init -> auth (b0)
I (2766847) wifi: state: auth -> assoc (0)
I (2766857) wifi: state: assoc -> run (10)
I (2766887) wifi: connected with AirLinksys24G, channel 10, bssid = 60:38:e0:99:9d:35
I (2766887) wifi: pm start, type: 1
I (2767867) event: sta ip: 192.168.1.135, mask: 255.255.255.0, gw: 192.168.1.1
E (2862327) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (2952507) aws_iot: failed! mbedtls_ssl_setup returned -0x7f00
E (3048037) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (3143577) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (3238777) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
-
- Posts: 190
- Joined: Wed Jan 24, 2018 6:51 am
Re: Amazon IOT disconnects and won't reconnect
Could you please help to check if there is sufficient dynamic memory available before attempting to connect to AWS IoT (error code -0x7F00 points to failure in allocation)? If not already done then, API can help to free up memory from previous TLS connection, once there is WiFi disconnect event.
Code: Select all
aws_iot_mqtt_disconnect()
Mahavir
https://github.com/mahavirj/
https://github.com/mahavirj/
Re: Amazon IOT disconnects and won't reconnect
Hi,jrounds wrote: ↑Thu Dec 13, 2018 6:14 pmI can send and receive messages from cloud until it drops then it won't reconnect. Some times it will stay connected for hours
I (2761787) wifi: bcn_timout,ap_probe_send_start
I (2764297) wifi: ap_probe_send over, resett wifi status to disassoc
I (2764297) wifi: state: run -> init (100)
I (2764297) wifi: pm stop, total sleep time: 2234832424 us / 2396858473 us
I (2764297) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
E (2766637) aws_iot: failed! mbedtls_ssl_write returned -0x4e
E (2766647) aws_iot: failed! mbedtls_ssl_write returned -0x4e
W (2766647) AIOT: MQTT Disconnect
I (2766647) AIOT: Auto Reconnect is enabled, Reconnecting attempt will start now
I (2766847) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
I (2766847) wifi: state: init -> auth (b0)
I (2766847) wifi: state: auth -> assoc (0)
I (2766857) wifi: state: assoc -> run (10)
I (2766887) wifi: connected with AirLinksys24G, channel 10, bssid = 60:38:e0:99:9d:35
I (2766887) wifi: pm start, type: 1
I (2767867) event: sta ip: 192.168.1.135, mask: 255.255.255.0, gw: 192.168.1.1
E (2862327) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (2952507) aws_iot: failed! mbedtls_ssl_setup returned -0x7f00
E (3048037) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (3143577) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
E (3238777) aws_iot: failed! mbedtls_ssl_handshake returned -0x6800
Would you please check free heap size using getfreeheapsize API ? As it looks like there is an issue with memory as you are using mbedTLS and AWS IOT components which are heavy memory consumption. So just have doubt for that.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Amazon IOT disconnects and won't reconnect
I call aws_iot_mqtt_disconnect and have even tried deleting the whole task thread and restarting it any suggestions?
Re: Amazon IOT disconnects and won't reconnect
Hi,
Did you try with checking free heap size remaining before calling any cloud based request? so that it will be easier for me to provide further suggestions.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Amazon IOT disconnects and won't reconnect
See below the heap looks like it has plenty of mermory
Free 8bit-capable memory (after 32-bit): 22620K, 32-bit capable memory 83272K
I (318518) wifi: bcn_timout,ap_probe_send_start
W (318518) wifi: alloc eb len=76 type=2 fail, heap:20
W (318518) wifi: m f probe req l=0
W (319528) wifi: alloc eb len=76 type=2 fail, heap:20
W (319528) wifi: m f probe req l=0
W (320528) wifi: alloc eb len=76 type=2 fail, heap:20
W (320528) wifi: m f probe req l=0
I (321028) wifi: ap_probe_send over, resett wifi status to disassoc
I (321028) wifi: state: run -> init (c800)
I (321028) wifi: pm stop, total sleep time: 253083337 us / 316085321 us
I (321028) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
I (321038) AirCylcer: Event called
I (321158) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
I (321158) wifi: state: init -> auth (b0)
I (321168) wifi: state: auth -> assoc (0)
I (321168) wifi: state: assoc -> run (10)
I (321208) wifi: connected with AirLinksys24G, channel 10, bssid = 60:38:e0:99:9d:35
I (321208) wifi: pm start, type: 1
I (321208) AirCylcer: Event called
I (321798) event: sta ip: 192.168.1.149, mask: 255.255.255.0, gw: 192.168.1.1
I (321798) AirCylcer: Event called
E (331048) aws_iot: failed! mbedtls_ssl_write returned -0x4e
E (331518) aws_iot: failed! mbedtls_ssl_handshake returned -0x2700
E (331518) aws_iot: Unable to verify the server's certificate.
Free 8bit-capable memory (after 32-bit): 22620K, 32-bit capable memory 83272K
E (331528) AIOT: Error(-4) connecting to a1olbtf05i1ac0.iot.us-east-1.amazonaws.com:8883
E (341988) aws_iot: failed! mbedtls_ssl_handshake returned -0x2700
E (341988) aws_iot: Unable to verify the server's certificate.
Free 8bit-capable memory (after 32-bit): 22332K, 32-bit capable memory 82984K
E (341998) AIOT: Error(-4) connecting to a1olbtf05i1ac0.iot.us-east-1.amazonaws.com:8883
E (352258) aws_iot: failed! mbedtls_ssl_handshake returned -0x2700
E (352258) aws_iot: Unable to verify the server's certificate.
Free 8bit-capable memory (after 32-bit): 21692K, 32-bit capable memory 82344K
E (352268) AIOT: Error(-4) connecting to a1olbtf05i1ac0.iot.us-east-1.amazonaws.com:8883
Free 8bit-capable memory (after 32-bit): 22620K, 32-bit capable memory 83272K
I (318518) wifi: bcn_timout,ap_probe_send_start
W (318518) wifi: alloc eb len=76 type=2 fail, heap:20
W (318518) wifi: m f probe req l=0
W (319528) wifi: alloc eb len=76 type=2 fail, heap:20
W (319528) wifi: m f probe req l=0
W (320528) wifi: alloc eb len=76 type=2 fail, heap:20
W (320528) wifi: m f probe req l=0
I (321028) wifi: ap_probe_send over, resett wifi status to disassoc
I (321028) wifi: state: run -> init (c800)
I (321028) wifi: pm stop, total sleep time: 253083337 us / 316085321 us
I (321028) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
I (321038) AirCylcer: Event called
I (321158) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
I (321158) wifi: state: init -> auth (b0)
I (321168) wifi: state: auth -> assoc (0)
I (321168) wifi: state: assoc -> run (10)
I (321208) wifi: connected with AirLinksys24G, channel 10, bssid = 60:38:e0:99:9d:35
I (321208) wifi: pm start, type: 1
I (321208) AirCylcer: Event called
I (321798) event: sta ip: 192.168.1.149, mask: 255.255.255.0, gw: 192.168.1.1
I (321798) AirCylcer: Event called
E (331048) aws_iot: failed! mbedtls_ssl_write returned -0x4e
E (331518) aws_iot: failed! mbedtls_ssl_handshake returned -0x2700
E (331518) aws_iot: Unable to verify the server's certificate.
Free 8bit-capable memory (after 32-bit): 22620K, 32-bit capable memory 83272K
E (331528) AIOT: Error(-4) connecting to a1olbtf05i1ac0.iot.us-east-1.amazonaws.com:8883
E (341988) aws_iot: failed! mbedtls_ssl_handshake returned -0x2700
E (341988) aws_iot: Unable to verify the server's certificate.
Free 8bit-capable memory (after 32-bit): 22332K, 32-bit capable memory 82984K
E (341998) AIOT: Error(-4) connecting to a1olbtf05i1ac0.iot.us-east-1.amazonaws.com:8883
E (352258) aws_iot: failed! mbedtls_ssl_handshake returned -0x2700
E (352258) aws_iot: Unable to verify the server's certificate.
Free 8bit-capable memory (after 32-bit): 21692K, 32-bit capable memory 82344K
E (352268) AIOT: Error(-4) connecting to a1olbtf05i1ac0.iot.us-east-1.amazonaws.com:8883
Re: Amazon IOT disconnects and won't reconnect
Any suggestions I have been spinning my wheels on this issues. I understand that is is a heap size issues my guess is some wifi buffer fills up doesn't get cleared. Am I the only having issues any help would be greatly appreciated this is the last hurdle I am having with my code. Thank you
Joseph
Joseph
Re: Amazon IOT disconnects and won't reconnect
Sorry. Let me check it in details tomorrow and get back to you.jrounds wrote: ↑Thu Mar 07, 2019 8:29 pmAny suggestions I have been spinning my wheels on this issues. I understand that is is a heap size issues my guess is some wifi buffer fills up doesn't get cleared. Am I the only having issues any help would be greatly appreciated this is the last hurdle I am having with my code. Thank you
Joseph
Espressif Developer, would you guys please check it into parallel?
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Amazon IOT disconnects and won't reconnect
#define MBEDTLS_ERR_NET_SEND_FAILED -0x004E /**< Sending information through the socket failed. */
#define MBEDTLS_ERR_SSL_TIMEOUT -0x6800 /**< The operation timed out. */
Looks like you aren't waiting for the wifi to connect before trying to talk to the outside world.
#define MBEDTLS_ERR_SSL_TIMEOUT -0x6800 /**< The operation timed out. */
Looks like you aren't waiting for the wifi to connect before trying to talk to the outside world.
John AE (2766637) aws_iot: failed! mbedtls_ssl_write returned -0x4e
E (2766647) aws_iot: failed! mbedtls_ssl_write returned -0x4e
W (2766647) AIOT: MQTT Disconnect
I (2766647) AIOT: Auto Reconnect is enabled, Reconnecting attempt will start now
I (2766847) wifi: new:<10,0>, old:<10,0>, ap:<255,255>, sta:<10,0>, prof:1
I (2766847) wifi: state: init -> auth (b0)
I (2766847) wifi: state: auth -> assoc (0)
I (2766857) wifi: state: assoc -> run (10)
I (2766887) wifi: connected with AirLinksys24G, channel 10, bssid = 60:38:e0:99:9d:35
I (2766887) wifi: pm start, type: 1
I (2767867) event: sta ip: 192.168.1.135, mask: 255.255.255.0, gw: 192.168.1.1
Re: Amazon IOT disconnects and won't reconnect
Even with a wait it still the same message sorry the example I posted must of left that code out but the result is the same with our without it
Who is online
Users browsing this forum: Bing [Bot], Gaston1980 and 164 guests