1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add modems support for ZBT z8109ax

This commit is contained in:
Ycarus (Yannick Chabanois) 2025-02-11 17:05:35 +01:00
parent e48c9b5957
commit 4ec92e8cca
2 changed files with 88 additions and 1 deletions

View file

@ -41,4 +41,22 @@ if [ -n "$(grep z8102ax /etc/board.json)" ]; then
EOF
fi
[ -n "$(uci -q changes network)" ] && uci -q commit network
fi
fi
if [ -n "$(grep z8109ax /etc/board.json)" ]; then
if [ -e /sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.1 ]; then
uci -q batch <<-EOF
set network.modem1.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.1'
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.2'
set network.modem3.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.3'
set network.modem4.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.4'
EOF
elif [ -e /sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1 ]; then
uci -q batch <<-EOF
set network.modem1.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1'
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.2'
set network.modem3.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.3'
set network.modem4.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.4'
EOF
fi
[ -n "$(uci -q changes network)" ] && uci -q commit network
fi