Photon 2 wifi stability issues on 5.8.2

Hi,

I have a Photon 2 that I've just started using that is having issues connecting and staying connected to wifi.

It was recently on 5.8.0, and I locally flashed 5.8.2 onto it. It immediately started having these issues. It usually shows up as the fast blinking cyan happening for a long time, then going back to blinking green. The log shows it's mostly hanging on "establishing secure connection" and then disconnecting. Sometimes it does connect, other times it just retries, but then always disconnecting pretty soon after.
After flashing it did hang, and unfortunately i wasnt able to count all of the red flashes, but it did get reset by my 60s hw wdt and then I've not seen it fault since.

I do notice that it takes longer to connect my other Photon 2s to this network in my office when compared to home. It may just be congestion or the network is set up in a way that makes it take longer compared to my home network.

To dig deeper on if the wifi network was somehow the issue, I had it connect to my phone's wifi and it seems to work fine... So I guess my question is what should I ask or look for in my workspace's wifi settings that would cause this issue? I'll see what info I can get from the workspace management but I'm not sure what else I can check from my end. Still - I don't know why it's having issues on 5.8.2 when it didn't seem to have these issues on 5.8.0.

Here's particle serial inspect

Device: 0a10aced202194944a059060
Platform: 32 - Photon 2 / P2

Modules
  Bootloader module #0 - version 2601
  Size: 56.34 kB / MaxSize: 65.536 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #2 - version 8

  Bootloader module #1 - version 2
  Size: 4.204 kB / MaxSize: 8.192 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

  Bootloader module #2 - version 8
  Size: 79.188 kB / MaxSize: 303.104 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

  System part module #1 - version 5802
  Size: 1213.788 kB / MaxSize: 1572.864 kB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 2601

  User part module #1 - version 6
  Size: 127.256 kB / MaxSize: 1572.864 kB
    UUID: 69ff25ca917a7cac415336487f78a5755d0b148500daa7022e671780baf36b63
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System part module #1 - version 5802
    Asset Dependencies:
      Required:
        CBS_5_1_5_C.cyacd (PASS)
        CBT_5_0_6_C.cyacd (PASS)
        PC_5_0_3_C.cyacd (PASS)
        PO_5_0_4_C.cyacd (PASS)
        PS_5_0_2_C.cyacd (PASS)

Big log dump below, removed my [app] entries. All from when the Photon 2 was connected to the workspace wifi.

C:\>particle serial monitor --follow
Polling for available serial device...Opening serial monitor for com port: " COM11 "
Serial monitor opened successfully:
0000036194 [ncp.rltk.client] TRACE: Disconnected
0000036195 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000036196 [net.rltkncp] TRACE: NCP event 2
0000036197 [net.rltkncp] TRACE: State changed event: 0
0000036199 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0000036203 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000036205 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0000036209 [hal] INFO: DNS server list changed
0000036210 [hal] INFO: DNS server list changed
0000036214 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0000036238 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000036241 [net.rltkncp] TRACE: NCP event 2
0000036242 [net.rltkncp] TRACE: State changed event: 1
0000036243 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000047598 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000047600 [net.rltkncp] TRACE: NCP event 2
0000047601 [net.rltkncp] TRACE: State changed event: 0
0000048103 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000048105 [net.rltkncp] TRACE: NCP event 2
0000048106 [net.rltkncp] TRACE: State changed event: 1
0000048107 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000059462 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000059463 [net.rltkncp] TRACE: NCP event 2
0000059464 [net.rltkncp] TRACE: State changed event: 0
0000063778 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0000063779 [hal.ble] TRACE: Going to stop the stack...
0000064091 [hal] INFO: WiFi off
0000064102 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:90:60
0000064236 [hal] INFO: WiFi on
0000064237 [hal] INFO: WiFi is already on
0000064341 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000064342 [net.rltkncp] TRACE: NCP event 2
0000064343 [net.rltkncp] TRACE: State changed event: 1
0000064345 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics

Serial connection closed.  Attempting to reconnect...
Serial monitor opened successfully:
0000002497 [hal] INFO: WiFi KM0 firmware initialization started   result=0 (RAM start=10006000 end=1001a000)
0000002529 [hal] INFO: WiFi KM0 firmware initialization completed result=0 (RAM start=10006000 end=10013bf8 reserved=00005000)
0000002576 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:90:60
0000002728 [hal] INFO: WiFi on
0000003584 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000003656 [system.nm] INFO: State changed: IFACE_DOWN -> IFACE_REQUEST_UP
0000003709 [net.ifapi] INFO: Netif wl3 state UP
0000003742 [ncp.rltk.client] TRACE: NCP power state changed: 4
0000003743 [net.rltkncp] TRACE: NCP event 3
0000003744 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_POWERING_UP
0000003746 [system.nm] INFO: State changed: IFACE_REQUEST_UP -> IFACE_UP
0000003752 [system.nm] TRACE: Interface 4 power state changed: POWERING_UP
0000003754 [hal] INFO: WiFi is already on
0000003755 [ncp.rltk.client] TRACE: NCP power state changed: 2
0000003757 [net.rltkncp] TRACE: NCP event 3
0000003758 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_UP
0000003760 [system.nm] TRACE: Interface 4 power state changed: UP
0000003762 [ncp.rltk.client] INFO: rltkOff
0000003763 [ncp.rltk.client] INFO: rltkOff done
0000003764 [ncp.rltk.client] TRACE: NCP power state changed: 1
0000003766 [net.rltkncp] TRACE: NCP event 3
0000003767 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_DOWN
0000003769 [system.nm] TRACE: Interface 4 power state changed: DOWN
0000003771 [hal] INFO: WiFi is already on
0000003772 [ncp.rltk.client] TRACE: NCP power state changed: 2
0000003774 [net.rltkncp] TRACE: NCP event 3
0000003775 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_UP
0000003777 [system.nm] TRACE: Interface 4 power state changed: UP
0000003778 [ncp.rltk.client] TRACE: NCP state changed: 1
0000003780 [net.rltkncp] TRACE: NCP event 1
0000003783 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000003785 [net.rltkncp] TRACE: NCP event 2
0000003786 [net.rltkncp] TRACE: State changed event: 1
0000003787 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000004687 [hal] TRACE: Abort: 00000001
0000008376 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0000008379 [net.rltkncp] TRACE: NCP event 2
0000008381 [net.rltkncp] TRACE: State changed event: 2
0000008383 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0000008393 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000008430 [hal] INFO: DNS server list changed
0000008432 [hal] INFO: DNS server list changed
0000008433 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000008435 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000008440 [system] INFO: Cloud: connecting
0000008490 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000008515 [system] WARN: Failed to load session data from persistent storage
0000008538 [system] INFO: Discarding session data
0000008605 [system] TRACE: Resolving 0a10aced202194944a059060.v5.udp.particle.io#5684
0000008725 [system] TRACE: Address type: 3
0000008758 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000008779 [system] INFO: Cloud socket=0, connecting to 52.5.139.123#5684 using if 4
0000008807 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0000008827 [system] TRACE: Cloud socket=0, connected to 52.5.139.123#5684
0000008849 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000008873 [system] TRACE: Applying new keepalive interval now
0000008893 [system] INFO: Cloud socket connected
0000008908 [system] INFO: Starting handshake: presense_announce=0
0000008927 [comm.protocol.handshake] INFO: Establish secure connection
0000008987 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000012749 [comm.protocol.handshake] INFO: Sending HELLO message
0000013270 [comm.protocol.handshake] INFO: Handshake completed
0000013315 [comm.protocol.handshake] TRACE: Updating cached session parameters
0000013382 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000013440 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000014911 [comm] INFO: Sending TIME request
0000014973 [system] INFO: Send spark/device/last_reset event
0000015034 [system] INFO: Sending application DESCRIBE
0000015088 [system] INFO: Sending subscriptions
0000015130 [comm.protocol] INFO: Sending subscriptions
0000015182 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000015262 [comm.protocol] TRACE: Updating system DESCRIBE checksum
0000015323 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000016875 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000016932 [comm.protocol] INFO: Received TIME response: 1721314577
0000017386 [comm.protocol] TRACE: Updating application DESCRIBE checksum
0000017451 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000017505 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000017760 [system] INFO: All handshake messages have been processed
0000017821 [comm.protocol] TRACE: Updating subscriptions checksum
0000017879 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000017934 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000018090 [comm.protocol] INFO: Received DESCRIBE request; flags: 0x04
0000018162 [system] INFO: Cloud connected
0000018198 [system.ledger] TRACE: Connected
0000002094 [hal] INFO: WiFi KM0 firmware initialization started   result=0 (RAM start=10006000 end=1001a000)
0000002126 [hal] INFO: WiFi KM0 firmware initialization completed result=0 (RAM start=10006000 end=10013bf8 reserved=00005000)
0000002172 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:90:60
0000002324 [hal] INFO: WiFi on
0000003177 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000003254 [system.nm] INFO: State changed: IFACE_DOWN -> IFACE_REQUEST_UP
0000003294 [net.ifapi] INFO: Netif wl3 state UP
0000003325 [ncp.rltk.client] TRACE: NCP power state changed: 4
0000003326 [net.rltkncp] TRACE: NCP event 3
0000003327 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_POWERING_UP
0000003329 [system.nm] INFO: State changed: IFACE_REQUEST_UP -> IFACE_UP
0000003335 [system.nm] TRACE: Interface 4 power state changed: POWERING_UP
0000003338 [hal] INFO: WiFi is already on
0000003339 [ncp.rltk.client] TRACE: NCP power state changed: 2
0000003340 [net.rltkncp] TRACE: NCP event 3
0000003341 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_UP
0000003343 [system.nm] TRACE: Interface 4 power state changed: UP
0000003345 [ncp.rltk.client] INFO: rltkOff
0000003346 [ncp.rltk.client] INFO: rltkOff done
0000003348 [ncp.rltk.client] TRACE: NCP power state changed: 1
0000003349 [net.rltkncp] TRACE: NCP event 3
0000003350 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_DOWN
0000003353 [system.nm] TRACE: Interface 4 power state changed: DOWN
0000003354 [hal] INFO: WiFi is already on
0000003355 [ncp.rltk.client] TRACE: NCP power state changed: 2
0000003356 [net.rltkncp] TRACE: NCP event 3
0000003357 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_UP
0000003359 [system.nm] TRACE: Interface 4 power state changed: UP
0000003361 [ncp.rltk.client] TRACE: NCP state changed: 1
0000003363 [net.rltkncp] TRACE: NCP event 1
0000003366 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000003368 [net.rltkncp] TRACE: NCP event 2
0000003369 [net.rltkncp] TRACE: State changed event: 1
0000003370 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000008043 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0000008045 [net.rltkncp] TRACE: NCP event 2
0000008046 [net.rltkncp] TRACE: State changed event: 2
0000008047 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0000008057 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000008083 [hal] INFO: DNS server list changed
0000008084 [hal] INFO: DNS server list changed
0000008087 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000008088 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000008093 [system] INFO: Cloud: connecting
0000008152 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000008241 [system] INFO: Loaded cloud server address and port from session data
0000008303 [system] TRACE: Address type: 1
0000008341 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000008402 [system] INFO: Cloud socket=0, connecting to 52.5.139.123#5684 using if 4
0000008474 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0000008529 [system] TRACE: Cloud socket=0, connected to 52.5.139.123#5684
0000008597 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000008666 [system] TRACE: Applying new keepalive interval now
0000008721 [system] INFO: Cloud socket connected
0000008764 [system] INFO: Starting handshake: presense_announce=0
0000008820 [comm.protocol.handshake] INFO: Establish secure connection
0000008887 [comm.dtls] INFO: session has 0 uses
0000008933 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0000008997 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,16, next_coap_id=c
0000009063 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=12
0000009136 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0000010615 [comm.protocol.handshake] INFO: Skipping HELLO message
0000010673 [system] INFO: cloud connected from existing session.
0000010747 [comm] INFO: Sending TIME request
0000010786 [system] INFO: Send spark/device/last_reset event
0000010839 [system] INFO: Sending application DESCRIBE
0000010882 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0000010955 [system] INFO: Sending subscriptions
0000010991 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0000011052 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000011124 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000011169 [comm.protocol] INFO: Received TIME response: 1721314622
0000011519 [system] INFO: All handshake messages have been processed
0000011674 [system] INFO: Cloud connected
0000011709 [system.ledger] TRACE: Connected
0000058330 [ncp.rltk.client] TRACE: Disconnected
0000058332 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000058333 [net.rltkncp] TRACE: NCP event 2
0000058334 [net.rltkncp] TRACE: State changed event: 0
0000058335 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0000058338 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000058341 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0000058345 [hal] INFO: DNS server list changed
0000058346 [hal] INFO: DNS server list changed
0000058350 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0000058361 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000058365 [net.rltkncp] TRACE: NCP event 2
0000058366 [net.rltkncp] TRACE: State changed event: 1
0000058367 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000064490 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000064491 [net.rltkncp] TRACE: NCP event 2
0000064492 [net.rltkncp] TRACE: State changed event: 0
0000064993 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000064995 [net.rltkncp] TRACE: NCP event 2
0000064996 [net.rltkncp] TRACE: State changed event: 1
0000064997 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000076360 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000076362 [net.rltkncp] TRACE: NCP event 2
0000076363 [net.rltkncp] TRACE: State changed event: 0
0000080677 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0000080679 [hal.ble] TRACE: Going to stop the stack...
0000080991 [hal] INFO: WiFi off
0000081001 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:90:60
0000081133 [hal] INFO: WiFi on
0000081134 [hal] INFO: WiFi is already on
0000081238 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000081240 [net.rltkncp] TRACE: NCP event 2
0000081241 [net.rltkncp] TRACE: State changed event: 1
0000081242 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000082189 [comm.protocol] ERROR: Event loop error 1
0000082227 [system] WARN: Communication loop error, closing cloud socket
0000082281 [system] INFO: Cloud: disconnecting
0000082317 [system.ledger] TRACE: Disconnected
0000082332 [system] INFO: Cloud: disconnected
0000085167 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0000085168 [net.rltkncp] TRACE: NCP event 2
0000085169 [net.rltkncp] TRACE: State changed event: 2
0000085171 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0000085181 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000085221 [hal] INFO: DNS server list changed
0000085223 [hal] INFO: DNS server list changed
0000085226 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000085228 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000085233 [system] INFO: Cloud: connecting
0000085250 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000085358 [system] INFO: Loaded cloud server address and port from session data
0000085419 [system] TRACE: Address type: 1
0000085455 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000085513 [system] INFO: Cloud socket=0, connecting to 52.5.139.123#5684 using if 4
0000085585 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0000085634 [system] TRACE: Cloud socket=0, connected to 52.5.139.123#5684
0000085691 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000085754 [system] TRACE: Applying new keepalive interval now
0000085806 [system] INFO: Cloud socket connected
0000085848 [system] INFO: Starting handshake: presense_announce=0
0000085902 [comm.protocol.handshake] INFO: Establish secure connection
0000085960 [comm.dtls] INFO: session has 0 uses
0000086005 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0000086064 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,41, next_coap_id=22
0000086111 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=34
0000086174 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0000087469 [comm.protocol.handshake] INFO: Skipping HELLO message
0000087523 [system] INFO: cloud connected from existing session.
0000087548 [system] INFO: Sending application DESCRIBE
0000087620 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0000087690 [system] INFO: Sending subscriptions
0000087727 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0000087796 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000087880 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000088039 [system] INFO: All handshake messages have been processed
0000088197 [system] INFO: Cloud connected
0000088230 [system.ledger] TRACE: Connected
0000113136 [ncp.rltk.client] TRACE: Disconnected
0000113137 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000113139 [net.rltkncp] TRACE: NCP event 2
0000113140 [net.rltkncp] TRACE: State changed event: 0
0000113141 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0000113144 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000113146 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0000113151 [hal] INFO: DNS server list changed
0000113152 [hal] INFO: DNS server list changed
0000113157 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0000113162 [comm] INFO: Forcing a cloud ping
0000113195 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000113198 [net.rltkncp] TRACE: NCP event 2
0000113199 [net.rltkncp] TRACE: State changed event: 1
0000113200 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000122560 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000122562 [net.rltkncp] TRACE: NCP event 2
0000122563 [net.rltkncp] TRACE: State changed event: 0
0000123064 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000123066 [net.rltkncp] TRACE: NCP event 2
0000123067 [net.rltkncp] TRACE: State changed event: 1
0000123068 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000134423 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000134425 [net.rltkncp] TRACE: NCP event 2
0000134427 [net.rltkncp] TRACE: State changed event: 0
0000138738 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0000138740 [hal.ble] TRACE: Going to stop the stack...

