Author Topic: Kickstarter Oak will not first update  (Read 10804 times)

ty1911

  • Newbie
  • *
  • Posts: 12
Kickstarter Oak will not first update
« on: December 10, 2016, 01:03:48 am »
Hey everybody,
So I purchased 3 Oaks during the Kickstarter campaign and only now do I have time to monkey around with them (well from the Kickstarter updates, I was told to wait).  So I found them while I was cleaning up and I checked that it was OK to update and start using them.  Anyway, long story short, the last 5 hours and I still cannot update 1 of them.  I just ordered a USB to serial adapter, but I was wondering if anyone knows if I can trade the other 2 for ones that are past this first update?
I just uploaded a video of what happens.  Once plugged in, it will blink every second.  When I start the upgrade, it blinks once then twice for 10 seconds then back to once every second.

Thanks,
Alan
« Last Edit: December 10, 2016, 10:31:52 pm by ty1911 »

PeterF

  • Hero Member
  • *****
  • Posts: 877
Re: Kickstarter Oak will not first update
« Reply #1 on: December 10, 2016, 11:29:41 pm »
Have you tried the Troubleshooting a First Update steps? To be honest, this should be the only 'big' issue you'll have... getting past this first update. After that, most reports I've heard (and my own experiences) say it's fine after that. The single most effective solution I've found is to do the serial update, and it's pretty quick and painless once you've done it a few times! ;) I have another four yet to be provisioned... and I'll just serial update them when they get used... I won't even bother with OTA for the first update.

ty1911

  • Newbie
  • *
  • Posts: 12
Re: Kickstarter Oak will not first update
« Reply #2 on: December 11, 2016, 05:38:34 pm »
Thanks for the vote of confidence PeterF.
I tried all the different first update styles.
I have a serial adapter from ebay coming soon.
I was very frustrated when I wrote the post, but after reading the other posts, I feel confident that I'll get it done with the serial adapter.

Thanks,
Alan

PeterF

  • Hero Member
  • *****
  • Posts: 877
Re: Kickstarter Oak will not first update
« Reply #3 on: December 11, 2016, 10:06:23 pm »
Hey Alan. Just checking as if you haven't, you haven't... and it might be the solution! ;) Anyway, I appreciate you were frustrated... it is certainly annoying when you pull something out of the draw to use it and it just won't co-operate... a bit like the STM Maple Mini I'm playing with at the moment... just can't seem to work out how to get it to be a low power proposition without studying the code and datasheet for the next month straight... :-/ ... I now the Oak certainly isn't a polished end product, and has more than a few issues, but once you work them out it seems pretty robust. I hope to see you around on the forum after the usb-serial adapter arrives... ;)

ty1911

  • Newbie
  • *
  • Posts: 12
Re: Kickstarter Oak will not first update
« Reply #4 on: December 16, 2016, 09:37:14 pm »
Hi Peter,
Just an update.  Believe it or not, I ordered the serial adapter on Saturday (12/10) and I got it Monday morning (12/12)!  This is exciting because I live in Hawaii and nothing gets here this fast.  OK, I am sort of kidding, but I jury-rigged the adapter to the Oak (like connect the adapter directly into the Oak with the micro USB to power up the Oak) and it still didn't work.  So I finally got the correct connectors and make the connections and it still didn't work!  I re-read the instructions and I realized that when I ran the BAT file, I was just entering 3 instead of COM3. DUH!  About one minute later, Success!  So if I re-read the instructions, I could have had these Oaks updated.
I double checked the System Version and it shows 10!
So now I am just checking the forums for trying to get my Oak onto Particle.

Thanks Again!
Alan

PeterF

  • Hero Member
  • *****
  • Posts: 877
Re: Kickstarter Oak will not first update
« Reply #5 on: December 16, 2016, 09:42:36 pm »
lol... glad you're up and running. I amended the instructions on the 13th, so if you had been looking before then you would have been frustrated, as there wasn't a mention of needing to enter the full name before then ;) Nice to hear the adapter turned up that fast... yikes that was fast!

Use the OakConfig web app, log into your particle account (or register first if you need to and then log in), and then connect to your Oak, and tell it which wifi network to connect to. Once you let it loose on your wifi, it should automatically register on Particle. If it doesn't, you'll need to follow the manual claim steps because it's being stubborn.


ty1911

  • Newbie
  • *
  • Posts: 12
Re: Kickstarter Oak will not first update
« Reply #6 on: December 16, 2016, 11:13:53 pm »
Thanks for pointing me in the right direction regarding Particle.io
When I go to the OakConfig web app and I log in, I get a message saying "Your Oak is connected to the cloud and ready to use!"
I would assume this is the message I want to see, but when I refresh my devices (I have the Partilce.io website up) it does not show up. So I click on Console and something shows up. Now I am just logging down the Device ID and associating it with my Oak using Excel.
Slowly I am getting this.

