HW mods to install OpenWRT on Asus RT-AC58U

A couple of small hardware mods are required before getting started with the software. If after soldering the serial port connector it doesn’t seem to receive your input, this article will help you.

These are the first installation instructions from openwrt.org (original instructions in the git commit):

  • Open the case of the router, as described in the Opening the case section.
  • Connect a serial cable, as described in the Serial section. This requires soldering a pin header on the router PCB.
This is how the serial port will look like.
  • Connect an Ethernet cable to one of the four LAN-ports (yellow).
  • Open a serial terminal program and connect to the port used for the serial connection to the router.
  • Power on the router. The serial terminal will show the bootloader messages and after a few seconds will come to a menu with several options. Select here option #1 for loading a new firmware into RAM. The selection has to be done within 3 seconds, otherwise the router will continue its normal startup; in case of missing this short timeout, just restart the router.

If you managed to select the mode, you can go ahead and continue with https://openwrt.org/toh/asus/rt-ac58u#installation

Problems? Some times, the commands are not received by the router and you cannot select the boot mode

This is due to a (tiny) voltage divider that you can find in the bottom side of the PCB. Too much current is required in order to drive it and some USB-to-serial ICs can not supply it.

Voltage divider in the RX pin.

The (quick) solution is to remove the top one, leaving only the one in series with the input buffer.

Now you can continue your path towards a more feature-rich and safe router!

Restart VPN Server automatically

If your ISP forces you to reconnect or you any other cause hangs the server, this small script can be added to your crontab as:

* * * * * /scripts/restart_ovpn
if ! ping -c 1 &> /dev/null
  echo $(date '+%Y-%m-%d') >> /root/ping_failures.txt
  ifdown lan             
  service openvpn restart
  sleep 10
  ifup lan