Author Topic: Trouble with Oak after bootloop and restore  (Read 1982 times)

tonyjaco

  • Newbie
  • *
  • Posts: 1
Trouble with Oak after bootloop and restore
« on: July 14, 2016, 08:02:39 pm »
I've been trying to restore one of my Oaks to factory firmware and settings following a failed sketch upload that for some reason caused the odd reboot loop (once every couple seconds). I've been reading the forums and keeping up with the firmware releases and I've noticed that the latest is v1.0.5, which which @DrJFM has had success with.

A tl;dr of my problem is that after flashing over serial using the OakRestore repository, I am unable to complete the WiFi setup. Using the latest version of the Oak Config App, connecting to the ACORN_xxxxxx SSID, putting in different access points (WPA-PSK AES secured, Open System[no password], mobile hotspot) and placing the oak in different locations around the house, it is unable to download the first update successfully.

Additionally, I have also followed the instructions in the OakRestore repo regarding the last resort of flashing the actual firmware_v1.bin to the Oak. As well as performing the last step of sending the set\n40\n{"device-id":"....."}  command to the Oak over serial.

Even after flashing firmware_v1.bin and seeing the system_version change, I am still unable to get out of the wifi config of the Oak. No matter how many times I try to enter wifi settings, reboot the oak, etc. it still returns to the wifi setup, broadcasting the Acorn SSID, not connecting to the wifi or talking to Particle.

I was able to successfully test sketches, prior to the one that caused issues, and see it in the Particle devices list, etc.
 
Code: [Select]
To reiterate:

I have restored to the oak_restore_factory.bin [as per the instruction in the OakRestore repo]
I have tested restoring to firmwares: 1.0.0, 1.0.2, 1.0.3, as well as what should be 1.0.5 [file firmware_v1.bin downloaded on 7/10/16]
I have sent the serial command of set\n40\n{"device-id":"[my actual Oak ID, pulled from Particle]"}\n
I have tried multiple wireless access points, both my main infrastructure AP and my mobile hotspot, with and without passwords.
I haven't modified parameters that I don't fully understand, no have I altered the OakRestore command line arguments [with the exception of changing my COM port]

I am at a loss. I don't know what to try now, and I keep performing the same steps, hoping for different results.
If anyone needs more information, I will be happy to provide what I can.

Thank you,
Tony


DrJFM

  • Newbie
  • *
  • Posts: 31
Re: Trouble with Oak after bootloop and restore
« Reply #1 on: July 15, 2016, 11:28:58 am »
Good thing the Oaks are not $300 each....

I got to such a pretty non-responsive state a couple times and eventually escaped.  Most recently, the way I regained control was to go back to the serial Factory Reset state -- where initially, I could not even get a serial connection running for a successful flash.  Checked all my wires etc and was about to admit defeat when I (thought) I remembered my earliest successful flashes where I had not only grounded pin 2 ,but had left Pin 1 grounded as well.  Although I have not flashed w Pin 1 to ground recently or routinely, I gave it a try and got a successful flash.  Point being that when the firmware gets really in the ozone, the device was not behaving well or listening well and the Pin 1 was not doing a reset per normal.  Not sure what the additional Pin 1 to ground shut down, but my flash succeeded with both 1 and 2 grounded.

You may or may not want to try this flash approach, but a factory reset and avoidance of 1.0.3, 1.0.3 and 1.0.4 remains your best shot.  After a successful flash, I have had "first OTA update" issues that usually resolve.  I move the device a fair bit away from the WiFi source (as you have tried), go through the setup to the stage where it tries again at a slower speed.  I find that this first update takes, often, much longer than the Config app software seems to think necessary.  I just leave it for a good hour or more -- and get to the three blink sage of a successful first OTA update.  Look at the blinking pattern.  If it is not uniformly regular, it may be getting a packet of data every 15 sec or so -- let it sit.

What type of LED blinking patterns do you see?  I assume you are getting the proper flash messages when you flash.  Do you have trouble connecting via the Config app when Oak is broadcasting or just can't get the SSID and password to take? I have shut down the target WiFi source in order to configure the OAK to a SSID source with my WiFi dongle on my computer -- otherwise you can end up with too many strong signals all on one channel at once.  When SSID and Password are entered, I quickly fire up the indicated SSID sourceand unplug my dongle.  This channel congestion may be why some have success using their phone to connect for the configuration.

After a successful flash and first OTA (with patience for that to finish), I would just use the Arduino IDE and Board Manager to load a simple sketch AND to update to 1.0.5.
Glad I had more than one OAK -- gives me something to work w as I fight w a messed up unit.  I have never had to try and do that first OTA update stage via flash.  I have, once I got to 1.0.1, done the flash to 1.0.5.  But after a Factory Reset flash and if you can get the first OTA done, you should not need to flash to 1.0.5.

These Oaks do seem to take a lot of abuse and still survive.  Not sure if there is anything here really new (other than flashing w Pin 1 grounded) but the first OTA can take a long time.   But at some point, one does need to move on.   Sounds like you are close to that point.  Final question -- do you have a decent power source?  Flash, radio, etc can take a bit of power -- a miscellaneous cell phone charger/wall wart can possibly be weak on power???  I always use the USB3 port on my desktop computer when using a USB port for power or a couple of 2 Amp 5V chargers I have.  Will be interested to see if any other great hints show up.  I am sure I will brick one of my Oaks again.  Resorting to flash usually does the trick and you have done that...

   Cheers.