I appreciate all the help.

Good luck with your Maple Mini (I also have a Pine64 I have been messing with, but that is more full on computer than like the Oak)

Alan

Update:
I got 2 out of the 3 to connect to Particle.io
The third Oak?
After entering my login and then my network, I get "Waiting for your Oak to connect to the cloud..."
Then after about 30 seconds, I get "Your Oak did not connect to the cloud, please retry or change your WiFi settings."
So I have started looking into this problem.  I hope it is nothing big.
Do you think I should try safe mode?
« Last Edit: December 17, 2016, 01:04:05 pm by ty1911 »

PeterF

  • Hero Member
  • *****
  • Posts: 877
Re: Kickstarter Oak will not first update
« Reply #7 on: December 17, 2016, 03:31:51 am »
No problem Alan.

lol... so you're also a pine64 user... I'm one of the mods over on the pine64 forum (pfeerick), so flick me a PM over there if you need any help on that front. I just haven't been on over there for the last week or so due to uni assessment.

Once you get your Oaks on the Particle cloud then the real fun can begin programming them OTA, or if that is an issue, using your USB-to-serial adapter.

Pete

ty1911

  • Newbie
  • *
  • Posts: 12
Re: Kickstarter Oak will not first update
« Reply #8 on: December 17, 2016, 01:04:38 pm »
Update:
I got 2 out of the 3 to connect to Particle.io
The third Oak?
After entering my login and then my network, I get "Waiting for your Oak to connect to the cloud..."
Then after about 30 seconds, I get "Your Oak did not connect to the cloud, please retry or change your WiFi settings."
So I have started looking into this problem.  I hope it is nothing big.
Do you think I should try safe mode?

PeterF

  • Hero Member
  • *****
  • Posts: 877
Re: Kickstarter Oak will not first update
« Reply #9 on: December 17, 2016, 03:47:23 pm »
As long as it accepted the wifi config and rebooted, if it didn't connect to particle on it's own, you'll just need the follow the manual claim process. It doesn't matter what the config app says at that point. All you will need to do is enter the device ID on Particle Build, and it should be registered / paired.

Your Oak should still be in safe mode (doing a triple blink), as at this point you haven't loaded a sketch onto it. If it is still doing the single flash pattern, it hasn't updated, and that needs to happen before it can connect to Particle.

ty1911

  • Newbie
  • *
  • Posts: 12
Re: Kickstarter Oak will not first update
« Reply #10 on: December 17, 2016, 06:20:34 pm »
When I checked on the Particle website, it only shows 2 out of the 3 registered.  While I was there, I tried manually entering the Device ID, but then it says "Could not claim device."
Funny though, when I check http://192.168.0.1/info it shows claimed (unless I am reading that wrong).
Wait, if I go to http://192.168.0.1/particle it shows "Not Connected" which is probably more accurate.
The Oak is blinking 3 times and It also shows "system_version":10,"version_string":"1.0.5", so the update did go through, right?

Can you think of anything else I could try?
I am in no rush for this third Oak because I only need 2 for a project I am doing, but it would be nice to have all three working properly.

Thanks,
Alan

Bobzilla

  • Newbie
  • *
  • Posts: 12
Re: Kickstarter Oak will not first update
« Reply #11 on: December 26, 2016, 05:42:48 am »
I'm at the same point Alan is.

I have done serial update, several times. Always get 3 blinkies, version 10, yada yada.
Connected to ACORN-xxxxxxx, did the config for the local network all the others have worked with.
Oak does NOT seem to reboot and certainly does not connect to Particle. Cannot manually claim.

The key here is that it will not config for the network.

Is there a verify after program on the serial method?

Help!

PeterF

  • Hero Member
  • *****
  • Posts: 877
Re: Kickstarter Oak will not first update
« Reply #12 on: December 26, 2016, 05:16:32 pm »
When you said it will not config for the network... what actually happens? It might help if list some steps, then we'll be on the same page:

1. Load the Oak WiFi Config page on a wifi capable device connected to the internet.
2. Log in to Particle
3. Connect to Oak Acorn network (your Oak should be doing the P1 triple blink pattern because it is in config mode)
4. See list of wifi devices, system version. Pick your network from the list or enter one manually.
5. Save the new config
6. Reboot and connect to configured network.

If you are getting to step 4, then the Oak WiFi is working - it is serving the ACORN network, scanning other available networks and sending that info back to the OakWiFiConfig page. If it freezes on step 5, the times that has happened to me I have just had to do it a couple of times until it takes... making sure I'm not too close to the Oak when doing so (i.e. closer is NOT better). I have had the best luck with my tablet and use that all the time when configuring Oaks. One trick I learn with it was to connect and leave it for about 30 seconds, so it could do the wifi handshaking and come to terms with the fact it no longer had an active connection to the internet.