Trying with a a different Photon 2, also on the workspace wifi

Serial monitor opened successfully:
...
0000140745 [system] TRACE: Claim code received by the cloud and cleared locally.
0000141460 [system.ctrl.ble] TRACE: Enqueued a reply message for sending; ID: 38
0000141637 [comm.protocol] INFO: Received DESCRIBE request; flags: 0x04
0000142051 [comm.protocol] TRACE: Updating application DESCRIBE checksum
0000142108 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000142163 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000142218 [system.ctrl.ble] TRACE: Received a request message; type: 300, ID: 39
0000142387 [system.ctrl.ble] TRACE: Enqueued a reply message for sending; ID: 39
0000142569 [comm.protocol] TRACE: Updating subscriptions checksum
0000142625 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000142684 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000142956 [system] INFO: All handshake messages have been processed
0000143112 [system] INFO: Cloud connected
0000143144 [system.ledger] TRACE: Connected
0000143184 [system.ctrl.ble] TRACE: Received a request message; type: 300, ID: 40
0000143232 [system.ctrl.ble] TRACE: Enqueued a reply message for sending; ID: 40
0000143311 [comm.protocol] WARN: Received a key change message; discarding session
0000143362 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 1
0000143383 [system.ledger] TRACE: Disconnected
0000143398 [comm.protocol] ERROR: Event loop error 21
0000143438 [system] WARN: Communication loop error, closing cloud socket
0000143456 [system] INFO: Cloud: disconnecting
0000143470 [system] INFO: Cloud: disconnected
0000143486 [system] TRACE: Disable BLE prov mode
0000143501 [system] INFO: Cloud: connecting
0000143530 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000143618 [system] WARN: Failed to load session data from persistent storage
0000143641 [system] INFO: Discarding session data
0000143681 [system] TRACE: Resolving 0a10aced202194944a05a358.v5.udp.particle.io#5684
0000143796 [system] TRACE: Address type: 3
0000143832 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000143903 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0000143981 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0000144042 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0000144112 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000144183 [system] TRACE: Applying new keepalive interval now
0000144238 [system] INFO: Cloud socket connected
0000144285 [system] INFO: Starting handshake: presense_announce=0
0000144347 [comm.protocol.handshake] INFO: Establish secure connection
0000144412 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000148921 [comm.protocol.handshake] INFO: Sending HELLO message
0000149003 [comm.protocol.handshake] INFO: Handshake completed
0000149057 [comm.protocol.handshake] TRACE: Updating cached session parameters
0000149116 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000149171 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000150504 [comm] INFO: Sending TIME request
0000150580 [system] INFO: Sending application DESCRIBE
0000150635 [system] INFO: Sending subscriptions
0000150680 [comm.protocol] INFO: Sending subscriptions
0000150739 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000150822 [comm.protocol] TRACE: Updating system DESCRIBE checksum
0000150883 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000152233 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000152287 [system.ctrl.ble] TRACE: Received a request message; type: 300, ID: 41
0000152363 [comm.protocol] INFO: Received TIME response: 1721317835
0000152420 [system.ctrl.ble] TRACE: Enqueued a reply message for sending; ID: 41
0000152686 [comm.protocol] TRACE: Updating application DESCRIBE checksum
0000152746 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000152798 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000153057 [comm.protocol] TRACE: Updating subscriptions checksum
0000153109 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000153160 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000153217 [system.ctrl.ble] TRACE: Received a request message; type: 300, ID: 42
0000153383 [comm.protocol] INFO: Received DESCRIBE request; flags: 0x04
0000153450 [system.ctrl.ble] TRACE: Enqueued a reply message for sending; ID: 42
0000153722 [system] INFO: All handshake messages have been processed
0000153888 [system] INFO: Cloud connected
0000153919 [system.ledger] TRACE: Connected
0000154099 [system.ctrl.ble] TRACE: Received a request message; type: 300, ID: 43
0000154261 [system.ctrl.ble] TRACE: Enqueued a reply message for sending; ID: 43
0000155122 [system.ctrl.ble] TRACE: Received a request message; type: 300, ID: 44
0000155281 [system.ctrl.ble] TRACE: Enqueued a reply message for sending; ID: 44
0000156046 [system.ctrl.ble] TRACE: Received a request message; type: 300, ID: 45
0000156208 [system.ctrl.ble] TRACE: Enqueued a reply message for sending; ID: 45
0000284583 [ncp.rltk.client] TRACE: Disconnected
0000284584 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000284586 [net.rltkncp] TRACE: NCP event 2
0000284587 [net.rltkncp] TRACE: State changed event: 0
0000284588 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0000284591 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000284593 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0000284598 [hal] INFO: DNS server list changed
0000284600 [hal] INFO: DNS server list changed
0000284605 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0000284664 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000284665 [net.rltkncp] TRACE: NCP event 2
0000284666 [net.rltkncp] TRACE: State changed event: 1
0000284668 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000296036 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000296038 [net.rltkncp] TRACE: NCP event 2
0000296039 [net.rltkncp] TRACE: State changed event: 0
0000296541 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000296542 [net.rltkncp] TRACE: NCP event 2
0000296544 [net.rltkncp] TRACE: State changed event: 1
0000296545 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000297920 [comm.protocol] ERROR: Event loop error 1
0000297969 [system] WARN: Communication loop error, closing cloud socket
0000298024 [system] INFO: Cloud: disconnecting
0000298063 [system.ledger] TRACE: Disconnected
0000298122 [system] INFO: Cloud: disconnected
0000307906 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000307907 [net.rltkncp] TRACE: NCP event 2
0000307909 [net.rltkncp] TRACE: State changed event: 0
0000312225 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0000312227 [hal.ble] TRACE: Going to stop the stack...
0000312305 [wiring.ble] TRACE: Disconnected
0000312364 [system.ctrl.ble] TRACE: Disconnected
0000312964 [hal] INFO: WiFi off
0000312977 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:a3:58
0000313109 [hal] INFO: WiFi on
0000313111 [hal] INFO: WiFi is already on
0000313561 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000313563 [net.rltkncp] TRACE: NCP event 2
0000313564 [net.rltkncp] TRACE: State changed event: 1
0000313565 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000317488 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0000317489 [net.rltkncp] TRACE: NCP event 2
0000317490 [net.rltkncp] TRACE: State changed event: 2
0000317492 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0000317502 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000317536 [hal] INFO: DNS server list changed
0000317539 [hal] INFO: DNS server list changed
0000317542 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000317544 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000317550 [system] INFO: Cloud: connecting
0000317615 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000317701 [system] INFO: Loaded cloud server address and port from session data
0000317770 [system] TRACE: Address type: 1
0000317805 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000317870 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0000317949 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0000318008 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0000318068 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000318143 [system] TRACE: Applying new keepalive interval now
0000318196 [system] INFO: Cloud socket connected
0000318245 [system] INFO: Starting handshake: presense_announce=0
0000318297 [comm.protocol.handshake] INFO: Establish secure connection
0000318361 [comm.dtls] INFO: session has 0 uses
0000318410 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0000318476 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,66, next_coap_id=46
0000318540 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=70
0000318622 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0000320223 [comm.protocol.handshake] INFO: Skipping HELLO message
0000320281 [system] INFO: cloud connected from existing session.
0000320309 [system] INFO: Sending application DESCRIBE
0000320374 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0000320453 [system] INFO: Sending subscriptions
0000320494 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0000320565 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000320656 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000320817 [system] INFO: All handshake messages have been processed
0000320975 [system] INFO: Cloud connected
0000321009 [system.ledger] TRACE: Connected

In a number of cases, the timestamp resets, like this:

0000018198 [system.ledger] TRACE: Connected
0000002094 [hal] INFO: WiFi KM0 firmware initialization started   result=0 (RAM start=10006000 end=1001a000)

This generally indicates that the device successfully connected then rebooted without a log message. Some causes of this include: software bug causing a SOS panic, or your watchdog is resetting the device.

When i first programmed it and it had panicked, i had reset it a few times and it was still having the same issues. I should've cut that out. My second log with a different devices still shows the disconnections without any resets.

Here is more logging specifically of the connection loop

