Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Crash while connecting to AWS

sunfingersunfinger Germany
edited February 13 in Mongoose OS

Everything was working fine but one week ago my ESP8266 crashing when connecting to AWS. Not always but very very often. Connected once it works like a charme.
I have change to mongoose OS from release to latest without success.
ESP8266 connecting to Wifi, getting IP by DHCP, synchronize time by SNTP and starts connecting to AWS endpoint and crashes.
Sometimes 9 of 10 connects fail, today 1 of 5. I know there are different endpoints at AWS but I can't identify any pattern.
If needed I can provide core dump.

Cheers Tom

[Feb 11 19:17:28.487] dhcp client start...
[Feb 11 19:17:28.490] mgos_net.c:89           WiFi STA: connected
[Feb 11 19:17:29.761] ip:172.16.0.83,mask:255.255.255.0,gw:172.16.0.1
[Feb 11 19:17:29.764] mgos_net.c:101          WiFi STA: ready, IP 172.16.0.83, GW 172.16.0.1, DNS 172.16.0.1
[Feb 11 19:17:29.773] mgos_provision_state:43 Current state: 1 -> 2
[Feb 11 19:17:29.777] mgos_mqtt.c:427         MQTT connecting to xxxxxxxxxxxxxxx.iot.eu-west-1.amazonaws.com:8883
[Feb 11 19:17:29.812] mgos_mongoose.c:66      New heap free LWM: 24504
[Feb 11 19:17:29.830] mgos_mongoose.c:66      New heap free LWM: 24256
[Feb 11 19:17:30.840] mgos_sntp.c:95          SNTP query to time.google.com
[Feb 11 19:17:30.848] mgos_mongoose.c:66      New heap free LWM: 24048
[Feb 11 19:17:30.894] mgos_sntp.c:59          SNTP reply from 216.239.35.12: time 1549909051.082536, local 7.287807, delta 1549909043.794729
[Feb 11 19:17:30.948] mgos_mongoose.c:66      New heap free LWM: 20688
[Feb 11 19:17:30.971] mg_ssl_if_mbedtls.c:35  0x3fff250c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
[Feb 11 19:17:31.757] SW ECDH curve 3
[Feb 11 19:17:39.367] E:M 36 (5 blocks)
[Feb 11 19:17:39.367] 
[Feb 11 19:17:39.367] Exception 29 @ 0x4000e1b2, vaddr 0x00000000
[Feb 11 19:17:39.372]  A0: 0x402971a7  A1: 0x3ffff670  A2: 0x00000000  A3: 0x00000000
[Feb 11 19:17:39.378]  A4: 0x00000024  A5: 0x00000000  A6: 0x00000020  A7: 0x00000002
[Feb 11 19:17:39.383]  A8: 0x3ffe83cc  A9: 0x00000190 A10: 0x00000000 A11: 0x0000007c
[Feb 11 19:17:39.389] A12: 0x00000000 A13: 0x00000024 A14: 0x00000008 A15: 0x3ffff70c
[Feb 11 19:17:39.394] 
[Feb 11 19:17:39.394] (exc SP: 0x3ffff4d0)
[Feb 11 19:17:39.394] 
[Feb 11 19:17:39.394] --- BEGIN CORE DUMP ---
[Feb 11 19:17:39.397] mos: catching core dump
[Feb 11 19:17:42.243] ....
[Feb 11 19:17:50.949] ---- END CORE DUMP ----

Comments

  • Is it the wrong forum for my topic?

  • JuanilloJuanillo Madrid
    edited February 17

    I have the same problem. I used in combination with BM280 (I2C - 0x76) and I observe that if I remove BME280 code works correctly.
    Here is my output when I used with BME280:

    Feb 17 12:01:43.060] mgos_net_on_change_c WiFi STA: connected
    [Feb 17 12:01:44.145] ip:192.168.1.49,mask:255.255.255.0,gw:192.168.1.1
    [Feb 17 12:01:44.145] mgos_net_on_change_c WiFi STA: ready, IP 192.168.1.49, GW 192.168.1.1, DNS 80.58.61.250
    [Feb 17 12:01:44.150] mgos_provision_set_c Current state: 1 -> 2
    [Feb 17 12:01:44.159] mgos_mqtt_global_con MQTT connecting to xxxxxxxxxxxxxxxxx.amazonaws.com:8883
    [Feb 17 12:01:44.305] mongoose_poll        New heap free LWM: 20272
    [Feb 17 12:01:44.319] mg_ssl_mbed_log      0x3ffef76c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
    [Feb 17 12:01:45.117] SW ECDH curve 3
    [Feb 17 12:01:52.757] E:M 64 (9 blocks)
    [Feb 17 12:01:52.847]
    [Feb 17 12:01:52.847] Exception 29 @ 0x4000e1b2, vaddr 0x00000000
    [Feb 17 12:01:52.847]  A0: 0x402982b3  A1: 0x3ffff700  A2: 0x00000000  A3: 0x00000000
    [Feb 17 12:01:52.847]  A4: 0x00000040  A5: 0x00000000  A6: 0x00000040  A7: 0x00000004
    [Feb 17 12:01:52.847]  A8: 0x3ffe83cc  A9: 0x00000190 A10: 0x00000000 A11: 0x0000007c
    [Feb 17 12:01:52.847] A12: 0x00000000 A13: 0x00000040 A14: 0x00000000 A15: 0x3fffb788
    [Feb 17 12:01:52.847]
    [Feb 17 12:01:52.847] (exc SP: 0x3ffff560)
    [Feb 17 12:01:52.847]
    [Feb 17 12:01:52.847] --- BEGIN CORE DUMP ---
    [Feb 17 12:01:52.847] mos: catching core dump
    

    mongoose-os version: 2.11

  • JuanilloJuanillo Madrid
    edited February 17

    Hi, I solved it.

    There is no problem with BME280 and AWS. I solved by regenerating certificates, copy to 'fs' folder, build and flash.

    This perhaps could help you @sunfinger

  • Sometime it works, sometime it crashes. I guess your device still chrashing. Try reconnect and check. Once connected it's works. So probably nobody takes notice because it will connect after x crashes.

    Tom

Sign In or Register to comment.