Im stuck in firmware update?

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:

Adam

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?

Thanks

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 upgrades.electricimp.com 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?

@Hugo

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.

@nimble99 thanks for posting your fix using tcptrace, the problem is that I am not sure how to make the DNS changes you mentioned. Is there any page anywhere that shows the steps for a tcp-dummy like me? Thanks in advance for your help!

I am having the same problem with one of my Imp. Firmware update was triggered. The light blink green for a while, then went off. No confirmation on whether the update was successful. I assumed the light stopped blinking indicated that the update was done.
Reboot the imp and it got into the firmware update loop again.

Update:
After about a dozen tries. Plugging and unplugging the Imp and wait for about 5 minutes on each attempt, my Imp finally gave a message that it successfully updated firmware.

Solid red should never be seen (outside of some factory procedures for commercial users) - if you have an imp behaving like this then we’ll replace it and analyze the returned one.

If you have one misbehaving like that, then please email us at info@electricimp.com

@Hugo, thanks a lot for your answer. Indeed the imp I tried on 3 different wireless networks shows solid red on each network after it gets connected, while trying to download the firmware. I will email as you requested.

However, as I mentioned before, I got several imps in the same order so before I will email, I will open a couple more and see if they behave the same - just thinking that somehow I ended up with some imp that were destined like you said for commercial use.

Thanks a lot for your reply, I thought there is nothing I can do about this imp, I really appreciate your help!

Can you tell me the mac address of the one you have confirmed you have problems with? I’d be surprised if you had problems with multiple ones, as solid red is sounding more like an imp issue than a network issue given you’ve tried several routers.