Firmware update failing, stuck in loop

Hi,

I have two Imp’s which just came out of hibernation following a house move. One has updated to new firmware ok when powered back up, the other (2320374dead3dbee) seems to be stuck in a loop trying to get the update. The network configuration hasn’t changed and they were powered up only ten minutes apart.

Can anyone suggest things I can try please? the one that’s failing is of course the more useful of the two! (central heating remote monitor and control)

Thanks, Simon.

Here is the device log, if that gives any clues.

The imp is never contacting the upgrade server. There are (usually) two different reasons for this: a network problem that means that it can’t contact the server. The fact that your other imp has successfully upgraded suggests that this is not the case.

The other common cause is that your squirrel is immediately disconnecting before allowing the upgrade message to be processed. Usually power-cycling it would fix this (because it prevents the squirrel from immediately running), but I assume you’ve tried that. My other suggestion would be to do another BlinkUp.

Thanks - as you guessed I have power cycled it a whole bunch of times. It doesn’t seem to accept a new BlinkUp at all, and I’ve just noticed it is flashing in a regular pattern.

Red
Red+Orange
(pause)
Red
Red+Orange
(pause)
Red+Orange
Red+Orange
(pause then re-start)

I remember one of the Imp’s was setup originally using a ‘legacy’ tickbox on the app, but that’s not there on the iOS or android version now it seems. Is there some way I can get to try that again?

It obviously connects to the first part as I get status messages in the IDE, but what is the address for the upgrade server? it’s just possible that my ISP broke something just after I updated the first Imp! I can at least confirm that route to the server is visible from another device still.

upgrades.electricimp.com – you’ll get a “404 Not Found” header (and a blank page) if you try to hit it with a browser.

Also https://electricimp.com/docs/troubleshooting/blinkup/

Oh, if you’re using imp001, you could just swap the cards over, then you’d get your central heating remote monitor and control back.

Thanks again - I did in fact just swap the cards :slight_smile:
It seems like I do have issues getting to that address (ping and trace both fail) so I will have to try another friendly network sometime. At least it’s not so urgent now, but I can’t imagine how the first Imp got lucky and did the upgrade.

The host isn’t configured to return ICMP echo, so ping won’t work.

Hmm, OK. Is there a surefire way I can check if the network is the issue? I’ve just tried again and it still is in this loop.
Also I noticed that nslookup and trace return a different IP address for that hostname, which is a little odd.

impOS upgrades are fetched over HTTP; you can use a web browser or curl to http://upgrade.electricimp.com; note that you’ll get a blank page, so check the headers.

The upgrade “server” itself is actually multiple servers (us-east, us-west, etc…) on latency-based DNS, so it’s possible that you’ll get different IP addresses at different times and from different locations.

Thanks for your continued help. I’m sure there’s no network issue now, I do get the correct response from the upgrades site and can see valid headers.
I have just tried doing a blinkup to another known network, and can’t get the Imp to accept new settings at all. I even tried using the erase settings option from blinkup and that didn’t change anything either.
I am going to see if I can find the previous App with the mode for older device blinkup, but failing that I’m stumped.

I found v3.1 for android with the legacy mode, but still no luck. Behaviour doesn’t change after multiple attempts to reset network settings, or clear settings.

Does the imp actually receive the blinkup? (green flash at the end of the blinking)

btw, what’s the MAC address of the one you’re having issues with? (printed on the back of the card). Would like to see what version it’s on right now (it should be release 30 or later, which means you don’t need to use legacy mode)

Yes, I have seen the single green flash on a few occasions. The problem one is mac 0c2a69001a32. It was probably last active in about March this year, and working fine then.

So the device is on 32.12 (as expected). It was last seen around 2016-10-17T19:28:16 UTC, when it was told to fetch an upgrade.

However, we never saw any fetch from the upgrade server. It doesn’t appear to be able to reach upgrades.electricimp.com from what I can see.

OK, so I am trying another wifi router here but now can’t get the Imp to accept new settings. I’ve tried latest iOS version of the app and the older version on Android (with legacy box checked) but neither work. Is there any way to do a complete reset of the Imp? it is still blinking red and orange when switched on.
Failing that can it be left to run the current version please? it was working fine before

Sorry, it cannot be left on an old version; we keep the entire imp base up to date which ensures that we can keep them all secure & properly maintained.

If the device is getting sent to upgrade (ie it’s connecting to the old network, which is still there) then this would interrupt a blinkup. If you go out of range of the configured network then blinkup you should be fine (or go out of range and do a clear configuration blinkup, leaving the imp flashing amber, then come back and blinkup with the new network details)

I switched all of the networks off and tried to clear the settings. The led blinks green to suggest it has worked, but then does the red blinks which suggest it is trying to connect again. I tried setting to the new network and clearing several times, all with the wifi networks switched off and nothing seems to stick - when I switch the old wifi point back on the Imp tries to connect to that and gets stuck trying to upgrade again.

I have also confirmed that this laptop connected to the same wifi network can definitely get a response from upgrades.electricimp.com - unless you can see anything wrong with this?

`
Stirley_Simon@PIDHUNWS0090 ~
$ curl -v upgrades.electricimp.com

  • STATE: INIT => CONNECT handle 0x80048590; line 1397 (connection #-5000)
  • Rebuilt URL to: upgrades.electricimp.com/
  • Added connection 0. The cache now contains 1 members
  • Trying 52.4.66.68…
  • TCP_NODELAY set
  • STATE: CONNECT => WAITCONNECT handle 0x80048590; line 1450 (connection #0)
  • Connected to upgrades.electricimp.com (52.4.66.68) port 80 (#0)
  • STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x80048590; line 1557 (connection #0)
  • Marked for [keep alive]: HTTP default
  • STATE: SENDPROTOCONNECT => DO handle 0x80048590; line 1575 (connection #0)

GET / HTTP/1.1
Host: upgrades.electricimp.com
User-Agent: curl/7.50.3
Accept: /

  • STATE: DO => DO_DONE handle 0x80048590; line 1654 (connection #0)
  • STATE: DO_DONE => WAITPERFORM handle 0x80048590; line 1781 (connection #0)
  • STATE: WAITPERFORM => PERFORM handle 0x80048590; line 1791 (connection #0)
  • HTTP 1.1 or later with persistent connection, pipelining supported
    < HTTP/1.1 404 Not Found
  • Server Cowboy is not blacklisted
    < server: Cowboy
    < date: Thu, 20 Oct 2016 15:30:42 GMT
    < content-length: 0
    <
  • STATE: PERFORM => DONE handle 0x80048590; line 1955 (connection #0)
  • multi_done
  • Curl_http_done: called premature == 0
  • Connection #0 to host upgrades.electricimp.com left intact
  • Expire cleared
    `

If I had much hair left I might start pulling it out now :frowning:

Well, I can see your manual curl requests in the logs, but nothing else from the same IP address aside from the imp server connects where it gets told to go fetch an upgrade.

Can you describe your internet connection/router/etc? This is really rather strange.