Author Topic: Oaks Disconnecting  (Read 2545 times)

brohan

  • Jr. Member
  • **
  • Posts: 59
Oaks Disconnecting
« on: September 12, 2016, 10:48:11 pm »
Hello all,

I have several Oaks, that for quite a while were working quite well. The other day, 3 of them started connecting to the internet, and Particle, and then after a short time, disconnect. They disconnect from both Particle, as well as my wireless AP. 

Sometimes they'll remain connected for 10-15 minutes, but most of the time 5 minutes or less.

Any ideas what's causing this, or how I may be able to rectify.

I'm not beyond setting up a way to logging all communication via my pfsense router.

Thank you for the help.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Oaks Disconnecting
« Reply #1 on: September 13, 2016, 05:23:41 pm »
Does the P1 led start doing a triple blink or anything? Does this also affect the new ones you provisioned the other day?

brohan

  • Jr. Member
  • **
  • Posts: 59
Re: Oaks Disconnecting
« Reply #2 on: September 13, 2016, 10:41:21 pm »
Great question, I should have been more descriptive.

I have been using 1 Oak (black) my original, this one is giving me issues now
I have been using 3 of my 5 new ones (pink, red and purple, all nail polish FWIW), the red one is working just fine, the purple and pink of these give me issues.

The last programs on the  3 that are giving me issues do NOT have a sketch that makes the Pin 1 LED blink by default. In fact they all have the SAME sketch on them. A Sketch I was trying to get the NRF shield to be in receive mode, and when it received from another Oak (hopefully), Pin 1 LED would blink.

I can put these into config mode, and then reconnect them to my wifi. They will connect to wifi (as verified by my AP), and they are seen on Particle. I can NOT however send a basic LED blink sketch. Arduino says that it is uploading the sketch (I do change the target Oak on the Oak CLI), waits, and then says an error occurred while flashing the device.

Then some short time later it will disconnect from Particle and my AP.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Oaks Disconnecting
« Reply #3 on: September 13, 2016, 11:35:25 pm »
Ok, so there is a chance the code running on them is bricking their ability to update OTA... that happens some times. The one I have running an LCD screen simply will not reliably do a OTA particle update while the program is running... All I do is reset into config mode (I don't connect to it with softAP or anything, I just reboot into config mode), and then once the device is up again (as seen on Particle or OakTerm), I'll upload the new code to it then.

Maybe give that a try (uploading new code when in config mode)? As it sounds like you haven't given that a try yet. First do it with the NRF shield still plugged in, and if it still gives you trouble, try it without, to see if there is something about the shield that is causing grief. I think of config mode serving two jobs. It firstly allows you to configure the Oak's wifi connection. Secondly, it allows you to load new code on if the old code is misbehaving. If certain conditions are met, the Oak will reboot into config mode itself (code bugs, loss of wireless connection) unless you force it to only go into config mode manually via the Arduino IDE board menu options.


brohan

  • Jr. Member
  • **
  • Posts: 59
Re: Oaks Disconnecting
« Reply #4 on: September 14, 2016, 03:55:27 pm »
As per the usual, you are the pro around these part. Did as you said, put each of the Oaks in config mode, once they connected to Particle, flashed a simple Blink program, which took, and they have been connected ever since.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Oaks Disconnecting
« Reply #5 on: September 14, 2016, 04:07:08 pm »
Glad to hear... and I'm certainly not the pro around here... that's reserved for the likes of kh and Erik! ;) I'm just a bit further down the path, and have bashed my head against a lot of these problems already! :o