0005585266 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005585267 [net.rltkncp] TRACE: NCP event 2
0005585268 [net.rltkncp] TRACE: State changed event: 1
0005585270 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005589360 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0005589362 [net.rltkncp] TRACE: NCP event 2
0005589363 [net.rltkncp] TRACE: State changed event: 2
0005589364 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0005589374 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0005589404 [hal] INFO: DNS server list changed
0005589406 [hal] INFO: DNS server list changed
0005589408 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005589410 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0005589414 [system] INFO: Cloud: connecting
0005589431 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0005589475 [system] INFO: Loaded cloud server address and port from session data
0005589499 [system] TRACE: Address type: 1
0005589556 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0005589620 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0005589687 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0005589740 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0005589806 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0005589865 [system] TRACE: Applying new keepalive interval now
0005589908 [system] INFO: Cloud socket connected
0005589946 [system] INFO: Starting handshake: presense_announce=0
0005589998 [comm.protocol.handshake] INFO: Establish secure connection
0005590057 [comm.dtls] INFO: session has 0 uses
0005590100 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0005590155 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,59, next_coap_id=d8
0005590213 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=216
0005590286 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0005591918 [comm.protocol.handshake] INFO: Skipping HELLO message
0005591986 [system] INFO: cloud connected from existing session.
0005592012 [system] INFO: Sending application DESCRIBE
0005592077 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0005592149 [system] INFO: Sending subscriptions
0005592189 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0005592254 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0005592328 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0005592485 [system] INFO: All handshake messages have been processed
0005592637 [system] INFO: Cloud connected
0005592672 [system.ledger] TRACE: Connected
0005620816 [ncp.rltk.client] TRACE: Disconnected
0005620817 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005620819 [net.rltkncp] TRACE: NCP event 2
0005620820 [net.rltkncp] TRACE: State changed event: 0
0005620821 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0005620824 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005620826 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0005620831 [hal] INFO: DNS server list changed
0005620832 [hal] INFO: DNS server list changed
0005620836 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0005620879 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005620880 [net.rltkncp] TRACE: NCP event 2
0005620881 [net.rltkncp] TRACE: State changed event: 1
0005620882 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005632248 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005632250 [net.rltkncp] TRACE: NCP event 2
0005632251 [net.rltkncp] TRACE: State changed event: 0
0005632752 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005632753 [net.rltkncp] TRACE: NCP event 2
0005632754 [net.rltkncp] TRACE: State changed event: 1
0005632756 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005644114 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005644116 [net.rltkncp] TRACE: NCP event 2
0005644117 [net.rltkncp] TRACE: State changed event: 0
0005648071 [comm.protocol] ERROR: Event loop error 1
0005648118 [system] WARN: Communication loop error, closing cloud socket
0005648183 [system] INFO: Cloud: disconnecting
0005648225 [system.ledger] TRACE: Disconnected
0005648239 [system] INFO: Cloud: disconnected
0005648431 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0005648433 [hal.ble] TRACE: Going to stop the stack...
0005648867 [hal] INFO: WiFi off
0005648877 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:a3:58
0005649009 [hal] INFO: WiFi on
0005649010 [hal] INFO: WiFi is already on
0005649461 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005649463 [net.rltkncp] TRACE: NCP event 2
0005649464 [net.rltkncp] TRACE: State changed event: 1
0005649465 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005653461 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0005653463 [net.rltkncp] TRACE: NCP event 2
0005653464 [net.rltkncp] TRACE: State changed event: 2
0005653466 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0005653475 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0005653498 [hal] INFO: DNS server list changed
0005653500 [hal] INFO: DNS server list changed
0005653502 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005653505 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0005653511 [system] INFO: Cloud: connecting
0005653526 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0005653644 [system] INFO: Loaded cloud server address and port from session data
0005653725 [system] TRACE: Address type: 1
0005653765 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0005653826 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0005653901 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0005653956 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0005654018 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0005654094 [system] TRACE: Applying new keepalive interval now
0005654144 [system] INFO: Cloud socket connected
0005654183 [system] INFO: Starting handshake: presense_announce=0
0005654243 [comm.protocol.handshake] INFO: Establish secure connection
0005654304 [comm.dtls] INFO: session has 0 uses
0005654353 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0005654414 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,67, next_coap_id=dd
0005654477 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=221
0005654548 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0005655855 [comm.protocol.handshake] INFO: Skipping HELLO message
0005655910 [system] INFO: cloud connected from existing session.
0005655939 [system] INFO: Sending application DESCRIBE
0005656000 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0005656073 [system] INFO: Sending subscriptions
0005656112 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0005656176 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0005656263 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0005656424 [system] INFO: All handshake messages have been processed
0005656585 [system] INFO: Cloud connected
0005656619 [system.ledger] TRACE: Connected
0005693013 [ncp.rltk.client] TRACE: Disconnected
0005693014 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005693016 [net.rltkncp] TRACE: NCP event 2
0005693016 [net.rltkncp] TRACE: State changed event: 0
0005693018 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0005693021 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005693023 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0005693027 [hal] INFO: DNS server list changed
0005693029 [hal] INFO: DNS server list changed
0005693033 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0005693080 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005693082 [net.rltkncp] TRACE: NCP event 2
0005693083 [net.rltkncp] TRACE: State changed event: 1
0005693084 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005704456 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005704458 [net.rltkncp] TRACE: NCP event 2
0005704459 [net.rltkncp] TRACE: State changed event: 0
0005704960 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005704962 [net.rltkncp] TRACE: NCP event 2
0005704963 [net.rltkncp] TRACE: State changed event: 1
0005704964 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005712072 [comm.protocol] ERROR: Event loop error 1
0005712115 [system] WARN: Communication loop error, closing cloud socket
0005712176 [system] INFO: Cloud: disconnecting
0005712214 [system.ledger] TRACE: Disconnected
0005712230 [system] INFO: Cloud: disconnected
0005716329 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005716330 [net.rltkncp] TRACE: NCP event 2
0005716331 [net.rltkncp] TRACE: State changed event: 0
0005720650 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0005720652 [hal.ble] TRACE: Going to stop the stack...
0005721085 [hal] INFO: WiFi off
0005721098 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:a3:58
0005721231 [hal] INFO: WiFi on
0005721232 [hal] INFO: WiFi is already on
0005721674 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005721675 [net.rltkncp] TRACE: NCP event 2
0005721676 [net.rltkncp] TRACE: State changed event: 1
0005721678 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005725705 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0005725707 [net.rltkncp] TRACE: NCP event 2
0005725708 [net.rltkncp] TRACE: State changed event: 2
0005725710 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0005725719 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0005725744 [hal] INFO: DNS server list changed
0005725746 [hal] INFO: DNS server list changed
0005725748 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005725750 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0005725754 [system] INFO: Cloud: connecting
0005725769 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0005725816 [system] INFO: Loaded cloud server address and port from session data
0005725903 [system] TRACE: Address type: 1
0005725941 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0005726008 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0005726085 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0005726138 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0005726206 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0005726282 [system] TRACE: Applying new keepalive interval now
0005726343 [system] INFO: Cloud socket connected
0005726390 [system] INFO: Starting handshake: presense_announce=0
0005726448 [comm.protocol.handshake] INFO: Establish secure connection
0005726510 [comm.dtls] INFO: session has 0 uses
0005726562 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0005726626 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,75, next_coap_id=e2
0005726683 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=226
0005726761 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0005728082 [comm.protocol.handshake] INFO: Skipping HELLO message
0005728136 [system] INFO: cloud connected from existing session.
0005728162 [system] INFO: Sending application DESCRIBE
0005728224 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0005728300 [system] INFO: Sending subscriptions
0005728340 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0005728410 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0005728493 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0005728652 [system] INFO: All handshake messages have been processed
0005728816 [system] INFO: Cloud connected
0005728851 [system.ledger] TRACE: Connected
0005785235 [ncp.rltk.client] TRACE: Disconnected
0005785236 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005785237 [net.rltkncp] TRACE: NCP event 2
0005785238 [net.rltkncp] TRACE: State changed event: 0
0005785240 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0005785243 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005785245 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0005785249 [hal] INFO: DNS server list changed
0005785251 [hal] INFO: DNS server list changed
0005785255 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0005785324 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005785325 [net.rltkncp] TRACE: NCP event 2
0005785327 [net.rltkncp] TRACE: State changed event: 1
0005785328 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005796694 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005796695 [net.rltkncp] TRACE: NCP event 2
0005796697 [net.rltkncp] TRACE: State changed event: 0
0005797198 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005797200 [net.rltkncp] TRACE: NCP event 2
0005797200 [net.rltkncp] TRACE: State changed event: 1
0005797202 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005808570 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005808572 [net.rltkncp] TRACE: NCP event 2
0005808573 [net.rltkncp] TRACE: State changed event: 0
0005809380 [comm.protocol] ERROR: Event loop error 1
0005809426 [system] WARN: Communication loop error, closing cloud socket
0005809487 [system] INFO: Cloud: disconnecting
0005809528 [system.ledger] TRACE: Disconnected
0005809542 [system] INFO: Cloud: disconnected
0005812887 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0005812889 [hal.ble] TRACE: Going to stop the stack...
0005813322 [hal] INFO: WiFi off
0005813335 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:a3:58
0005813468 [hal] INFO: WiFi on
0005813469 [hal] INFO: WiFi is already on
0005813920 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005813921 [net.rltkncp] TRACE: NCP event 2
0005813922 [net.rltkncp] TRACE: State changed event: 1
0005813924 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005817969 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0005817970 [net.rltkncp] TRACE: NCP event 2
0005817971 [net.rltkncp] TRACE: State changed event: 2
0005817973 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0005817982 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0005818033 [hal] INFO: DNS server list changed
0005818036 [hal] INFO: DNS server list changed
0005818038 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005818040 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0005818048 [system] INFO: Cloud: connecting
0005818102 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0005818191 [system] INFO: Loaded cloud server address and port from session data
0005818250 [system] TRACE: Address type: 1
0005818287 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0005818348 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0005818420 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0005818466 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0005818527 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0005818597 [system] TRACE: Applying new keepalive interval now
0005818656 [system] INFO: Cloud socket connected
0005818700 [system] INFO: Starting handshake: presense_announce=0
0005818757 [comm.protocol.handshake] INFO: Establish secure connection
0005818822 [comm.dtls] INFO: session has 0 uses
0005818870 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0005818930 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,84, next_coap_id=e8
0005818987 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=232
0005819063 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0005820391 [comm.protocol.handshake] INFO: Skipping HELLO message
0005820446 [system] INFO: cloud connected from existing session.
0005820472 [system] INFO: Sending application DESCRIBE
0005820525 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0005820593 [system] INFO: Sending subscriptions
0005820635 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0005820700 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0005820779 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0005820927 [system] INFO: All handshake messages have been processed
0005821084 [system] INFO: Cloud connected
0005821117 [system.ledger] TRACE: Connected
0005853471 [ncp.rltk.client] TRACE: Disconnected
0005853472 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005853474 [net.rltkncp] TRACE: NCP event 2
0005853475 [net.rltkncp] TRACE: State changed event: 0
0005853476 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0005853488 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005853495 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0005853501 [hal] INFO: DNS server list changed
0005853504 [hal] INFO: DNS server list changed
0005853510 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0005853517 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005853520 [net.rltkncp] TRACE: NCP event 2
0005853521 [net.rltkncp] TRACE: State changed event: 1
0005853523 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005864889 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005864892 [net.rltkncp] TRACE: NCP event 2
0005864893 [net.rltkncp] TRACE: State changed event: 0
0005865395 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005865399 [net.rltkncp] TRACE: NCP event 2
0005865401 [net.rltkncp] TRACE: State changed event: 1
0005865404 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005876606 [comm.protocol] ERROR: Event loop error 1
0005876648 [system] WARN: Communication loop error, closing cloud socket
0005876707 [system] INFO: Cloud: disconnecting
0005876744 [system.ledger] TRACE: Disconnected
0005876760 [system] INFO: Cloud: disconnected
0005876763 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005876769 [net.rltkncp] TRACE: NCP event 2
0005876771 [net.rltkncp] TRACE: State changed event: 0
0005881087 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0005881091 [hal.ble] TRACE: Going to stop the stack...
0005881524 [hal] INFO: WiFi off
0005881534 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:a3:58
0005881671 [hal] INFO: WiFi on
0005881672 [hal] INFO: WiFi is already on
0005882124 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005882126 [net.rltkncp] TRACE: NCP event 2
0005882127 [net.rltkncp] TRACE: State changed event: 1
0005882128 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005886054 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0005886056 [net.rltkncp] TRACE: NCP event 2
0005886057 [net.rltkncp] TRACE: State changed event: 2
0005886058 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0005886067 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0005886123 [hal] INFO: DNS server list changed
0005886125 [hal] INFO: DNS server list changed
0005886128 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005886131 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0005886138 [system] INFO: Cloud: connecting
0005886200 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0005886283 [system] INFO: Loaded cloud server address and port from session data
0005886345 [system] TRACE: Address type: 1
0005886378 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0005886434 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0005886508 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0005886559 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0005886612 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0005886671 [system] TRACE: Applying new keepalive interval now
0005886723 [system] INFO: Cloud socket connected
0005886767 [system] INFO: Starting handshake: presense_announce=0
0005886817 [comm.protocol.handshake] INFO: Establish secure connection
0005886884 [comm.dtls] INFO: session has 0 uses
0005886922 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0005886975 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,92, next_coap_id=ed
0005887042 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=237
0005887107 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0005888750 [comm.protocol.handshake] INFO: Skipping HELLO message
0005888803 [system] INFO: cloud connected from existing session.
0005888832 [system] INFO: Sending application DESCRIBE
0005888900 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0005888973 [system] INFO: Sending subscriptions
0005889013 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0005889076 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0005905674 [ncp.rltk.client] TRACE: Disconnected
0005905675 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005905677 [net.rltkncp] TRACE: NCP event 2
0005905678 [net.rltkncp] TRACE: State changed event: 0
0005905679 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0005905681 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005905684 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0005905689 [hal] INFO: DNS server list changed
0005905690 [hal] INFO: DNS server list changed
0005905694 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0005905698 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005905701 [net.rltkncp] TRACE: NCP event 2
0005905702 [net.rltkncp] TRACE: State changed event: 1
0005905705 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005917065 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005917067 [net.rltkncp] TRACE: NCP event 2
0005917068 [net.rltkncp] TRACE: State changed event: 0
0005917569 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005917571 [net.rltkncp] TRACE: NCP event 2
0005917572 [net.rltkncp] TRACE: State changed event: 1
0005917573 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005928936 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005928938 [net.rltkncp] TRACE: NCP event 2
0005928939 [net.rltkncp] TRACE: State changed event: 0
0005933257 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0005933259 [hal.ble] TRACE: Going to stop the stack...
0005933692 [hal] INFO: WiFi off
0005933703 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:a3:58
0005933836 [hal] INFO: WiFi on
0005933837 [hal] INFO: WiFi is already on
0005934288 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005934290 [net.rltkncp] TRACE: NCP event 2
0005934291 [net.rltkncp] TRACE: State changed event: 1
0005934292 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005938235 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0005938237 [net.rltkncp] TRACE: NCP event 2
0005938238 [net.rltkncp] TRACE: State changed event: 2
0005938239 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0005938249 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0005938274 [hal] INFO: DNS server list changed
0005938275 [hal] INFO: DNS server list changed
0005938277 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005938279 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0005943890 [comm.protocol] ERROR: Event loop error 1
0005943939 [system] WARN: Communication loop error, closing cloud socket
0005944008 [system] INFO: Cloud: disconnecting
0005944060 [system] INFO: Cloud: disconnected
0005944093 [system] INFO: Cloud: connecting
0005944110 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0005944157 [system] INFO: Loaded cloud server address and port from session data
0005944243 [system] TRACE: Address type: 1
0005944284 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0005944351 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0005944426 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0005944489 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0005944559 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0005944633 [system] TRACE: Applying new keepalive interval now
0005944694 [system] INFO: Cloud socket connected
0005944741 [system] INFO: Starting handshake: presense_announce=0
0005944802 [comm.protocol.handshake] INFO: Establish secure connection
0005944864 [comm.dtls] INFO: session has 1 uses
0005944915 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0005944996 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,107, next_coap_id=f1
0005945074 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=241
0005945153 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0005946616 [comm.protocol.handshake] INFO: Skipping HELLO message
0005946699 [system] INFO: cloud connected from existing session.
0005946729 [system] INFO: Sending application DESCRIBE
0005946814 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0005946894 [system] INFO: Sending subscriptions
0005946934 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0005947022 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0005959838 [ncp.rltk.client] TRACE: Disconnected
0005959839 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005959841 [net.rltkncp] TRACE: NCP event 2
0005959841 [net.rltkncp] TRACE: State changed event: 0
0005959843 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0005959845 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005959848 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0005959852 [hal] INFO: DNS server list changed
0005959854 [hal] INFO: DNS server list changed
0005959857 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0005959863 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005959864 [net.rltkncp] TRACE: NCP event 2
0005959865 [net.rltkncp] TRACE: State changed event: 1
0005959867 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005971226 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005971228 [net.rltkncp] TRACE: NCP event 2
0005971229 [net.rltkncp] TRACE: State changed event: 0
0005971730 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005971732 [net.rltkncp] TRACE: NCP event 2
0005971733 [net.rltkncp] TRACE: State changed event: 1
0005971735 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005983094 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0005983096 [net.rltkncp] TRACE: NCP event 2
0005983097 [net.rltkncp] TRACE: State changed event: 0
0005987413 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0005987415 [hal.ble] TRACE: Going to stop the stack...
0005987848 [hal] INFO: WiFi off
0005987858 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:a3:58
0005987995 [hal] INFO: WiFi on
0005987996 [hal] INFO: WiFi is already on
0005988448 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0005988450 [net.rltkncp] TRACE: NCP event 2
0005988451 [net.rltkncp] TRACE: State changed event: 1
0005988452 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0005992407 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0005992409 [net.rltkncp] TRACE: NCP event 2
0005992410 [net.rltkncp] TRACE: State changed event: 2
0005992411 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0005992420 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0005992441 [hal] INFO: DNS server list changed
0005992443 [hal] INFO: DNS server list changed
0005992445 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0005992447 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0006001751 [comm.protocol] ERROR: Event loop error 1
0006001791 [system] WARN: Communication loop error, closing cloud socket
0006001852 [system] INFO: Cloud: disconnecting
0006001894 [system] INFO: Cloud: disconnected
0006001936 [system] INFO: Cloud: connecting
0006001951 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0006002060 [system] INFO: Loaded cloud server address and port from session data
0006002127 [system] TRACE: Address type: 1
0006002158 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0006002217 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0006002283 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0006002341 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0006002402 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0006002457 [system] TRACE: Applying new keepalive interval now
0006002505 [system] INFO: Cloud socket connected
0006002550 [system] INFO: Starting handshake: presense_announce=0
0006002600 [comm.protocol.handshake] INFO: Establish secure connection
0006002659 [comm.dtls] INFO: session has 2 uses
0006002709 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0006002769 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,122, next_coap_id=f5
0006002835 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=245
0006002909 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0006004555 [comm.protocol.handshake] INFO: Skipping HELLO message
0006004612 [system] INFO: cloud connected from existing session.
0006004641 [system] INFO: Sending application DESCRIBE
0006004708 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0006004784 [system] INFO: Sending subscriptions
0006004822 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0006004891 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0006004973 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0006005131 [system] INFO: All handshake messages have been processed
0006005291 [system] INFO: Cloud connected

