diff --git a/openwrt/teltonika-firmware-upgrade.sh b/openwrt/teltonika-firmware-upgrade.sh new file mode 100644 index 0000000..2d8b3e7 --- /dev/null +++ b/openwrt/teltonika-firmware-upgrade.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# Nico Schottelius, 2022-01-26 + +if [ $# -ne 1 ]; then + echo "$0 address" + echo " address: connect to this address (often: 192.168.1.1)" + exit 1 +fi + +set -x + +filename=RUT2_R_00.07.01.2_WEBUI.bin +device_ip=$1; shift + +while ! ping -c1 ${device_ip}; do + echo "Cannot ping $device_ip yet - waiting" + sleep 1 +done + +if echo $device_ip | grep -q :; then + scp_ip="[$device_ip]" +else + scp_ip="$device_ip" +fi + +wget -c https://wiki.teltonika-networks.com/wikibase/images/8/85/${filename} + +scp ${filename} root@${scp_ip}:/tmp +ssh root@${device_ip} "sysupgrade -n /tmp/*.bin"