Wifi notecard loses connection

Hi,
wanted to report some seemingly undesirable behaviour from the wifi notecard.
Haven’t fully got to the bottom of it, but when running continuously over several days I’ve seen the card lose connection and not manage to restore it.

Im my case, I have 5 wifi cards connected to the same router.
All running FW 4.1.1.4015681
1 of them lost connection about 24 hours ago

I was able to read the following while it was in this state.

card.status={'storage': 5, 'status': '{normal}', 'usb': True, 'time': 1674726993}
hub.syncStatus = {'sync': True, 'requested': 77794}

I’m running a sync with allow=True periodically (actually every 5s), so it shouldn’t be a penalty box issue.

            req = {"req": "hub.sync"}
            req['allow'] = True
            self.ncard.Transaction(req)

I’ve hub.set() it to continuous mode with inbound and outbound set to 2 and sync=True

Currently working around it by detecting this condition and doing a card.restart, which isn’t ideal.

happily the notecard remembered all the notes I sent to it and sync’d them up after a restart.

Hi @calcut,

If at all possible, it would be to see a trace log of the activity on the Wi-Fi Notecard when this happens. Here are some instructions to follow.

Thanks,
Rob

1 Like

Hi Rob, sorry for slow reply on this.
I did manage to get some traces when this happens

4 out of my 5 systems failed to sync and so reconfigured their notecards at about the same time.
Which I guess indicates a genuine network problem around that time. However, since a card.restart got things going again, the network must have been restored but not picked up by the notecards?
Full disclosure, before I do a card.restart I also reconfigure the hub.set settings and wifi settings (SSID and PW)

Device Serial "ST30C"
"body":{"2023-02-16 21:08:21":"notecard CRITICAL no sync in 600s, timed out, reconfiguring notecard. 
Trace = {'text': 'R21:08:22.45 sync: wakeup: hub.sync\\r\\nS21:08:22.62 wifi: FMAC Driver version 3.3.0\\r\\n--Initializing--\\r\\nS21:08:22.62 wifi: power on\\r\\n'}"}

Device Serial "STINS"
"body":{"2023-02-16 21:08:21":"notecard CRITICAL no sync in 600s, timed out, reconfiguring notecard. 
Trace = {'text': 'R21:08:21.15 sync: wakeup: hub.sync\\r\\n'}"}

Device Serial "STCON"
"body":{"2023-02-16 21:08:23":"notecard CRITICAL no sync in 600s, timed out, reconfiguring notecard. 
Trace = {'text': '--Bus initialized--\\r\\n--Chip initialized--\\r\\n--Bootloader running--\\r\\nR21:08:20.94 sync: wakeup: hub.sync\\r\\n'}"}

Device Serial "ST20C"
"body":{"2023-02-16 21:08:19":"notecard CRITICAL no sync in 601s, timed out, reconfiguring notecard. 
Trace = {'text': 'R21:08:20.94 sync: wakeup: hub.sync\\r\\n'}"}

This seems to be a different event,

Device Serial "STINS"
"body":{"2023-02-15 21:43:07":"notecard CRITICAL no sync in 604s, timed out, reconfiguring notecard. 
Trace = {'text': 'R21:43:06.33 sync: wakeup: hub.sync\\r\\n'}"}

Hi @calcut,

I’m guessing that your intuition is correct (when in continuous mode, the Wi-Fi Notecard won’t maintain a connection of the AP fails/restarts). I really need to test this myself though, which I’ll do later this week or early next.

Thanks,
Rob

Just looping back on this. We did confirm that a Wi-Fi Notecard will end up in a penalty box in this scenario. There are two ways to resolve this situation today:

  1. Wait 1 hour and the Notecard should automatically re-connect after the penalty box expires.
  2. Issue a hub.sync request with allow:true which will automatically release the Notecard from a penalty box.

In a future revision of the Notecard firmware, in this scenario the Wi-Fi Notecard will have a much shorter penalty box time, so hopefully this won’t be an issue.

Thanks,
Rob

1 Like

Hi Rob
Thanks for looking into this.

Appreciate the update, but I’m not certain that is the root cause of the behaviour I’ve seen.
I already do a hub.sync with allow:true in my code (I do this if “connected” is not returned by a card.status request).

Also, in my original post

hub.syncStatus = {'sync': True, 'requested': 77794}

So it had been disconnected for over 21 hours in that case.

Hi @calcut,

Sorry - I completely missed that in your first post. Are you connecting to an Access Point that combines 5 Ghz and 2.4 Ghz? Just curious, as we’ve seen inconsistent behavior when connecting to those.

I’d like to try and reproduce this behavior. Can you send me all of the commands you send to the Notecard, just to make sure I’m mimicking your scenario as closely as possible? You can DM me here or email me at rob@blues.com if that’s easier.

Thanks,
Rob

Also, what version of the Wi-Fi Notecard do you have? It’ll say on the front of the board (should be either 1.1 or 1.2).