Im stuck in firmware update?

I have bought 3 imps, and have tried two of them - both with the same problem.
After blinking them up to the wifi, I configure them in the IDE - which says agent-online, device-online, and I can ping it on my wifi… but the imp is flashing green short/long (like its in firmware update mode) - and it stays like that forever.
The docs suggest it should only be in firmware update for 60 seconds… Its been connected for 15 minutes and is still stuck. Programs wont run on the device… (the agent code runs)


Notes: I have a Cisco E4200 v1, running Shibby Tomato-Usb (screenshot attached).
I have turned off (as far as I can tell) all the DNS interception.

I also blinked up the imp to my iphone tether over 3G - and it had the same problem.

And here is my router traffic - you can see the imp appears to be in some kind of polling loop.

  1. Software Version: Unknown - I cannot get the device to log any messages to the server
  2. Hardware Version: “April,”
  3. Environment: Chrome 32.0.1700.107, on OSX 10.8.5 on a Macbook Pro 15’’ Retina. April is powered via USB.

Could you provide a mac address, so we can confirm it’s being sent for an upgrade and is, in fact, not hitting the update server?

Hi Hugo,

One of them is: 0C:2A:69:00:38:81

I can confirm it’s being sent for an upgrade, and is fetching it, possibly very slowly (I can see incomplete fetches here, two of them from a different IP address which was probably your 3G hotspot experiment).

I’ve no idea why it’s taking quite so long - what is your connection type? - but I would suggest just leaving it until it finishes as it is fetching the update.

Hi Hugo,

How large is the firmware update? I connected it to 3G, and left it for 15 minutes, then it disconnected itself (the flashing stopped). Upon reboot it just wen back in to firmware update mode.
I have now connected it back to my router, and it has so far downloaded 27kb, at 0.04 KB/s. I have a broadband connection and get speeds of 8Mb/s… so the problem isn’t that… Could it be that because the unit is getting the data so slowly, it gives up after a fixed period of time?
Why would the data be coming down so slowly? I am in New Zealand - do you have other customers in my area? (Auckland)

This has also gotten me thinking. If I build a product using the Imp - will firmware updates always be forced, or can I opt-out? I would imagine it would be a bad, if a firmware update gets sent out, and all products try to update (and hence be unable to perform their primary programming) - leaving people with broken devices… even for a day…

Thanks Hugo… I’m keen to get started building my project, once we get over this hurdle :wink:


Update: it’s been updating for about 8 hours now, and the router reports it has downloaded about 2.5mb of data. Could that be right? Are the updates really that large?


Ok!! I have fixed it - inadvertently, however, while diagnosing the issue. This post may help others who are having the same problem with their Imps, out of the box.

I noticed through my router logs that the Imp was connecting to to download the update. So I reconfigured my DNS, and created a man-in-the-middle application to observe the requests and see if something obvious was going wrong.
Both Imps immediately connected and downloaded two payloads, each approximately 520kb - (and appeared to be identical, so possibly just for error checking/redundancy). Immediately the imp that I had programmed was up and running - device programs working for the first time since I bought them!!

So, the upshot is - my diagnostic process actually fixed the issue, the cause of which I can’t put my finger on - my relay was doing a pure TCP interception of the requests, so it would have to be on the TCP transport layer that the requests were ‘fixed’ by the tool. Ultimately it led to the imps never getting their update - and whatever they did download, came down incredibly slowly (0.04KB/s?).

Anyway, if anyone else has the same problem, this is how you fix it. Download TCPTrace (or something like) and reconfigure your local DNS temporarily.

Fingers crossed the next firmware update works without intervention.

Thanks Hugo.

Yep, you can MITM the firmware update as the update itself is AES-GCM encrypted and signed… but I’ve no idea why it was taking so long on your router. Because the update is bigger than ram, it verifies it once then programs it the second time.

Note that no, you can’t insert an image that fails verification the second time. The imp won’t fall for it :wink:

