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
|
|
|
|
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)
|
2017-11-16 21:17:42 +00:00
|
|
|
boardname="${board##*,}"
|
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
|
2015-08-17 06:24:34 +00:00
|
|
|
3g-6200n)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:amber:wlan"
|
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)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wlan"
|
2016-09-27 05:16:16 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
br-6475nd|\
|
|
|
|
mzk-w300nh2)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:amber:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
ai-br100)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" "eth0.2"
|
|
|
|
set_wifi_led "$boardname:blue:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
air3gii)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-10-14 08:44:39 +00:00
|
|
|
alfa-network,ac1200rm)
|
|
|
|
set_wifi_led "$boardname:green:wlan2g" "wlan1"
|
|
|
|
;;
|
2018-01-26 15:21:34 +00:00
|
|
|
alfa-network,awusfree1)
|
|
|
|
set_wifi_led "$boardname:blue:wlan"
|
|
|
|
;;
|
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_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
|
|
|
|
set_wifi_led "asl26555:green:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
broadway)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:red:wps_active"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-09-06 09:14:16 +00:00
|
|
|
c108)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
|
|
|
|
ucidef_set_led_netdev "modem" "modem" "$boardname:green:modem" "wwan0"
|
2017-09-06 09:14:16 +00:00
|
|
|
;;
|
2016-07-26 04:44:19 +00:00
|
|
|
c20i)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x01"
|
|
|
|
ucidef_set_led_wlan "wlan" "wlan" "$boardname:blue:wlan" "phy0radio"
|
2016-07-26 04:44:19 +00:00
|
|
|
;;
|
2016-06-12 21:43:51 +00:00
|
|
|
c50)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
|
|
|
|
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" wlan1
|
|
|
|
set_wifi_led "$boardname:green:wlan5g"
|
2016-06-12 21:43:51 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
cf-wr800n)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:white:ethernet" eth0.1
|
|
|
|
set_wifi_led "$boardname:white:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-02-04 20:28:52 +00:00
|
|
|
d240)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:blue:wifi"
|
2017-02-04 20:28:52 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
dcs-930l-b1)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wifi" "WiFi" "$boardname: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)
|
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)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2016-04-26 11:43:06 +00:00
|
|
|
dir-620-d1|\
|
2018-01-20 08:27:03 +00:00
|
|
|
dlink,dwr-116-a1|\
|
2016-04-26 11:43:06 +00:00
|
|
|
mzk-ex300np)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2018-04-19 17:34:22 +00:00
|
|
|
dlink,dwr-118-a2)
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
|
|
|
|
set_wifi_led "$boardname:green:wlan2g" "wlan1"
|
|
|
|
;;
|
2018-03-10 09:34:38 +00:00
|
|
|
dlink,dwr-921-c1)
|
|
|
|
set_wifi_led "$boardname:green:wifi"
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0f"
|
|
|
|
;;
|
2016-06-30 13:18:03 +00:00
|
|
|
dir-860l-b1)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2"
|
2016-06-30 13:18:03 +00:00
|
|
|
;;
|
2018-08-06 17:52:28 +00:00
|
|
|
edimax,br-6478ac-v2)
|
|
|
|
set_wifi_led "$boardname:blue:wlan"
|
|
|
|
;;
|
2017-01-18 10:34:56 +00:00
|
|
|
ex2700|\
|
|
|
|
wn3000rpv3)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:router"
|
2016-02-12 08:29:33 +00:00
|
|
|
;;
|
2017-03-03 14:36:51 +00:00
|
|
|
ex3700)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wlan5g" "ROUTER (green)" "$boardname:green:router" "wlan0"
|
|
|
|
ucidef_set_led_netdev "wlan2g" "DEVICE (green)" "$boardname:green:device" "wlan1"
|
2017-03-03 14:36:51 +00:00
|
|
|
;;
|
2016-12-01 14:08:22 +00:00
|
|
|
f5d8235-v1)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:blue:wireless"
|
2016-12-01 14:08:22 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
fonera20n)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:orange:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2018-05-27 00:26:14 +00:00
|
|
|
gnubee,gb-pc1|\
|
2018-02-17 08:54:57 +00:00
|
|
|
gnubee,gb-pc2)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_switch "lan1" "lan1" "$boardname:green:lan1" "switch0" "0x01"
|
|
|
|
ucidef_set_led_switch "lan2" "lan2" "$boardname:green:lan2" "switch0" "0x10"
|
2017-07-22 01:15:56 +00:00
|
|
|
;;
|
2016-03-10 19:12:04 +00:00
|
|
|
gl-mt300a|\
|
2016-03-10 19:12:10 +00:00
|
|
|
gl-mt300n|\
|
|
|
|
gl-mt750)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:wlan"
|
2016-03-10 19:11:57 +00:00
|
|
|
;;
|
2017-05-17 10:18:45 +00:00
|
|
|
gl-mt300n-v2)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:red:wlan"
|
2018-11-02 19:52:01 +00:00
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x1"
|
2017-05-17 10:18:45 +00:00
|
|
|
;;
|
2017-02-24 23:19:15 +00:00
|
|
|
hc5661|\
|
|
|
|
hc5661a)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$boardname:blue:wlan2g"
|
2016-07-23 14:25:38 +00:00
|
|
|
;;
|
2015-10-05 10:25:47 +00:00
|
|
|
hc5761)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$boardname:blue:wlan2g"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "rai0"
|
2015-10-05 10:25:47 +00:00
|
|
|
;;
|
|
|
|
hc5861)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$boardname:blue:wlan2g"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "rai0"
|
2015-10-05 10:25:47 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
hg255d)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wlan"
|
|
|
|
ucidef_set_led_netdev "internet" "internet" "$boardname:green:internet" "eth0.2"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2018-08-09 17:22:46 +00:00
|
|
|
hiwifi,hc5861b)
|
|
|
|
set_wifi_led "$boardname:green:wlan2g"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
hpm)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
|
|
|
|
set_wifi_led "$boardname:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
ht-tm02)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:lan" "eth0"
|
|
|
|
set_wifi_led "$boardname:blue:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2018-07-04 01:29:36 +00:00
|
|
|
kimax,u35wf)
|
|
|
|
set_wifi_led "$boardname:blue:wifi"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
|
|
|
|
;;
|
2017-04-27 18:02:05 +00:00
|
|
|
kn|\
|
|
|
|
nbg-419n2)
|
|
|
|
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)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wifi"
|
2016-10-29 12:26:58 +00:00
|
|
|
;;
|
2017-12-21 18:55:25 +00:00
|
|
|
linkits7688)
|
|
|
|
ucidef_set_led_wlan "wifi" "wifi" "linkit-smart-7688:orange:wifi" "phy0tpt"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
m2m)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:blue:wifi"
|
|
|
|
ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:wan" "eth0"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2018-06-25 20:51:43 +00:00
|
|
|
mikrotik,rbm11g)
|
|
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
|
|
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:green:rssi1" "wlan0" "20" "100"
|
|
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi2" "wlan0" "40" "100"
|
|
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
|
|
|
|
ucidef_set_led_rssi "rssiveryhigh" "RSSIVERYHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
miniembplug)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:red:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-08-12 14:56:11 +00:00
|
|
|
mir3g)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x02" "0x08"
|
|
|
|
ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x08" "0x08"
|
|
|
|
ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08"
|
2017-08-12 14:56:11 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
mlw221|\
|
2015-08-17 06:24:34 +00:00
|
|
|
mlwg2)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:blue:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
mr-102n)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2016-09-24 19:41:43 +00:00
|
|
|
mr200)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:white:lan" "eth0.1"
|
|
|
|
ucidef_set_led_netdev "wan" "wan" "$boardname:white:wan" "usb0"
|
|
|
|
set_wifi_led "$boardname:white:wlan"
|
2016-09-24 19:41:43 +00:00
|
|
|
;;
|
2016-04-29 11:34:56 +00:00
|
|
|
mzk-ex750np)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:red:wifi"
|
2016-04-29 11:34:56 +00:00
|
|
|
;;
|
2018-06-12 19:17:23 +00:00
|
|
|
netgear,r6120)
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0f"
|
|
|
|
ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "phy0tpt"
|
|
|
|
ucidef_set_led_wlan "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "phy1tpt"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
oy-0001)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
pbr-m1)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
ramips: add support for newifi d2
Previously Newifi D2 could only use PandoraBox M1's firmware.
It works fine, but LED GPIO is different.
As a result, a separated DTS file for this device should be implemented.
Hardware spec:
* CPU: MTK MT7621A
* RAM: 512MB
* ROM: 32MB SPI Flash
* WiFi: MTK MT7603+MT7612
* Button: 2 buttons (reset, wps)
* LED: 3 single-color LEDs (USB, WiFi 2.4GHz, WiFi 5GHz) &
2 dual-color LEDs (Power, Internet)
* Ethernet: 5 ports, 4 LAN + 1 WAN
Installation method:
Same as Newifi D1, users may need to request unlock code from the device
manufacturer. Otherwise, a SPI flash programmer may be necessary to get
the firmware flashed. After the device is unlocked, press and hold reset
button before power cable plugs in. Then go to http://192.168.1.1 to
upload and flash the firmware package.
Signed-off-by: Jackson Ming Hu <huming2207@gmail.com>
2017-12-15 03:51:33 +00:00
|
|
|
d-team,newifi-d2)
|
|
|
|
ucidef_set_led_switch "internet" "internet" "$boardname:amber:internet" "switch0" "0x10"
|
|
|
|
ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:blue:wlan2g" "wlan0"
|
|
|
|
ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:blue:wlan5g" "wlan1"
|
|
|
|
;;
|
2016-02-15 18:45:22 +00:00
|
|
|
psg1208)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:white:wlan2g"
|
2016-02-15 18:45:22 +00:00
|
|
|
;;
|
2017-04-07 22:34:48 +00:00
|
|
|
px-4885-4M|\
|
|
|
|
px-4885-8M)
|
|
|
|
set_wifi_led "px-4885:orange:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-03-11 07:44:33 +00:00
|
|
|
r6220)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2
|
|
|
|
set_wifi_led "$boardname:green:wifi"
|
2017-03-11 07:44:33 +00:00
|
|
|
;;
|
2017-07-23 19:06:44 +00:00
|
|
|
re350-v1)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi2G" "wlan0"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "Wifi 5G" "$boardname:blue:wifi5G" "wlan1"
|
|
|
|
ucidef_set_led_netdev "eth_act" "LAN act" "$boardname:green:eth_act" "eth0" "tx rx"
|
|
|
|
ucidef_set_led_switch "eth_link" "LAN link" "$boardname:green:eth_link" "switch0" "0x01"
|
2017-07-23 19:06:44 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
rp-n53)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "eth" "Network" "$boardname:white:back" "eth0"
|
|
|
|
set_wifi_led "$boardname:blue:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-05-05 15:54:26 +00:00
|
|
|
rt-ac51u)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:blue:wifi"
|
2017-05-05 15:54:26 +00:00
|
|
|
;;
|
2017-12-06 14:43:55 +00:00
|
|
|
rt-n12p)
|
2018-08-29 06:59:46 +00:00
|
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0.1
|
|
|
|
ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2
|
|
|
|
set_wifi_led "$boardname:green:air"
|
2017-12-06 14:43:55 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
rt-n14u)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:blue:lan" eth0.1
|
|
|
|
ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" eth0.2
|
|
|
|
set_wifi_led "$boardname:blue:air"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
ramips: add support for Skylab SKW92A in EVB
Specifically, SKW92A_E16, described here:
http://www.skylabmodule.com/wp-content/uploads/SkyLab_SKW92A_V1.04_datasheet.pdf
Specification:
- MediaTek MT7628N/N (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x u.FL
- Power by micro-USB connector at USB1 on EVB
- UART via micro-USB connector at USB3 on EVB (57600 8n1)
- 5x Ethernet LEDs
- 1x WLAN LEDs
- 1x WPS LED connected by jumper wire from I2S_CK on J20 to WPS_LED pin hole next
to daughter board on EVB
- WPS/Reset button (S2 on EVB)
- RESET button (S1 on EVB) is *not* connected to RST hole next to daughter board
Flash instruction:
>From Skylab firmware:
1. Associate with SKYLAP_AP
2. In a browser, load: http://10.10.10.254/
3. Username/password: admin/admin
4. In web admin interface: Administration / Upload Firmware, browse to
sysupgrade image, apply, flash will fail with a message:
Not a valid firmware. *** Warning: "/var/tmpFW" has corrupted data!
5. Telnet to 10.10.10.254, drops you into a root shell with no credentials
6. # cd /var
7. # mtd_write -r write tmpFW mtd4
Unlocking mtd4 ...
Writing from tmpFW to mtd4 ... [e]
8. When flash has completed, you will have booted into your firmware.
>From U-boot via TFTP and initramfs:
1. Place openwrt-ramips-mt76x8-skw92a-initramfs-kernel.bin on a TFTP server
2. Connect to serial console at USB3 on EVB
3. Connect ethernet between port 1 (not WAN) and your TFTP server (e.g.
192.168.11.20)
4. Start terminal software (e.g. screen /dev/ttyUSB0 57600) on PC
5. Apply power to EVB
6. Interrupt u-boot with keypress of "1"
7. At u-boot prompts:
Input device IP (10.10.10.123) ==:192.168.11.21
Input server IP (10.10.10.3) ==:192.168.11.20
Input Linux Kernel filename (root_uImage) ==:openwrt-ramips-mt76x8-skw92a-initramfs-kernel.bin
8. Move ethernet to port 0 (WAN) on EVB
9. At new OpenWrt console shell, fetch squashfs-sysupgrade image and flash
with sysupgrade.
>From U-boot via TFTP direct flash:
1. Place openwrt-ramips-mt76x8-skw92a-squashfs-sysupgrade.bin on a TFTP server
2. Connect to serial console at USB3 on EVB (57600 8N1)
3. Connect ethernet between port 1 (not WAN) an your TFTP server (e.g.
192.168.11.20)
4. Start terminal software (e.g. screen /dev/ttyUSB0 57600) on PC
5. Apply power to EVB
6. Interrupt u-boot with keypress of "2"
7. At u-boot prompts:
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) Y
Input device IP (10.10.10.123) ==:192.168.11.21
Input server IP (10.10.10.3) ==:192.168.11.20
Input Linux Kernel filename (root_uImage) ==:openwrt-ramips-mt76x8-skw92a-squashfs-sysupgrade.bin
8. When transfer is complete or as OpenWrt begins booting, move ethernet to
port 0 (WAN).
Signed-off-by: Russell Senior <russell@personaltelco.net>
2018-11-25 11:39:19 +00:00
|
|
|
skw92a)
|
|
|
|
set_wifi_led "$boardname:green:wlan"
|
|
|
|
;;
|
2018-02-19 05:35:42 +00:00
|
|
|
tama,w06)
|
|
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
|
|
|
|
ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt"
|
|
|
|
;;
|
2016-08-03 17:58:01 +00:00
|
|
|
tew-714tru)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wifi"
|
2016-08-03 17:58:01 +00:00
|
|
|
;;
|
2015-11-02 10:17:51 +00:00
|
|
|
tiny-ac)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:orange:wifi"
|
2015-11-02 10:17:51 +00:00
|
|
|
;;
|
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)
|
2018-06-10 22:37:38 +00:00
|
|
|
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
|
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-wr841n-v13)
|
2018-06-10 22:37:38 +00:00
|
|
|
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_switch "lan1" "lan1" "$boardname:green:lan1" "switch0" "0x2"
|
|
|
|
ucidef_set_led_switch "lan2" "lan2" "$boardname:green:lan2" "switch0" "0x4"
|
|
|
|
ucidef_set_led_switch "lan3" "lan3" "$boardname:green:lan3" "switch0" "0x8"
|
|
|
|
ucidef_set_led_switch "lan4" "lan4" "$boardname:green:lan4" "switch0" "0x10"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
|
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
|
|
|
;;
|
2018-05-17 09:57:00 +00:00
|
|
|
tplink,c2-v1)
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch1" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch1" "0x01"
|
|
|
|
set_wifi_led "$boardname:green:wlan"
|
|
|
|
;;
|
2018-01-13 07:16:20 +00:00
|
|
|
tplink,c20-v1)
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x01"
|
|
|
|
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:blue:wlan2g" "wlan0"
|
|
|
|
;;
|
2018-01-09 11:25:53 +00:00
|
|
|
tplink,c20-v4)
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
|
|
|
|
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" "wlan0"
|
|
|
|
;;
|
2018-01-28 18:49:38 +00:00
|
|
|
tplink,c50-v3)
|
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
|
2018-05-18 21:37:49 +00:00
|
|
|
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan2g" "phy0tpt"
|
|
|
|
ucidef_set_led_wlan "wlan5g" "wlan5g" "$boardname:green:wlan5g" "phy1tpt"
|
2018-01-28 18:49:38 +00:00
|
|
|
;;
|
2018-06-26 23:24:39 +00:00
|
|
|
tplink,tl-wa801nd-v5)
|
|
|
|
ucidef_set_led_wlan "wlan" "wlan" "$boardname:green:wlan" "phy0tpt"
|
|
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
|
|
|
|
;;
|
2018-08-26 19:11:59 +00:00
|
|
|
tplink,tl-mr3020-v3)
|
|
|
|
set_wifi_led "$boardname:green:wlan"
|
|
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
|
|
|
|
;;
|
2018-05-30 15:41:53 +00:00
|
|
|
tplink,tl-mr3420-v5|\
|
|
|
|
tplink,tl-wr842n-v5)
|
2018-06-10 22:37:38 +00:00
|
|
|
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
|
2017-12-15 14:57:49 +00:00
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
|
|
|
|
;;
|
2018-03-17 17:47:51 +00:00
|
|
|
tplink,tl-wr902ac-v3)
|
2018-06-10 22:37:38 +00:00
|
|
|
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
|
2018-03-17 17:47:51 +00:00
|
|
|
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x10"
|
|
|
|
;;
|
2017-02-19 08:46:44 +00:00
|
|
|
u25awf-h1)
|
|
|
|
set_wifi_led "u25awf:red:wifi"
|
|
|
|
ucidef_set_led_netdev "eth" "eth" "u25awf:green:lan" "eth0"
|
|
|
|
;;
|
ramips: add support for UniElec U7628-01
UniElec U7628-01 is a router platform board based on MediaTek MT7628AN.
The device has the following specifications:
- MT7628AN (580MHz)
- 64/128/256 MB of RAM (DDR2)
- 8/16 MB of flash (SPI NOR)
- 5x 10/100 Mbps Ethernet (MT7628 built-in switch)
- 1x 2T2R 2.4 GHz Wi-Fi (MT7628)
- 1x miniPCIe slot (with PCIe and USB 2.0 buses)
- 1x miniSIM slot
- 1x microSD slot
- 1x USB 2.0 port
- 7x single-color LEDs (GPIO-controlled)
- 1x bi-color LED (green GPIO-controlled, red -> LED_WLAN# in miniPCIe)
- 1x reset button
- 1x UART header (4-pins)
- 1x SDXC/GPIO header (10-pins, connected with microSD slot)
- 1x DC jack for main power (12 V)
The following has been tested and is working:
- Ethernet switch
- miniPCIe slot (tested with modem and Wi-Fi card)
- miniSIM slot
- sysupgrade
- reset button
- USB 2.0 port*
Due to a missing driver (MMC over GPIO) this is not supported:
- microSD card reader
* Warning:
USB buses in miniPCIe and regular A-type socket are connected together,
without any proper analog switch or USB HUB.
Installation:
This board might come with a different firmware versions (MediaTek SDK,
PandoraBox, Padavan, etc.). If your board comes with PandoraBox, you can
install LEDE using sysupgrade. Just SSH to the router and perform forced
sysupgrade (due to a board name mismatch). The default IP of this board
should be: 192.168.1.1 and username/password: root/admin. In case of a
different firmware, you can use web based recovery described below.
Use the following command to perform the sysupgrade (for the 128MB
RAM/16MB flash version):
sysupgrade -n -F lede-ramips-mt76x8-u7628-01-128M-16M-squashfs-sysupgrade.bin
Recovery:
This board contains a Chinese, closed-source bootloader called Breed
(Boot and Recovery Environment for Embedded Devices). Breed supports web
recovery and to enter it, you keep the reset button pressed for around
5 seconds during boot. Your machine will be assigned an IP through DHCP
and the router will use IP address 192.168.1.1. The recovery website is
in Chinese, but is easy to use. Click on the second item in the list to
access the recovery page, then the second item on the next page is where
you select the firmware. In order to start the recovery, you click the
button at the bottom.
SDXC/GPIO header (J3):
1. SDXC_D3 / I2C_SCLK
2. SDXC_D2 / I2C_SD
3. SDXC_D1 / I2S_DI
4. SDXC_D0 / I2S_WS
5. SDXC_CMD / I2S_CLK
6. SDXC_CLK / GPIO0
7. SDXC_CD / UART_RXD1
8. UART_TXD1
9. 3V3
10. GND
Other notes:
1. The board is available with different amounts of RAM and flash. We
have only added support for the 128/16 MB configuration, as that seems
to be the default. However, all the required infrastructure is in place
for making support for the other configurations easy.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2017-11-03 20:12:49 +00:00
|
|
|
u7628-01-128M-16M)
|
|
|
|
ucidef_set_led_switch "lan1" "lan1" "u7628-01:green:lan1" "switch0" "0x2"
|
|
|
|
ucidef_set_led_switch "lan2" "lan2" "u7628-01:green:lan2" "switch0" "0x4"
|
|
|
|
ucidef_set_led_switch "lan3" "lan3" "u7628-01:green:lan3" "switch0" "0x8"
|
|
|
|
ucidef_set_led_switch "lan4" "lan4" "u7628-01:green:lan4" "switch0" "0x10"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "u7628-01:green:wan" "switch0" "0x01"
|
|
|
|
set_wifi_led "u7628-01:green:wlan"
|
|
|
|
;;
|
2017-04-07 22:34:48 +00:00
|
|
|
vocore-8M|\
|
|
|
|
vocore-16M)
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "vocore:orange:eth" "eth0"
|
2017-08-03 20:09:06 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
w502u)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
ramips: Add support for ZTE ZXECS EBG3130 aka BDCOM WAP2100-SK
On the bottom sticker it's branded as ZTE ZXECS EBG3130 device, but in factory
OpenWrt image it's referenced as BDCOM WAP2100-SK device.
Specifications:
- SoC: MediaTek MT7620A
- RAM: 128 MB
- Flash: 16 MB
- Ethernet: 5 FE ports
- Wireless radio: 2T2R 2.4 GHz and 1T1R 5 GHz (MT7610EN, unsupported)
- UART: 1 x UART on PCB marked as J2 (R=RX, T=TX, G=GND) with 115200 8N1 config
- LEDs: Power, FE ports 1-5, WPS, USB, RF 2.4G, RF 5G
- Other: USB port, SD card slot and 2x external antennas (non-detachable)
Flashing instructions:
A) The U-Boot has HTTP based firmware upgrade
A1) Flashing notes
We've identified so far two different batches of units, unfortunately
each batch has different U-Boot bootloader flashed with different
default environment variables, thus each batch has different IP address
for accessing web based firmware updater.
* First batch has web based bootloader IP address 1.1.1.1
* Second batch has web based bootloader IP address 192.168.1.250
In case you can't connect to either of those IPs, you can try to get
the default IP address via two methods:
A1.1) Serial console, then the IP address is visible during the boot
...
HTTP server is starting at IP: 1.1.1.1
raspi_read: from:40004 len:6
HTTP server is ready!
...
A1.2) Over telnet/SSH using this command:
root@bdcom:/# grep ipaddr= /dev/mtd0
ipaddr=1.1.1.1
A2) Flashing with browser
* Change IP address of PC to 1.1.1.2 with 255.255.255.0 netmask
* Reboot the device and try to reach web based bootloader in the
browser with the following URL http://1.1.1.1
* Quickly select the firmware sysupgrade file and click on the
`Update firmware` button, this all has to be done within 10 seconds,
bootloader doesn't wait any longer
If done correctly, the web page should show UPDATE IN PROGRESS page
with progress indicator. Once the flashing completes (it takes roughly
around 1 minute), the device will reboot to the OpenWrt firmware
A3) Flashing with curl
sudo ip addr add 1.1.1.2/24 dev eth0
curl \
--verbose \
--retry 3 \
--retry-delay 1 \
--retry-max-time 30 \
--connect-timeout 30 \
--form "firmware=@openwrt-ramips-mt7620-BDCOM-WAP2100-SK-squashfs-sysupgrade.bin" \
http://1.1.1.1
Now power on the router.
B) The U-boot is based on Ralink SDK so we can flash the firmware using UART.
1. Configure PC with a static IP address and setup an TFTP server.
2. Put the firmware into the tftp directory.
3. Connect the UART line as described on the PCB (G=GND, R=RX, T=TX)
4. Power up the device and press 2, follow the instruction to set device and
tftp server IP address and input the firmware file name. U-boot will then load
the firmware and write it into the flash.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2018-11-13 12:10:40 +00:00
|
|
|
wap2100-sk)
|
|
|
|
set_usb_led "$boardname:green:usb"
|
|
|
|
set_wifi_led "$boardname:green:wlan2g"
|
|
|
|
;;
|
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"
|
|
|
|
;;
|
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-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_rssi "wifi-low" "wifi-low" "$boardname:green:wifi-low" "wlan1" "1" "49"
|
|
|
|
ucidef_set_led_rssi "wifi-med" "wifi-med" "$boardname:green:wifi-med" "wlan1" "50" "84"
|
|
|
|
ucidef_set_led_rssi "wifi-high" "wifi-high" "$boardname:green:wifi-high" "wlan1" "85" "100"
|
2016-11-06 12:00:38 +00:00
|
|
|
;;
|
2016-04-21 19:46:59 +00:00
|
|
|
wrh-300cr)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wlan"
|
|
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:green:ethernet" "eth0"
|
2016-04-21 19:46:59 +00:00
|
|
|
;;
|
2016-12-02 01:33:23 +00:00
|
|
|
y1)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wifi" "WIFI" "$boardname:blue:wifi" "wlan1"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$boardname:blue:wifi5g" "wlan0"
|
2017-12-29 04:35:32 +00:00
|
|
|
ucidef_set_led_switch "lan" "LAN" "$boardname:blue:lan" "switch0" "0x03"
|
2016-12-02 01:33:23 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
y1s)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wifi" "WIFI" "$boardname:yellow:wifi" "wlan1"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$boardname:blue:wifi" "wlan0"
|
|
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:blue:internet" "eth0.2" "tx rx"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2018-03-29 10:33:02 +00:00
|
|
|
youhua,wr1200js)
|
|
|
|
ucidef_set_led_switch "internet" "INTERNET" "$boardname:green:wan" "switch0" "0x01"
|
|
|
|
;;
|
2016-06-23 08:58:08 +00:00
|
|
|
zbt-ape522ii)
|
2017-11-16 21:17:42 +00:00
|
|
|
ucidef_set_led_netdev "wlan2g4" "wlan1-link" "$boardname:green:wlan2g4" "wlan1"
|
|
|
|
ucidef_set_led_netdev "sys1" "wlan1" "$boardname:green:sys1" "wlan1" "tx rx"
|
|
|
|
ucidef_set_led_netdev "sys2" "wlan0" "$boardname:green:sys2" "wlan0" "tx rx"
|
2016-06-23 08:58:08 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
zbt-wa05)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:blue:air"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2017-03-15 08:37:05 +00:00
|
|
|
zbt-we2026)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wlan"
|
2017-03-15 08:37:05 +00:00
|
|
|
;;
|
2017-04-12 05:53:56 +00:00
|
|
|
zbt-we826-16M|\
|
|
|
|
zbt-we826-32M)
|
|
|
|
set_wifi_led "zbt-we826:green:wifi"
|
2016-03-01 09:17:06 +00:00
|
|
|
;;
|
2018-01-24 00:27:51 +00:00
|
|
|
zbtlink,zbt-we1226)
|
2018-01-23 01:46:36 +00:00
|
|
|
set_wifi_led "$boardname:green:wlan"
|
|
|
|
ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x01"
|
|
|
|
ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x02"
|
|
|
|
ucidef_set_led_switch "wan" "WAN" "$boardname:green:wan" "switch0" "0x10"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
zbt-wr8305rt)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2018-04-03 23:19:22 +00:00
|
|
|
zorlik,zl5900v2)
|
|
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0
|
|
|
|
;;
|
2018-04-08 14:04:11 +00:00
|
|
|
zyxel,keenetic-extra-ii)
|
|
|
|
set_wifi_led "$boardname:green:wifi"
|
|
|
|
ucidef_set_led_switch "internet" "internet" "$boardname:green:internet" "switch0" "0x01"
|
|
|
|
;;
|
2015-11-24 18:29:02 +00:00
|
|
|
youku-yk1)
|
2017-11-16 21:17:42 +00:00
|
|
|
set_wifi_led "$boardname:blue:air"
|
|
|
|
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10"
|
2015-11-24 18:29:02 +00:00
|
|
|
;;
|
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
|