Skip to content

Instantly share code, notes, and snippets.

@krusic22
Last active February 4, 2023 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krusic22/27db703adf730b1219bf1910f9d373b2 to your computer and use it in GitHub Desktop.
Save krusic22/27db703adf730b1219bf1910f9d373b2 to your computer and use it in GitHub Desktop.
AP400i installation

0. Connect to the device

Plug your computer into LAN2 (1000Mbps connection required). If you are forced to use the LAN1/POE port, set your computer to force a 100Mbps link.

Connect to the device via TTL (Serial) 115200n8. If the image is long gone, locate the header (or solder pads) labeled 9X, near the Ethernet jacks/transformers. There should be an arrow on the other side of the header marking. The connections should go like this (from the arrow to the 9X text): NC - TXD - GND - RXD - NC


1. Prepare for installation

While the AP is powering up, interrupt the startup process by pressing any key. MAKE SURE TO CHECK YOUR CURRENT PARTITION!

If you see: Current Partition is : partB or Need to switch partition from partA to partB, you have to force the device into partA mode, before continuing. This can be done by changing the PKRstCnt to 5 and resetting the device.

setenv PKRstCnt 5 saveenv reset

After you interrupt the startup process again, you should see: Need to switch partition from partB to partA

You can now continue to the next step.

If you see: Current Partition is : partA you can continue to the next step.


2. Prevent partition switching.

To prevent the device from switching partitions, we are going to modify the startup command. set bootcmd "setenv PKRstCnt 0; saveenv; bootipq" setenv


3. First boot

Now, we have to boot the OpenWRT intifs. The easiest way to do this is by running Tiny PXE server on your Windows computer. You can also use tftp.

Run bootp this will get an IP from the DHCP server running on your computer and possibly the firmware image. If it doesn't download the firmware image, run tftpboot. Now run bootm to run the image.

You might see: "ERROR: new format image overwritten - must RESET the board to recover" this means that the image you are trying to load is too big. Use a smaller image for the initial boot.


4. Install OpenWRT from initfs

Once you are booted into OpenWRT, transfer the OpenWRT upgrade image and use sysupgrade to install OpenWRT to the device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment