mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
974d6958a7
TP-Link Archer C60 v2 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561 + QCA9886. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - 7x LED, 2x button - UART header on PCB Flash instruction (WebUI): Download *-factory.bin image and upload it via the firmwary upgrade function of the stock firmware WebUI. Flash instruction (TFTP): 1. Set PC to fixed IP address 192.168.0.66 2. Download *-factory.bin image and rename it to tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin in its root directory 4. Turn off the router 5. Press and hold reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery Flash instruction (under U-Boot, using UART): tftp 0x81000000 ...-sysupgrade.bin erase 0x9f030000 +$filesize cp.b $fileaddr 0x9f030000 $filesize reset Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
249 lines
11 KiB
Bash
Executable File
249 lines
11 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
boardname="${board##*,}"
|
|
|
|
case "$board" in
|
|
8dev,carambola2)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:orange:eth0" "eth0"
|
|
ucidef_set_led_switch "wan" "WAN" "$boardname:orange:eth1" "switch0" "0x04"
|
|
;;
|
|
avm,fritz300e)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
|
|
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 "rssimedium" "RSSIMEDIUM" "$boardname:green:rssi2" "wlan0" "40" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
|
|
;;
|
|
avm,fritz4020)
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
|
|
ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x1E"
|
|
;;
|
|
buffalo,whr-g301n)
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02"
|
|
ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10"
|
|
;;
|
|
comfast,cf-e110n-v2)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth1"
|
|
ucidef_set_led_switch "wan" "WAN" "$boardname:green:wan" "switch0" "0x02"
|
|
ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:red:rssimediumlow" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssimediumhigh" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssihigh" "wlan0" "76" "100"
|
|
;;
|
|
comfast,cf-e120a-v3)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth1"
|
|
ucidef_set_led_switch "wan" "WAN" "$boardname:green:wan" "switch0" "0x04"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:red:rssimediumlow" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssimediumhigh" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssihigh" "wlan0" "76" "100"
|
|
;;
|
|
comfast,cf-e5)
|
|
ucidef_set_led_switch "lan" "LAN" "$boardname:blue:lan" "switch0" "0x02"
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:blue:wan" "eth1"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:blue:rssi0" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$boardname:blue:rssi1" "wlan0" "33" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:blue:rssi2" "wlan0" "66" "100"
|
|
;;
|
|
dlink,dir-859-a1)
|
|
ucidef_set_led_switch "internet" "WAN" "$boardname:green:internet" "switch0" "0x20"
|
|
;;
|
|
engenius,ecb1750)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:blue:lan" "eth0"
|
|
;;
|
|
engenius,ews511ap)
|
|
ucidef_set_led_netdev "lan1" "LAN1" "$boardname:blue:lan1" "eth1"
|
|
ucidef_set_led_netdev "lan2" "LAN2" "$boardname:blue:lan2" "eth0"
|
|
;;
|
|
etactica,eg200)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0"
|
|
ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
|
|
ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore"
|
|
;;
|
|
glinet,gl-ar150)
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
|
|
ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02"
|
|
;;
|
|
glinet,gl-ar300m-nand|\
|
|
glinet,gl-ar300m-nor)
|
|
ucidef_set_led_netdev "lan" "LAN" "gl-ar300m:green:lan" "eth0"
|
|
;;
|
|
glinet,gl-ar300m-lite)
|
|
ucidef_set_led_netdev "lan" "LAN" "gl-ar300m-lite:green:lan" "eth0"
|
|
;;
|
|
glinet,gl-x750)
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
|
|
;;
|
|
netgear,wnr612-v2|\
|
|
on,n150r)
|
|
ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f"
|
|
ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
|
|
;;
|
|
pcs,cap324)
|
|
ucidef_set_led_netdev "lan" "LAN" "pcs:lan:green" "eth0"
|
|
;;
|
|
pcs,cr3000)
|
|
ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "pcs:blue:lan1" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan2" "LAN2" "pcs:blue:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02"
|
|
;;
|
|
qihoo,c301)
|
|
ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt"
|
|
;;
|
|
tplink,archer-a7-v5|\
|
|
tplink,archer-c7-v4|\
|
|
tplink,archer-c7-v5)
|
|
ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x20"
|
|
;;
|
|
tplink,archer-c2-v3|\
|
|
tplink,tl-wr1043nd-v4|\
|
|
tplink,tl-wr1043n-v5)
|
|
ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
;;
|
|
tplink,archer-c6-v2)
|
|
ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x3C"
|
|
ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02"
|
|
;;
|
|
tplink,archer-c25-v1|\
|
|
tplink,tl-wr841-v9|\
|
|
tplink,tl-wr841-v11|\
|
|
tplink,tl-wr842n-v3)
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
;;
|
|
tplink,archer-c58-v1|\
|
|
tplink,archer-c59-v1|\
|
|
tplink,archer-c60-v1|\
|
|
tplink,archer-c60-v2)
|
|
ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x1E"
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
|
|
;;
|
|
tplink,archer-d50-v1)
|
|
ucidef_set_led_switch "lan" "LAN" "tp-link:white:lan" "switch0" "0x1c"
|
|
ucidef_set_led_switch "wan_data" "WAN Data" "tp-link:white:internet" "switch0" "0x02" "" "tx rx"
|
|
ucidef_set_led_switch "wan_link" "WAN Link" "tp-link:white:wan" "switch0" "0x02" "" "link"
|
|
;;
|
|
tplink,cpe210-v2|\
|
|
tplink,cpe210-v3)
|
|
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "30" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "60" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "80" "100"
|
|
;;
|
|
tplink,cpe510-v2|\
|
|
tplink,cpe510-v3)
|
|
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100" "0" "13"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "26" "100" "-25" "13"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "51" "100" "-50" "13"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13"
|
|
;;
|
|
tplink,cpe610-v1)
|
|
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
|
|
;;
|
|
tplink,re355-v1|\
|
|
tplink,re450-v1|\
|
|
tplink,re450-v2)
|
|
ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
|
|
ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
|
|
;;
|
|
tplink,tl-mr3020-v1|\
|
|
tplink,tl-mr3040-v2)
|
|
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
|
|
;;
|
|
tplink,tl-wr740n-v1|\
|
|
tplink,tl-wr740n-v3|\
|
|
tplink,tl-wr741-v1|\
|
|
tplink,tl-wr743nd-v1|\
|
|
tplink,tl-wr841-v5|\
|
|
tplink,tl-wr941-v4)
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x10"
|
|
;;
|
|
tplink,tl-wr740n-v4|\
|
|
tplink,tl-wr741nd-v4|\
|
|
tplink,tl-wr841-v8|\
|
|
tplink,tl-wr842n-v2)
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
;;
|
|
trendnet,tew-823dru)
|
|
ucidef_set_led_netdev "wan" "WAN" "trendnet:green:planet" "eth0"
|
|
;;
|
|
ubnt,bullet-m|\
|
|
ubnt,bullet-m-xw|\
|
|
ubnt,nanostation-m|\
|
|
ubnt,nanostation-m-xw|\
|
|
ubnt,rocket-m)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:orange:link2" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100"
|
|
;;
|
|
ubnt,nanobeam-ac|\
|
|
ubnt,nanostation-ac)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:blue:rssi0" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:blue:rssi1" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:blue:rssi2" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:blue:rssi3" "wlan0" "76" "100"
|
|
;;
|
|
wd,mynet-wifi-rangeextender)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:rssi-low" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMED" "$boardname:blue:rssi-med" "wlan0" "33" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIMAX" "$boardname:blue:rssi-max" "wlan0" "66" "100"
|
|
;;
|
|
yuncore,a770)
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
|
|
ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x10"
|
|
;;
|
|
zbtlink,zbt-wd323)
|
|
ucidef_set_led_switch "lan1" "LAN1" "zbt-wd323:orange:lan1" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan2" "LAN2" "zbt-wd323:orange:lan2" "switch0" "0x08"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|