CURL response contains error: "Unknown Function: digitalwrite


I’m having a few problems getting up and running with my Core.

Using CURL I run into the following:

curl<id>/digitalwrite -d access_token=<token> -d params=D7,HIGH
“id”: “<id>”,
“name”: “core1”,
“last_app”: null,
“connected”: true,
“return_value”: {
“Error”: “Something went wrong calling this function: Unknown Function: digitalwrite”

The LED is breathing cyan, and when I send the request it briefly flickers.

Also, the iOS app just crashes when I try to set D7 HIGH too.

I see the same behaviour (though Android app doesn’t crash - just reports a “something went wrong” message.)

This is my second core, first went pretty smoothly - second one shows this error.
First one continues to work.

The default tinker firmware is what provides the digital/analog read/write functions to the api. If you’ve flashed a custom app to your core, it won’t have these functions anymore. You can re-flash the tinker firmware from your mobile app. if you haven’t flashed a custom firmware, try re-flashing the tinker firmware anyway and see if that fixes it.

This was an out of the box core.
Will try reflashing and see.

Same here… it was out of the box.

Reflashing had no effect. The RGB LED turned magenta and eventually back to breathing cyan but the iOS app still shows the spinning progress icon on the Re-Flash Tinker button. Eventually the app reported an internal error with the Spark Cloud.

Dang. Sounds like someone from the spark team will need to help you. You might also try using this tool and see if you get any different results:

I’m lucky enough to have 2 cores. The same curl syntax (modulo device ID) worked on one while failing on its sibling. No need to try other web-side interfaces, something’s borked.

I reflashed tinker from the android app, and on the 2nd or 3rd attempt it took, and now the core is working as advertised.

Not sure why the stock tinker as delivered was borked, but reflashing worked for me.

Hi Andy… same here. Although I had already tried reflashing 2 or 3 times it finally started working when I did two reflash operations in quick succession. Annoying but all working now :smile: My geeky Christmas week is saved!

The crucial thing to note, for other readers, is that if the small blue LED isn’t lit up by the reflash process it isn’t working.

1 Like

Hey guys - just wanted to let you know the Spark team is aware of the issue and working on a fix. It seems like the auto-update firmware isn’t working as expected; for now, flashing the Tinker firmware from the mobile app should work.


Looks like this has been fixed - auto-update was not working correctly. Let us know if you still see issues!