Here is what my computer sees for the network I'm trying to stay connected to.


My Photon 2 currently has the BSSID EC:8C:A2:27:EE:68 saved for the strongest 2.4 GHz network on that list.

Hi James, I see the same. I see it going offline then coming online 2 to 5 minutes after, at least sometimes. Other times, it panics, resets and then becomes online.

I also observe the following weird things, for which I need to do more troubleshooting:

  • the Photon 2 stops executing user code
  • stops printing anything on the serial console
  • does not respond to cloud function calls nor cloud variables refreshes

The panic could be related to this, so I need to scan the project in more detail:

I appreciate the SPI and I2C fixes on 5.8.2, perhaps we are not out of the woods yet on the stability front.
Of course, it could be that the firmware I am trying to run (which has been running ok for years on Borons and Argons) may still have wrinkles to iron out on the Photon 2. Let's see.

2 Likes

Glad I’m not the only one!
I don’t think I’m logging anything null, and I thought I had checked it with logging disabled and saw that it was still disconnecting, but I’ll have to recheck that on Tuesday.
The panic is definitely the weirdest part and I don’t have any idea what’s causing it yet.

Hi, is your project using BLE as well as WiFi?
thanks

It is, though I only use provisioning mode when I'm actively sending control requests to set wifi credentials. Otherwise provisioning mode is disabled.

1 Like

I am seeing similar issues with the wifi dropping on P2 with 5.8.2
Happening on the company network and on my home network.
Rolled back to 5.6.0 and seems to be stable for the moment.
BLE is advertising all the time.

Yeah I’ve just rolled back my devices to 5.8.0 for the time being. Eager to try out the next release.

I'm still seeing the same issue on 5.9.0.

Network 0 found: MassRobotics, bssid: EC:8C:A2:27:EE:68
Network 1 found: MoCAccino 5 GHz, bssid: BA:5E:71:FD:37:2A
0000002902 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000002942 [system.nm] INFO: State changed: IFACE_DOWN -> IFACE_REQUEST_UP
0000002982 [net.ifapi] INFO: Netif wl3 state UP
0000003030 [system.nm] INFO: State changed: IFACE_REQUEST_UP -> IFACE_UP
0000003035 [ncp.rltk.client] TRACE: NCP power state changed: 4
0000003036 [net.rltkncp] TRACE: NCP event 3
0000003037 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_POWERING_UP
0000003040 [system.nm] TRACE: Interface 4 power state changed: POWERING_UP
0000003041 [hal] INFO: WiFi is already on
0000003042 [ncp.rltk.client] TRACE: NCP power state changed: 2
0000003043 [net.rltkncp] TRACE: NCP event 3
0000003045 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_UP
0000003046 [system.nm] TRACE: Interface 4 power state changed: UP
0000003048 [ncp.rltk.client] INFO: rltkOff
0000003049 [ncp.rltk.client] INFO: rltkOff done
0000003050 [ncp.rltk.client] TRACE: NCP power state changed: 1
0000003051 [net.rltkncp] TRACE: NCP event 3
0000003052 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_DOWN
0000003054 [system.nm] TRACE: Interface 4 power state changed: DOWN
0000003055 [hal] INFO: WiFi is already on
0000003056 [ncp.rltk.client] TRACE: NCP power state changed: 2
0000003057 [net.rltkncp] TRACE: NCP event 3
0000003058 [net.rltkncp] TRACE: NCP power state changed: IF_POWER_STATE_UP
0000003060 [system.nm] TRACE: Interface 4 power state changed: UP
0000003061 [ncp.rltk.client] TRACE: NCP state changed: 1
0000003062 [net.rltkncp] TRACE: NCP event 1
0000003066 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000003067 [net.rltkncp] TRACE: NCP event 2
0000003068 [net.rltkncp] TRACE: State changed event: 1
0000003069 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000008780 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0000008781 [net.rltkncp] TRACE: NCP event 2
0000008782 [net.rltkncp] TRACE: State changed event: 2
0000008783 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0000008792 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000008821 [hal] INFO: DNS server list changed
0000008822 [hal] INFO: DNS server list changed
0000008824 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000008827 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000008838 [system] INFO: Cloud: connecting
0000008890 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000008974 [system] INFO: Loaded cloud server address and port from session data
0000009038 [system] TRACE: Address type: 1
0000009070 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000009126 [system.cm] TRACE: Using best network: WiFi
0000009168 [system] INFO: Cloud socket=0, connecting to 3.230.254.13#5684 using if 4
0000009232 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0000009283 [system] TRACE: Cloud socket=0, connected to 3.230.254.13#5684
0000009343 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000009404 [system] TRACE: Applying new keepalive interval now
0000009453 [system] INFO: Cloud socket connected
0000009491 [system] INFO: Starting handshake: presense_announce=0
0000009547 [comm.protocol.handshake] INFO: Establish secure connection
0000009601 [comm.dtls] INFO: session has 0 uses
0000009646 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0000009698 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,135, next_coap_id=45
0000009753 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=69
0000009826 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0000011365 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000011419 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000011470 [comm.protocol.handshake] INFO: Sending HELLO message
0000030157 [ncp.rltk.client] TRACE: Disconnected
0000030158 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000030159 [net.rltkncp] TRACE: NCP event 2
0000030160 [net.rltkncp] TRACE: State changed event: 0
0000030161 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0000030164 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000030166 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0000030167 [hal] INFO: DNS server list changed
0000030169 [hal] INFO: DNS server list changed
0000030172 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0000030174 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=ffff:   connected stage, loss beacon
0000030197 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000030200 [net.rltkncp] TRACE: NCP event 2
0000030201 [net.rltkncp] TRACE: State changed event: 1
0000030202 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000041557 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout
0000041561 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000041562 [net.rltkncp] TRACE: NCP event 2
0000041562 [net.rltkncp] TRACE: State changed event: 0
0000042064 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000042066 [net.rltkncp] TRACE: NCP event 2
0000042066 [net.rltkncp] TRACE: State changed event: 1
0000042067 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000053426 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout
0000053430 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000053431 [net.rltkncp] TRACE: NCP event 2
0000053433 [net.rltkncp] TRACE: State changed event: 0
0000057748 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0000057750 [hal.ble] TRACE: Going to stop the stack...
0000057954 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=0000:
0000058062 [hal] INFO: WiFi off
0000058074 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:05:39:e4
0000058204 [hal] INFO: WiFi on
0000058205 [hal] INFO: WiFi is already on
0000058309 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000058311 [net.rltkncp] TRACE: NCP event 2
0000058312 [net.rltkncp] TRACE: State changed event: 1
0000058313 [ncp.rltk.client] INFO: Try to connect to ssid: MassRobotics
0000062233 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0000062234 [net.rltkncp] TRACE: NCP event 2
0000062235 [net.rltkncp] TRACE: State changed event: 2
0000062236 [net.ifapi] INFO: Netif wl3 link UP, profile=MassRobotics
0000062245 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000062266 [hal] INFO: DNS server list changed
0000062268 [hal] INFO: DNS server list changed
0000062271 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000062273 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000090959 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 0
0000091019 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000091074 [comm.protocol.handshake] ERROR: Could not send HELLO message: 10
0000091178 [system] TRACE: Resolving 0a10aced202194944a0539e4.v5.udp.particle.io#5684
0000097137 [system.cm] INFO: Ethernet: 0/0 packets (0 tx errors) 0/0 bytes received, avg rtt: 0, mask=0000, score=4294967295
0000097246 [system.cm] INFO: WiFi: 10/10 packets (0 tx errors) 2318/2448 bytes received, avg rtt: 31, mask=03ff, score=31
0000097342 [system] WARN: Internet available, cloud not reachable
0000097400 [system] WARN: Cloud handshake failed, code=-160
0000097702 [system] INFO: Cloud: disconnecting
0000097741 [system] INFO: Cloud: disconnected
0000097781 [system] INFO: Cloud: connecting
0000097797 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000097900 [system] WARN: Failed to load session data from persistent storage
0000097961 [system] INFO: Discarding session data
0000098043 [system] TRACE: Resolving 0a10aced202194944a0539e4.v5.udp.particle.io#5684
0000098120 [system] TRACE: Address type: 3
0000098153 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000098225 [system.cm] TRACE: Using best network: WiFi
0000098265 [system] INFO: Cloud socket=0, connecting to 3.230.254.13#5684 using if 4
0000098334 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0000098392 [system] TRACE: Cloud socket=0, connected to 3.230.254.13#5684
0000098451 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000098517 [system] TRACE: Applying new keepalive interval now
0000098564 [system] INFO: Cloud socket connected
0000098604 [system] INFO: Starting handshake: presense_announce=0
0000098658 [comm.protocol.handshake] INFO: Establish secure connection
0000098724 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000103041 [comm.protocol.handshake] INFO: Sending HELLO message
0000103116 [comm.protocol.handshake] INFO: Handshake completed
0000103169 [comm.protocol.handshake] TRACE: Updating cached session parameters
0000103235 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000103281 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000104767 [comm] INFO: Sending TIME request
0000104821 [system] INFO: Send spark/device/last_reset event
0000104885 [system] INFO: Sending application DESCRIBE
0000104938 [system] INFO: Sending subscriptions
0000104977 [comm.protocol] INFO: Sending subscriptions
0000105022 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000105105 [comm.protocol] TRACE: Updating system DESCRIBE checksum
0000105155 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000106671 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000106723 [comm.protocol] INFO: Received TIME response: 1726150459
0000106783 [comm.protocol] TRACE: Updating application DESCRIBE checksum
0000106842 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000106890 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000106948 [system] INFO: All handshake messages have been processed
0000107001 [comm.protocol] TRACE: Updating subscriptions checksum
0000107054 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000107103 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000107156 [comm.protocol] INFO: Received DESCRIBE request; flags: 0x04
0000107225 [system] INFO: Cloud connected
0000107259 [system.ledger] TRACE: Connected
0000107297 [comm] INFO: Forcing a cloud ping
0000178208 [ncp.rltk.client] TRACE: Disconnected

