Compare commits
4 Commits
2f5696dff0
...
master
Author | SHA1 | Date | |
---|---|---|---|
ca241a6b64 | |||
00908a1b89 | |||
520d1e98fc | |||
9bbdee00e8 |
38
README.md
38
README.md
@ -4,7 +4,7 @@ Use a USB-Serial Converter like the FT232RL for activating a buzzer. Simple and
|
|||||||
|
|
||||||
## Features:
|
## Features:
|
||||||
* works on GNU/Linux only
|
* works on GNU/Linux only
|
||||||
* no drivers or other software/libs are requidered
|
* no drivers or other software/libs are required
|
||||||
* triggerd via bash or service daemon
|
* triggerd via bash or service daemon
|
||||||
|
|
||||||
## Limitations:
|
## Limitations:
|
||||||
@ -26,19 +26,45 @@ To invert the TXD pin on the FTDI device, programming the EEPROM is needed. With
|
|||||||
|
|
||||||
### Commmon Distributions
|
### Commmon Distributions
|
||||||
|
|
||||||
Make shure the device is recocntied as ttyUSB after plug in with `dmesg`.<br/>
|
Make sure the device is after plug in recognized as ttyUSB with `dmesg`.<br/>
|
||||||
Edit the alarm.sh with your device name, like `/dev/ttyUSB0`. <br/>
|
Edit the alert.sh with your device name, like `/dev/ttyUSB0`. <br/>
|
||||||
Run `bash ./alarm.sh` for starting the alarm.<br/>
|
Run `bash ./alert.sh` for starting the alarm.<br/>
|
||||||
|
|
||||||
### openWrt
|
### openWrt
|
||||||
|
|
||||||
`opkg update`<br/>
|
`opkg update`<br/>
|
||||||
|
`opkg install usbutils`<br/>
|
||||||
`opkg install kmod-usb-serial`<br/>
|
`opkg install kmod-usb-serial`<br/>
|
||||||
`opkg install kmod-usb-serial-ftdi`<br/>
|
`opkg install kmod-usb-serial-ftdi`<br/>
|
||||||
|
|
||||||
Make shure the device is recocntied as ttyUSB after plug in with `dmesg`.<br/>
|
Make shure the device is recocntied as ttyUSB after plug in with `dmesg`.<br/>
|
||||||
Edit the alarm.sh with your device name, like `/dev/ttyUSB0`. <br/>
|
Edit the alarm.sh with your device name, like `/dev/ttyUSB0`. <br/>
|
||||||
Run `bash ./alarm.sh` for starting the alarm.<br/>
|
Run `bash ./alert.sh` for starting the alarm.<br/>
|
||||||
|
|
||||||
### Service
|
### Service
|
||||||
todo
|
`nano /etc/init.d/alarm`
|
||||||
|
|
||||||
|
```
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=99
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
bash /root/alert.sh > /dev/null 2>&1 &
|
||||||
|
bash /root/alert.sh start > /dev/null 2>&1 &
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
bash /root/alert.sh > /dev/null 2>&1 &
|
||||||
|
bash /root/alert.sh start > /dev/null 2>&1 &
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
bash /root/alert.sh > /dev/null 2>&1 &
|
||||||
|
}
|
||||||
|
```
|
||||||
|
`chmod +x /etc/init.d/alarm`
|
||||||
|
|
||||||
|
`/etc/init.d/alarm start`
|
||||||
|
|
||||||
|
`/etc/init.d/alarm stop`
|
Reference in New Issue
Block a user