2011-10-24 21:49:31 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-12-11 15:26:06 +00:00
|
|
|
. /lib/functions/uci-defaults.sh
|
2011-10-24 21:49:31 +00:00
|
|
|
|
|
|
|
set_usb_led() {
|
2016-07-26 17:18:53 +00:00
|
|
|
ucidef_set_led_usbdev "usb" "USB" "${1}" "${2:-1-1}"
|
2011-10-24 21:49:31 +00:00
|
|
|
}
|
|
|
|
|
2011-12-23 14:27:10 +00:00
|
|
|
set_wifi_led() {
|
2016-07-26 17:18:53 +00:00
|
|
|
ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}"
|
2012-05-29 16:39:03 +00:00
|
|
|
}
|
|
|
|
|
2014-08-18 13:09:20 +00:00
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
board=$(board_name)
|
2011-10-24 21:49:31 +00:00
|
|
|
|
2014-08-18 13:09:20 +00:00
|
|
|
board_config_update
|
|
|
|
|
2011-10-24 21:49:31 +00:00
|
|
|
case $board in
|
2016-12-23 07:21:31 +00:00
|
|
|
11acnas|\
|
|
|
|
all0239-3g|\
|
2017-02-27 20:59:50 +00:00
|
|
|
ew1200|\
|
2016-12-23 07:21:31 +00:00
|
|
|
hw550-3g|\
|
|
|
|
mofi3500-3gn|\
|
|
|
|
sap-g3200u3|\
|
|
|
|
sk-wb8|\
|
|
|
|
w2914nsv2|\
|
|
|
|
wf-2881)
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
3g150b|\
|
2015-08-17 06:24:34 +00:00
|
|
|
3g300m)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:3g"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
3g-6200n)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:amber:wlan"
|
|
|
|
set_usb_led "$board:blue:3g"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
3g-6200nl|\
|
2016-09-27 05:16:16 +00:00
|
|
|
wnce2001)
|
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
br-6475nd|\
|
|
|
|
mzk-w300nh2)
|
|
|
|
set_wifi_led "$board:amber:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-04-26 11:43:01 +00:00
|
|
|
a5-v11|\
|
|
|
|
cs-qr10)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
ai-br100)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "wan" "wan" "$board:blue:wan" "eth0.2"
|
|
|
|
set_wifi_led "$board:blue:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
air3gii)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
set_usb_led "$board:green:mobile"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-04-07 22:34:48 +00:00
|
|
|
all0256n-4M|\
|
|
|
|
all0256n-8M)
|
2016-11-02 15:10:44 +00:00
|
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
2017-04-07 22:34:48 +00:00
|
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "all0256n:green:rssilow" "wlan0" "1" "40" "0" "6"
|
|
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0256n:green:rssimed" "wlan0" "30" "80" "-29" "5"
|
|
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
|
|
|
ar670w|\
|
|
|
|
ar725w|\
|
|
|
|
awapn2403)
|
|
|
|
set_wifi_led "rt2800soc-phy0::radio"
|
|
|
|
;;
|
2017-04-07 22:34:48 +00:00
|
|
|
asl26555-8M|\
|
|
|
|
asl26555-16M)
|
|
|
|
ucidef_set_led_default "power" "POWER" "asl26555:green:power" "1"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
|
|
|
|
set_wifi_led "asl26555:green:wlan"
|
|
|
|
set_usb_led "asl26555:green:3g"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
bc2)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
broadway)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:red:diskmounted"
|
|
|
|
set_wifi_led "$board:red:wps_active"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-09-06 09:14:16 +00:00
|
|
|
c108)
|
|
|
|
ucidef_set_led_netdev "lan" "lan" "$board:green:lan" "eth0"
|
|
|
|
ucidef_set_led_netdev "modem" "modem" "$board:green:modem" "wwan0"
|
|
|
|
;;
|
2016-07-26 04:44:19 +00:00
|
|
|
c20i)
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$board:blue:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$board:blue:wan" "switch0" "0x01"
|
|
|
|
set_usb_led "$board:blue:usb" "2-1"
|
|
|
|
ucidef_set_led_wlan "wlan" "wlan" "$board:blue:wlan" "phy0radio"
|
|
|
|
;;
|
2016-06-12 21:43:51 +00:00
|
|
|
c50)
|
2016-10-13 19:00:06 +00:00
|
|
|
ucidef_set_led_switch "lan" "lan" "$board:green:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$board:green:wan" "switch0" "0x01"
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
ucidef_set_led_netdev "wlan2g" "wlan2g" "$board:green:wlan2g" wlan1
|
|
|
|
set_wifi_led "$board:green:wlan5g"
|
2016-06-12 21:43:51 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
cf-wr800n)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "lan" "lan" "$board:white:ethernet" eth0.1
|
|
|
|
set_wifi_led "$board:white:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
cy-swr1100)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "wps" "WPS" "$board:blue:wps" "0"
|
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
d105)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
|
|
|
|
set_usb_led "$board:green:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-02-04 20:28:52 +00:00
|
|
|
d240)
|
|
|
|
set_wifi_led "$board:blue:wifi"
|
|
|
|
set_usb_led "$board:blue:usb"
|
|
|
|
;;
|
2015-09-14 20:08:55 +00:00
|
|
|
db-wrt01)
|
|
|
|
ucidef_set_led_default "power" "power" "$board:orange:power" "1"
|
|
|
|
;;
|
2016-05-02 03:57:40 +00:00
|
|
|
dch-m225)
|
|
|
|
ucidef_set_led_default "power" "POWER" "$board:geeen:power" "1"
|
|
|
|
ucidef_set_led_default "status" "STATUS" "$board:red:status" "0"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
dcs-930l-b1)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
|
|
|
|
ucidef_set_led_netdev "wifi" "WiFi" "$board:blue:wps"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
dir-300-b1|\
|
|
|
|
dir-600-b1|\
|
|
|
|
dir-620-a1)
|
|
|
|
ucidef_set_led_default "wan" "WAN LED (amber)" "$board:amber:wan" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
|
|
|
dir-300-b7|\
|
|
|
|
dir-320-b1|\
|
|
|
|
dir-610-a1|\
|
|
|
|
esr-9753|\
|
|
|
|
hlk-rm04|\
|
|
|
|
sl-r7205|\
|
|
|
|
v11st-fe|\
|
|
|
|
w306r-v20|\
|
2017-04-07 22:34:48 +00:00
|
|
|
wt1520-4M|\
|
|
|
|
wt1520-8M)
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
dir-615-d|\
|
2015-08-17 06:24:34 +00:00
|
|
|
dir-615-h1)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0"
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2016-04-26 11:43:06 +00:00
|
|
|
dir-620-d1|\
|
|
|
|
mzk-ex300np)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
dir-810l|\
|
2016-04-20 17:19:05 +00:00
|
|
|
mzk-750dhp|\
|
2016-10-10 01:24:42 +00:00
|
|
|
mzk-dp150n|\
|
|
|
|
vr500)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:green:power" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-06-30 13:18:03 +00:00
|
|
|
dir-860l-b1)
|
|
|
|
ucidef_set_led_netdev "wan" "wan" "$board:green:net" "eth0.2"
|
|
|
|
;;
|
2017-01-18 10:34:56 +00:00
|
|
|
ex2700|\
|
|
|
|
wn3000rpv3)
|
2016-02-12 08:29:33 +00:00
|
|
|
set_wifi_led "$board:green:router"
|
|
|
|
;;
|
2017-03-03 14:36:51 +00:00
|
|
|
ex3700)
|
|
|
|
ucidef_set_led_netdev "wlan5g" "ROUTER (green)" "$board:green:router" "wlan0"
|
|
|
|
ucidef_set_led_netdev "wlan2g" "DEVICE (green)" "$board:green:device" "wlan1"
|
|
|
|
;;
|
2016-12-01 14:08:22 +00:00
|
|
|
f5d8235-v1)
|
|
|
|
ucidef_set_led_default "lan" "lan" "$board:blue:wired" "0"
|
|
|
|
set_usb_led "$board:blue:storage"
|
|
|
|
set_wifi_led "$board:blue:wireless"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
f5d8235-v2)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:storage"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
fonera20n)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:orange:usb"
|
|
|
|
set_wifi_led "$board:orange:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-07-22 01:15:56 +00:00
|
|
|
gb-pc1)
|
|
|
|
ucidef_set_led_switch "lan1" "lan1" "$board:green:lan1" "switch0" "0x01"
|
|
|
|
ucidef_set_led_switch "lan2" "lan2" "$board:green:lan2" "switch0" "0x10"
|
|
|
|
;;
|
2016-03-10 19:12:04 +00:00
|
|
|
gl-mt300a|\
|
2016-03-10 19:12:10 +00:00
|
|
|
gl-mt300n|\
|
|
|
|
gl-mt750)
|
2016-03-10 19:11:57 +00:00
|
|
|
set_wifi_led "$board:wlan"
|
|
|
|
;;
|
2017-05-17 10:18:45 +00:00
|
|
|
gl-mt300n-v2)
|
|
|
|
set_wifi_led "$board:red:wlan"
|
|
|
|
;;
|
2017-02-24 23:19:15 +00:00
|
|
|
hc5661|\
|
|
|
|
hc5661a)
|
2015-10-05 10:25:47 +00:00
|
|
|
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
|
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$board:blue:wlan2g"
|
2016-07-23 14:25:38 +00:00
|
|
|
;;
|
2015-10-05 10:25:47 +00:00
|
|
|
hc5761)
|
|
|
|
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
|
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$board:blue:wlan2g"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "wifi5g" "$board:blue:wlan5g" "rai0"
|
|
|
|
;;
|
|
|
|
hc5861)
|
|
|
|
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
|
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$board:blue:wlan2g"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "wifi5g" "$board:blue:wlan5g" "rai0"
|
|
|
|
ucidef_set_led_default "turbo" "turbo" "$board:blue:turbo" "0"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
hg255d)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
set_usb_led "$board:green:usb"
|
2015-11-26 12:46:04 +00:00
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:green:internet" "eth0.2"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
hpm)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:orange:power" "1"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "$board:green:eth" "eth0"
|
|
|
|
set_wifi_led "$board:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
ht-tm02)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "eth" "Ethernet" "$board:green:lan" "eth0"
|
|
|
|
set_wifi_led "$board:blue:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-04-27 18:02:05 +00:00
|
|
|
kn|\
|
|
|
|
nbg-419n2)
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2016-11-28 18:41:51 +00:00
|
|
|
kn_rc|\
|
|
|
|
kn_rf|\
|
2016-10-29 12:26:58 +00:00
|
|
|
kng_rc)
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
set_wifi_led "$board:green:wifi"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
m2m)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:blue:wifi"
|
|
|
|
ucidef_set_led_netdev "eth" "Ethernet" "$board:green:wan" "eth0"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
miniembplug)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:red:wlan"
|
|
|
|
set_usb_led "$board:green:mobile"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-08-12 14:56:11 +00:00
|
|
|
mir3g)
|
|
|
|
ucidef_set_led_netdev "eth" "Ethernet" "$board:red:wan" "eth0"
|
|
|
|
set_usb_led "$board:blue:usb"
|
|
|
|
;;
|
2016-09-28 17:08:38 +00:00
|
|
|
miwifi-mini)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:red:status" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
mlw221|\
|
2015-08-17 06:24:34 +00:00
|
|
|
mlwg2)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:blue:wifi"
|
|
|
|
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
mpr-a1|\
|
2015-08-17 06:24:34 +00:00
|
|
|
mpr-a2)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:blue:system"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
mr-102n)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
set_usb_led "$board:green:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-09-24 19:41:43 +00:00
|
|
|
mr200)
|
|
|
|
ucidef_set_led_default "power" "power" "$board:white:power" "1"
|
|
|
|
ucidef_set_led_netdev "lan" "lan" "$board:white:lan" "eth0.1"
|
|
|
|
ucidef_set_led_netdev "wan" "wan" "$board:white:wan" "usb0"
|
|
|
|
set_wifi_led "$board:white:wlan"
|
|
|
|
;;
|
2016-04-29 11:34:56 +00:00
|
|
|
mzk-ex750np)
|
|
|
|
ucidef_set_led_default "power" "power" "$board:red:power" "1"
|
|
|
|
set_wifi_led "$board:red:wifi"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
na930)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:status"
|
2016-09-27 06:25:04 +00:00
|
|
|
;;
|
|
|
|
newifi-d1)
|
|
|
|
set_usb_led "$board:red:status"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
nw718)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:amber:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
oy-0001)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:green:power" "1"
|
|
|
|
set_wifi_led "$board:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-09-27 06:23:27 +00:00
|
|
|
pbr-d1)
|
|
|
|
set_usb_led "$board:orange:usb"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
pbr-m1)
|
2015-12-11 15:03:50 +00:00
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
|
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
ucidef_set_led_default "sys" "sys" "$board:blue:sys" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-02-15 18:45:22 +00:00
|
|
|
psg1208)
|
|
|
|
set_wifi_led "$board:white:wlan2g"
|
|
|
|
;;
|
2017-04-27 07:38:25 +00:00
|
|
|
psg1218a|\
|
2017-04-21 00:47:44 +00:00
|
|
|
psg1218b)
|
2016-10-21 09:06:39 +00:00
|
|
|
ucidef_set_led_netdev "Network" "Network" "$board:blue:status" "eth0"
|
|
|
|
ucidef_set_led_default "status" "STATUS" "$board:yellow:status" "0"
|
2016-09-30 11:41:12 +00:00
|
|
|
;;
|
2017-04-07 22:34:48 +00:00
|
|
|
px-4885-4M|\
|
|
|
|
px-4885-8M)
|
|
|
|
set_wifi_led "px-4885:orange:wifi"
|
|
|
|
set_usb_led "px-4885:blue:storage"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-03-11 07:44:33 +00:00
|
|
|
r6220)
|
|
|
|
ucidef_set_led_netdev "wan" "wan" "$board:green:wan" eth0.2
|
|
|
|
set_wifi_led "$board:green:wifi"
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
;;
|
2017-07-23 19:06:44 +00:00
|
|
|
re350-v1)
|
|
|
|
ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$board:blue:wifi2G" "wlan0"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "Wifi 5G" "$board:blue:wifi5G" "wlan1"
|
|
|
|
ucidef_set_led_netdev "eth_act" "LAN act" "$board:green:eth_act" "eth0" "tx rx"
|
|
|
|
ucidef_set_led_switch "eth_link" "LAN link" "$board:green:eth_link" "switch0" "0x01"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
re6500)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:white:power" "1"
|
|
|
|
ucidef_set_led_default "wifi" "wifi" "$board:orange:wifi" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
rp-n53)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "eth" "Network" "$board:white:back" "eth0"
|
|
|
|
set_wifi_led "$board:blue:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-05-05 15:54:26 +00:00
|
|
|
rt-ac51u)
|
|
|
|
set_wifi_led "$board:blue:wifi"
|
|
|
|
set_usb_led "$board:blue:usb" "1-1"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
rt-n14u)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
ucidef_set_led_netdev "lan" "lan" "$board:blue:lan" eth0.1
|
|
|
|
ucidef_set_led_netdev "wan" "wan" "$board:blue:wan" eth0.2
|
|
|
|
set_wifi_led "$board:blue:air"
|
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-08-03 17:58:01 +00:00
|
|
|
tew-714tru)
|
|
|
|
set_usb_led "$board:red:usb"
|
|
|
|
set_wifi_led "$board:green:wifi"
|
|
|
|
;;
|
2015-11-02 10:17:51 +00:00
|
|
|
tiny-ac)
|
|
|
|
set_wifi_led "$board:orange:wifi"
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
;;
|
ramips: add support for TP-Link TL-WR840N v4 and TL-WR841N v13
TP-Link TL-WR840N v4 and TL-WR841N v13 are simple N300 routers with
5-port FE switch and non-detachable antennas. Both are very similar
and are based on MediaTek MT7628NN (aka MT7628N) WiSoC.
The difference between these two models is in number of available
LEDs, buttons and power input switch.
This work is partially based on GitHub PR#974.
Specification:
- MT7628N/N (580 MHz)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- TL-WR840N v4: 5x LED (GPIO-controlled), 1x button
- TL-WR841N v13: 8x LED (GPIO-controlled*), 2x button, power input
switch
* WAN LED in TL-WR841N v13 is a dual-color, dual-leads type which isn't
(fully) supported by gpio-leds driver. This type of LED requires both
GPIOs state change at the same time to select color or turn it off.
For now, we support/use only the green part of the LED.
Factory image notes:
These devices use version 3 of TP-Link header, fortunately without RSA
signature (at least in case of devices sold in Europe). The difference
lays in the requirement for a non-zero value in "Additional Hardware
Version" field. Ideally, it should match the value stored in vendor
firmware header on device ("0x4"/"0x13" for these devices) but it seems
that anything other than "0" is correct.
We are able to prepare factory firwmare file which is accepted and
(almost) correctly flashed from the vendor GUI. As it turned out, it
accepts files without U-Boot image with second header at the beginning
but due to some kind of bug in upgrade routine, flashed image gets
corrupted before it's written to flash.
Tests showed that the GUI upgrade routine copies value of "Additional
Hardware Version" from existing firmware into offset "0x2023c" in
provided file, _before_ storing it in flash. In case of vendor firmware
upgrade files (which all include U-Boot image and two headers), this
offset points to the matching field in kernel+rootfs firmware part
header. Unfortunately, in case of LEDE factory image file which contains
only one header, it points to the offset "0x2023c" in kernel image. This
leads to a corrupted kernel and ends up with a "soft-bricked" device.
The good news is that U-Boot in these devices contains well known tftp
recovery mode, which can be triggered with "reset" button. What's more,
in comparison to some of older MediaTek based TP-Link devices, this
recovery mode doesn't write whole file at offset "0x0" in flash, without
verifying provided file in advance. In case of recovery mode in these
devices, first "0x20000" bytes are always skipped and "0x7a0000" bytes
from rest of the file are stored in flash at offset "0x20000".
Flash instruction:
Until (if at all) TP-Link fixes described problem, the only way to flash
LEDE image in these devices is to use tftp recovery mode in U-Boot:
1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "lede-ramips-mt7628-tl-wr84...-squashfs-tftp-recovery.bin"
to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
the router and keep button pressed for around 6-7 seconds, until
device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.
To access U-Boot CLI, keep pressed "4" key during boot.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-21 12:16:15 +00:00
|
|
|
tl-wr840n-v4)
|
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$board:green:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$board:green:wan" "switch0" "0x01"
|
|
|
|
;;
|
|
|
|
tl-wr841n-v13)
|
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
ucidef_set_led_switch "lan1" "lan1" "$board:green:lan1" "switch0" "0x2"
|
|
|
|
ucidef_set_led_switch "lan2" "lan2" "$board:green:lan2" "switch0" "0x4"
|
|
|
|
ucidef_set_led_switch "lan3" "lan3" "$board:green:lan3" "switch0" "0x8"
|
|
|
|
ucidef_set_led_switch "lan4" "lan4" "$board:green:lan4" "switch0" "0x10"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$board:green:wan" "switch0" "0x01"
|
|
|
|
;;
|
2017-04-07 22:34:48 +00:00
|
|
|
vocore-8M|\
|
|
|
|
vocore-16M)
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "vocore:orange:eth" "eth0"
|
|
|
|
set_wifi_led "vocore:green:status"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-01-08 06:30:10 +00:00
|
|
|
vocore2)
|
|
|
|
set_wifi_led "$board:fuchsia:status"
|
|
|
|
;;
|
2017-08-03 20:09:06 +00:00
|
|
|
vocore2lite)
|
|
|
|
set_wifi_led "$board:green:status"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
w502u)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
|
|
|
wcr-150gn)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:amber:user"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
ramips: Add support for ZBT WE1026-5G
The ZBT WE1026-5G
(http://www.zbtlink.com/products/router/WE1026-5G.html) is the follow-up
to the ZBT WE1026 and is based on MT7620. For the previous WE1026, the
ZBT WE826 image could be used. However, as the name implies, the -5G
comes equipped with a 5GHz wifi radio. As the WE826 only has a 2.4GHz
radio, the addition of 5GHz means that a separate image is needed for
the WE1026-5G. I suspect that this image will also work on the previous
WE1026, but I don't have a device to test with.
The WE1026-5G has following specifications:
* CPU: MT7620A
* 1x 10/100Mbps Ethernet.
* 16 MB Flash.
* 64 MB RAM.
* 1x USB 2.0 port.
* 1x mini-PCIe slots.
* 1x SIM slots.
* 1x 2.4Ghz WIFI.
* 1x 5GHz wifi (MT7612)
* 1x button.
* 3x controllable LEDs.
Works:
* Wifi.
* Switch.
* mini-PCIe slot. Only tested with a USB device (a modem).
* SIM slot.
* Sysupgrade.
* Button (reset).
Not working:
* The 5GHz WIFI LED is completely dead. I suspect the issue is the same
as on other devices with Mediatek 5Ghz wifi-cards/chips. The LED is
controlled by the driver, and mt76 (currently) does not support this.
Not tested:
* SD card reader.
Notes:
* The modem (labeled 3G/4G) and power LEDs are controlled by the
hardware.
* There is a 32MB version of this device available, but I do not have
access to it. I have therefor only added support for the 16MB version,
but added all the required infrastructure to make adding support for the
32MB version easy.
Installation:
The router comes pre-installed with OpenWRT, including a variant of
Luci. The initial firmware install can be done through this UI,
following normal procedure. I.e., access the UI and update the firmware
using the sysupgrade-image. Remember to select that you do not want to
keep existing settings.
Recovery:
If you brick the device, the WE1026-5G supports recovery using HTTP. Keep the
reset button pressed for ~5sec when booting to start the web server. Set the
address of the network interface on your machine to 192.168.1.2/24, and
point your browser to 192.168.1.1 to access the recovery UI. From the
recovery UI you can upload a firmware image.
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2017-09-10 12:44:47 +00:00
|
|
|
we1026-5g-16m)
|
|
|
|
ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
|
|
|
|
set_wifi_led "we1026-5g:green:wifi"
|
|
|
|
set_usb_led "we1026-5g:green:usb" "1-1.1"
|
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
whr-1166d|\
|
|
|
|
whr-300hp2|\
|
2015-08-17 06:24:34 +00:00
|
|
|
whr-600d)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:green:power" "1"
|
|
|
|
ucidef_set_led_default "router" "router" "$board:green:router" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-11-06 12:00:38 +00:00
|
|
|
wl-wn575a3)
|
2016-11-02 15:10:44 +00:00
|
|
|
ucidef_set_rssimon "wlan1" "200000" "1"
|
2017-06-16 22:39:25 +00:00
|
|
|
ucidef_set_led_rssi "wifi-low" "wifi-low" "$board:green:wifi-low" "wlan1" "1" "49"
|
|
|
|
ucidef_set_led_rssi "wifi-med" "wifi-med" "$board:green:wifi-med" "wlan1" "50" "84"
|
|
|
|
ucidef_set_led_rssi "wifi-high" "wifi-high" "$board:green:wifi-high" "wlan1" "85" "100"
|
2016-11-06 12:00:38 +00:00
|
|
|
;;
|
2016-04-21 19:46:59 +00:00
|
|
|
wrh-300cr)
|
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
ucidef_set_led_netdev "lan" "lan" "$board:green:ethernet" "eth0"
|
|
|
|
;;
|
2016-04-26 11:43:53 +00:00
|
|
|
wndr3700v5)
|
|
|
|
ucidef_set_led_default "power" "POWER" "$board:green:power" "0"
|
|
|
|
;;
|
2017-04-07 22:34:48 +00:00
|
|
|
wt3020-4M|\
|
|
|
|
wt3020-8M)
|
|
|
|
ucidef_set_led_default "power" "power" "wt3020:blue:power" "0"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-12-02 01:33:23 +00:00
|
|
|
y1)
|
|
|
|
set_usb_led "$board:blue:usb"
|
|
|
|
ucidef_set_led_netdev "wifi" "WIFI" "$board:blue:wifi" "wlan1"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$board:blue:wifi5g" "wlan0"
|
|
|
|
ucidef_set_led_netdev "lan" "LAN" "$board:blue:lan" "eth0.1" "tx rx"
|
|
|
|
ucidef_set_led_netdev "wan" "WAN" "$board:blue:internet" "eth0.2" "tx rx"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
y1s)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:usb"
|
2016-12-02 01:33:23 +00:00
|
|
|
ucidef_set_led_netdev "wifi" "WIFI" "$board:yellow:wifi" "wlan1"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$board:blue:wifi" "wlan0"
|
|
|
|
ucidef_set_led_netdev "wan" "WAN" "$board:blue:internet" "eth0.2" "tx rx"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-06-23 08:58:08 +00:00
|
|
|
zbt-ape522ii)
|
|
|
|
ucidef_set_led_netdev "wlan2g4" "wlan1-link" "$board:green:wlan2g4" "wlan1"
|
|
|
|
ucidef_set_led_netdev "sys1" "wlan1" "$board:green:sys1" "wlan1" "tx rx"
|
|
|
|
ucidef_set_led_netdev "sys2" "wlan0" "$board:green:sys2" "wlan0" "tx rx"
|
|
|
|
;;
|
2016-09-25 19:09:31 +00:00
|
|
|
zbt-cpe102)
|
|
|
|
ucidef_set_led_default "power" "power" "$board:green:4g-0" "0"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
zbt-wa05)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
set_wifi_led "$board:blue:air"
|
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-03-15 08:37:05 +00:00
|
|
|
zbt-we2026)
|
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
;;
|
2017-04-12 05:53:56 +00:00
|
|
|
zbt-we826-16M|\
|
|
|
|
zbt-we826-32M)
|
|
|
|
set_wifi_led "zbt-we826:green:wifi"
|
|
|
|
set_usb_led "zbt-we826:green:usb"
|
2016-03-01 09:17:06 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
zbt-wr8305rt)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:green:sys" "1"
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
set_wifi_led "$board:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
zte-q7)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:blue:status"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-11-24 18:29:02 +00:00
|
|
|
youku-yk1)
|
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
set_wifi_led "$board:blue:air"
|
|
|
|
set_usb_led "$board:blue:usb"
|
|
|
|
;;
|
2011-10-24 21:49:31 +00:00
|
|
|
esac
|
2012-05-29 16:39:18 +00:00
|
|
|
|
2014-08-18 13:09:20 +00:00
|
|
|
board_config_flush
|
2012-05-29 16:39:18 +00:00
|
|
|
|
|
|
|
exit 0
|