It disconnects pretty consistently every 54 or 108 seconds when looking at [ncp.rltk.client] TRACE: Disconnected logs.

Larger log here.

0000030174 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=ffff:   connected stage, loss beacon
0000041557 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout

We've added detailed disconnect reason logs from WiFi stack in 5.9.0 and looking at them this looks to be a signal strength issue. I'd double check the antenna and also manually perform WiFi.scan() and capture the observed RSSI.

Well you're not going to love this, but here are a few results of WiFi.scan().

0000017021 [app] INFO: ssid=MassRobotics security=3 channel=11 rssi=-48
0000017023 [app] INFO: ssid=MassRobotics security=3 channel=104 rssi=-48
0000017026 [app] INFO: ssid= security=3 channel=1 rssi=-54
0000017028 [app] INFO: ssid=ECE Guest security=3 channel=48 rssi=-54
0000017031 [app] INFO: ssid=InnoVets security=3 channel=48 rssi=-54
0000017034 [app] INFO: ssid=MFH security=3 channel=48 rssi=-54
0000017036 [app] INFO: ssid= security=1 channel=48 rssi=-54
0000017038 [app] INFO: ssid= security=3 channel=48 rssi=-54
0000017040 [app] INFO: ssid= security=3 channel=48 rssi=-54
0000017043 [app] INFO: ssid=TestSSID security=3 channel=10 rssi=-55
0000017045 [app] INFO: ssid= security=3 channel=10 rssi=-59
0000017047 [app] INFO: ssid=MFH security=3 channel=44 rssi=-62
0000017050 [app] INFO: ssid=TestSSID security=3 channel=157 rssi=-62
0000017053 [app] INFO: ssid=RasLabs security=3 channel=5 rssi=-63
0000017056 [app] INFO: ssid=ECE Guest security=3 channel=44 rssi=-63
0000017058 [app] INFO: ssid=InnoVets security=3 channel=44 rssi=-64
0000017060 [app] INFO: ssid= security=3 channel=44 rssi=-64
0000017063 [app] INFO: ssid=MassRobotics security=3 channel=116 rssi=-64
0000017065 [app] INFO: ssid=RasLabs-5G security=3 channel=153 rssi=-64
0000017068 [app] INFO: ssid= security=3 channel=157 rssi=-64
0000017071 [app] INFO: ssid=MassRobotics security=3 channel=11 rssi=-65
0000017073 [app] INFO: ssid=InnoVets security=3 channel=11 rssi=-66
0000017076 [app] INFO: ssid= security=3 channel=1 rssi=-67
0000017078 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-67
0000017081 [app] INFO: ssid=Boston Fire Mobile security=3 channel=1 rssi=-68
0000017084 [app] INFO: ssid=Poseidon security=3 channel=8 rssi=-68
0000017086 [app] INFO: ssid= security=3 channel=8 rssi=-68
0000017089 [app] INFO: ssid=MFH security=3 channel=11 rssi=-68
0000017092 [app] INFO: ssid=ECE Guest security=3 channel=11 rssi=-68
0000017094 [app] INFO: ssid= security=3 channel=11 rssi=-68
0000017096 [app] INFO: ssid=ECE Guest security=3 channel=6 rssi=-69
0000017099 [app] INFO: ssid=ECE Guest security=3 channel=6 rssi=-70
0000017101 [app] INFO: ssid=InnoVets security=3 channel=6 rssi=-71
0000017103 [app] INFO: ssid=MFH security=3 channel=6 rssi=-71
0000017106 [app] INFO: ssid= security=3 channel=6 rssi=-71
0000017108 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-71
0000017111 [app] INFO: ssid=DIRECT-5291AF4F security=3 channel=5 rssi=-72
0000017114 [app] INFO: ssid=MFH security=3 channel=6 rssi=-72
0000017116 [app] INFO: ssid=InnoVets security=3 channel=6 rssi=-72
0000017119 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-72
0000017122 [app] INFO: ssid=CBCI-8FC6 security=3 channel=6 rssi=-73
0000017124 [app] INFO: ssid= security=3 channel=8 rssi=-73
0000017127 [app] INFO: ssid=Poseidon security=3 channel=8 rssi=-73
0000017130 [app] INFO: ssid=DIRECT-34-HP M234 LaserJet security=3 channel=48 rssi=-73
0000017132 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-74
0000017134 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-74
0000017137 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-74
0000017141 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-74
0000017143 [app] INFO: ssid=InnoVets security=3 channel=44 rssi=-74
0000017146 [app] INFO: ssid= security=1 channel=44 rssi=-74
0000017148 [app] INFO: ssid=MFH security=3 channel=44 rssi=-74
0000017150 [app] INFO: ssid=ECE Guest security=3 channel=44 rssi=-74
0000017153 [app] INFO: ssid= security=3 channel=44 rssi=-74
0000017155 [app] INFO: ssid= security=3 channel=44 rssi=-75
0000017158 [app] INFO: ssid= security=3 channel=157 rssi=-75
0000017160 [app] INFO: ssid=InnoVets security=3 channel=157 rssi=-75
0000017162 [app] INFO: ssid=MFH security=3 channel=157 rssi=-75
0000017165 [app] INFO: ssid=ECE Guest security=3 channel=157 rssi=-75
0000017167 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-76
0000017170 [app] INFO: ssid= security=3 channel=36 rssi=-76
0000017173 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-76
0000017176 [app] INFO: result_count=61

0000027021 [app] INFO: ssid=MFH security=3 channel=1 rssi=-44
0000027023 [app] INFO: ssid=MassRobotics security=3 channel=11 rssi=-48
0000027025 [app] INFO: ssid=MassRobotics security=3 channel=104 rssi=-48
0000027028 [app] INFO: ssid= security=1 channel=48 rssi=-53
0000027031 [app] INFO: ssid=InnoVets security=3 channel=48 rssi=-53
0000027033 [app] INFO: ssid= security=3 channel=48 rssi=-53
0000027035 [app] INFO: ssid= security=3 channel=48 rssi=-54
0000027037 [app] INFO: ssid=ECE Guest security=3 channel=48 rssi=-54
0000027040 [app] INFO: ssid=MFH security=3 channel=48 rssi=-54
0000027042 [app] INFO: ssid=InnoVets security=3 channel=1 rssi=-55
0000027046 [app] INFO: ssid=ECE Guest security=3 channel=1 rssi=-55
0000027048 [app] INFO: ssid= security=3 channel=1 rssi=-56
0000027050 [app] INFO: ssid=TestSSID security=3 channel=10 rssi=-56
0000027054 [app] INFO: ssid= security=3 channel=10 rssi=-58
0000027055 [app] INFO: ssid=ECE Guest security=3 channel=6 rssi=-63
0000027058 [app] INFO: ssid=InnoVets security=3 channel=44 rssi=-63
0000027060 [app] INFO: ssid=MFH security=3 channel=44 rssi=-63
0000027063 [app] INFO: ssid=ECE Guest security=3 channel=44 rssi=-63
0000027066 [app] INFO: ssid= security=1 channel=44 rssi=-63
0000027068 [app] INFO: ssid=MassRobotics security=3 channel=116 rssi=-63
0000027070 [app] INFO: ssid= security=3 channel=11 rssi=-64
0000027072 [app] INFO: ssid= security=3 channel=44 rssi=-64
0000027075 [app] INFO: ssid= security=3 channel=44 rssi=-64
0000027078 [app] INFO: ssid=RasLabs-5G security=3 channel=153 rssi=-64
0000027080 [app] INFO: ssid=TestSSID security=3 channel=157 rssi=-64
0000027082 [app] INFO: ssid= security=3 channel=157 rssi=-64
0000027084 [app] INFO: ssid=MassRobotics security=3 channel=11 rssi=-65
0000027087 [app] INFO: ssid=Poseidon security=3 channel=8 rssi=-66
0000027091 [app] INFO: ssid=InnoVets security=3 channel=6 rssi=-67
0000027093 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-67
0000027095 [app] INFO: ssid= security=3 channel=6 rssi=-68
0000027098 [app] INFO: ssid=MFH security=3 channel=6 rssi=-68
0000027100 [app] INFO: ssid= security=3 channel=8 rssi=-68
0000027102 [app] INFO: ssid=MFH security=3 channel=11 rssi=-68
0000027105 [app] INFO: ssid=InnoVets security=3 channel=11 rssi=-68
0000027107 [app] INFO: ssid=ECE Guest security=3 channel=11 rssi=-68
0000027110 [app] INFO: ssid=ECE Guest security=3 channel=6 rssi=-70
0000027112 [app] INFO: ssid=Poseidon security=3 channel=8 rssi=-70
0000027115 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-71
0000027117 [app] INFO: ssid=Poseidon security=3 channel=8 rssi=-71
0000027121 [app] INFO: ssid=DIRECT-34-HP M234 LaserJet security=3 channel=48 rssi=-71
0000027123 [app] INFO: ssid=Boston Fire Mobile security=3 channel=1 rssi=-72
0000027127 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-72
0000027130 [app] INFO: ssid=DIRECT-5291AF4F security=3 channel=5 rssi=-73
0000027132 [app] INFO: ssid=CBCI-8FC6 security=3 channel=6 rssi=-73
0000027135 [app] INFO: ssid= security=3 channel=8 rssi=-73
0000027137 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-73
0000027140 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-73
0000027143 [app] INFO: ssid= security=3 channel=36 rssi=-73
0000027145 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-73
0000027148 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-73
0000027150 [app] INFO: ssid= security=3 channel=149 rssi=-73
0000027153 [app] INFO: ssid=InnoVets security=3 channel=6 rssi=-74
0000027155 [app] INFO: ssid= security=3 channel=8 rssi=-74
0000027157 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-74
0000027159 [app] INFO: ssid=ECE Guest security=3 channel=44 rssi=-74
0000027162 [app] INFO: ssid=InnoVets security=3 channel=44 rssi=-74
0000027165 [app] INFO: ssid= security=3 channel=44 rssi=-74
0000027167 [app] INFO: ssid= security=3 channel=44 rssi=-74
0000027169 [app] INFO: ssid=MFH security=3 channel=6 rssi=-75
0000027172 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-75
0000027176 [app] INFO: result_count=61

