Author Topic: Roaming Oak Connection  (Read 2960 times)

toemat

  • Newbie
  • *
  • Posts: 2
Roaming Oak Connection
« on: June 29, 2016, 10:54:24 am »
Hi there! So I've got my Oak set up on a tracked robot and it does this thing where if the connection gets bad it seems to stop executing my code for a while (sometimes about one minute, sometimes forever). Does anyone know if the Oak goes into a search mode (or maybe it's the config mode?) when the connection gets bad, which would interrupt the user code execution?

I'm hoping to find a way to stop that from happening so that my code can keep operating the robot even if the connection is temporarily lost.


emardee

  • Full Member
  • ***
  • Posts: 135
Re: Roaming Oak Connection
« Reply #1 on: June 29, 2016, 06:47:24 pm »
A couple of my intended projects might want to run uninterrupted, so keen to see what comes from this thread.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Roaming Oak Connection
« Reply #2 on: June 29, 2016, 07:44:45 pm »
When the Oak loses it's connection, if you have the board profile set as 'Pin 1 Safe Mode - Default', when the oak has trouble with it's wifi for a set time period it will drop back into config / safe mode (as indicated by a triple blink pattern). If you want to fix that, choose the 'Pin 1 Safe Mode - Manual Config Only' board option.

IIRC, it is not that the wireless connection is lost that is the trigger, but that it can't talk to particle... (ie. "Tt will also boot to a safe mode if there is a timeout (do to a while loop that doesn't call Particle.process()) or a exception (memory overflow, etc)", so another other option may be to use the SYSTEM_MODE() API calls to instruct the Oak that you want to manage either the particle connection manually in code, which should prevent the automatic safe mode due to inability to talk to particle...



toemat

  • Newbie
  • *
  • Posts: 2
Re: Roaming Oak Connection
« Reply #3 on: June 29, 2016, 09:33:53 pm »
Thank you Peter, that is exactly the info I needed! I'll give it a shot and report back.

Do you happen to have a link to some info on exactly what the different Pin 1 Safe Mode options do?

emardee

  • Full Member
  • ***
  • Posts: 135
Re: Roaming Oak Connection
« Reply #4 on: June 29, 2016, 10:46:21 pm »
One place it was discussed was here:
https://github.com/digistump/OakCore/issues/18

I'm sure there was somewhere more detailed too. Maybe in the release notes for v1.0.1 in the Oak Wiki, or in the announcement of v1.0.1 release in Kickstarter Updates?

If you find more info, put a link here.

Thanks

Mike

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Roaming Oak Connection
« Reply #5 on: June 30, 2016, 12:05:26 am »
Pretty much it Mike... most of the info is in the release notes or in our heads atm ;D

In a nutshell,

Manual mode will only trigger safe mode if something goes wrong in the code (the "exception (memory overflow, etc)"  bit), or if you have the jumper on P1 when powering up the Oak.

Default mode adds on top of that the case of if the oak can't contact particle/wifi for a period of time, that it will fall back into safe mode... will have to document that on the wiki properly somewhere because it keeps coming up every now and then...