One thing to do after the serial update, or even the OTA update if that succeeds is to manually power cycle the Oak - it doesn't seem to work well / reboot properly after doing the update.

There is no specific mention of esptool verifying after write, but there must be some verification or communication as a write can fail. There is a specific verify function, but it shouldn't be needed as the bootloader has a checksum verification protocol, and that should be enough to catch any errors there. If you can see things like the Oak AP, acccess info about the system version, and see wifi scan results, it appears to be working properly.

What do http://192.168.0.1/device-id and http://192.168.0.1/particle return/display when connected to the Oak? device-id will display your Oaks device ID, and also the claim status - 1 for claimed, and presumably 0 for not claimed. particle should return Connected to indicate the Oak is connected to the Particle Cloud.
« Last Edit: December 26, 2016, 05:18:46 pm by PeterF »

Bobzilla

  • Newbie
  • *
  • Posts: 12
Re: Kickstarter Oak will not first update
« Reply #13 on: December 28, 2016, 09:29:03 pm »
Thanks for your swift reply.

I get to step 5 on WiFi-1. It doesn't seem to do a full reboot but enough of some horsing around to disconnect from the PC doing the config.
There are a number of short and long blinks with short and long pauses but the Oak network never leaves the list of available networks as all the others have done by this point but perhaps momentarily.
Eventually it just goes back to the triple blink and as an available network.

I even tried the manual power cycle (disconnect as you described) to no avail.

I tried and got the same result on WiFi-2.

Went back to WiFi-1 (it is 15 feet farther away from the Oak than -2) and repeated 3 times doing 'Change Settings' each time.

I tried from scratch 3 times and always giving the board plenty of settle time, no joy.

While connected to the ACORN-network I checked the id, the particle state (Not connected), and the info, which I show below (less some possible private...info).
  • {"id":"d9...4f","c":0}
  • Not connected
  • {"id":"d9...4f","claimed":0,"claim_code":"84...G7~","server_address_type":1,"server_address_domain":"device.spark.io","system_version":10,"version_string":"1.0.5","meta_id":0,"meta_data":"","first_update_domain":"oakota.digistump.com","first_update_url":"/firmware/firmware_v1.bin","first_update_fingerprint":"98 ... 95"}
Then I did another config with PUTTY on TX pin 4, which spits out the following at 'reboot' time:
ets Jan  8 2013,rst cause:2, boot mode:(3,0)

load 0x40100000, len 3632, room 16
tail 0
chksum 0xc0
load 0x3ffe8000, len 352, room 8
tail 8
chksum 0x82
csum 0x82

OakBoot v1 - N,BU,0


It all seems like good info but I have no knowledge about it to align with. It would be nice if there was a 'verbose debug' switch that would give a play by play on the boot/reboot at TX.

Any more clues here?

PeterF

  • Hero Member
  • *****
  • Posts: 877
Re: Kickstarter Oak will not first update
« Reply #14 on: December 29, 2016, 11:03:59 pm »
It sounds like for some strange reason the wifi config isn't being saved, and hence it isn't going online, so it can't automatically claim on particle or let you claim it manually. And the claim information from the Oak is confirming that - as far as it's concerned, the claim process hasn't occurred. I would suggest seeing if you can power it from a different power source, or use a different lead, just in case the Oak is having power issues...

Otherwise, if you're game for some lower level tinkering, you can enable some diagnostic messaging, and see if that sheds any light. Firstly, you'll want to make sure your system is ready for Serial programming an Oak... Then, you'll need to do an OakRestore, as that will ensure your Oak is ready for Serial programming - else you'll load your serial program onto the Oak, but it won't run it! Then, download OakSystem, which is the code that the Oak runs in the background of your sketch,and when in config mode. Before you compile it, and load it onto your Oak, goto either (%appdata%\..\Local\Arduino15\packages\digistump\hardware\oak\1.0.6\cores\oak\OakParticle\particle_globals.h [on windows - but don't quote me on it... I'm on linux at time of writing!] or ~/.arduino15/packages/digistump/hardware/oak/1.0.6/cores/oak/OakParticle/particle_globals.h [on linux]) and uncomment #define DEBUG_SETUP. This enables the debug messages. You can then compile and upload the code to your misbehaving Oak, and see if any useful messages ensue. Note that the serial debug messages are output at 115200 baud, not the 74880 of the bootloader.

Hopefully that doesn't scare you off... please ask if something doesn't make sense! :)

The
Code: [Select]
ets Jan  8 2013,rst cause:2, boot mode:(3,0)

load 0x40100000, len 3632, room 16
tail 0
chksum 0xc0
load 0x3ffe8000, len 352, room 8
tail 8
chksum 0x82
csum 0x82

bit is normal... that is the standard ESP8266 boot code, and the

Code: [Select]
OakBoot v1 - N,BU,0
line tells you that the Oaks bootloader has started.