Go to file
2023-12-07 00:24:55 +01:00
19.07.8 Add files via upload 2023-03-31 21:30:02 +02:00
21.02.1 Add files via upload 2023-05-04 20:32:14 +02:00
21.02.2 Update ReadMe.md 2022-05-04 17:36:04 +02:00
21.02.3 Add files via upload 2022-09-25 23:00:40 +02:00
21.02.7 Update ReadMe.md 2023-12-07 00:24:55 +01:00
22.03.0 Add files via upload 2022-10-11 21:42:07 +02:00
22.03.2 Add files via upload 2022-12-27 16:49:25 +01:00
22.03.3 Delete Read 2023-04-06 11:59:52 +02:00
22.03.5 Delete test 2023-08-02 17:52:04 +02:00
23.05.0 Update ReadMe.md 2023-10-31 18:49:11 +01:00
23.05.2 Add files via upload 2023-11-20 22:46:30 +01:00
atc Update README.md 2023-09-17 17:34:14 +02:00
MR200v4 Delete test 2022-03-15 19:51:13 +01:00
uqmi_test Add files via upload 2023-02-15 23:49:02 +01:00
README.md Update README.md 2023-01-12 20:31:39 +01:00

openwrt - uqmi

Customized uqmi with APN profiles. More information and source code: https://github.com/mrhaav/openwrt-packages/blob/main/README.md

Latest version: 2022-11-29-0.10

From version 2022-09-13-0.9, an SMS receive/send function and a connectivity daemon are included.
The SMS is stored in /var/sms/received and the file name is sent to script /usr/bin/uqmi_sms.sh (uqmi_sms.sh is not included in the ipk file). The daemon will run every 30sec and check the network connectivity and send the RSSI value to script /usr/bin/uqmi_led.sh to trigger signal strenght LEDs (uqmi_led.sh is not included in the ipk file).
Don´t run other uqmi scripts in parallell. The modems are not able to handle multiple uqmi request at the same time.
If you need some special uqmi command to be exequted every 30s, add them to the daemon, /usr/bin/uqmi_d.sh.

Switches:
uci set network.<your interface>.ipv6profile=<ipv6 profile number>
If you need an other APN for IPv6. Configure you IPv4 APN with LuCI and add the IPv6 APN with uqmi command --create-profile or --modify-profile

uci set network.<your interface>.abort_search=false
If you have you modem in poor radio coverage, you can let the modem search for network for ever (default, it will search for 35 sec).

uci set network.<your interface>.daemon=false
If you would like to turn off the daemon.

Don´t foget to run uci commit network.

Downloading file to your router:
Choose OpenWrt version and target.
Go to the file, right click on Download button and select Copy link addess.
Then paste the link in your router after wget.

wget https://github.com/mrhaav/openwrt/raw/master/22.03.2/uqmi_2022-11-29-0.10_mipsel_24kc.ipk
opkg install uqmi_2022-11-29-0.10_mipsel_24kc.ipk



uqmi_led.sh example for MR200v4

#!/bin/sh

rssi=$1

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



uqmi_sms.sh example

#!/bin/sh

receivedSMS=$1
Bnumber=$(sed -n '1p' $receivedSMS)
if [ $Bnumber = '+46123456' ]
then
	first_row=$(sed -n '2p' $receivedSMS)
	second_row=$(sed -n '3p' $receivedSMS)
#	Execute your commands
	rm $receivedSMS
else
	logger -t SMS Unauthorized Anumber
	rm $receivedSMS
fi