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)
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.
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
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 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.
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
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’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.
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.
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
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.