Asset shield: Flashing issues?

Havent used it in a while, but i’m having issues.

Connecting via USB. Did paricle list. Said credentials expired, so re-logged in, using particle login.
Next, downloaded following code as bin:

Servo myServoName;
int pos = 0;

void setup() {
    myServoName.attach( A5 );
    Spark.function("setpos", setPosition);
    Spark.variable("getpos", &pos, INT);

void loop() {

int setPosition(String posValue) {
    pos = posValue.toInt();
    return 0;

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:

If you look at the code, there’s supposed to be 2 functions, setpos and getpos.

On top of that, the main led blinks green, but the led closed to the USB cable is blinking red all the time, and I dont know what that means.


You are compiling with the Web IDE or CLI?

Can you try particle flash --usb servo.bin in DFU Mode instead?
The success message of --serial is often misleading and --usb is more elaborate.

The red LED on the Asset Tracker Shield is the GPS fix indicator. On the v1 shield this LED would stop flashing once a GPS fix has been acquired.

Compiling with Web IDE.

This is the output.

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

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!

Also, it’s unable to flash over OTA, but I got billed for this month even though I cant flash it over OTA.

Are you using an electron?

No, it’s an asset shield.

An asset tracker shield (normally) has an electron in it, which is what’s being flashed. That’s also the only device you could be billed for.

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.

Update 1: I realized I dont have my antenna on. I cant find it. Is the shield able to use 3G networks without the antenna?

Update 2: I found an NFC antenna with the same socket, and plugged it in. After I did that, the servo started turning.

So questions now:

  • Why wasnt it able to flash the device without the 3G network when I flashed it via USB?

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

    Spark.function("setpos", setPosition);
    Spark.variable("getpos", &pos, INT);

would now be

    Particle.function("setpos", setPosition);
    Particle.variable("getpos", pos);

Nice, i just looked at the SYSTEM_MODE(), looks interesting.

Btw, since i’m a big idiot that looses antennas, can I just purchase the antenna?

You should be able to order that online

The Electron BOM lists this as the type

Antenna - Penta band 850/900/1800/1900/2100 MHz | IPEX MHFI (U.FL) | Taoglas	PC104.07.0165C

On your store I can only see the WiFi one for order not the 2G one. Any ideas on the socket type or something so I can search elsewhere?

Ok, find it, it’s called an IPEX antenna / connector.

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