diff --git a/target/linux/imx/base-files/etc/uci-defaults/70_start_ap b/target/linux/imx/base-files/etc/uci-defaults/70_start_ap index f3b822b14d376e..da8813f9028158 100644 --- a/target/linux/imx/base-files/etc/uci-defaults/70_start_ap +++ b/target/linux/imx/base-files/etc/uci-defaults/70_start_ap @@ -22,6 +22,23 @@ case "$(board_name)" in uci set firewall.@zone[1].network='wwan wan wan6' uci commit firewall ;; + geniatech,gtw360 ) + # create wwan zone as it is the default for scanned networks + uci set network.wwan='interface' + uci set network.wwan.proto='dhcp' + uci commit network + + # and add wwan to wan zone in firewall + uci set firewall.@zone[1].network='wwan wan wan6' + uci commit firewall + + uci delete wireless.@wifi-device[0].disabled + uci set wireless.@wifi-device[0].channel='1' + uci set wireless.@wifi-device[0].band='2g' + uci set wireless.@wifi-device[0].country='US' + uci delete wireless.@wifi-device[0].htmode + uci commit wireless + ;; esac exit 0 diff --git a/target/linux/imx/base-files/etc/uci-defaults/71_button_actions b/target/linux/imx/base-files/etc/uci-defaults/71_button_actions index c0fb755b3eb4cb..10535e0b3f1813 100644 --- a/target/linux/imx/base-files/etc/uci-defaults/71_button_actions +++ b/target/linux/imx/base-files/etc/uci-defaults/71_button_actions @@ -88,6 +88,50 @@ EOF done reboot } +EOF + ;; + geniatech,gtw360 ) + cat << "EOF" > /usr/bin/reset_wifi_config +#!/bin/sh +{ + rm -f /etc/config/network + /bin/config_generate generate_static_network + uci set network.wwan='interface' + uci set network.wwan.proto='dhcp' + uci commit network + + rm -f /etc/config/wireless + wifi config + uci delete wireless.@wifi-device[0].disabled + uci set wireless.@wifi-device[0].channel='1' + uci set wireless.@wifi-device[0].band='2g' + uci set wireless.@wifi-device[0].country='US' + uci delete wireless.@wifi-device[0].htmode + uci commit wireless + ubus call network restart + for i in 1 2 3 + do + echo 100 > /sys/class/leds/amber/brightness + sleep 1 + echo 0 > /sys/class/leds/amber/brightness + sleep 1 + done +} +EOF + cat << "EOF" > /usr/bin/reset_overlay +#!/bin/sh +{ + rm -rf /overlay/upper/.* /overlay/upper/* + + for i in 1 2 3 + do + echo 100 > /sys/class/leds/blue/brightness + sleep 1 + echo 0 > /sys/class/leds/blue/brightness + sleep 1 + done + reboot +} EOF ;; esac