0000186943 [app] INFO: ssid=MassRobotics security=3 channel=11 rssi=-49
0000186945 [app] INFO: ssid=MassRobotics security=3 channel=104 rssi=-49
0000186948 [app] INFO: ssid= security=3 channel=1 rssi=-52
0000186950 [app] INFO: ssid=InnoVets security=3 channel=48 rssi=-52
0000186952 [app] INFO: ssid=ECE Guest security=3 channel=48 rssi=-52
0000186956 [app] INFO: ssid=InnoVets security=3 channel=1 rssi=-53
0000186958 [app] INFO: ssid=MFH security=3 channel=1 rssi=-53
0000186960 [app] INFO: ssid=ECE Guest security=3 channel=1 rssi=-53
0000186963 [app] INFO: ssid=MFH security=3 channel=48 rssi=-53
0000186965 [app] INFO: ssid= security=1 channel=48 rssi=-53
0000186967 [app] INFO: ssid= security=3 channel=48 rssi=-53
0000186969 [app] INFO: ssid= security=3 channel=48 rssi=-55
0000186972 [app] INFO: ssid=TestSSID security=3 channel=10 rssi=-57
0000186974 [app] INFO: ssid= security=3 channel=10 rssi=-57
0000186976 [app] INFO: ssid=RasLabs security=3 channel=5 rssi=-61
0000186979 [app] INFO: ssid=TestSSID security=3 channel=157 rssi=-63
0000186981 [app] INFO: ssid=MFH security=3 channel=44 rssi=-64
0000186984 [app] INFO: ssid=InnoVets security=3 channel=44 rssi=-64
0000186986 [app] INFO: ssid= security=3 channel=44 rssi=-64
0000186988 [app] INFO: ssid=ECE Guest security=3 channel=44 rssi=-64
0000186990 [app] INFO: ssid= security=1 channel=44 rssi=-64
0000186993 [app] INFO: ssid= security=3 channel=157 rssi=-64
0000186995 [app] INFO: ssid=MassRobotics security=3 channel=11 rssi=-66
0000186998 [app] INFO: ssid=MassRobotics security=3 channel=116 rssi=-66
0000187001 [app] INFO: ssid= security=3 channel=6 rssi=-67
0000187003 [app] INFO: ssid=ECE Guest security=3 channel=11 rssi=-67
0000187006 [app] INFO: ssid=RasLabs-5G security=3 channel=153 rssi=-67
0000187008 [app] INFO: ssid=MFH security=3 channel=11 rssi=-68
0000187010 [app] INFO: ssid=InnoVets security=3 channel=11 rssi=-68
0000187012 [app] INFO: ssid=MFH security=3 channel=6 rssi=-69
0000187015 [app] INFO: ssid=ECE Guest security=3 channel=6 rssi=-69
0000187017 [app] INFO: ssid=DIRECT-5291AF4F security=3 channel=5 rssi=-69
0000187021 [app] INFO: ssid=ECE Guest security=3 channel=6 rssi=-69
0000187023 [app] INFO: ssid= security=3 channel=11 rssi=-69
0000187025 [app] INFO: ssid=Poseidon security=3 channel=8 rssi=-70
0000187028 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-70
0000187030 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-70
0000187034 [app] INFO: ssid=MFH security=3 channel=6 rssi=-71
0000187036 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-71
0000187038 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-71
0000187040 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-71
0000187043 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-71
0000187046 [app] INFO: ssid= security=3 channel=36 rssi=-71
0000187049 [app] INFO: ssid=InnoVets security=3 channel=6 rssi=-72
0000187051 [app] INFO: ssid= security=3 channel=8 rssi=-72
0000187053 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=8 rssi=-72
0000187056 [app] INFO: ssid=MFH security=3 channel=44 rssi=-72
0000187058 [app] INFO: ssid= security=1 channel=44 rssi=-72
0000187060 [app] INFO: ssid=ECE Guest security=3 channel=44 rssi=-72
0000187063 [app] INFO: ssid=InnoVets security=3 channel=44 rssi=-72
0000187065 [app] INFO: ssid=DIRECT-34-HP M234 LaserJet security=3 channel=48 rssi=-72
0000187069 [app] INFO: ssid=Poseidon security=3 channel=8 rssi=-73
0000187071 [app] INFO: ssid=Comcast Sucks 2.4 security=3 channel=36 rssi=-73
0000187074 [app] INFO: ssid= security=3 channel=36 rssi=-73
0000187076 [app] INFO: ssid= security=3 channel=36 rssi=-73
0000187078 [app] INFO: ssid= security=3 channel=44 rssi=-73
0000187080 [app] INFO: ssid= security=3 channel=8 rssi=-74
0000187083 [app] INFO: ssid=Poseidon security=3 channel=36 rssi=-74
0000187085 [app] INFO: ssid= security=3 channel=149 rssi=-75
0000187087 [app] INFO: ssid=InnoVets security=3 channel=157 rssi=-75
0000187090 [app] INFO: ssid= security=3 channel=157 rssi=-75
0000187092 [app] INFO: ssid=ECE Guest security=3 channel=157 rssi=-75
0000187096 [app] INFO: result_count=62

Clearly a lot going on... but the network BSSIDs of MassRobotics I'm trying to connect to have an RSSI consistently around -48 to -49. However, there are also BSSIDs that have an RSSI around -66.
I've not changed the antenna config so it should be using the trace antenna.

Ah, so there are multiple access points under the same SSID, that's good to know. (Re-read that it's the built-in trace antenna on Photon 2, not P2, so should be 5GHz too)

Perhaps the stack tries to connect to the less desirable BSSID for some reason. Would you mind running a debug build?

It should be, I've tested the Photon 2 on separated 2.4/5 GHz networks at home and it seems to connect and work just fine.

Also, the manual scan takes just over 4 seconds to complete if that's useful.

I wouldn't mind running a debug build at all. Can I build that through a compiler define?

I can provide a system-part binary for you, which you can flash using CLI, that should be the easiest. Give me some time to look into what the Realtek stack offers in terms of 802.11k/v/r visibility if that's perhaps in play here and I'll get back to you.

2 Likes

I'm still seeing issues on 6.2.0. Could you provide me with a debug build for that version?

I don't know if this is related, but are do you have any I2C devices connected to your P2?

0000082189 [comm.protocol] ERROR: Event loop error 1
0000082227 [system] WARN: Communication loop error, closing cloud socket

this looked familiar to me; i'm not sure if we were having the same issue, but I was intermittently losing wifi connection and it would sometimes fix itself, and sometimes the watchdog would kill the system.

For my device, it was being caused by my reading an i2c sensor (accelerometer) occasionally from a different thread, and I had not applied the WITH_LOCK(WIRE){} to the function doing the actual reads to the device. Adding the lock appears to have fixed the issue for me.

Idk if the P2 system thread is doing any i2c reads to it's NIC or other internal peripherials; that would make sense if the I locked up the i2c bus and then the system thread couldn't communicate with it's wifi component...or something.

I do use I2C, but only on startup to bootload an external µc. I call Wire.end() before this logging occurs. I doubt I2C is related in my case but I've not ruled it out.

I'm experiencing similar stability issues on 6.2.0 with some P2 units. I've tried to document my testing below. Here's my test setup:

  • Two P2 units running the same empty firmware, connected to the same Wi-Fi network, "MedShift"
    • One P2 on 5.6.0
    • One P2 on 6.2.0
  • Both units using the built-in antenna

In all logs below, I have cut out the initial Wi-Fi connection logs, and also trimmed down the regular pings to/from the cloud, which seem to happen every ~25 seconds (is this related to keep alive?). There is no specific reason I am running 5.6.0, other than a previous working P2 I had was running this OS version, and I started seeing issues when I updated from 5.6.0 to 6.2.0.

Here's some Wi-FI scan results from one of the devices - I am also in an environment with many APs broadcasting the same SSID:

0000016182 [app] INFO: ssid= security=3 channel=11 rssi=-47
0000016198 [app] INFO: ssid=MedShift Guest security=3 channel=11 rssi=-47
0000016217 [app] INFO: ssid=MedShift Guest security=3 channel=153 rssi=-51
0000016235 [app] INFO: ssid=MedShift security=3 channel=153 rssi=-51
0000016253 [app] INFO: ssid= security=3 channel=153 rssi=-52
0000016268 [app] INFO: ssid= security=3 channel=6 rssi=-56
0000016283 [app] INFO: ssid=MedShift security=3 channel=6 rssi=-56
0000016300 [app] INFO: ssid=MedShift Guest security=3 channel=6 rssi=-56
0000016319 [app] INFO: ssid=MedShift security=3 channel=11 rssi=-57
0000016336 [app] INFO: ssid= security=3 channel=11 rssi=-58
0000016352 [app] INFO: ssid=MedShift Guest security=3 channel=11 rssi=-58
0000016370 [app] INFO: ssid= security=3 channel=157 rssi=-59
0000016386 [app] INFO: ssid=MedShift security=3 channel=153 rssi=-60
0000016405 [app] INFO: ssid=MedShift Guest security=3 channel=153 rssi=-60
0000016424 [app] INFO: ssid=MedShift security=3 channel=157 rssi=-60
0000016441 [app] INFO: ssid=MedShift Guest security=3 channel=157 rssi=-61
0000016460 [app] INFO: ssid= security=3 channel=157 rssi=-61
0000016475 [app] INFO: ssid=MedShift security=3 channel=40 rssi=-63
0000016493 [app] INFO: ssid= security=3 channel=40 rssi=-63
0000016508 [app] INFO: ssid=MedShift security=3 channel=11 rssi=-64

Firmware

#include "Particle.h"

SYSTEM_MODE(AUTOMATIC);
SYSTEM_THREAD(ENABLED);
SerialLogHandler logHandler(LOG_LEVEL_ALL);

void setup()
{
}

void loop()
{
}

In my first test, after about ~20 minutes, the P2 running 6.2.0 output the logs below. After the last message at time 0000653722, the P2 displays solid cyan status light and stops outputting logs, and is not responding to cloud pings.

The P2 running 5.6.0 is still connected and responds to cloud pings.

P2 6.2.0 logs #1

