Is there any reason why this code works on imps purchased from EI and not on ones from Sparkfun?

On the sparkfun ones i get: ERROR: the index ‘getimpeeid’ does not exist.

function awake()


//bunch of stuff not needed for example
local deep = 20 -(time() % 20);
server.log("Start deep sleep for: " + deep);
imp.configure(“Wake and Sleep”, [], []);“Starting”);
// Set an alarm for some future time when …
imp.wakeup(0.1, awake);

if ((“nv” in getroottable()) && (“count” in nv))
nv <- {count=1};
}“Count: %d, id: %s”,nv.count,hardware.getimpeeid().slice(-4)));
server.log("count: " + nv.count );

// No more code to execute so we’ll sleep until an event occurs

are they both on the same firmware release ?

Good question, no way for me to tell. I’m travelling next week and was planning a few demos with the imps so decided that commission first then demo :slight_smile:

I loaded the imp.unboundsq and left it blinking green while i have breakfast

getimpeeid is a firmware5 enhancement (the imp wiki contains a list of those).
I would say the sp imp is running an older firmware if it cannot find it - I use this function to test the firmeware version :slight_smile:

I would try to put the unbound code (or other factory code) to it and let it run for 10 minutes without touching it and hoping the firmware will be updated together with the user code update … Than try my own software again …

^ What I assumed. And am letting it run :slight_smile: , Thanks.

I do the same thing, try a very small code snippet to verify operation before proceeding.

They now have the update queued, so just power them off and on and they should pick up the new code.

The FW queueing is currently manual for imps never before seen by the server (ie, fresh out of the packet imps) - we’ll shortly be making every brand new imp do an update on first connect, which will solve the issue.

Sorry for the delay!

Note that firmware updates will only ever happen at boot time, we don’t force imps already running to take new firmware. This will be a user option in the future so you can update otherwise inaccessible imps from the planner.

Ok, 2 of 3 updated. The 3rd is patiently waiting and watching me eat. It’s baleful green eye is blinking steadily.

Thanks for the update Hugo.

That’s confusing, the 3rd one should definitely have updated. Try putting it in one of the impees that the others updated in?

3rd one is in the april board, waiting. I power cycled it a few times. (for luck)

Working now. Deleting it from the planner seemed to expedite the update. I’m sure the root cause is somewhere.