Timeout for some wifi connections: Difference between revisions

From lechacal
Jump to navigation Jump to search
(Created page with " SOme wifi connection might drop in and out intermittently which would cause the wget function to get stuck. A work around for this is proposed here to timeout the wget comma...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:


SOme wifi connection might drop in and out intermittently which would cause the wget function to get stuck.
Some wifi connection might drop in and out intermittently which would cause the wget function to get stuck.


A work around for this is proposed here to timeout the wget command.
A work around for this is proposed here to timeout the wget command.
Line 15: Line 15:


3/ Open and edit the emonwrt_forwarder.sh script:
3/ Open and edit the emonwrt_forwarder.sh script:
(make sure you know the [http://www.cs.rit.edu/~cslab/vi.html basics of vi] before undertaking this)


  $ vi /usr/bin/emonwrt_forwarder.sh (learn the basics of vi before undertaking this)
  $ vi /usr/bin/emonwrt_forwarder.sh  


Replace line 63 that says
Replace line 63 that says

Latest revision as of 19:26, 26 July 2016

Some wifi connection might drop in and out intermittently which would cause the wget function to get stuck.

A work around for this is proposed here to timeout the wget command.

Steps

1/ ssh to the emonWRT

$ ssh root@192.168.2.1

2/ install coreutils-timeout

$ opkg update
$ opkg install coreutils-timeout

3/ Open and edit the emonwrt_forwarder.sh script: (make sure you know the basics of vi before undertaking this)

$ vi /usr/bin/emonwrt_forwarder.sh 

Replace line 63 that says

wget $ec_request -q -O /dev/null

with

timeout 7 wget $ec_request -q -O /dev/null

4/ Restart the service

$ /etc/init.d/emonwrt restart