Linksys WRT1900AC

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:47, 16 November 2017 (edit)
Ian5142 (Talk | contribs)
(Contact)
← Previous diff
Revision as of 19:20, 12 September 2019 (edit) (undo)
Jeremywh7 (Talk | contribs)
m (How to Flash - add cliff notes link)
Next diff →
(6 intermediate revisions not shown.)
Line 1: Line 1:
-<font color=red>NOTE: </font> '''I am still working on these instructions and will have them finished by the middle of September, 2017. /u/Kleinbottle'''+=Introduction=
 +These instructions have only been tested on the [https://wikidevi.com/wiki/Linksys_WRT1900AC_v1 Linksys WRT1900AC v1].
 +The [https://wikidevi.com/wiki/Linksys_WRT1200AC_v1 WRT1200AC], [https://wikidevi.com/wiki/Linksys_WRT1900ACS WRT1900ACS], and [https://wikidevi.com/wiki/Linksys_WRT3200ACM WRT3200ACM] and other versions are so similar that these instructions will probably also apply to the other versions, but it's not guaranteed.
-== Intro, Versions ==+=How to Flash=
 +Read the standard [[Installation#Method_1:_Flashing_with_Web_GUI|GUI Installation]] wiki and [https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=311117 Marvell forum Cliff Notes].
 +#See [[Firmware_FAQ#Where_do_I_download_firmware.3F|Where do I download firmware?]] for download links and details.
 +#Go to the appropriate model build directory:
 + linksys-wrt1900ac
 + linksys-wrt1900acs
 + linksys-wrt1900acsv2
 + linksys-wrt1900acv2
 + linksys-wrt3200acm
 + linksys-wrt32x
 +#There are two firmware files to download and install. Do them both in this order:
 +##Initial installation firmware (not needed for later upgrades): '''factory-to-ddwrt.img'''
 +##Upgrade firmware: '''ddwrt-linksys-wrt1900ac-webflash.bin'''
-These instructions have only been tested on the Linksys WRT1900AC v1.+To see historically available packages, see [[What_is_DD-WRT%3F#File_Versions|File Versions]]. As this is a Marvell unit, builds are customized and do not necessarily correspond to the Broadcom file versions.
-The other models: WRT1200AC, WRT1900ACS, and WRT3200ACM are so similar that these instructions will probably also apply to the other versions, but it's not guaranteed. See [https://wikidevi.com/wiki/Linksys_WRT1900ACS this page] for differences.+=Setup=
 +Since the WRTxx00 family uses Marvell chips, the "ifconfig ath0 up" command is used to toggle the wireless. "wl radio on" is only for Broadcom.
-== How to Flash ==+===Wireless setup===
 +The WRT1900AC is a dual band router, each band with discrete physical interfaces in the Wireless/Basic Settings webpage.
 +*ath0 is the 2.4 GHz band (802.11n with channel bonding)
 +*ath1 is the 5GHz band (described as 802.11ac)
 +*[https://www.linksys.com/ca/support-article?articleNum=135534 Comparison of Wireless-AC and Wireless-N technologies]
-# Follow the standard procedure described for Linksys routers. +Follow the [[QCA_wireless_settings|Atheros/Qualcomm guide for wireless setup]].
-# There are two firmware files to download and install. Do them both; in order.+
-## Firmware: factory to dd-wrt, initial installation image '''factory-to-ddwrt.img'''+
-## Firmware: webflash image '''ddwrt-linksys-wrt1900ac-webflash.bin'''+
-## See [https://www.dd-wrt.com/wiki/index.php/Firmware_FAQ#Where_do_I_download_firmware.3F Where do I download firmware?] for links.+
- +
-To see what's included, look [https://dd-wrt.com/wiki/index.php/What_is_DD-WRT%3F#File_Versions here]. As this is a Marvell based unit, builds are customized, just because it is standard, does not mean much, it can have more than a Broadcom standard.+
- +
-== Setup ==+
- +
-Since the WRT1900 family uses Marvell chips, the "wl radio on" command does not work for turning the wifi on and off. Instead use the command "ifconfig ath0 up".+
- +
-=== Wireless setup ===+
-The WRT1900AC is a dual band router. The two bands correspond to two physical interfaces in the Wireless/Basic Settings webpage.+
- +
-* ath0 is the 2.4 GHz band (also listed as TurboQAM)+
-* ath1 is the 5GHz band (described as 802.11ac)+
- +
-Follow the [https://www.dd-wrt.com/wiki/index.php/Atheros/ath_wireless_settings guide for wireless setup].+
For ath0, my settings are: For ath0, my settings are:
 + Wireless Mode: AP
 + Wireless Network Mode: Mixed
 + Channel Width: wide (40MHz)
 + Wireless Channel: 9
 + Extension Channel: Lower
 +Choose a non-overlapping channel after scanning with a wireless analyzer.
- Wireless Mode: AP+====Advanced WiFi Settings====
- Wireless Network Mode: Mixed+
- Channel Width: wide (40MHz)+
- Wireless Channel: 9+
- Extension Channel: Lower+
- +
-Please choose a channel that is not on top of all of the others in your neighbourhood. Use the Android app "WiFi Data" or similar to see which channels in your area are not being used.+
- +
-==== Advanced WiFi Settings ====+
- +
* Don't bother changing the TX power. Increasing it from 30dBm doesn't seem to have any effect. * Don't bother changing the TX power. Increasing it from 30dBm doesn't seem to have any effect.
* If you do not plan to use the 5GHz wifi band, turn it off by adding the command ''ifconfig ath1 down'' to the startup commands (webpage: Administration/Commands "Save Startup". Thus less power will be consumed and less heat generated. * If you do not plan to use the 5GHz wifi band, turn it off by adding the command ''ifconfig ath1 down'' to the startup commands (webpage: Administration/Commands "Save Startup". Thus less power will be consumed and less heat generated.
-=== 5 GHz wifi setup ===+===5 GHz wifi setup===
- +
In order to get the 5 GHz band working, all of the following must be set In order to get the 5 GHz band working, all of the following must be set
 +*'''SSID''': the two interfaces (ath0, ath1) must have different SSIDs
 +*'''Channel''': even though there are a number of channels that can be used for the 5GHz band, many do not work, as this [http://www.networkcomputing.com/wireless/dynamic-frequency-selection-part-3-channel-dilemma/438580919 DFS page] explains. Basically, the only usable ones are channels 36-48 and 149-165.
 +*'''Wireless Network Mode''': the webpage GUI lists various possibilities, but some may not work such as "N-only". The "AC/N-mixed" mode has been tested to work.
 +*'''Channel Width''': The smallest width is 20MHz. Increasing this can increase the speed, but may also increase noise. The DFS page linked above explains channel width well. You'll have to see how many other 5 GHz routers are nearby and experiment. The '''Extension Channel''' of Upper/Lower is also important based on where the DFS/radar channels are with respect to the channel that you have selected.
-* '''SSID''': the two interfaces (ath0, ath1) must have different SSIDs +=Guest WiFi setup=
-* '''Channel''': even though there are a number of channels that can be used for the 5GHz band, many do not work, as this [http://www.networkcomputing.com/wireless/dynamic-frequency-selection-part-3-channel-dilemma/438580919 DFS page] explains. Basically, the only usable ones are channels 36-48 and 149-165. +See [[Guest Network]] for details and options.
-* '''Wireless Network Mode''': the webpage GUI lists various possibilities, but some do not work, notably "N-only". This is probably because the interface is called 802.11ac. "AC/N-mixed" is one of the few modes that works for me. A chart showing the difference between AC and N is [https://www.linksys.com/ca/support-article?articleNum=135534 here]. +
-* '''Channel Width''': The smallest width is 20MHz. Increasing this can increase the speed, but may also increase noise. The DFS page linked above explains channel width well. You'll have to see how many other 5 GHz routers are nearby and experiment. The '''Extension Channel''' of Upper/Lower is also important based on where the DFS/radar channels are with respect to the channel that you have selected.+
-== Guest WiFi setup ==+'''Backup the NVRAM beforehand in case something goes wrong, to restore working settings.'''
 +#ADD a virtual interface. then SAVE.
 +#Configure the virtual interface, then SAVE again.
-'''When adding virtual interfaces, make a NVRAM backup beforehand in case something goes wrong and you need to restore the previous settings.'''+'''Example Settings:'''
 +*set private network to 172.71.1.1/255.255.255.0 (completely different subnet from 192.168.x.x)
 +*use OpenDNS dns server
-# ADD a virtual interface. then SAVE.+Example NAT/QOS settings:
-# Configure the virtual interface, then SAVE again.+ Start QoS: Enable
- + Port: WAN
-I followed all of the instructions at [https://www.dd-wrt.com/wiki/index.php/Guest_WiFi_%2B_abuse_control_for_beginners Guest Wifi for beginners]+ Packet Scheduler: HTB
- + Queueing Discipline: SFQ
-'''My Settings'''+ Downlink (kbps): 27000
-* set private network to 172.71.1.1/255.255.255.0 (completely different subnet from 192.168.x.x)+ Uplink (kbps): 4500
-* use OpenDNS dns server+
- +
-my NAT/QOS settings:+
- +
- Start QoS: Enable+
- Port: WAN+
- Packet Scheduler: HTB+
- Queueing Discipline: SFQ +
- Downlink (kbps): 27000+
- Uplink (kbps): 4500+
As explained in the link above, the downlink and uplink speeds must NOT be more than 95% of your ISPs speeds. My ISP provides 30Mbps down and 5 Mpbs up. Thus my QOS speed settings are As explained in the link above, the downlink and uplink speeds must NOT be more than 95% of your ISPs speeds. My ISP provides 30Mbps down and 5 Mpbs up. Thus my QOS speed settings are
 + Downlink speed = .9 * 30,000 kbps = 27000
 + Uplink speed = .9 * 5000 kbps = 4500
- Downlink speed = .9 * 30,000 kbps = 27000+*Set bandwidth limiting to '''maximum''' for private network and '''bulk''' for guest.
- Uplink speed = .9 * 5000 kbps = 4500+*I have not had a lot of traffic to test the QOS for the guest network. If there are problems change change SFQ to FQ_CODEL
- +
- +
-* Set bandwidth limiting to '''maximum''' for private network and '''bulk''' for guest.+
-* I have not had a lot of traffic to test the QOS for the guest network. If there are problems change change SFQ to FQ_CODEL+
* I have not implemented any abuse control yet. * I have not implemented any abuse control yet.
-== Hardware ==+=Hardware=
-=== USB LEDs ===+===USB LEDs===
The LEDS for USB1 and USB2 do not seem to work as advertised. This may be a bug in DD-WRT. They both turn on when USB ports are enabled (see services) and turn off when they are disabled, regardless of whether something is plugged in or not. The LEDS for USB1 and USB2 do not seem to work as advertised. This may be a bug in DD-WRT. They both turn on when USB ports are enabled (see services) and turn off when they are disabled, regardless of whether something is plugged in or not.
-=== LED brightness ===+===LED brightness===
The LEDs seem to lose brightness over time according to [http://community.linksys.com/t5/Wireless-Routers/WRT1900AC-and-WRT1900ACS-front-panel-LED-brightness-adjustment/m-p/1098166 this]. My router is second-hand and it's quite evident that the frequently used LEDs are dimmer than the others. The LEDs seem to lose brightness over time according to [http://community.linksys.com/t5/Wireless-Routers/WRT1900AC-and-WRT1900ACS-front-panel-LED-brightness-adjustment/m-p/1098166 this]. My router is second-hand and it's quite evident that the frequently used LEDs are dimmer than the others.
-=== Changing LED brightness ===+===Changing LED brightness===
 +To see the list of LEDs, run the command:
 + root@ddwrt:~# ls -l /sys/class/leds
 + mamba:white:power
 + mamba:amber:wan
 + mamba:white:wan
 + mamba:white:wlan_2g
 + mamba:white:wlan_5g
 + mamba:white:esata
 + mamba:white:usb2
 + mamba:white:usb3_1
 + mamba:white:usb3_2
 + mamba:white:wps
 + mamba:amber:wps
-To see the list of LEDs, type in the command: ''ls -l /sys/class/leds''+NOTE: ''mamba'' is the codename for the 1900AC v1, while ''cobra'' is v2. The 4 ethernet ports have two LEDs each but do not show up here.
-The results are+The brightness of the LEDs can be adjusted with this command:
- + echo 255 > /sys/class/leds/mamba\:white\:wan/{brightness}
- mamba:white:power+Where the {brightness} value ranges from 0 to 255 (minimum to maximum).
- mamba:amber:wan+
- mamba:white:wan+
- mamba:white:wlan_2g+
- mamba:white:wlan_5g+
- mamba:white:esata+
- mamba:white:usb2+
- mamba:white:usb3_1+
- mamba:white:usb3_2 +
- mamba:white:wps+
- mamba:amber:wps+
- +
-NOTE: (1) mamba is the codename for the 1900AC v1. cobra is the codename for v2. +
-(2) The 4 ethernet ports have two LEDs each, but they do not show up here. +
- +
-The brightness of the LEDs can be adjusted by using this command +
- +
- echo 255 > /sys/class/leds/mamba\:white\:wan/brightness +
- +
-Where the brightness value can be from 0 to 255 (and as mentioned above, even at 255 they are not that bright).+
- +
-=== LEDs and GPIO pins ===+
 +===LEDs and GPIO pins===
Most of the LEDs above are connected to / controlled by GPIO pins. Most of the LEDs above are connected to / controlled by GPIO pins.
The command ''/sbin/gpio'' allows one to examine and manipulate the GPIO pin status. The command ''/sbin/gpio'' allows one to examine and manipulate the GPIO pin status.
- 
* /sbin/gpio poll 9 (this tells if pin 9 is 00 = off or 01 = on) * /sbin/gpio poll 9 (this tells if pin 9 is 00 = off or 01 = on)
* /sbin/gpio enable 9 (this enables pin 9, ie. sets it to 1) * /sbin/gpio enable 9 (this enables pin 9, ie. sets it to 1)
Line 130: Line 113:
'''Notes:''' '''Notes:'''
- 
# The /sbin/gpio command works better over wifi than from a computer connected via ethernet cable. I don't know why. In the latter case, CTRL-C does not work to end the poll command. # The /sbin/gpio command works better over wifi than from a computer connected via ethernet cable. I don't know why. In the latter case, CTRL-C does not work to end the poll command.
# Even doing a poll will often mess up the router so much that it just freezes. You'll have to reboot it after experimenting with the /sbin/gpio commands. # Even doing a poll will often mess up the router so much that it just freezes. You'll have to reboot it after experimenting with the /sbin/gpio commands.
-The LEDs that have GPIO pins that can be accessed are the following:+The LEDs with accessible GPIO pins are mapped as follows:
- + 0 = Power
- [pin # = LED name]+ 4 = USB2
- 0=power+ 5 = USB1
- 4=USB2+ 6 = White internet
- 5=USB1+ 7 = Amber internet
- 6=white internet+ 8 = USB2 dot
- 7=amber internet+ 9 = WPS (white - the far right LED with an Up/Down arrow)
- 8=USB2 dot+ 10= WPS (amber)
- 9= WPS (white) This is the far right LED that has an UP/Down arrow.+
- 10= WPS (amber)+
- +
-I have not been able to find out what pins 1,2,3 do, although it seems logical that they would be wlan_2g, wlan_5g and esata.+
- +
-It looks like pins 9 and 10 are available and most easily used as customizable indicator lights.+
- +
-The GPIO pin information is important for the scripting below ...+
-== Scripting ==+Pins 1-3 are currently unknown, although it seems logical they would be wlan_2g, wlan_5g and eSATA.
-''to be completed later''+
-== Contact ==+Pins 9 and 10 are available and most easily used as customizable indicator lights. See [[LED_Scripts#LED_Scripts|LED Scripts]].
-For any corrections or additions, please email me at ''wrt1900@5024.ca'' . This email address will work until it gets inundated with spam and I delete it.+
[[Category: Linksys]] [[Category: Linksys]]
[[Category: Linksys guides]] [[Category: Linksys guides]]

Revision as of 19:20, 12 September 2019

Contents

Introduction

These instructions have only been tested on the Linksys WRT1900AC v1.

The WRT1200AC, WRT1900ACS, and WRT3200ACM and other versions are so similar that these instructions will probably also apply to the other versions, but it's not guaranteed.

How to Flash

Read the standard GUI Installation wiki and Marvell forum Cliff Notes.

  1. See Where do I download firmware? for download links and details.
  2. Go to the appropriate model build directory:
linksys-wrt1900ac
linksys-wrt1900acs
linksys-wrt1900acsv2
linksys-wrt1900acv2
linksys-wrt3200acm
linksys-wrt32x
  1. There are two firmware files to download and install. Do them both in this order:
    1. Initial installation firmware (not needed for later upgrades): factory-to-ddwrt.img
    2. Upgrade firmware: ddwrt-linksys-wrt1900ac-webflash.bin

To see historically available packages, see File Versions. As this is a Marvell unit, builds are customized and do not necessarily correspond to the Broadcom file versions.

Setup

Since the WRTxx00 family uses Marvell chips, the "ifconfig ath0 up" command is used to toggle the wireless. "wl radio on" is only for Broadcom.

Wireless setup

The WRT1900AC is a dual band router, each band with discrete physical interfaces in the Wireless/Basic Settings webpage.

Follow the Atheros/Qualcomm guide for wireless setup.

For ath0, my settings are:

Wireless Mode: AP
Wireless Network Mode: Mixed
Channel Width: wide (40MHz)
Wireless Channel: 9
Extension Channel: Lower

Choose a non-overlapping channel after scanning with a wireless analyzer.

Advanced WiFi Settings

  • Don't bother changing the TX power. Increasing it from 30dBm doesn't seem to have any effect.
  • If you do not plan to use the 5GHz wifi band, turn it off by adding the command ifconfig ath1 down to the startup commands (webpage: Administration/Commands "Save Startup". Thus less power will be consumed and less heat generated.

5 GHz wifi setup

In order to get the 5 GHz band working, all of the following must be set

  • SSID: the two interfaces (ath0, ath1) must have different SSIDs
  • Channel: even though there are a number of channels that can be used for the 5GHz band, many do not work, as this DFS page explains. Basically, the only usable ones are channels 36-48 and 149-165.
  • Wireless Network Mode: the webpage GUI lists various possibilities, but some may not work such as "N-only". The "AC/N-mixed" mode has been tested to work.
  • Channel Width: The smallest width is 20MHz. Increasing this can increase the speed, but may also increase noise. The DFS page linked above explains channel width well. You'll have to see how many other 5 GHz routers are nearby and experiment. The Extension Channel of Upper/Lower is also important based on where the DFS/radar channels are with respect to the channel that you have selected.

Guest WiFi setup

See Guest Network for details and options.

Backup the NVRAM beforehand in case something goes wrong, to restore working settings.

  1. ADD a virtual interface. then SAVE.
  2. Configure the virtual interface, then SAVE again.

Example Settings:

  • set private network to 172.71.1.1/255.255.255.0 (completely different subnet from 192.168.x.x)
  • use OpenDNS dns server

Example NAT/QOS settings:

Start QoS:  Enable
Port: WAN
Packet Scheduler: HTB
Queueing Discipline: SFQ 
Downlink (kbps): 27000
Uplink (kbps): 4500

As explained in the link above, the downlink and uplink speeds must NOT be more than 95% of your ISPs speeds. My ISP provides 30Mbps down and 5 Mpbs up. Thus my QOS speed settings are

Downlink speed = .9 * 30,000 kbps = 27000
Uplink speed = .9 * 5000 kbps = 4500
  • Set bandwidth limiting to maximum for private network and bulk for guest.
  • I have not had a lot of traffic to test the QOS for the guest network. If there are problems change change SFQ to FQ_CODEL
  • I have not implemented any abuse control yet.

Hardware

USB LEDs

The LEDS for USB1 and USB2 do not seem to work as advertised. This may be a bug in DD-WRT. They both turn on when USB ports are enabled (see services) and turn off when they are disabled, regardless of whether something is plugged in or not.

LED brightness

The LEDs seem to lose brightness over time according to this. My router is second-hand and it's quite evident that the frequently used LEDs are dimmer than the others.

Changing LED brightness

To see the list of LEDs, run the command:

root@ddwrt:~#  ls -l /sys/class/leds
mamba:white:power
mamba:amber:wan
mamba:white:wan
mamba:white:wlan_2g
mamba:white:wlan_5g
mamba:white:esata
mamba:white:usb2
mamba:white:usb3_1
mamba:white:usb3_2    
mamba:white:wps
mamba:amber:wps

NOTE: mamba is the codename for the 1900AC v1, while cobra is v2. The 4 ethernet ports have two LEDs each but do not show up here.

The brightness of the LEDs can be adjusted with this command:

 echo 255 > /sys/class/leds/mamba\:white\:wan/{brightness}

Where the {brightness} value ranges from 0 to 255 (minimum to maximum).

LEDs and GPIO pins

Most of the LEDs above are connected to / controlled by GPIO pins. The command /sbin/gpio allows one to examine and manipulate the GPIO pin status.

  • /sbin/gpio poll 9 (this tells if pin 9 is 00 = off or 01 = on)
  • /sbin/gpio enable 9 (this enables pin 9, ie. sets it to 1)
  • /sbin/gpio disable 9 (this disables pin 9, ie, sets it to 0)

Notes:

  1. The /sbin/gpio command works better over wifi than from a computer connected via ethernet cable. I don't know why. In the latter case, CTRL-C does not work to end the poll command.
  2. Even doing a poll will often mess up the router so much that it just freezes. You'll have to reboot it after experimenting with the /sbin/gpio commands.

The LEDs with accessible GPIO pins are mapped as follows:

0 = Power
4 = USB2
5 = USB1
6 = White internet
7 = Amber internet
8 = USB2 dot
9 = WPS (white - the far right LED with an Up/Down arrow)
10= WPS (amber)

Pins 1-3 are currently unknown, although it seems logical they would be wlan_2g, wlan_5g and eSATA.

Pins 9 and 10 are available and most easily used as customizable indicator lights. See LED Scripts.