Author Topic: Uploading failing?  (Read 7341 times)

aja175

  • Newbie
  • *
  • Posts: 19
Uploading failing?
« on: January 23, 2016, 10:37:22 am »
So I have everything connected, ran the CLI and have that set up, but I can't get a sketch to write over particle. 
I'm using the basic LED blink example from the quick start http://digistump.com/wiki/oak/tutorials/arduino
The IDE sends it to particle, everything looks ok on the IDE side but nothing happens on the board.  Tried it on the web IDE on the particle site, no joy there either.

Am I missing something? 

aja175

  • Newbie
  • *
  • Posts: 19
Re: Uploading failing?
« Reply #1 on: January 23, 2016, 10:49:15 am »
When I upload the sketch via the CLI I get this:

C:\Users\Jay2\Desktop>oak blink
Sending file to cloud, to flash to device.
An error occurred while flashing the device: { [Error: form-data: EISDIR: illegal operation on a directory, read] errno: -4068, code: 'EISDIR', syscall: 'read' }

This is what the error on the particle log says:
{"data":"failed ","ttl":"60","published_at":"2016-01-23T19:20:36.568Z","coreid":"d957040112809604e23ce22b","name":"spark/flash/status"
« Last Edit: January 23, 2016, 11:24:03 am by aja175 »

jpd

  • Newbie
  • *
  • Posts: 1
Re: Uploading failing?
« Reply #2 on: January 24, 2016, 12:28:46 pm »
You are getting EISDIR because "blink" is a directory. When using the CLI tool, you need to specify the source file itself (possibly blink\blink.ino).

That doesn't explain why it isn't working via the IDE though.
Was the board showing as connected when you uploaded the sketch? (Blue dot next to the target device on the particle dashboard.)

aja175

  • Newbie
  • *
  • Posts: 19
Re: Uploading failing?
« Reply #3 on: January 24, 2016, 12:54:54 pm »
I see what you're saying and that explains why the cli failed, I think it's a low power condition for the other problem.
My first board won't take any sketch at all.  It's getting a fatal error when I try to upload anything.
My 2nd board is working great with the same sketch.


Board 1 - It took a day to get it to finally connect to my wifi network and download a firmware.  It grabbed the firmware and that was it. The blinky light blinked its last blink. It talks to particle, reports errors, reports power on and off but that's all it does.
That only ever got power from usb on my laptop. 

Board 2 - I plugged it into my laptop, could connect to it and get the wifi AP list but that's it.   Blinky light blinking away but that's all it would do.  It never actually connected to my lan.
Last night someone suggested the fatal errors we were seeing were caused by a low power condition on the board, so I plugged board2 into a 700mah power brick, fired it up and it connected to my lan, grabbed the firmware and I've been using it ever since.

The only difference is the power brick.

« Last Edit: January 24, 2016, 01:04:06 pm by aja175 »

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Uploading failing?
« Reply #4 on: January 30, 2016, 01:56:39 pm »
@aja175 - have you tried Board 1 with the latest beta release (restoring to factory first)? I'd be interested to hear if that revives it

Thanks!
Erik

aja175

  • Newbie
  • *
  • Posts: 19
Re: Uploading failing?
« Reply #5 on: January 30, 2016, 03:02:30 pm »
It's not broadcasting an SID. I tried pulling 10 to ground and powercycling, that didn't help.  It was talking to particle the last time I had it plugged in but it's not doing that anymore.

Do your mac addresses start with 82:37:73 by any chance?  That's the only device on my lan that I can't readily identify.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Uploading failing?
« Reply #6 on: January 30, 2016, 04:04:57 pm »
Even after a factory restore? http://github.com/digistump/OakRestore - if you haven't yet please try that.

aja175

  • Newbie
  • *
  • Posts: 19
Re: Uploading failing?
« Reply #7 on: January 30, 2016, 04:53:57 pm »
I can't try that yet.  My FTDI board is 5v.  I ordered a 3.3v, it'll be here Monday or Tuesday.

aja175

  • Newbie
  • *
  • Posts: 19
Re: Uploading failing?
« Reply #8 on: February 05, 2016, 08:17:22 pm »
I tried the script to restore, it bombs with this error:

C:\Users\Jay2\Desktop\OakRestore-master>python esptool.py --baud 115200 --port 6 write_flash -fs 32m 0x1000 blank.bin 0x2000 oaksetup_restore.bin 0x0081000 oakupdate_restore.bin 0x101000 blank.bin 0x102000 blank.bin 0x202000 blank.bin
  File "esptool.py", line 149
    print 'Connecting...'
                        ^
SyntaxError: Missing parentheses in call to 'print'


digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Uploading failing?
« Reply #9 on: February 06, 2016, 03:55:32 am »
Try the precompiled esptool.exe in the same OakRestore repo - that will eliminate any weird python version issues and such - also your port should be COM6 for COM6 not just 6

aja175

  • Newbie
  • *
  • Posts: 19
Re: Uploading failing?
« Reply #10 on: February 06, 2016, 09:35:58 am »
Progress!  So I've got it back to what appears to be its original state with the blinky led being all blinky, but I can't get anything to upload from the IDE to either board.  I've tried updating the board package and reinstalling the IDE, it always throws this:


C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\Jay2\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\Jay2\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\Jay2\Documents\Arduino\libraries" -fqbn=digistump:oak:oak:CpuFrequency=80,UploadTool=oak_ota,FlashSize=OAK,RomConfig=Full -ide-version=10607 -build-path "C:\Users\Jay2\AppData\Local\Temp\build3e2565c6d726f437c658fed4db1b1656.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Jay2\Documents\Arduino\sketch_feb06c\sketch_feb06c.ino"

Board oak (platform oak, package digistump) is unknown

Error compiling.

aja175

  • Newbie
  • *
  • Posts: 19
Re: Uploading failing?
« Reply #11 on: February 07, 2016, 08:21:33 am »
It works!  Uninstalling the IDE didn't do it, had to find and manually delete the oak libraries.

Thanks for all the help Erik