If you still have imps that won’t upgrade, a tcpdump of the connection would be really interesting to us. Wouldn’t have to be the whole process (as it appears to get stuck) but seeing the first couple of minutes would be most interesting.

I am having the same issue. I let mine go for almost 4 hours and then restarted it.

Device Log
2014-02-20 21:16:19 UTC-7: [Status] Downloading new code; 1.59% program storage used
2014-02-20 21:16:19 UTC-7: [Status] firmware update triggered
2014-02-20 21:25:39 UTC-7: [Status] Device disconnected; 83 bytes sent, 0 received, 83 total

Mac address: 0c:2a:69:00:0a:e9

I am in Colorado with a 25gb download speed
Router: Dlink FIR-651

Tried a few settings on the router, changed DNS servers, same thing, just sitting forever in downloading firmware status.

24 hours and all of a sudden it seems to have gotten the update

[Device] device firmware version: af0f28a - release-27.10 - Fri Dec 13 11:08:38 2013

Would have loved to see some tcpdumps. Not sure why the firmware update should take so long unless there is huge packet loss somewhere…

I’m not sure if this is the right thread to ask for help but I am having a similar problem, the imp seems to be connected (I can see it in the IDE) but the led color is solid red, unlike other reports I read. But it seems stuck in firmware update as well. This is what I see in the IDE, repeated over and over:

2014-02-28 21:59:16 UTC-7: [Status] Downloading new code; 1.59% program storage used
2014-02-28 21:59:16 UTC-7: [Status] firmware update triggered
2014-02-28 21:59:53 UTC-7: [Status] Device disconnected; 83 bytes sent, 13 received, 96 total
2014-02-28 21:59:53 UTC-7: [Status] Device booting; 1.59% program storage used
2014-02-28 21:59:53 UTC-7: [Status] firmware update triggered
2014-02-28 22:04:55 UTC-7: [Status] Device disconnected; 83 bytes sent, 0 received, 83 total
2014-02-28 22:04:55 UTC-7: [Status] Device booting; 1.59% program storage used
2014-02-28 22:04:55 UTC-7: [Status] firmware update triggered
2014-02-28 21:59:16 UTC-7: [Status] Downloading new code; 1.59% program storage used
2014-02-28 21:59:16 UTC-7: [Status] firmware update triggered

mac address: 0C:2A:69:02:31:5F. I will leave it powered overnight as it seems this fixed for other posters and hope it will work for me too.

I would love to help with the tcpdumps you mentioned @Hugo but I am not sure how to get something like this.

I appreciate any help I can get. Thank you!

Again, very strange. It’s connecting to the server, which is telling it to fetch the upgrade (which is a standard HTTP fetch) but it never hits the upgrade server.

Could you try on another wifi network?

Thanks for your help, Hugo.

I got another router, cleared the imp, setup the new wifi but unfortunately still the same issue. I even moved it to an older April card I have and still the same:

2014-03-03 19:22:08 UTC-7: [Status] Device disconnected; 83 bytes sent, 0 received, 83 total
2014-03-03 19:22:08 UTC-7: [Status] Device booting; 1.59% program storage used
2014-03-03 19:22:08 UTC-7: [Status] firmware update triggered

Anything else I could try?


I have one Imp remaining that I have not unpacked from the packet (it came with the order of the other two imps that also had the firmware update problem, which I managed to fix).
I can do the TCP dump like you’re requesting - however I’ve never done that before on a remote device - can you give me some pointers of what I need to do? Tools/tuts?
I have both mac and windows machines.

I just blinked the imp for a 3rd wireless network I have access to and same thing happens: [Status] firmware update triggered and then nothing while the light is solid red. This is the last network I can try so pretty much I am out of options. Is there anything else I can do? Please, I really need some help.

What I am more worried about is that I got 6 imps in this order and I wonder if all will have the same issue.