[SOLVED] Can't get function registrated

In device 28004e000251353337353037 complie and flash Controlling LEDs over the Internet Example. From particle command line and serial. Try to see particle list but not see led function. And https://api.particle.io/v1/devices/28004e000251353337353037?access_token=xxxxxxxx
give me {
“id”: “28004e000251353337353037”,
“name”: “rco2170”,
“last_app”: null,
“last_ip_address”: “176.83.209.131:8182”,
“last_heard”: “2016-08-01T15:07:10.981Z”,
“product_id”: 10,
“connected”: true,
“platform_id”: 10,
“cellular”: true,
“status”: “safe-mode”,
“last_iccid”: “xxxxxxxxxxxxxx”,
“imei”: “xxxxxxxxxxxx”,
“current_build_target”: “0.4.9”,
“variables”: {},
“functions”: []
}

What i do worng? Why Spark.function(“led”,ledToggle) from code not resitrated this function in Cloud?

Thank you

This is the important bit

Your device is in Safe Mode (breathing magenta) and not running your code (should be breathing cyan)!

The binary you try to flash seems tohave a higher version than the system firmwaren (0.4.9).
Update your Electron or target 0.4.9.

What need to do to running code? Just press reset or what elese? Maybe need listen mode?

What OS are you using?
Have you got CLI installed?
What IDE are you using?

I use windows 10 , cli installed (nodejs and all stuff) and i can compile from command line and fash it with serial. I use Atom.io (or just notepad)

Put your device into DFU Mode (blinking yellow) and run

particle update

After that your application firmware should run. If not flash the binary again.

ok i find way to working add --target 0.4.8 for compiling (but in cloud i have “current_build_target”: “0.4.9”) Flash and not status “status”: “normal”, and “functions”: [“led”] is apper. Mmmmm… look like not bug look like feature.

That’s neither a bug nor a feature.
Using incompatible code will not run but put your device into Safe Mode.

When reporting issues, giving full detail of your environment and most importantly telling the color code of the status LED will help :wink:
And looking in the docs does too

https://docs.particle.io/guide/tools-and-features/firmware-manager/electron/#troubleshooting

1 Like