config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0.1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth1
option proto dhcp
config switch
option name rtl8366s
option reset 1
option enable_vlan 1
# Blinkrate: 0=43ms; 1=84ms; 2=120ms; 3=170ms; 4=340ms; 5=670ms
option blinkrate 2
config switch_vlan
option device rtl8366s
option vlan 1
option ports "0 1 2 3 5t"
config switch_port
# Port 1 controls the GREEN configuration of LEDs for# the switch and the section does not correspond to a real# switch port.## 0=LED off; 1=Collision/FDX; 2=Link/activity; 3=1000 Mb/s;# 4=100 Mb/s; 5=10 Mb/s; 6=1000 Mb/s+activity; 7=100 Mb/s+activity;# 8=10 Mb/s+activity; 9=10/100 Mb/s+activity; 10: Fiber;# 11: Fault; 12: Link/activity(tx); 13: Link/activity(rx);# 14: Link (master); 15: separate register
option device rtl8366s
option port 1
option led 6
config switch_port
# Port 2 controls the ORANGE configuration of LEDs for# the switch and the section does not correspond to a real# switch port.## See the key above for switch port 1 for the meaning of the# 'led' setting below.
option device rtl8366s
option port 2
option led 9
config switch_port
# Port 5 controls the configuration of the WAN LED and the# section does not correspond to a real switch port.## To toggle the use of green or orange LEDs for the WAN port,# see the LED setting for wndr3700:green:wan in /etc/config/system.## See the key above for switch port 1 for the meaning of the# 'led' setting below.
option device rtl8366s
option port 5
option led 2
/etc/hotplug.d/button/50-wps
## Copyright (c) 2014, The Linux Foundation. All rights reserved.## Permission to use, copy, modify, and/or distribute this software for any# purpose with or without fee is hereby granted, provided that the above# copyright notice and this permission notice appear in all copies.## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.#if [ "$ACTION"="pressed"-a"$BUTTON"="wps" ];then
[ -r /var/run/wifi-wps-enhc-extn.conf ] &&exit 0
echo""> /dev/console
echo"WPS PUSH BUTTON EVENT DETECTED"> /dev/console
fordirin /var/run/hostapd-*;do
[ -d"$dir" ] ||continueforvap_dirin$dir/ath*$dir/wlan*;do
[ -r"$vap_dir" ] ||continue
backhaul=`iwpriv "${vap_dir#"$dir/"}" get_backhaul | cut -d':' -f2`if [ $backhaul-eq 1 ];thenecho"wps_pbc"> /dev/console
echo"wps_pbc $SEEN"> /var/run/sonwps.pipe &continuefi
nopbn=`iwpriv "${vap_dir#"$dir/"}" get_nopbn | cut -d':' -f2`if [ $nopbn!= 1 ];then
hostapd_cli -i "${vap_dir#"$dir/"}" -p "$dir" wps_pbc
fidonedonefi
/etc/hotplug.d/button/51-wps-reset
### Copyright (c) 2014, The Linux Foundation. All rights reserved.## Permission to use, copy, modify, and/or distribute this software for any# purpose with or without fee is hereby granted, provided that the above# copyright notice and this permission notice appear in all copies.## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.#if [ "$ACTION"="released"-a"$BUTTON"="wps" ];then
default_hold=3
if [ -f /var/run/plchost.pid ]
then
default_hold=12
fiif [ "$SEEN"-gt$default_hold ];thenecho""> /dev/console
echo"RESET TO FACTORY SETTING EVENT DETECTED"> /dev/console
echo"PLEASE WAIT WHILE REBOOTING THE DEVICE..."> /dev/console
rm -rf /overlay/*
reboot
fifi
/etc/hotplug.d/button/52-wps-supplicant
## Copyright (c) 2014, The Linux Foundation. All rights reserved.## Permission to use, copy, modify, and/or distribute this software for any# purpose with or without fee is hereby granted, provided that the above# copyright notice and this permission notice appear in all copies.## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.##local pid
if [ "$ACTION"="pressed"-a"$BUTTON"="wps" ];then
[ -r /var/run/wifi-wps-enhc-extn.conf ] &&exit 0
fordirin /var/run/wpa_supplicant-*;do
[ -d"$dir" ] ||continue
pid=/var/run/wps-hotplug-${dir#"/var/run/wpa_supplicant-"}.pid
wpa_cli -p "$dir" wps_pbc
[ -f$pid ] || {
wpa_cli -p"$dir" -a/lib/wifi/wps-supplicant-update-uci -P$pid -B
}
donefi
/etc/hotplug.d/button/54-wps-extender
## Copyright (c) 2015, The Linux Foundation. All rights reserved.## Permission to use, copy, modify, and/or distribute this software for any# purpose with or without fee is hereby granted, provided that the above# copyright notice and this permission notice appear in all copies.## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.#if [ "$ACTION"="pressed"-a"$BUTTON"="wps" ];thenlocal num
[ -r /var/run/wifi-wps-enhc-extn.conf ] ||exit 0
echo""> /dev/console
echo"WPS PUSH BUTTON EVENT DETECTED"> /dev/console
num=`grep -w "RADIO" /var/run/wifi-wps-enhc-extn.conf | wc -l`if [ -r /var/run/wifi-wps-enhc-extn.pid ];thenkill"$(cat "/var/run/wifi-wps-enhc-extn.pid")"
sleep 1
fiif [ -r /var/run/wifi-wps-enhc-extn.pid ];then
rm -f /var/run/wifi-wps-enhc-extn.pid
exit 0
fiecho"START APP TO HANDLE WPS PUSH BUTTON EVENT"> /dev/console
/usr/sbin/wps_enhc -b /var/run/wifi-wps-enhc-extn.pid -n $num \
-d 128 -l /var/run/wifi-wps-enhc-extn.log
fi
/etc/hotplug.d/net/10-ar922x-led-fix
#!/bin/sh# For AR9220 and AR9223, GPIO JTAG must explicit be disabled# before LEDs start working. Do this when wifi device is# detected.## $DEVPATH is not valid for some boards (including WZR-HP-AG300H).# Manipulate the $DEVPATH to reach the corresponding phyN.#
devdir=`dirname $DEVPATH`
devdir=`dirname $devdir`
phydir=/sys$devdir/ieee80211
phyname=`cat $phydir/phy*/name`if [ -z$phyname-o$ACTION!="add" ];thenexit 0;fi## ar922x_disable_gpio_jtag():## Emulate# REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);# for AR9220 and AR9223.#ar922x_disable_gpio_jtag()
{
local regidx=0x4054
[ -f /sys/kernel/debug/ieee80211/$1/ath9k/regidx ] && {
echo$regidx> /sys/kernel/debug/ieee80211/$1/ath9k/regidx
regval=`cat /sys/kernel/debug/ieee80211/$1/ath9k/regval`
regval=$((regval |0x20000))echo regval $regvalecho$regval> /sys/kernel/debug/ieee80211/$1/ath9k/regval
}
}
if [ $phyname-a$ACTION="add" ];then. /lib/ar71xx.sh
case$(ar71xx_board_name)in
wzr-hp-ag300h)
ar922x_disable_gpio_jtag $phyname
;;
esac;fiexit 0
/etc/config/easycwmp
config local
option interface 'usb0'
option port '7547'
option ubus_socket '/var/run/ubus.sock'
option date_format '%FT%T%z'
option logging_level '4'
option path '/kmhldonck'
config acs
option periodic_enable '1'
option http100continue_disable '1'
option url 'https://lte.cpe-mgmt.at:7024/cwmpWeb/CPEMgt'
option username 'AlcatelHH40'
option password 'CENSORED-BY-KILLERBEES19'
option periodic_interval '86400'
config device
option manufacturer 'TCT Mobile Limited'
option oui '002623'
option product_class 'HUB40'
option hardware_version 'example_hw_version'
option software_version 'example_sw_version'
option imsi ''
option nw_reg_state 'Unknown'
config scripts
list location '/lib/functions/network.sh'
list location '/usr/share/easycwmp/functions/common'
list location '/usr/share/easycwmp/functions/device_info'
list location '/usr/share/easycwmp/functions/lan_device'
list location '/usr/share/easycwmp/functions/management_server'
list location '/usr/share/easycwmp/functions/wan_device'
list location '/usr/share/easycwmp/functions/time_info'
list location '/usr/share/easycwmp/functions/device_hosts'
list location '/usr/share/easycwmp/functions/ping_diagnostics'
list location '/usr/share/easycwmp/functions/host_configManage'
list location '/usr/share/easycwmp/functions/eth_InterfaceConfig'
list location '/usr/share/easycwmp/functions/radio_info'
list function 'device_info'
list function 'lan_device'
list function 'management_server'
list function 'wan_device'
list function 'time_info'
list function 'ping_diagnostics'
config device_routing
option DefaultConnectionService 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.'
config user_interface
config ping_diagnostics
option DiagnosticsState 'None'
option Interface 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1'
option Host 'www.baidu.com'
option NumberOfRepetitions '20'
option Timeout '60000'
option DataBlockSize '56'
option DSCP '0'
config UdpEchoConfig
option Enable '0'
option Interface 'usb0'
option UDPPort '9000'
option EchoPlusEnabled '0'
option EchoPlusSupported '1'
config DownloadDiagnostics
option DiagnosticsState 'None'
option Interface 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1'
option DSCP '0'
option EthernetPriority '0'
config UploadDiagnostics
option DiagnosticsState 'None'
option Interface 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1'
option DSCP '0'
option EthernetPriority '0'
option TestFileLength '1024'
config notifications
list active 'InternetGatewayDevice.DeviceInfo.SoftwareVersion'
list active 'InternetGatewayDevice.DeviceInfo.ProvisioningCode'
list active 'InternetGatewayDevice.ManagementServer.ConnectionRequestURL'