OM1P config
From DD-WRT Wiki
(Difference between revisions)
Revision as of 19:47, 20 December 2009 (edit) Ctech4285 (Talk | contribs) (New page: The OM1P has a hardware watchdog that will reset the device every 5 minutes if it's not reset via a GPIO device. After you got the route flashed you have 5 minutes to configure this. u...) ← Previous diff |
Current revision (08:52, 10 June 2010) (edit) (undo) Delphinus (Talk | contribs) (→Workaround) |
||
(6 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
+ | __TOC__ | ||
- | The OM1P has a hardware watchdog that will reset the device every 5 minutes if it's not reset via a GPIO device. | ||
- | After you got the route flashed you have 5 minutes to configure this. | ||
- | update | ||
- | + | The OM1P has a hardware watchdog that will reset the device every 5 minutes if it's not reset via a GPIO device. | |
- | + | =Permanent Fix= | |
- | DD-WRT | + | install DD-WRT [[Micro_Redboot]] to disable the HW watchdog permanently |
+ | =Workaround= | ||
+ | After you got the route flashed you have 5 minutes to configure this. | ||
- | + | Tested on: | |
+ | * DD-WRT v24 Beta (08/03/07) std | ||
+ | * DD-WRT v24-sp2 (10/10/09) std | ||
+ | Go to your web interface add a custom script: | ||
+ | <pre> | ||
chdir / | chdir / | ||
/sbin/gpio enable 3 | /sbin/gpio enable 3 | ||
Line 21: | Line 25: | ||
echo "1" >/proc/gpio/3_dir | echo "1" >/proc/gpio/3_dir | ||
echo "0" >/proc/gpio/3_dir | echo "0" >/proc/gpio/3_dir | ||
+ | </pre> | ||
- | + | Then enable Cron under management and add this line | |
- | + | ||
Code: | Code: | ||
+ | <pre> | ||
*/4 * * * * root /tmp/custom.sh | */4 * * * * root /tmp/custom.sh | ||
+ | </pre> | ||
+ | Log into via console or web interface and restart cron: | ||
+ | <pre> | ||
+ | stopservice cron && startservice cron | ||
+ | </pre> | ||
- | + | Not sure but i think you have to do this every time you restart the device. | |
- | stopservice cron && startservice cron | ||
- | + | '''Original hw-heartbeat.sh from Open-Mesh''' | |
+ | |||
+ | <pre> | ||
+ | #!/bin/sh | ||
+ | # /sbin/hw-heartbeat.sh | ||
+ | # send heartbeat to the hardware watchdog | ||
+ | |||
+ | GPO="3" | ||
+ | MCTL="4" | ||
+ | |||
+ | [ "$(uci get node.general.hw_watchdog)" -eq 1 ] && { | ||
+ | # i have no idea | ||
+ | gpioctl dirout $GPO ; | ||
+ | # set pin $GPO (3) to direction out? | ||
+ | gpioctl clear $GPO | ||
+ | # set pin 3 to logic 0 | ||
+ | |||
+ | sleep 1 | ||
+ | # wait one second/milli second? | ||
+ | |||
+ | gpioctl set $GPO | ||
+ | # set pin 3 to logic 1 | ||
+ | logger -st ${0##*/} | ||
+ | "signaling to the hw-watchdog" | ||
+ | # write something to the log | ||
+ | } | ||
+ | # | ||
+ | </pre> | ||
+ | |||
+ | Source: [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=62860 Open-Mesh OM1P 5 minute hw-heartbeat.sh restart ] | ||
+ | [[Category:Middleware]] |
Current revision
Contents |
The OM1P has a hardware watchdog that will reset the device every 5 minutes if it's not reset via a GPIO device.
[edit] Permanent Fix
install DD-WRT Micro_Redboot to disable the HW watchdog permanently
[edit] Workaround
After you got the route flashed you have 5 minutes to configure this.
Tested on:
- DD-WRT v24 Beta (08/03/07) std
- DD-WRT v24-sp2 (10/10/09) std
Go to your web interface add a custom script:
chdir / /sbin/gpio enable 3 echo "1" >/proc/gpio/3_out echo "0" >/proc/gpio/3_out echo "1" >/proc/gpio/3_dir echo "0" >/proc/gpio/3_dir
Then enable Cron under management and add this line Code:
*/4 * * * * root /tmp/custom.sh
Log into via console or web interface and restart cron:
stopservice cron && startservice cron
Not sure but i think you have to do this every time you restart the device.
Original hw-heartbeat.sh from Open-Mesh
#!/bin/sh # /sbin/hw-heartbeat.sh # send heartbeat to the hardware watchdog GPO="3" MCTL="4" [ "$(uci get node.general.hw_watchdog)" -eq 1 ] && { # i have no idea gpioctl dirout $GPO ; # set pin $GPO (3) to direction out? gpioctl clear $GPO # set pin 3 to logic 0 sleep 1 # wait one second/milli second? gpioctl set $GPO # set pin 3 to logic 1 logger -st ${0##*/} "signaling to the hw-watchdog" # write something to the log } #