OM1P config

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
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
Revision as of 19:49, 20 December 2009 (edit) (undo)
Ctech4285 (Talk | contribs)

Next diff →
Line 1: Line 1:
- 
The OM1P has a hardware watchdog that will reset the device every 5 minutes if it's not reset via a GPIO device. 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. After you got the route flashed you have 5 minutes to configure this.
Line 6: Line 5:
tested on tested on
-DD-WRT v24 Beta (08/03/07) std +DD-WRT v24 Beta (08/03/07) std and
DD-WRT v24-sp2 (10/10/09) std DD-WRT v24-sp2 (10/10/09) std
Line 34: Line 33:
not sure but i think you got to do this every time you restart the device. not sure but i think you got 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
 +}
 +#

Revision as of 19:49, 20 December 2009

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

tested on DD-WRT v24 Beta (08/03/07) std and 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 consol or web interface and restart cron

stopservice cron && startservice cron


not sure but i think you got to do this every time you restart the device.


original hw-heartbeat.sh from Open-Mesh


  1. !/bin/sh
  2. /sbin/hw-heartbeat.sh
  3. send heartbeat to the hardware watchdog

GPO="3" MCTL="4"

[ "$(uci get node.general.hw_watchdog)" -eq 1 ] && {

  1. i have no idea

gpioctl dirout $GPO ;

  1. set pin $GPO (3) to direction out?

gpioctl clear $GPO

  1. set pin 3 to logic 0

sleep 1

  1. wait one second/milli second?

gpioctl set $GPO

  1. set pin 3 to logic 1

logger -st ${0##*/} "signaling to the hw-watchdog"

  1. write something to the log

}