Author Topic: Arduino Fail  (Read 3997 times)

crambo

  • Jr. Member
  • **
  • Posts: 52
Arduino Fail
« on: November 19, 2016, 01:17:52 pm »
HI All,

I now have two Oaks registered such that they show up in the particle.io devices menu. I have attempted to follow the initial getting started with Arduino. I successfully completed all steps, but when attempting to compile a upload the START sketch, I get the following error:

Arduino: 1.6.12 (Mac OS X), Board: "Oak by Digistump (Pin 1 Safe Mode - Default), 80 MHz, Particle OTA, OAK (4M/1M SPIFFS), Single - 1MB (Fullsize)"

Sketch uses 259,994 bytes (24%) of program storage space. Maximum is 1,040,368 bytes.
Global variables use 51,128 bytes (62%) of dynamic memory, leaving 30,792 bytes for local variables. Maximum is 81,920 bytes.
OakCLI tool version 1.0.2
Using config file at: /user/path/Library/Preferences/oak/config.json
Sending file to cloud, to flash Unnamed Device (Device ID: d9*****************)

Error : An error occurred while flashing the device:
Error : An error occurred while flashing the device:

Any pointers?

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Arduino Fail
« Reply #1 on: November 19, 2016, 02:08:18 pm »
Oh no! Do you have a 3v compatable FDTI board just in case you need to do a factory restore?

Does the board that you are trying to upload to show the blue dot heartbeat on Particle? That is, Particle sees it as connected. Also I assume you selected the right Oak with the OakCLI.

This Error is obviously an indication of a failed upload. Figuring out the reason is another story. I once spent days fighting this and was only able to resolve it with some drastic measure that I hope will not be required for you.


crambo

  • Jr. Member
  • **
  • Posts: 52
Re: Arduino Fail
« Reply #2 on: November 19, 2016, 02:11:39 pm »
Hi. No i do not have a fddi thingee. Yes. Both units show blue dots on particle. I too hope for none drastic measures. All I wanted was an easy way to get networking integrated into my arduino projects... color me sad. Oak seems too good to be true.

Does it provide any light if I give output from Oakterm:

[14:11:33] Event: spark/status - online
[14:11:33] Config Mode
[14:11:33] No user rom found

I have NO IDEA what this means, and only even stumbled upon Oakterm by accident in another post. Doc seem sketchy for these things.

crambo

  • Jr. Member
  • **
  • Posts: 52
Re: Arduino Fail
« Reply #3 on: November 19, 2016, 02:20:27 pm »
I have no idea why, but it just started working... I changed name in the Oakterm (because it was one thing I COULD do) and after that, I can now flash the thing from Arduino. The Oakterm shows the flashing, but indicates that there were problems, yet the blink code I sent spells out my name in morse code just fine...

I have no clue, but if anyone else has this issue, try changing name in OakTerm and see if it helps??? Anyone with a higher pay grade want to comment on why this caused it to start working?

;)

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Arduino Fail
« Reply #4 on: November 19, 2016, 02:26:54 pm »
Not a user of Oakterm. KH is the creator and pro. He may have a clue as to why that would make it work. Glad to hear it's working.

BTW, you should consider getting an FDTI board (3V compatible) in case you ever need to factory restore. Also useful for getting serial output from the Oak when needed.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Arduino Fail
« Reply #5 on: November 19, 2016, 03:46:38 pm »
Ah, good to see you got past the wifi connect hurdle ;)

The bit about

Code: [Select]
[14:11:33] Event: spark/status - online
[14:11:33] Config Mode
[14:11:33] No user rom found

is perfectly normal. After an oak as been updated and configured to connect to your wifi, it will enter config mode as at that point there is no user program on the oak - hence it says it is online, in config mode (which you can tell visually as it should have been doing a triple blink pattern at the time) and that there is no user program (rom) present.

When you upload programs, the return from the update process (visibile on both OakTerm and the particle console logs) is inverted - it will say it has failed when it has in fact been successful, and it is successful when it has failed. Generally, only go by what the actual oakcli uploader says - it should tell you that the Oak has rebooted and that everything was a success.

As far as the name preventing an upload - I got nothing... kh or Erik would have a better idea as to what is going on there. The more common thing is that the right board is not picked in the oak cli program - so you try to upload to a board that is not currently powered ;)

And btw, I also recommend getting yourself a 3V (3.3v) compatible  FTDI (USB to serial) ... one of these days an OTA update will fail, and you'll be very sad until you do get a usb-to-serial adapter so you can knock some sense back into the Oak ;) the CH340 ones are redicously cheap - $1-2 inc. postage in ebay.

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Arduino Fail
« Reply #6 on: November 19, 2016, 04:03:29 pm »
Ah... Pete comes through again.

I could see the tests in OakSystem.ino after a connect to Particle for user rom and config rom being the same "==" and thought that this was normal but couldn't put together a good explanation for crambo's issue. I'm still learning about the system level stuff, but only when forced too.

Thanks again for jumping in. BTW, I wouldn't think a name change would do anything either. Perhaps the CLI config file was not in sync????
exeng

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Arduino Fail
« Reply #7 on: November 19, 2016, 07:09:13 pm »
lol... pretty much the same here also... when I'm forced to! ;) Plus I am intending (and have put the initial dot points on the wiki) to document the memory map and elaborate a bit more on how the oak works from start to finish, thus ensuring there is some documentation that aids a better understanding of what can go wrong and why;)

crambo

  • Jr. Member
  • **
  • Posts: 52
Re: Arduino Fail
« Reply #8 on: November 20, 2016, 12:21:24 pm »
Thanks to you both. I will get the FDTI interface. I will also find and bookmark the instructions for unbricking. I excited to make an led clock that can get time updates via NTP! (Or that is my first goal....) ;D

emardee

  • Full Member
  • ***
  • Posts: 135
Re: Arduino Fail
« Reply #9 on: November 21, 2016, 12:40:07 am »
Don't get the FDTI brand as there are some driver issues with cloned chips... and hard to tell whether you'll get a genuine one.

Search ebay for CH340G and you should be able to get a unit for about $1 - $2 including free worldwide shipping.