Author Topic: HOWTO upgrade OAKS successfully  (Read 5855 times)

starwolf73

  • Newbie
  • *
  • Posts: 7
HOWTO upgrade OAKS successfully
« on: February 24, 2016, 08:28:58 pm »
[Warning: Firmware is still in Beta, please use this procedure with caution]

Hi,

In hope it can help other, I would like to share my experience on how I was able to successfully upgrade my ten OAKs and connect them the Particle Cloud. After a few hours and trying to upgrade the OAK through the normal procedure, all my 10 OAKs fail to upgrade the firmware and connect to the particle cloud. The LED was flashing all the time with the initial sequence (1sec) and sometime a few random blink. So I did a quick investigate and found out that the OAK pre-firmware wasn't connecting well to my router but once it was upgrade and connect to the Particle Cloud, the OAK was working fine and steady. Hope it help other to upgrade their OAK and guide Erik/Team to diagnose deeper those bugs.

Notice: This isn't a deep analysis due to time but more a logical approach with try, guest and error.

Apple power supply 2.1A
iPhone 6 (ios 9.2.1)
Laptop Windows 7.1
Router: Asus RN-16 ( Kernel AdvancedTomato  1.28.0000 MIPSR2-3.1-132 K26 USB AIO )
Browser: Google Chrome

There is 3 important phase:
1- Steady Wifi connection
2- Firmware download, upgrade and finally the special fast blinking list (250ms)
3- Particle Cloud connection.

Phase 1 - Steady Wifi Connection
I found with my setup that OAK wasn't connecting well to my router and the only solution for me to have a consistent upgrade was with the following step:
- Make sure your router is not running on Wifi Channel 1 since OAK is broadcasting on it and may interfere. I used channel 3 since it was free
- Change your router Wireless mode to B (G or N work partially)
- Set the SPEED to 1MBS
- If you can create a Wifi Guest with No Encryption connect to internet, I found that by remove the encryption it was also going smoother. Again I didn't investigate more due to time constraint.
- Open your router diagnostic page to monitor the connection wifi and find the IP address but DON'T PING the OAK, I'll explain later.
- Using your phone (work best) only with 3G/LTE (wifi Off) connect to this URL: http://rawgit.com/digistump/OakSoftAP/master/config.html     (don't used HTTPS(!) even if it work)
- Register a Particle account and used a temporally password because it will be on unencrypted communication.
- Once you are register connect with your phone to the Wifi OAKs call ACORN-XXXXX
- Follow the procedure to config the Wifi.
- If it work you should have a strong and constant signal from your router page.
Unfortunately, if it didn't work please repeat the procedure again and always make sure to monitor the router device page to make sure the OAK is still connect and don't use PING to monitor it. I believe the stack IP on OAK pre-firmware is unstable when upgrading so make sure you don't have any other source trying to connect to his WIFI and limite to the minimum the communication until it is fully upgrade.


Phase 2 - Push the firmware
Most important part before you upgrade
Requirement:
Make sure you have a steady wifi connection before moving on.

Step:
- The trick that seem to work always is to press the NEXT to start the upgrade and Disable right away the WIFI so your phone doesn't reconnect..
- Your OAK should start blinking similar to your router packet light.
- If it succeed after ~30s it should go off 2-3 second and start with a different blinking (250ms cycle). If you see the normal blinking (1 sec. cycle) it didn't work and required to power off/on the OAK, reconnect to the wifi and press Retry button. I realized that soon after the upgrade start, if he was received a Ping or a connection from my phone, OAK seem to crash and the normal blinking restart (1sec).
 
 Phase 3 - Connecting to the Particle Cloud
Requirement
- Router setting Phase 1 (Router to Type B, Channel other than 1 and no encryption)
- Fast blinking led
- Check your version by connect to your OAK via his WIFI ACORNxxxx and go to URL: http://192.168.0.1/system-version).
You should have the latest version System-Version: 5
Below is table explaining the version System-Version:
1= 0.9.1
2= 0.9.2
2= 0.9.3 (mistakenly not incremented)
4= 0.9.4
5= 0.9.5

Step:
- Use you PC/Laptop and open both page to monitor the connection
https://dashboard.particle.io/user/devices
https://dashboard.particle.io/user/logs
- Using your phone, turn your wifi OFF and connect to this via 3G/LTE URL: http://rawgit.com/digistump/OakSoftAP/master/config.html     (don't used HTTPS(!) even if it work)
- Power OFF the OAK
- On your phone used the FORGET NETWORK for the Wifi OAK
- Power ON the OAK
- Turn on your Wifi phone
- Reconnect to Wifi of the OAK
- Follow the OAK procedure to reconfigure your Wifi and proceed with the last cloud configuration.
- If it succeed, you will see something like "Cloud Connected!" but I prefer to monitor both web page above since it is dynamic and no need to refresh it.

*** Don't forget to reconfigure your router to his initial setting. You will have to redo again the Step 1 to configure your WIFI with your encryption key. ***

Due to routers difference you mileage may vary, but the important thing to remember:
- Make sure you have a steady connection WIFI before going further with your router device/diagnostic page.
- For the firmware, the trick is soon you press NEXT button, turn your Wifi Phone OFF so it doesn't reconnect when he is downloading the firmware and don't use the ping command.
- Finally for me, I had to used the "FORGET NETWORK" on the OAK Wifi config on my phone because  my phone was not able to reconnect to the OAK.

I was able to configure my arduino IDE with the OAK tools and send sketches. Particle API work fine but I was not able to use any ESP8266 API due to compiler error "ESP8266 library not support on OAK platform".

Enjoy :)
Eric
« Last Edit: March 01, 2016, 09:06:54 pm by starwolf73 »