Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
inbox:toh:askey:rt4230w_rev6 [2021/06/06 22:30] – [Installation] datatables updated tmomasinbox:toh:askey:rt4230w_rev6 [2024/02/12 08:58] – external edit
Line 1: Line 1:
 ====== Askey RT4230W REV6 / RAC2V1K ====== ====== Askey RT4230W REV6 / RAC2V1K ======
- 
-{{page>meta:infobox:construction&noheader&nofooter&noeditbtn}} 
  
 {{media:askey:rac2v1k.png?100|RT4230W}} {{media:askey:rac2v1k.png?100|RT4230W}}
Line 9: Line 7:
 **WARNING:** Do not flash OpenWrt on this router if it's currently being rented from Spectrum. The stock FW has a dual partition layout for redundancy and flashing this image will wipe out both partitions and a partition with info for provisioning with Spectrum, so there will be no way to revert it back to stock. I tried backing up/restoring the original parts but it caused the ubi partition for overlay to become corrupted so settings would be cleared after a reboot. If you come up with a solution to safely backup and restore the router, please post it [[https://forum.openwrt.org/t/askey-rac2v1k-support/15830/|here.]] **WARNING:** Do not flash OpenWrt on this router if it's currently being rented from Spectrum. The stock FW has a dual partition layout for redundancy and flashing this image will wipe out both partitions and a partition with info for provisioning with Spectrum, so there will be no way to revert it back to stock. I tried backing up/restoring the original parts but it caused the ubi partition for overlay to become corrupted so settings would be cleared after a reboot. If you come up with a solution to safely backup and restore the router, please post it [[https://forum.openwrt.org/t/askey-rac2v1k-support/15830/|here.]]
  
-**Note:** Spectrum has a revision of this router that has no local web interface, a QR code on the back with SAC2V1K next to it, and the only way to change settings is through the My Spectrum app. This revision has a 256MB NAND chip but is otherwise identical. This image should work perfectly fine with that router but it's only been tested with initramfs so flash at your own risk. +**Note:** There's 5 different revisions of this router according to the extracted device trees. Only 2 have actually been seen in the wild and both work perfectly fine, one just has smaller flash. More info in the 'Different Revisions' section.
- +
-===== Experimental firmware ===== +
- +
-Experimental firmware and install instructions here: https://github.com/lmore377/openwrt-rt4230w/tree/master+
  
  
 ===== Hardware Highlights ===== ===== Hardware Highlights =====
----- datatable ---- +<!-- ToH: { 
-cols    ModelVersionsCPU, CPU MHz, Flash MB_mbflashs, RAM MB_mbram, WLAN Hardware, WLAN 2.4GHz, WLAN 5.0GHz, Ethernet Gbit ports_USB ports_ +  "source""json", 
-header  : ModelVersion,SoC,CPU MHz,Flash MB,RAM MB,WLAN Hardware,WLAN2.4,WLAN5.0,Gbit ports,USB +  "dom": "t", 
-align   c,c,c,c,c,c,c,c,c,c,c,c,c +  "paging": false
-filter  : Model~RT4230W +  "rotate"true
-sort    : Model +  "shownColumns"["model""version""cpu""cpumhz""flashmb""rammb""wlanhardware""wlan24ghz""wlan50ghz""ethernet1gports""usbports"]
-----+  "filterColumns"{"model": "^RT4230W$"} 
 +-->
  
 ===== Installation ===== ===== Installation =====
-/* stable release */ 
-/* uncomment once stable release is available 
----- datatable ---- 
-cols    : Model, Versions, Supported Current Rel, Firmware OpenWrt Install URL_url, Firmware OpenWrt Upgrade URL_url, Firmware OEM Stock URL_url 
-headers : Model, Version, Current Release, Firmware OpenWrt Install, Firmware OpenWrt Upgrade, Firmware OEM Stock 
-align   : c,c,c 
-filter  : Model=RT4230W 
----- 
-*/ 
  
 +OpenWrt firmware: [[https://firmware-selector.openwrt.org/?target=ipq806x%2Fgeneric&id=askey_rt4230w-rev6|https://firmware-selector.openwrt.org]]
  
-/* snapshot */ +For explanation of different imagessee [[docs:guide-user:installation:before.installation|FAQ before installation]].
-/* delete once stable release is available */ +
----- datatable ---- +
-cols    : ModelVersions, Supported Current Rel, Firmware OpenWrt snapshot Install URL_url, Firmware OpenWrt snapshot Upgrade URL_url, Firmware OEM Stock URL_url +
-headers Model, Version, Current Release, Firmware OpenWrt snapshot Install, Firmware OpenWrt snapshot Upgrade, Firmware OEM Stock +
-align   c,c,c +
-filter  Model=RT4230W +
----- +
-===== Tuning ===== +
-Enable Software flow offloading in Network > Firewall+
  
-This router has the same soc as the Netgear R7800, so thanks to [[https://forum.openwrt.org/t/r7800-performance/15780/29|this forum post]] and the device page for this:+==== Method 1: Installation over the network without serial access (Only works with non-SAC2V1K firmware) ==== 
 +Method 1 doesn't require opening the case and works with non-SAC2V1K firmware (exserial number beginning with A922 or AD31)**This method does NOT work with SAC2V1K firmware** (example of SAC2V1K firmware: router has QR code next to serial number sticker and has a serial number beginning with AD70 or AE32). Instead, use installation method 2 that requires disassembling the router to access the serial console.
  
-To reach peak performance, paste the following lines into System > Startup > Local Startup:+**WARNING: If you soft-brick your router, you will need to disassemble it to access the serial console in order to recover. You can use installation method 2 in that case.** 
 + 
 +Stock non-SAC2V1K firmware: https://github.com/Lanchon/rt4230w-rev6-stock-firmware 
 +==== Method 1A: Installation using web interface and SSH (only works with non-SAC2V1K firmware) ==== 
 +This is the recommended install method. It does not require setting up a TFTP server and thus is quick and easy, it produces full backups of the router, and it installs dual OSes: main and recovery. The recovery OS will run automatically if the main OS ever gets corrupted, for example due to an interrupted sysupgrade. It also configures the router to attempt a TFTP boot if both OSes are corrupt. 
 + 
 +Note that this method must be executed under the WSL (Windows Subsystem for Linux) if you are running Windows. 
 + 
 +See instruction here: https://github.com/Lanchon/openwrt-rt4230w-rev6 
 + 
 +==== Method 1B: Installation using web interface, SSH, and TFTP (only works with non-SAC2V1K firmware) ==== 
 +//Instructions were tested on Ubuntu 22.04 with RAC2V1K with a serial number beginning with AD31 and stock FW version 1.1.16, 1.1.31, 1.2.4// 
 + 
 +Download the OpenWrt initramfs and sysupgrade (squashfs) images for your router. Install and set up a tftp server (see [[docs:guide-user:installation:generic.flashing.tftp|install OpenWrt over TFTP]]). 
 + 
 +Connect a network cable between your computer and the blue (switch) port of the router. Configure your computer with static IP address ''192.168.1.2''
 + 
 +Login to stock router at ''http://192.168.1.1/'' with the default username and password (admin, admin). Then navigate to **Advanced > Admin > Configuration** page in the stock router web interface. Use **Restore from File** option and upload the corresponding config file from [[https://github.com/lmore377/openwrt-rt4230w/raw/master/RAC2V1K-SSH.zip|RAC2V1K-SSH.zip]] [[https://www.mediafire.com/file/2snxez1bdc5mp3i/RAC2V1K-SSH.zip/file|mirror RAC2V1K-SSH.zip]] file that corresponds to the stock firmware version of the router (from **Advanced > Status > System Information** page).  (If you're firmware is newer than what's in the zip file, just restore the latest file). 
 + 
 +The router automatically reboots. Afterwards, you can ssh into the router with the username for your firmware from the [[https://pastebin.com/raw/ub8Um4ug|Readme]]. You may need to include extra parameters for ssh to work, such as ''ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa technician@192.168.1.1'' 
 + 
 +From ssh, run these commands to configure a booting attempt via TFTP with fallback to stock firmware: 
 +<code> 
 +fw_setenv bootcmd 'set ipaddr 192.168.1.1; set serverip 192.168.1.2; tftpboot recovery.bin && bootm; bootipq' 
 +fw_setenv bootdelay 2 
 +</code> 
 + 
 +Rename the OpenWrt initramfs image file ''recovery.bin'', and host it with the tftp server. 
 + 
 +Reboot the router. The router will run as a TFTP client at ''192.168.1.1'' and connect to your computer at ''192.168.1.2'' to download and run the ''recovery.bin'' OpenWrt image from RAM. If you set up everything right, the router LED should switch over to a slow blue glow which means OpenWrt is booted and running in recovery (initramfs) mode. The recovery will have default web address ''http://192.168.1.1'' with user root, no password. You can ssh into it by running ''ssh root@192.168.1.1''
 + 
 +After you've confirmed your router is booted to OpenWrt in recovery mode, disable your computer's tftp server by running ''sudo ufw deny tftp'' 
 + 
 +ssh into OpenWrt and run this command to configure OpenWrt boot (autodetects flash size): 
 +<code> 
 +fw_setenv bootcmd 'set mtdids nand0=nand0; set mtdparts mtdparts=nand0:416M@0x2400000(mtd_ubi); ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm; set mtdparts mtdparts=nand0:220M@0x2400000(mtd_ubi); ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm' 
 +</code> 
 + 
 +Next, use the OpenWrt sysupgrade image file and upgrade to sysupgrade OpenWrt firmware (using luci, etc.). See [[docs:guide-quick-start:sysupgrade.luci|Upgrading OpenWrt firmware using LuCI]] 
 + 
 +The router will reboot and, if all went well, you'll now have OpenWrt running. The router will have default address ''http://192.168.1.1'' with user root, no password. 
 + 
 +==== Method 2: Installation using serial access and TFTP (works with all firmware versions) ==== 
 +Method 2: Install with serial access (Do this if something fails and you can't boot after using method 1) 
 +Open the router and connect to the serial console. Instructions can be found here: https://openwrt.org/inbox/toh/askey/rt4230w_rev6#opening_the_case 
 + 
 +Download the OpenWrt initramfs and sysupgrade (squashfs) images for your router. Install and set up a tftp server (see [[docs:guide-user:installation:generic.flashing.tftp|install OpenWrt over TFTP]]). 
 + 
 +Connect a network cable between your computer and the blue (switch) port of the router. Configure your computer with static IP address ''192.168.1.2''
 + 
 +Rename the OpenWrt initramfs image file to ''recovery.bin'', and host it with the tftp server. 
 + 
 +Interrupt U-Boot and run these commands to configure OpenWrt boot (autodetects flash size): 
 +<code> 
 +set bootcmd 'set mtdids nand0=nand0; set mtdparts mtdparts=nand0:416M@0x2400000(mtd_ubi); ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm; set mtdparts mtdparts=nand0:220M@0x2400000(mtd_ubi); ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm' 
 +set bootdelay 2 
 +saveenv 
 +</code> 
 + 
 +And run this command to boot once via TFTP: 
 +<code> 
 +set ipaddr 192.168.1.1; set serverip 192.168.1.2; tftpboot recovery.bin && bootm 
 +</code> 
 + 
 +The router will run as a TFTP client at ''192.168.1.1'' and connect to your computer at ''192.168.1.2'' to download and run the ''recovery.bin'' OpenWrt image from RAM. If you set up everything right, the router LED should switch over to a slow blue glow which means OpenWrt is booted and running in recovery (initramfs) mode. The recovery will have default web address ''http://192.168.1.1'' with user root, no password. You can ssh into it by running ''ssh root@192.168.1.1''
 + 
 +Next, use the OpenWrt sysupgrade image file and upgrade to sysupgrade OpenWrt firmware (using luci, etc.). See [[docs:guide-quick-start:sysupgrade.luci|Upgrading OpenWrt firmware using LuCI]] 
 + 
 +The router will reboot and, if all went well, you'll now have OpenWrt running. The router will have default address ''http://192.168.1.1'' with user root, no password. 
 + 
 +(Originally based on: github.com/lmore377) 
 + 
 +==== Installation of a recovery OS ==== 
 +An secondary recovery OS (an initramfs OpenWrt image) can be installed on this device. The recovery OS will run automatically if the main OS ever gets corrupted, for example due to an interrupted sysupgrade. 
 + 
 +See here for details: https://github.com/Lanchon/openwrt-rt4230w-rev6#install-a-recovery-image-if-you-installed-openwrt-through-any-other-method 
 + 
 +===== Basic configuration ===== 
 +-> [[docs:guide-user:base-system:start|Basic configuration]] After flashing, proceed with this.\\ 
 +Set up your Internet connection, configure wireless, configure USB port, etc. 
 + 
 +===== Specific Configuration ===== 
 + 
 +==== Network interfaces ==== 
 +The default network configuration is: 
 +^ Interface Name ^ Description        ^ Default configuration ^ 
 +| br-lan (eth1.1) | LAN & WiFi         | 192.168.1.1/24        | 
 +| wan (eth0.2)    | WAN                | DHCP client           | 
 +| vlan1 (eth1.1)  | LAN ports (1 to 4) | None                  | 
 +| vlan2 (eth0.2)  | WAN port           | None                  | 
 +| radio0          | WiFi 5G            | Disabled              | 
 +| radio1          | WiFi 2.4G          | Disabled              | 
 + 
 +==== Switch Ports (for VLANs)  ==== 
 + 
 +OpenWrt Switch port number 1 is the physical network port labeled Internet (WAN) on the device, numbers 2-5 are the Ethernet ports labeled 1-4 on the device, and number 0 and 6 are internal connections between the switch chip and the CPU (labeled "CPU" in LuCI). Use these //switch// port numbers when specifying a VLAN's ports via the UCI (i.e., in the ''ports'' option of a VLAN's ''config switch_vlan'' section, in ''/etc/config/network''). 
 + 
 +By default, ''eth0'' is used for traffic to/from the ISP and ''eth1'' is for traffic to/from the local network. 
 + 
 +^ Port             ^ Switch port   ^ 
 +| CPU (eth0)       | 0             | 
 +| WAN              | 1             | 
 +| LAN 1            | 2             | 
 +| LAN 2            | 3             | 
 +| LAN 3            | 4             | 
 +| LAN 4            | 5             | 
 +| CPU (eth1)       | 6             | 
 +==== Performance tuning ==== 
 + 
 +In **Network > Firewall > General Settings**, in section **Routing/NAT Offloading** enable **Software flow offloading**. 
 + 
 +**IMPORTANT:** The information below no longer applies to OpenWrt 23.05 (kernel 5.15.134). 
 + 
 +<hidden> 
 +Recent OpenWrt releases use the ''performance'' governor by default, obviating the need for further configuration and keeping the CPUs always at max frequency: 
 + 
 +<code> 
 +root@OpenWrt:~# cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor 
 +performance 
 +performance 
 +</code> 
 + 
 +(Also, the referenced sysfs files (''/sys/devices/system/cpu/cpufreq/ondemand/*'') no longer exist.) 
 + 
 +**OUTDATED INFORMATION FOLLOWS:**  
 + 
 +This router has the same SoC as the Netgear R7800, so thanks to [[https://forum.openwrt.org/t/r7800-performance/15780/29|this forum post]] and the device page for this: 
 + 
 +To reach peak performance, paste the following lines into **System > Startup > Local Startup**:
  
 <code> <code>
Line 56: Line 163:
 echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor     echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor    
 </code> </code>
 +</hidden>
  
 ===== Hardware ===== ===== Hardware =====
 ==== Info ==== ==== Info ====
-^ Architecture     | ARMv7 Processor rev 0 (v7l), arm_cortex-a15_neon-vfpv4 |+^ Architecture     | ARMv7 |
 ^ Vendor           | Askey | ^ Vendor           | Askey |
 ^ Bootloader       | U-Boot | ^ Bootloader       | U-Boot |
-^ System-On-Chip   | Qualcomm Atheros IPQ8065, 1.7GHz, 2 cores |+^ System-On-Chip   | Qualcomm Atheros IPQ8065, 1.7 GHz, 2 cores |
 ^ Flash-Chip       | NAND, Micron MT29F4G08ABBDA3W (Some devices have a different NAND but this one's common)  | ^ Flash-Chip       | NAND, Micron MT29F4G08ABBDA3W (Some devices have a different NAND but this one's common)  |
-^ Flash size       | 512 MiB |+^ Flash size       | 512 MiB NAND, 32 KiB NOR |
 ^ RAM              | 1024 MiB | ^ RAM              | 1024 MiB |
-^ Wireless         | Qualcomm Atheros QCA9984, 2.4GHz 802.11bgn, 5GHz a/n/ac | +^ Wireless         2x Qualcomm Atheros QCA9984, 2.4GHz 802.11bgn, 5GHz 802.11a/n/ac | 
-^ Ethernet         | 10/100/1000 Mbit/s |+^ Ethernet         5x 10/100/1000 Mbit/s |
 ^ USB              | 1x USB 3.0| ^ USB              | 1x USB 3.0|
 ^ Serial           | [[#Serial|Yes]] | ^ Serial           | [[#Serial|Yes]] |
-^ JTAG             |+^ JTAG             ¿ | 
 + 
 + ==== Different Revisions ==== 
 +**NOTE:** Some Spectrum wireless routers have similar outward appearance, but different internal hardware.  
 +  * Sagemcom RAC2V1S, RAC2VS2S, RAC2V2S (Broadcom SoC, not supported by OpenWrt as of 2022) 
 +  * [[inbox:toh:arris:tr4400_v2|Arris TR4400 v2 / RAC2V1A]] (has more difficult OpenWrt installation steps)
  
-==== Different Revisions ==== 
 It seems like Askey has 5 revisions of the same router based off of the device trees extracted from the original firmware. Here's a list of differences that are known. The reference revision is rev 6 since that seems to be the most common and that's the one development has been happening on. The most accurate way to get the revision is to run `cat /proc/device-tree/model` on the router over ssh or printenv in uboot with the serial console and match the machine ID to the revision. Firmware can vary and it looks like it doesn't usually correlate with the revision (For reference, the RAC firmware has a webui and can be rooted with a modified config file and the SAC firmware can only be controlled with the My Spectrum app and is completely locked down.) It seems like Askey has 5 revisions of the same router based off of the device trees extracted from the original firmware. Here's a list of differences that are known. The reference revision is rev 6 since that seems to be the most common and that's the one development has been happening on. The most accurate way to get the revision is to run `cat /proc/device-tree/model` on the router over ssh or printenv in uboot with the serial console and match the machine ID to the revision. Firmware can vary and it looks like it doesn't usually correlate with the revision (For reference, the RAC firmware has a webui and can be rooted with a modified config file and the SAC firmware can only be controlled with the My Spectrum app and is completely locked down.)
 <hidden> <hidden>
Line 80: Line 192:
 | REV 3            | ?        | 177b         | Has an extra led pin (gpio25) to lower the led brightness. There's two more ethernet aliases and the first two are almost identical. | Ethernet and the led may be buggy or completely broken but it should at least boot and WiFi should work. Has dual wan ports.| No | | REV 3            | ?        | 177b         | Has an extra led pin (gpio25) to lower the led brightness. There's two more ethernet aliases and the first two are almost identical. | Ethernet and the led may be buggy or completely broken but it should at least boot and WiFi should work. Has dual wan ports.| No |
 | REV 5            | ?        | 177c         | Has an extra led pin (gpio25) to lower the led brightness. Setting to high or low has no effect on rev 6. qca,ar8327-initvals has extra values in the device tree. | Mostly everything should work fine but the led may be a bit buggy. | No |  | REV 5            | ?        | 177c         | Has an extra led pin (gpio25) to lower the led brightness. Setting to high or low has no effect on rev 6. qca,ar8327-initvals has extra values in the device tree. | Mostly everything should work fine but the led may be a bit buggy. | No | 
-| REV 6            | 512MB    | 177d         | Reference Revision | | Yes | So far, this version has only been seen with the RAC firmware. |+| REV 6            | 512MB    | 177d         | Reference Revision | **Works with 22.03.x stable release** | Yes | So far, this version has only been seen with the RAC firmware. Has a serial number beginning with A922 or AD31.|
 | REV 10           | 256MB    | 177e         | Smaller flash. Missing usb3_dev_reset_quirk in device tree. | Seems to work fine. OpenWRT seems to automatically adapt to the smaller flash. | Yes | This version has been seen with both the SAC and RAC firmware. It also needs a slightly different bootcmd because of the smaller flash (bascally just replace 0x1A000000 with 0xDC00000)| | REV 10           | 256MB    | 177e         | Smaller flash. Missing usb3_dev_reset_quirk in device tree. | Seems to work fine. OpenWRT seems to automatically adapt to the smaller flash. | Yes | This version has been seen with both the SAC and RAC firmware. It also needs a slightly different bootcmd because of the smaller flash (bascally just replace 0x1A000000 with 0xDC00000)|
  
  • Last modified: 2024/05/08 05:29
  • by lanchon