You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.1 KiB
Markdown

2 years ago
# uqmi
Downloading file to your router:
Go to the file, right click on Download button and select Copy link addess.\
Then paste the link in your router after wget. Install with opkg.
```
wget https://github.com/mrhaav/openwrt/raw/master/21.02.2/uqmi_2022-03-15-0.4_mipsel_24kc.ipk
opkg install uqmi_2022-03-15-0.4_mipsel_24kc.ipk
```
2 years ago
2 years ago
\
\
2 years ago
uqmi version 2022-04-22-0.4 includes a daemon that will check the connection every 30sec.
2 years ago
If the connection is released from the network, the daemon will re-connect the interface.
2 years ago
This daemon will also send the rssi value to /usr/bin/uqmi_led.sh for trigger signal strength LEDs.
When the daemon is stoped it will send rssi value = -200 to turn off all LEDs.
2 years ago
2 years ago
uqmi version 2022-04-22-0.5 includes a SMS receiver. It will store received SMS in /var/sms folder. The daemon will send the file name to /usr/bin/uqmi_sms.sh.
2 years ago
The first row in the SMS file is the senders phone number and the following rows are the text message.
2 years ago
2 years ago
uqmi_led.sh and uqmi_sms.sh are not included in the ipk file. You need to create the files your self and make them executable,
`chmod +x <file_name>`.
2 years ago
2 years ago
\
2 years ago
uqmi_led.sh example for MR200v4
2 years ago
```
2 years ago
#!/bin/sh
rssi=$1
2 years ago
LED1=$(readlink -f /sys/class/leds/mr200v4:white:signal1)
LED2=$(readlink -f /sys/class/leds/mr200v4:white:signal2)
LED3=$(readlink -f /sys/class/leds/mr200v4:white:signal3)
if [ "${rssi}" -eq -200 ]
then
echo none > $LED1/trigger
echo none > $LED2/trigger
echo none > $LED3/trigger
elif [ "${rssi}" -le -90 ]
then
echo default-on > $LED1/trigger
echo none > $LED2/trigger
echo none > $LED3/trigger
elif [ "${rssi}" -le -70 ]
then
echo default-on > $LED1/trigger
echo default-on > $LED2/trigger
echo none > $LED3/trigger
else
echo default-on > $LED1/trigger
echo default-on > $LED2/trigger
echo default-on > $LED3/trigger
fi
```
2 years ago
2 years ago
\
2 years ago
uqmi_sms.sh example
```
#!/bin/sh
receivedSMS=$1
Anumber=$(sed -n '1p' $receivedSMS)
if [ $Anumber = '+46123456' ]
then
first_row=$(sed -n '2p' $receivedSMS)
2 years ago
second_row=$(sed -n '3p' $receivedSMS)
2 years ago
# Execute your commands
rm $receivedSMS
else
2 years ago
logger -t SMS Unauthorized Anumber
2 years ago
rm $receivedSMS
2 years ago
fi