LeClubSandwichStudio / LaCOOLBoard

Arduino library & sample sketches for La COOL Board, the open-source, open-hardware environmental monitoring and control device
http://www.lacool.co
MIT License
3 stars 5 forks source link

Waiting for NTP... but Network is unreachable #170

Open Kameeno opened 6 years ago

Kameeno commented 6 years ago

It is useless to search a request from NTP if the coolboard is not connected to wifi

I got 4 networks on the wifiConfig, no one of these are reachable, my COOL Board is sitll waiting for an NTP response that'll never come.

LeSuedois commented 6 years ago

I just saw a crash that could be interesting on CoolCave: (sorry for improper text formatting code doesn't work due to funny caracters in DEBUG...)

[2018-07-12T09:07:27Z][HEAP:22576]INFO: Connecting... [2018-07-12T09:07:28Z][HEAP:22112]DEBUG: Reading configuration file as JSON: /wifiConfig.json [2018-07-12T09:07:28Z][HEAP:22112]DEBUG: Configuration JSON:{"wifiCount":1,"timeOut":180,"Wifi0":{"ssid":"lapaillasse","pass":"biohacking"}} [2018-07-12T09:07:28Z][HEAP:22192]INFO: Wifi configuration loaded [2018-07-12T09:07:28Z][HEAP:22192]INFO: Wifi configuration [2018-07-12T09:07:28Z][HEAP:22192]INFO: Wifi count = 1 [2018-07-12T09:07:28Z][HEAP:22192]INFO: Timeout = 180 [2018-07-12T09:07:28Z][HEAP:22192]INFO: Network # 0 [2018-07-12T09:07:28Z][HEAP:22192]INFO: SSID = lapaillasse [2018-07-12T09:07:28Z][HEAP:22512]INFO: Wifi connecting... [2018-07-12T09:07:28Z][HEAP:22512]DEBUG: Entry time to Wifi connection attempt: 809433 [2018-07-12T09:07:28Z][HEAP:22512]DEBUG: Exit time from Wifi connection attempt: 809441 [2018-07-12T09:07:28Z][HEAP:22512]INFO: Wifi status: connected [2018-07-12T09:07:28Z][HEAP:22512]INFO: RTC ISO8601 timestamp: 2018-07-12T09:07:28Z [2018-07-12T09:07:28Z][HEAP:22512]DEBUG: RTC UNIX timestamp: 1531386448 [2018-07-12T09:07:28Z][HEAP:22352]INFO: MQTT connecting... [2018-07-12T09:07:28Z][HEAP:22352]DEBUG: MQTT client id: 6001941D4CB4 [2018-07-12T09:07:28Z][HEAP:22352]DEBUG: Loading X509 certificate [2018-07-12T09:07:29Z][HEAP:21296]DEBUG: Closing bin file [2018-07-12T09:07:29Z][HEAP:22512]DEBUG: Loading X509 private key [2018-07-12T09:07:30Z][HEAP:20848]DEBUG: Closing bin file [2018-07-12T09:07:31Z][HEAP:22512]DEBUG: Configuring MQTT [2018-07-12T09:07:41Z][HEAP:22632]WARN: MQTT connection failed, retrying [2018-07-12T09:07:41Z][HEAP:22632]DEBUG: Loading X509 certificate [2018-07-12T09:07:42Z][HEAP:21416]DEBUG: Closing bin file [2018-07-12T09:07:42Z][HEAP:22632]DEBUG: Loading X509 private key [2018-07-12T09:07:43Z][HEAP:20968]DEBUG: Closing bin file [2018-07-12T09:07:43Z][HEAP:22632]DEBUG: Configuring MQTT [2018-07-12T09:07:44Z][HEAP:22680]WARN: MQTT connection failed, retrying [2018-07-12T09:07:44Z][HEAP:22680]DEBUG: Loading X509 certificate [2018-07-12T09:07:45Z][HEAP:21464]DEBUG: Closing bin file [2018-07-12T09:07:45Z][HEAP:22680]DEBUG: Loading X509 private key [2018-07-12T09:07:46Z][HEAP:21016]DEBUG: Closing bin file [2018-07-12T09:07:46Z][HEAP:22680]DEBUG: Configuring MQTT [2018-07-12T09:07:59Z][HEAP:3176]DEBUG: Received response from NTP server

Exception (29): epc1=0x40234e16 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000084 depc=0x00000000

ctx: cont sp: 3ffff9a0 end: 3fffffd0 offset: 01a0

stack>>> 3ffffb40: ffffffff 00000000 3fffa844 3fff1064
3ffffb50: 3fffa7c4 00000210 3fffa7c4 40100698
3ffffb60: 0000010c 40243ff2 000091f8 0000123f
3ffffb70: 00000043 3fffad88 00000001 3fffa848
3ffffb80: 00000000 d21c8bf4 00000000 00000001
3ffffb90: 00600000 00000060 3fffb304 40243ff2
3ffffba0: 04c2f3f0 3fffbf94 3fffb304 402441ec
3ffffbb0: 7ccebaa1 7ccebaa1 00000021 4024460c
3ffffbc0: 3fffa40c ffffffe1 00000021 00000020
3ffffbd0: 3fffbf94 00000060 3fffb2d4 40244505
3ffffbe0: 3fffa9e4 3fffb304 00000000 00000020
3ffffbf0: 3fffbf94 00000000 3fffbf94 00000040
3ffffc00: 00000020 3fffbf94 3fffb2d4 3fffb2ec
3ffffc10: 00000021 3fffbf94 3fffbf94 40245089
3ffffc20: 3fff466c 0000001f c51bf4a0 00000001
3ffffc30: 3fffbf94 3fffb2ec 3fffb2d4 40244a0a
3ffffc40: 000003f0 3fffbf94 000003ef 40245275
3ffffc50: 3fffb2d4 3fff463c 000003ef 00000008
3ffffc60: 00000004 3fff5d94 000003ff 3fff178c
3ffffc70: 0000010b 0000010b 3fffb274 3fff463c
3ffffc80: 3fff6994 3fff5d94 3fffbf94 40245434
3ffffc90: 3fff466c 3fff1734 3fff5d94 40244208
3ffffca0: 12337dc1 cc82a9fc a5b0c5cd 00000000
3ffffcb0: 00000100 3fff6e2c 3fff7239 40246240
3ffffcc0: 3fff4804 3fff6e2c 3fff7239 402447bc
3ffffcd0: 00000100 3fff6e2c 3fff7239 40246448
3ffffce0: 3ffffd10 2c49a88a 000000cd 00000033
3ffffcf0: fd08d51d 5a146465 2d8ea768 3fff6e2c
3ffffd00: 3fff7231 00000006 3fff63bc 4024156c
3ffffd10: 0d303130 86600906 03650148 05010204
3ffffd20: c1200400 fc12337d cdcc82a9 e7a5b0c5
3ffffd30: 425b20b4 4f42315c 5f1c283b 6efc13cf
3ffffd40: 00822a43 00000b0d 3fff52f4 40220b46
3ffffd50: 0000004a 00000006 0000002a 00000004
3ffffd60: 3fff7e04 00000004 3fff63bc 00000004
3ffffd70: 3fff7e04 00000004 3fff63bc 40240f20
3ffffd80: a5bba4b0 00000000 00000000 0000002b
3ffffd90: 00000060 3fff7231 3fff63bc 402412fc
3ffffda0: 00000014 3fff7264 000001f4 401004e8
3ffffdb0: 3ffffe08 0000000e 00000010 3fff469c
3ffffdc0: 00000000 00000000 4bc6a7f0 01000000
3ffffdd0: 3ffffe08 000cc0b2 3fff63bc 40241088
3ffffde0: 00000000 3fff63bc 3ffffe00 3fff469c
3ffffdf0: 3fffb274 000cc0b2 3fff3d9c 40209b19
3ffffe00: 3fff63bc 3fff4654 40220a8c 3fffefb0
3ffffe10: 00003a98 00003a98 00003a98 4020164f
3ffffe20: 00000000 3fff3d44 3fffb274 00000000
3ffffe30: 000022b3 3fff20ac 3fff3d44 40209d67
3ffffe40: 000022b3 3fff3d44 3fff20ac 00000000
3ffffe50: 000022b3 3fff3d44 3fff20ac 40209ea9
3ffffe60: 4022c540 45571134 4022c540 45571134
3ffffe70: 00000000 3fff3d04 3fff2d04 4020b193
3ffffe80: 00000000 00000000 00000000 40210964
3ffffe90: 00000000 00000000 3fff64f4 00000000
3ffffea0: 00000000 00000000 3ffe85cc 00000003
3ffffeb0: 3fff0d30 3fff08cc 3fff0d50 4020b2d8
3ffffec0: 00000000 00000000 00000005 00000003
3ffffed0: 3fff0d30 3fff08cc 3fff0d50 4020d8da
3ffffee0: 00000000 00000000 00000000 3fff0e64
3ffffef0: 00000000 3fff0e10 40220a8c 3fffefb0
3fffff00: 4020165a 00000064 00000064 3fff0e10
3fffff10: 3fff0914 3fff08cc 3fff0d50 4020d95c
3fffff20: 3fff0d30 3fff08cc 3fff0d50 4021f350
3fffff30: 3fff0d30 3fff08cc 3fff0d50 4020f141
3fffff40: 00000000 00000000 00000000 00000100
3fffff50: 00000000 00000000 00000000 00000000
3fffff60: 00000000 00000000 00000000 00000000
3fffff70: 00000000 00000000 00000000 3fffff70
3fffff80: 00000001 3fff4990 00000001 40211508
3fffff90: 0001c200 0000001c 00000000 3fff0e10
3fffffa0: 3fffdad0 00000000 3fff0e08 40207e50
3fffffb0: 3fffdad0 00000000 3fff0e08 40220b18
3fffffc0: feefeffe feefeffe 3ffe85cc 40100721
<<<stack<<<

last failed alloc call: 40243FF2(528)

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v00000000 ~ld [1996-03-04T20:48:00Z][HEAP:34496]DEBUG: Raw value: 1 [1984-02-27T20:48:00Z][HEAP:34496]DEBUG: Battery voltage: 0.01

ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v00000000 ~ld