Wifi loosing connectivity

Basic / Standard Reef Angel hardware
Post Reply
Sebyte

Wifi loosing connectivity

Post by Sebyte »

Three times now I have lost connection to the RA via wifi. Twice while I have been away from home and using iPad app, and once while I have been at home. Then the pc client would not collect data.

I have had to power cycle the RA to get the wifi back.

Having searched the forum the only topic I can find is http://forum.reefangel.com/viewtopic.ph ... connection

I am sure that the wifi software is the latest version as I had already carried out the download mentioned. But I will do the exercise again.

The green led was flashing but there was no activity from the amber LEDs.

Is there a recommended way to reboot the RA automatically say one a day? As I will be relying on remote monitoring more in the future, it would at least restore access should the problem come again.



Any suggestions?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi loosing connectivity

Post by rimai »

You can enable WDT by adding this to features file:

Code: Select all

#define WDT
Then add this to loop():

Code: Select all

if ((now()%86400)==0) delay(1000);
This should reboot the controller at midnight.
Roberto.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

Thanks Roberto, I will give it a try.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

Roberto,

Am I right in thinking that the following would reboot at 6 am, or should I use '06' ?

if ((now()%86400)==6) delay(1000);
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi loosing connectivity

Post by rimai »

You have to use this:

Code: Select all

if ((now()%86400)==21600) delay(1000);
The number you use is the number of seconds from midnight.

May I trouble you for some more info on the issue?
I'd like to know if you can ping the wifi attachment when you seem to loose connectivity.
Can you telnet to port 2000? Technically, if you establish a connection through telnet on port 2000, the wifi attachment will drop the connection after x seconds, which I believe the wifi utility from Dave sets it to 3 seconds.
If you do get to establish connection through telnet, does the green LED stop blinking on those 3 seconds? Also, if you get to establish connection, if you type anything on your telnet application, does the orange LED blink?
Roberto.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

Ok about seconds from midnight. As one of my ATO available periods is at that time I did not want to have any conflict.

I can do the tests for you, but may be a few days before it happens again. As my RA is 30ft away from my PC it may be hard to watch the LED's. I will have to get my wife to help if she is around at the time :)

Because my RA is wired into the tank cabinet and it is not easy to remove the relay unit, but I can easily pull the Head Unit out as well as the wifi, I was thinking that I might make up a D plug with 5v dc to pin 15 and Gnd to pin 10. I could then power up the Head Unit and wifi for testing and programming on my bench. I don't think that this will help with the above issues but would be a help while developing as you do not need to be switching physical relays, and can see what is on via the screen. Any comments?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi loosing connectivity

Post by rimai »

That works too or you can get one of these:
http://www.reefangel.com/Products.USB-Power-Cable.ashx
Roberto.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

That must be new as I don't think I have seen it before. I had not thought of using the USB 5v and it does do away with finding a separate PSU.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

Just had wifi down.

I used an iPad app called Network Ping Lite to ping the wifi address (192.168.2.10) and got a time out after four tries across my wifi network. I also tried to Telnet with no response from the same app.

The green LED was flashing, but no other activity.

I am not sure if you ment for me to connect the TTL/USB lead into the controller to do the Telnet part?

If so I will do that next time the wifi drops.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi loosing connectivity

Post by rimai »

It seems it really is with the wifi attachment and not with the controller.
Did this always happen or just recently?
Roberto.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

It has been recently, since around the last three weeks.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

Just been looking at the Roving Network site and Wifly info.

I don't know how you pass data from head unit to Wifly, but I suspect it may be via some UART configuration or at TCP level? I was wondering if an out of range variable was passed to the wifly buffer could it cause an overflow and hang the connection.

If so is the following of any relevance.
set sys sleep
<value>
sets the sleep timer. The sleep timer is the time in seconds after which the module goes to sleep. This timer is disabled during an open TCP connection. When the TCP connection is closed, the module counts down and puts the module in sleep state based on the value (in seconds). Setting the value= 0 disables the sleep counter and the module will not go into sleep based on this counter.
NOTE: Be sure to set the wake timer if not using an external wake up signal before issuing the sleep timer or the module will never wake up.
See section 10.1 for more details on using system timers
The WiFly modules can wake up from sleep state using the sensor input 0, 1, 2 and 3. This command sets the sensor input(s) to wake on (0-3). This is a bit-mapped value. Setting the value=0 disables wake on sensor inputs.
10.1.2. TCP Connection Timers Opening a TCP Connection:
In TCP-Client mode, the auto-conn timer controls the establishment of a socket connection. When set, the device automatically periodically attempts to establish a connection when the timer expires.
set sys autoconn <secs>
This command causes the module periodically connect to the host. The timer <secs> determines how often to connect to the stored remote host. If set to 1, the module will only make one attempt to auto connect upon power up. If set to 2 or greater auto connect will re-open the connection after the connection is closed. Default=0 disables.
10.3. Wake on UART
When the module is in sleep mode, the UART itself is disabled. However, wake on UART can be accomplished by connecting the SENSE pins to the RX data or CTS pin. (Using the appropriate divider resistors mentioned above)
I may be well off track and if so sorry for a Red Herring!
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi loosing connectivity

Post by rimai »

Could be...
Did you try factory reset and setting it up again?
Roberto.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

No, but I will give it a try and let you know.
Sebyte

Re: Wifi loosing connectivity

Post by Sebyte »

Hi Roberto

Yesterday morning I did a factory reboot and reloaded the software to the wifi. It shows that I am on v2.3.

The wifi dropped at 9:25 pm according to my web banner when I looked at it this morning.
Banner
Banner
09-01-12 21-25.JPG (24.16 KiB) Viewed 4788 times
I tried to ping the wifi and could not get a reply. I was surprised that the wifi had not come back at 6am when the RA should have rebooted using the code you gave me (see above).

I had to hard reboot the system by un-plugging and re-plugging into the mains socket.

You will see from the banner that the room temperature was 58.6. On previous times when the wifi has dropped the room has been cold. When we go away for example we turn down the heating to around 45f to stop the pipes freezing.

Last night and being an outcast, I fancied smoking one of my cigars. The rules are smoke only with the balcony doors open (and a Parker on as it gets very cold in Toronto!). The room temperature obviously dropped. Then closed the doors and put the heating back on. I did not check the tank readings before I turned in.

The coincidental thing is that I finished my smoke around 9:15 - 9:30 pm from what I can remember, the time the wifi died .

This morning I have tried to simulate the event by placing the temperature probe in a pan of water around 75f, then lowering the temperature by placing an ice pack in the water. The temperature got to 46f, then I removed the probe and let it return to room temperature. Unfortunately the fault did not show up.

So what now, two options

1. wait and see if the wifi drops again under similar circumstances.

2. Give up smoking cigars :cry:
mineman@mac.com
Posts: 43
Joined: Mon Jan 30, 2012 10:02 pm

Re: Wifi loosing connectivity

Post by mineman@mac.com »

I'm having the same issue, was there a resolution? I don't think it's a temperature issue as I'm in San Diego.
Image
Post Reply