...
0000448384 [comm.coap] TRACE: Sending CoAP message
0000448405 [comm.coap] TRACE: CON 0.00  size=4 token= id=30
0000448484 [comm.coap] TRACE: Received CoAP message
0000448505 [comm.coap] TRACE: ACK 0.00  size=4 token= id=30
0000473531 [comm.coap] TRACE: Sending CoAP message
0000473557 [comm.coap] TRACE: CON 0.00  size=4 token= id=31
0000479292 [comm.coap] TRACE: Retransmitting CoAP message; ID: 31; attempt 1 of 3
0000479335 [comm.coap] TRACE: Sending CoAP message
0000479360 [comm.coap] TRACE: CON 0.00  size=4 token= id=31
0000481188 [ncp.rltk.client] TRACE: Disconnected
0000481189 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000481190 [net.rltkncp] TRACE: NCP event 2
0000481191 [net.rltkncp] TRACE: State changed event: 0
0000481192 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0000481194 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000481196 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0000481198 [hal] INFO: DNS server list changed
0000481199 [hal] INFO: DNS server list changed
0000481202 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0000481204 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=ffff:   connected stage, loss beacon
0000481253 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000481254 [net.rltkncp] TRACE: NCP event 2
0000481255 [net.rltkncp] TRACE: State changed event: 1
0000481256 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0000488210 [comm.coap] TRACE: Retransmitting CoAP message; ID: 31; attempt 2 of 3
0000488250 [comm.coap] TRACE: Sending CoAP message
0000488276 [comm.coap] TRACE: CON 0.00  size=4 token= id=31
0000492581 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout  
0000492583 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000492584 [net.rltkncp] TRACE: NCP event 2
0000492585 [net.rltkncp] TRACE: State changed event: 0
0000493087 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000493088 [net.rltkncp] TRACE: NCP event 2
0000493089 [net.rltkncp] TRACE: State changed event: 1
0000493090 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0000503624 [comm.protocol] ERROR: Event loop error 1
0000503651 [system] WARN: Communication loop error, closing cloud socket
0000503687 [system] INFO: Cloud: disconnecting
0000503712 [system.ledger] TRACE: Disconnected
0000503735 [system] INFO: Cloud: disconnected
0000504414 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout  
0000504416 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0000504417 [net.rltkncp] TRACE: NCP event 2
0000504418 [net.rltkncp] TRACE: State changed event: 0
0000508725 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0000508928 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=0000:   
0000509036 [hal] INFO: WiFi off
0000509046 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:02:48:64
0000509177 [hal] INFO: WiFi on
0000509280 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0000509281 [net.rltkncp] TRACE: NCP event 2
0000509282 [net.rltkncp] TRACE: State changed event: 1
0000509283 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0000514156 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0000514158 [net.rltkncp] TRACE: NCP event 2
0000514159 [net.rltkncp] TRACE: State changed event: 2
0000514160 [net.ifapi] INFO: Netif wl3 link UP, profile=MedShift
0000514170 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000514202 [hal] INFO: DNS server list changed
0000514204 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0000514206 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000514239 [system] INFO: Cloud: connecting
0000514263 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000514305 [system] INFO: Loaded cloud server address and port from session data
0000514346 [system] TRACE: Address type: 1
0000514368 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000514405 [system.cm] TRACE: Using best network: WiFi
0000514435 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 4
0000514479 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0000514512 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0000514550 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000514591 [system] TRACE: Applying new keepalive interval now
0000514623 [system] INFO: Cloud socket connected
0000514650 [system] INFO: Starting handshake: presense_announce=0
0000514683 [comm.protocol.handshake] INFO: Establish secure connection
0000514721 [comm.dtls] INFO: session has 0 uses
0000514752 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0000514789 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,37, next_coap_id=1f
0000514825 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=31
0000514872 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0000515919 [comm.protocol.handshake] INFO: Skipping HELLO message
0000515954 [comm.coap] TRACE: Sending CoAP message
0000515982 [comm.coap] TRACE: CON 0.00  size=4 token= id=32
0000516015 [system] INFO: cloud connected from existing session.
0000516050 [comm.coap] TRACE: Sending CoAP message
0000516077 [comm.coap] TRACE: CON POST /E/particle/device/updates/enabled size=44 token= id=33
0000516128 [comm.coap] TRACE: Sending CoAP message
0000516155 [comm.coap] TRACE: CON POST /E/particle/device/updates/forced size=44 token= id=34
0000516208 [system] INFO: Sending application DESCRIBE
0000516237 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0000516283 [system] INFO: Sending subscriptions
0000516308 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0000516351 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000516403 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000516438 [comm.coap] TRACE: Received CoAP message
0000516464 [comm.coap] TRACE: ACK 0.00  size=4 token= id=32
0000516496 [comm.coap] TRACE: Received CoAP message
0000516523 [comm.coap] TRACE: ACK 0.00  size=4 token= id=33
0000516554 [comm.coap] TRACE: Received CoAP message
0000516583 [comm.coap] TRACE: ACK 0.00  size=4 token= id=34
0000516615 [system] INFO: All handshake messages have been processed
0000516650 [system] INFO: Cloud connected
0000516671 [system.ledger] TRACE: Connected
0000516696 [system.ledger] INFO: Subscribing to ledger updates
0000516728 [comm.coap] TRACE: Sending CoAP message
0000516755 [comm.coap] TRACE: CON POST /L size=57 token=e5 id=35
0000516794 [comm] INFO: Forcing a cloud ping
0000516818 [comm.coap] TRACE: Sending CoAP message
0000516844 [comm.coap] TRACE: CON 0.00  size=4 token= id=36
0000516908 [comm.coap] TRACE: Received CoAP message
0000516935 [comm.coap] TRACE: ACK 0.00  size=4 token= id=36
0000516968 [comm.coap] TRACE: Received CoAP message
0000516998 [comm.coap] TRACE: ACK 2.04  size=42 token=e5 id=35
0000517030 [system.ledger] INFO: Subscribed to ledger updates
0000517062 [system.ledger] TRACE: Subscribed to ledger updates: wak-device-settings
0000517157 [comm.coap] TRACE: Received CoAP message
0000517186 [comm.coap] TRACE: CON POST /E/particle/device/updates/pending size=47 token=01 id=49687
0000517237 [comm.coap] TRACE: Sending CoAP message
0000517263 [comm.coap] TRACE: ACK 0.00  size=4 token= id=49687
0000542300 [comm.coap] TRACE: Sending CoAP message
0000542326 [comm.coap] TRACE: CON 0.00  size=4 token= id=37
0000542488 [comm.coap] TRACE: Received CoAP message
0000542516 [comm.coap] TRACE: ACK 0.00  size=4 token= id=37
0000567551 [comm.coap] TRACE: Sending CoAP message
0000567581 [comm.coap] TRACE: CON 0.00  size=4 token= id=38
0000567689 [comm.coap] TRACE: Received CoAP message
0000567716 [comm.coap] TRACE: ACK 0.00  size=4 token= id=38
0000577814 [comm.coap] TRACE: Received CoAP message
0000577841 [comm.coap] TRACE: CON GET /d?\x04 size=9 token=02 id=49688
0000577877 [comm.protocol] INFO: Received DESCRIBE request; flags: 0x04
0000577915 [comm.coap] TRACE: Sending CoAP message
0000577942 [comm.coap] TRACE: ACK 0.00  size=4 token= id=49688
0000577977 [comm.coap] TRACE: Sending CoAP message
0000578004 [comm.coap] TRACE: CON 2.05  size=157 token=02 id=39
0000578128 [comm.coap] TRACE: Received CoAP message
0000578156 [comm.coap] TRACE: ACK 0.00  size=4 token= id=39
0000603188 [comm.coap] TRACE: Sending CoAP message
0000603215 [comm.coap] TRACE: CON 0.00  size=4 token= id=40
0000603313 [comm.coap] TRACE: Received CoAP message
0000603341 [comm.coap] TRACE: ACK 0.00  size=4 token= id=40
0000628372 [comm.coap] TRACE: Sending CoAP message
0000628399 [comm.coap] TRACE: CON 0.00  size=4 token= id=41
0000628515 [comm.coap] TRACE: Received CoAP message
0000628543 [comm.coap] TRACE: ACK 0.00  size=4 token= id=41
0000653578 [comm.coap] TRACE: Sending CoAP message
0000653606 [comm.coap] TRACE: CON 0.00  size=4 token= id=42
0000653695 [comm.coap] TRACE: Received CoAP message
0000653722 [comm.coap] TRACE: ACK 0.00  size=4 token= id=42

After the device froze, I reset and capture logs again. After about ~30 minutes, the device froze again and the last logs I received before the solid cyan light were some DNS server list changes.

The P2 running 5.6.0 is still connected.

P2 6.2.0 logs #2

