Imp offline *** no network reconnection retry

I added the following to my device code last night:

server.setsendtimeoutpolicy(SUSPEND_ON_ERROR, WAIT_FOR_ACK, 10);

It didn’t help. My Imp did not reconnect this morning.

Hugo, what is the default “timeoutpolicy” if server.setsendtimeoutpolicy is not used?

I used Peters template. Looks like it’s working except I’m not getting any status back about why it disconnected.
Peter, thanks for the template.

@mron What template are you referring to?

@osherf think might the code example in wiki http://devwiki.electricimp.com/doku.php?id=electricimpapi:server:onunexpecteddisconnect

@controlCloud Thanks! I’ll give it a try.

Peter’s template didn’t work for me :frowning:

did you try using the example as is? i tried that first. after it was working i folded my code around it.
it’s been consistently reconnecting for the last 4 days.

Yes, I used the example as is. Didn’t work for me.

This is strange… I used to power off/on the Imp to reboot. Last night I popped it out (April from Adafruit) and put put it back and the Imp reconnected this morning without a problem. Go figure…

…and it failed to reconnect today… :frowning:

@osherl I’ll PM you about testing the new release…

Installed new release (1e078ea - Fri Jul 12 10:54:48 2013). I will let you know. Thanks…

Good news! The imp reconnected this morning (WiFi was off for over 8 hrs). Thanks for the fix!

Please keep an eye on it and report any more strangeness (and the same for all the other testers who may be reading this)

We are experiencing similar problems. The only parts these different devices have in common are the Electric Imp card and the breakout board from SparkFun. Other parts are different types of relays, power sources, WiFi routers and so on.

Imp A:
Tue Aug 06 2013 07:53:46 GMT+0200 (CEST): Power state: online=>offlinePower CycleTue Aug 06 2013 11:02:35 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 11:02:35 GMT+0200 (CEST): Device booting Tue Aug 06 2013 11:02:35 GMT+0200 (CEST): Started

Imp B:
Thu Aug 01 2013 00:41:48 GMT+0200 (CEST): Power state: online=>offline Thu Aug 01 2013 00:42:18 GMT+0200 (CEST): Power state: offline=>online Thu Aug 01 2013 00:51:58 GMT+0200 (CEST): Power state: online=>offline Thu Aug 01 2013 01:31:00 GMT+0200 (CEST): Power state: offline=>online Thu Aug 01 2013 01:31:30 GMT+0200 (CEST): Power state: online=>offline Thu Aug 01 2013 01:31:48 GMT+0200 (CEST): Power state: offline=>online Thu Aug 01 2013 10:32:30 GMT+0200 (CEST): Power state: online=>offline Thu Aug 01 2013 12:35:58 GMT+0200 (CEST): Power state: offline=>online

Imp C:
Sun Aug 04 2013 01:25:00 GMT+0200 (CEST): Power state: online=>offline Sun Aug 04 2013 01:26:18 GMT+0200 (CEST): Power state: offline=>online Sun Aug 04 2013 23:30:23 GMT+0200 (CEST): Power state: online=>offline Sun Aug 04 2013 23:33:34 GMT+0200 (CEST): Power state: offline=>online Sun Aug 04 2013 23:43:04 GMT+0200 (CEST): Power state: online=>offline Sun Aug 04 2013 23:59:34 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 00:09:16 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 00:10:06 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 00:43:19 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 00:45:05 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 08:33:50 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 08:34:01 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 15:04:43 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 15:04:56 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 15:14:26 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 15:14:32 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 15:33:02 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 15:33:55 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 17:49:44 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 17:49:53 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 19:56:32 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 19:56:44 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 21:36:43 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 21:37:03 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 22:04:35 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 22:04:41 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 22:32:16 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 22:34:02 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 22:34:32 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 22:35:11 GMT+0200 (CEST): Power state: offline=>online Mon Aug 05 2013 22:35:42 GMT+0200 (CEST): Power state: online=>offline Mon Aug 05 2013 22:35:48 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 08:47:58 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 08:48:26 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 09:33:57 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 09:34:09 GMT+0200 (CEST): Power state: offline=>online

Imp C:
Tue Aug 06 2013 01:45:03 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 01:45:14 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 02:40:08 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 02:40:18 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 03:35:12 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 03:35:21 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 04:30:15 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 04:30:25 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 05:25:19 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 05:25:28 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 06:20:23 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 06:20:32 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 07:15:26 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 07:15:35 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 08:10:29 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 08:10:38 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 09:05:32 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 09:05:41 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 10:40:29 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 10:40:45 GMT+0200 (CEST): Power state: offline=>online Tue Aug 06 2013 12:19:25 GMT+0200 (CEST): Power state: online=>offline Tue Aug 06 2013 12:19:41 GMT+0200 (CEST): Power state: offline=>online

Could you go into more detail on your power source, attached hardware, wifi router and internet connection for each of these above?

My Imp went offline overnight and stayed down for 6 hours. I unplugged it from the SD socket, plugged it back in, and it came right up.

Power source is a 12v DC wall wart with a Murata DC-DC power supply on the board. Hardware is a custom PCB with a variety of chips, mostly connected via I2C. Router is a Linksys WRT54G2 running DD-WRT firmware. Internet connection is a point-to-point fixed wireless using Motorola Canopy equipment.

How close is the WRT54? We’ve seen issues where these APs (being rather old) can’t cope well with the imp’s output power when it’s close, and they drop/do not connect reliably. Moving the imp further from the base station fixes the problem, as does using a more modern AP with a decent front-end.

Are you using settimeoutpolicy at all?

My Imp is about 4 feet from the WRT54G2, so maybe the signal is too strong. It has behaved fine for the last 24+ hours.

I’m not using settimeoutpolicy.