Now, I do particle flash --serial servo.bin and it says it’s a success:
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: servo.bin
Flash success!
I hold the button till it flashes blue, then if flashes some colors and gives the success message.
However! Even though I do this 100 times, the code has not been flashed. Why do I say this? Well, in the devices, it lists the functions of the old code I had!
See a screenshot:
Device manager still lists the old functions / variables.
particle flash --usb servo.bin
Found DFU device 2b04:d00a
spawning dfu-util -d 2b04:d00a -a 0 -i 0 -s 0x08080000:leave -D servo.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d00a
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08080000, size = 6876
Download [=========================] 100% 6876 bytes
Download done.
File downloaded successfully
Flash success!
Yes, that would be correct. I am being billed for the electron. My question is why, since it wont flash the device over OTA, hence it’s not incurring any charges?
Also, I have a very expensive shield which I cannot flash, so any assistance is welcome.
I think it did flash, but the program never was able to run as in default AUTOMATIC mode, the device needs to connect to the cloud in order to start running your firmware
no antenna -> no connectino to cloud -> no running of new code - even with the new firmware on the device.
And since the device could never inform the cloud about the change in Particle.function()/Particle.variable() state, the cloud only knew about the state set by the previous firmware.
You may need to look into SYSTEM_MODE() and/or SYSTEM_THREAD() enabled to overcome this requirement.
BTW, your code in the OP does still use the deprecated syntax
I don’t think Particle sells them seperatly, but you can find them at Mouser or DigiKey or lots of other places.
Just search for Taoglas PC104.07.0165C