0000976000 [comm.coap] TRACE: Sending CoAP message
0000976026 [comm.coap] TRACE: CON 0.00  size=4 token= id=49
0000976195 [comm.coap] TRACE: Received CoAP message
0000976223 [comm.coap] TRACE: ACK 0.00  size=4 token= id=49
0001001257 [comm.coap] TRACE: Sending CoAP message
0001001284 [comm.coap] TRACE: CON 0.00  size=4 token= id=50
0001005616 [comm.coap] TRACE: Retransmitting CoAP message; ID: 50; attempt 1 of 3
0001005658 [comm.coap] TRACE: Sending CoAP message
0001005686 [comm.coap] TRACE: CON 0.00  size=4 token= id=50
0001009188 [ncp.rltk.client] TRACE: Disconnected
0001009189 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001009190 [net.rltkncp] TRACE: NCP event 2
0001009191 [net.rltkncp] TRACE: State changed event: 0
0001009192 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0001009194 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0001009196 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0001009197 [hal] INFO: DNS server list changed
0001009198 [hal] INFO: DNS server list changed
0001009202 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0001009204 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=ffff:   connected stage, loss beacon
0001009209 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001009210 [net.rltkncp] TRACE: NCP event 2
0001009212 [net.rltkncp] TRACE: State changed event: 1
0001009213 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001015926 [comm.coap] TRACE: Retransmitting CoAP message; ID: 50; attempt 2 of 3
0001015969 [comm.coap] TRACE: Sending CoAP message
0001015995 [comm.coap] TRACE: CON 0.00  size=4 token= id=50
0001020538 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout  
0001020540 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001020541 [net.rltkncp] TRACE: NCP event 2
0001020542 [net.rltkncp] TRACE: State changed event: 0
0001021044 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001021045 [net.rltkncp] TRACE: NCP event 2
0001021046 [net.rltkncp] TRACE: State changed event: 1
0001021047 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001031337 [comm.protocol] ERROR: Event loop error 1
0001031365 [system] WARN: Communication loop error, closing cloud socket
0001031402 [system] INFO: Cloud: disconnecting
0001031426 [system.ledger] TRACE: Disconnected
0001031451 [system] INFO: Cloud: disconnected
0001032373 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout  
0001032375 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001032376 [net.rltkncp] TRACE: NCP event 2
0001032377 [net.rltkncp] TRACE: State changed event: 0
0001036684 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0001036887 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=0000:   
0001036995 [hal] INFO: WiFi off
0001037006 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:02:48:64
0001037136 [hal] INFO: WiFi on
0001037239 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001037240 [net.rltkncp] TRACE: NCP event 2
0001037241 [net.rltkncp] TRACE: State changed event: 1
0001037242 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001041371 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0001041372 [net.rltkncp] TRACE: NCP event 2
0001041373 [net.rltkncp] TRACE: State changed event: 2
0001041374 [net.ifapi] INFO: Netif wl3 link UP, profile=MedShift
0001041383 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0001041435 [hal] INFO: DNS server list changed
0001041437 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0001041440 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0001041518 [system] INFO: Cloud: connecting
0001041544 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0001041585 [system] INFO: Loaded cloud server address and port from session data
0001041630 [system] TRACE: Address type: 1
0001041655 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0001041696 [system.cm] TRACE: Using best network: WiFi
0001041724 [system] INFO: Cloud socket=0, connecting to 52.5.139.123#5684 using if 4
0001041772 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0001041806 [system] TRACE: Cloud socket=0, connected to 52.5.139.123#5684
0001041844 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0001041886 [system] TRACE: Applying new keepalive interval now
0001041918 [system] INFO: Cloud socket connected
0001041945 [system] INFO: Starting handshake: presense_announce=0
0001041979 [comm.protocol.handshake] INFO: Establish secure connection
0001042017 [comm.dtls] INFO: session has 0 uses
0001042048 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0001042084 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,58, next_coap_id=32
0001042120 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=50
0001042168 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0001043215 [comm.protocol.handshake] INFO: Skipping HELLO message
0001043250 [comm.coap] TRACE: Sending CoAP message
0001043278 [comm.coap] TRACE: CON 0.00  size=4 token= id=51
0001043311 [system] INFO: cloud connected from existing session.
0001043344 [comm.coap] TRACE: Sending CoAP message
0001043373 [comm.coap] TRACE: CON POST /E/particle/device/updates/enabled size=44 token= id=52
0001043426 [comm.coap] TRACE: Sending CoAP message
0001043453 [comm.coap] TRACE: CON POST /E/particle/device/updates/forced size=44 token= id=53
0001043506 [system] INFO: Sending application DESCRIBE
0001043535 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0001043583 [system] INFO: Sending subscriptions
0001043608 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0001043654 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0001043707 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0001043744 [comm.coap] TRACE: Received CoAP message
0001043771 [comm.coap] TRACE: ACK 0.00  size=4 token= id=51
0001043805 [comm.coap] TRACE: Received CoAP message
0001043835 [comm.coap] TRACE: ACK 0.00  size=4 token= id=52
0001043867 [comm.coap] TRACE: Received CoAP message
0001043894 [comm.coap] TRACE: ACK 0.00  size=4 token= id=53
0001043930 [system] INFO: All handshake messages have been processed
0001043968 [system] INFO: Cloud connected
0001043992 [system.ledger] TRACE: Connected
0001044017 [system.ledger] INFO: Subscribing to ledger updates
0001044049 [comm.coap] TRACE: Sending CoAP message
0001044075 [comm.coap] TRACE: CON POST /L size=57 token=b7 id=54
0001044112 [comm] INFO: Forcing a cloud ping
0001044136 [comm.coap] TRACE: Sending CoAP message
0001044163 [comm.coap] TRACE: CON 0.00  size=4 token= id=55
0001044224 [comm.coap] TRACE: Received CoAP message
0001044252 [comm.coap] TRACE: ACK 0.00  size=4 token= id=55
0001044343 [comm.coap] TRACE: Received CoAP message
0001044371 [comm.coap] TRACE: ACK 2.04  size=42 token=b7 id=54
0001044404 [system.ledger] INFO: Subscribed to ledger updates
0001044435 [system.ledger] TRACE: Subscribed to ledger updates: wak-device-settings
0001044481 [comm.coap] TRACE: Received CoAP message
0001044509 [comm.coap] TRACE: CON POST /E/particle/device/updates/pending size=47 token=01 id=50098
0001044560 [comm.coap] TRACE: Sending CoAP message
0001044587 [comm.coap] TRACE: ACK 0.00  size=4 token= id=50098
0001069631 [comm.coap] TRACE: Sending CoAP message
0001069658 [comm.coap] TRACE: CON 0.00  size=4 token= id=56
0001069794 [comm.coap] TRACE: Received CoAP message
0001069821 [comm.coap] TRACE: ACK 0.00  size=4 token= id=56
0001094858 [comm.coap] TRACE: Sending CoAP message
0001094885 [comm.coap] TRACE: CON 0.00  size=4 token= id=57
0001094985 [comm.coap] TRACE: Received CoAP message
0001095012 [comm.coap] TRACE: ACK 0.00  size=4 token= id=57
0001120051 [comm.coap] TRACE: Sending CoAP message
0001120071 [comm.coap] TRACE: CON 0.00  size=4 token= id=58
0001125138 [ncp.rltk.client] TRACE: Disconnected
0001125139 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001125140 [net.rltkncp] TRACE: NCP event 2
0001125141 [net.rltkncp] TRACE: State changed event: 0
0001125142 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0001125143 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0001125145 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0001125147 [hal] INFO: DNS server list changed
0001125148 [hal] INFO: DNS server list changed
0001125152 [system.nm] INFO: State changed: IFACE_LINK_UP -> IFACE_UP
0001125154 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=ffff:   connected stage, loss beacon
0001125264 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001125265 [net.rltkncp] TRACE: NCP event 2
0001125266 [net.rltkncp] TRACE: State changed event: 1
0001125267 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001126080 [comm.coap] TRACE: Retransmitting CoAP message; ID: 58; attempt 1 of 3
0001126111 [comm.coap] TRACE: Sending CoAP message
0001126129 [comm.coap] TRACE: CON 0.00  size=4 token= id=58
0001133279 [ncp.rltk.client] WARN: Disconnect linkError=00000008 reason=0000: auth stage, auth timeout  
0001133282 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001133283 [net.rltkncp] TRACE: NCP event 2
0001133284 [net.rltkncp] TRACE: State changed event: 0
0001133786 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001133787 [net.rltkncp] TRACE: NCP event 2
0001133788 [net.rltkncp] TRACE: State changed event: 1
0001133789 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001138003 [comm.coap] TRACE: Retransmitting CoAP message; ID: 58; attempt 2 of 3
0001138039 [comm.coap] TRACE: Sending CoAP message
0001138060 [comm.coap] TRACE: CON 0.00  size=4 token= id=58
0001141801 [ncp.rltk.client] WARN: Disconnect linkError=00000008 reason=0000: auth stage, auth timeout  
0001141803 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001141805 [net.rltkncp] TRACE: NCP event 2
0001141806 [net.rltkncp] TRACE: State changed event: 0
0001146238 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001146239 [net.rltkncp] TRACE: NCP event 2
0001146240 [net.rltkncp] TRACE: State changed event: 1
0001146241 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001150125 [comm.protocol] ERROR: Event loop error 1
0001150152 [system] WARN: Communication loop error, closing cloud socket
0001150188 [system] INFO: Cloud: disconnecting
0001150212 [system.ledger] TRACE: Disconnected
0001150235 [system] INFO: Cloud: disconnected
0001157564 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout  
0001157566 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001157567 [net.rltkncp] TRACE: NCP event 2
0001157568 [net.rltkncp] TRACE: State changed event: 0
0001158070 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001158071 [net.rltkncp] TRACE: NCP event 2
0001158072 [net.rltkncp] TRACE: State changed event: 1
0001158073 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001169398 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout  
0001169400 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001169401 [net.rltkncp] TRACE: NCP event 2
0001169402 [net.rltkncp] TRACE: State changed event: 0
0001169906 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0001170009 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001170010 [net.rltkncp] TRACE: NCP event 2
0001170011 [net.rltkncp] TRACE: State changed event: 1
0001170012 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001181337 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout  
0001181339 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001181340 [net.rltkncp] TRACE: NCP event 2
0001181341 [net.rltkncp] TRACE: State changed event: 0
0001181843 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001181844 [net.rltkncp] TRACE: NCP event 2
0001181845 [net.rltkncp] TRACE: State changed event: 1
0001181846 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001193170 [ncp.rltk.client] WARN: Disconnect linkError=00000400 reason=0000: scan stage, scan timeout  
0001193172 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0001193173 [net.rltkncp] TRACE: NCP event 2
0001193174 [net.rltkncp] TRACE: State changed event: 0
0001197481 [net.rltkncp] TRACE: Failed to connect to WiFi: -170
0001197684 [ncp.rltk.client] WARN: Disconnect linkError=00000000 reason=0000:   
0001197792 [hal] INFO: WiFi off
0001197803 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:02:48:64
0001197933 [hal] INFO: WiFi on
0001198036 [ncp.rltk.client] TRACE: NCP connection state changed: 1
0001198037 [net.rltkncp] TRACE: NCP event 2
0001198038 [net.rltkncp] TRACE: State changed event: 1
0001198039 [ncp.rltk.client] INFO: Try to connect to ssid: MedShift
0001202033 [ncp.rltk.client] TRACE: NCP connection state changed: 2
0001202034 [net.rltkncp] TRACE: NCP event 2
0001202035 [net.rltkncp] TRACE: State changed event: 2
0001202036 [net.ifapi] INFO: Netif wl3 link UP, profile=MedShift
0001202045 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0001202098 [hal] INFO: DNS server list changed
0001202100 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0001202102 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0001202195 [system] INFO: Cloud: connecting
0001202219 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0001202261 [system] INFO: Loaded cloud server address and port from session data
0001202303 [system] TRACE: Address type: 1
0001202326 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0001202363 [system.cm] TRACE: Using best network: WiFi
0001202391 [system] INFO: Cloud socket=0, connecting to 52.5.139.123#5684 using if 4
0001202434 [system] INFO: Bound cloud socket to lwip if 4 ("wl3")
0001202468 [system] TRACE: Cloud socket=0, connected to 52.5.139.123#5684
0001202506 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0001202547 [system] TRACE: Applying new keepalive interval now
0001202579 [system] INFO: Cloud socket connected
0001202605 [system] INFO: Starting handshake: presense_announce=0
0001202638 [comm.protocol.handshake] INFO: Establish secure connection
0001202677 [comm.dtls] INFO: session has 0 uses
0001202708 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0001202746 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,69, next_coap_id=3a
0001202782 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=58
0001202827 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0001203868 [comm.protocol.handshake] INFO: Skipping HELLO message
0001203901 [comm.coap] TRACE: Sending CoAP message
0001203928 [comm.coap] TRACE: CON 0.00  size=4 token= id=59
0001203964 [system] INFO: cloud connected from existing session.
0001203999 [comm.coap] TRACE: Sending CoAP message
0001204026 [comm.coap] TRACE: CON POST /E/particle/device/updates/enabled size=44 token= id=60
0001204079 [comm.coap] TRACE: Sending CoAP message
0001204106 [comm.coap] TRACE: CON POST /E/particle/device/updates/forced size=44 token= id=61
0001204157 [system] INFO: Sending application DESCRIBE
0001204187 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0001204235 [system] INFO: Sending subscriptions
0001204260 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0001204303 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0001204355 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0001204389 [comm.coap] TRACE: Received CoAP message
0001204415 [comm.coap] TRACE: ACK 0.00  size=4 token= id=59
0001204451 [comm.coap] TRACE: Received CoAP message
0001204477 [comm.coap] TRACE: ACK 0.00  size=4 token= id=60
0001204509 [comm.coap] TRACE: Received CoAP message
0001204539 [comm.coap] TRACE: ACK 0.00  size=4 token= id=61
0001204575 [system] INFO: All handshake messages have been processed
0001204615 [system] INFO: Cloud connected
0001204637 [system.ledger] TRACE: Connected
0001204660 [system.ledger] INFO: Subscribing to ledger updates
0001204700 [comm.coap] TRACE: Sending CoAP message
0001204730 [comm.coap] TRACE: CON POST /L size=57 token=b8 id=62
0001204766 [comm] INFO: Forcing a cloud ping
0001204795 [comm.coap] TRACE: Sending CoAP message
0001204827 [comm.coap] TRACE: CON 0.00  size=4 token= id=63
0001204901 [comm.coap] TRACE: Received CoAP message
0001204933 [comm.coap] TRACE: ACK 0.00  size=4 token= id=63
0001205085 [comm.coap] TRACE: Received CoAP message
0001205121 [comm.coap] TRACE: ACK 2.04  size=42 token=b8 id=62
0001205153 [system.ledger] INFO: Subscribed to ledger updates
0001205185 [system.ledger] TRACE: Subscribed to ledger updates: wak-device-settings
0001205236 [comm.coap] TRACE: Received CoAP message
0001205263 [comm.coap] TRACE: CON POST /E/particle/device/updates/pending size=47 token=01 id=50099
0001205320 [comm.coap] TRACE: Sending CoAP message
0001205348 [comm.coap] TRACE: ACK 0.00  size=4 token= id=50099
0001230385 [comm.coap] TRACE: Sending CoAP message
0001230411 [comm.coap] TRACE: CON 0.00  size=4 token= id=64
0001230585 [comm.coap] TRACE: Received CoAP message
0001230614 [comm.coap] TRACE: ACK 0.00  size=4 token= id=64
...
0002114551 [comm.coap] TRACE: Sending CoAP message
0002114577 [comm.coap] TRACE: CON 0.00  size=4 token= id=99
0002114786 [comm.coap] TRACE: Received CoAP message
0002114814 [comm.coap] TRACE: ACK 0.00  size=4 token= id=99
0002137935 [ncp.rltk.client] TRACE: Disconnected
0002137936 [ncp.rltk.client] TRACE: NCP connection state changed: 0
0002137937 [net.rltkncp] TRACE: NCP event 2
0002137938 [net.rltkncp] TRACE: State changed event: 0
0002137939 [net.ifapi] INFO: Netif wl3 link DOWN, profile=NONE
0002137941 [net.ifapi] TRACE: Netif wl3 ipv4 configuration changed
0002137943 [system.nm] INFO: State changed: IP_CONFIGURED -> IFACE_LINK_UP
0002137944 [hal] INFO: DNS server list changed
0002137945 [hal] INFO: DNS s

For a third test, and to further test if this is due to different device OS versions, I installed 6.2.0 on the P2 previously running 5.6.0 and was able to reproduce the same issue. This P2 reconnected to Wi-Fi 2-3 times before freezing up with solid cyan. I stepped away from my computer, but the last logs I received appear to be the cloud pings.

P2 6.2.0 logs - swapped boards

0002773995 [comm.coap] TRACE: Sending CoAP message
0002774021 [comm.coap] TRACE: CON 0.00  size=4 token= id=179
0002774203 [comm.coap] TRACE: Received CoAP message
0002774229 [comm.coap] TRACE: ACK 0.00  size=4 token= id=179
0002799261 [comm.coap] TRACE: Sending CoAP message
0002799286 [comm.coap] TRACE: CON 0.00  size=4 token= id=180
0002799400 [comm.coap] TRACE: Received CoAP message
0002799427 [comm.coap] TRACE: ACK 0.00  size=4 token= id=180
1 Like