Alfa AP120C LEDE Upgrade

Recently purchase an Alfa Network AP120C since it appeared to be supported by LEDE. https://lede-project.org/toh/hwdata/alfanetwork/alfanetwork_ap120c

I downloaded the lede-17.01.0-r3205-59508e3-ar71xx-generic-alfa-ap120c-squashfs-sysupgrade.bin image as that is the only available package on the LEDE site. The upgrade failed from the native Alfa firmware's web interface. No factory .bin image exists.

The error is: The image /tmp/lede-17.01.0-r3205-59508e3-ar71xx-generic-alfa-ap120c-squashfs-sysupgrade.bin being stripped from protective header fail !! Error Code[256]

Reading OpenWRT it appears the there is an upgrade method via console using boot and tftp. OpenWRT also has root and boot filesystem images but I am concerned that the instructions are very limited and suggest issues.

Does anyone have a comprehensive way to upgrade this AP to LEDE. I have lots of background with Cisco Networking and RHEL Linux (certified) so not afraid of command line, tftp loads, etc.

Any help or insight would be appreciated.

Thanks,
Jeff R.

The OpenWrt wiki suggests that the only way to install LEDE on this particular router would be via u-boot/ tftp.

Thanks for the reply. That is what I read as well at https://wiki.openwrt.org/toh/alfa.network/ap120c

So the commands from console are:
#rootfs
tftp 0x80060000 openwrt-ar71xx-generic-db120-rootfs-squashfs.bin;erase 0x9f050000 +5E0000;cp.b 80060000 0x9f050000 $filesize
#kernel
tftp 0x80060000 openwrt-ar71xx-generic-db120-kernel.bin;erase 0x9fd50000 +110000;cp.b 80060000 0x9fd50000 110000

I assume I will need to get the rootfs and kernel from OpenWRT since those files don't exist in the Lede download area.

The Wiki link above has very little information but says under interface that "The network is not working at the moment".

Sounds like there are some major issues. Has anyone performed this UBOOT download? Also, assuming I do this, does this position me to install the sysupgrade binary file from Lede.

There seems to be very little information on how to proceed. Any information would be appreciated.

Thanks,
Jeff R.

Anyone have any insight or should I not bother with attempting to upgrade the Alfa AP120C given the sparse documentation?

Ping me please next week, I have this device here (currently bricked, I need to re-flash it), will try to help you and eventually fix support for it if it's broken.

Sounds great. Would definitely appreciate the assistance as I would prefer not to flash the rootfs, etc. via TFTP with the OpenWRT images if that breaks wireless/networking unless that just paves the way to flash the sysupgrade image.

Please keep me posted.

Sorry for late reply. I managed to fix my board and flash LEDE snapshot on it, you can follow below instruction:

Make sure you have selected booting from firmware A in vendor GUI

By default, vendor GUI should be available on 192.168.11.1 (login/password: admin/admin).
On serial console, during early stage of booting process (U-Boot) you should see something like below (important lines: "Current Image was A" and "## Booting image at 9fd50000"):


[...]
    
[eapsw_watchdog::status] cold start
[eapsw_watchdog::status] boot normally 
[eapsw_watchdog::status] autoswitch enabled=On , times=None 
Current Image was A 
In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...

[...]

## Booting image at 9fd50000 ...
   Image Name:   Linux Kernel Image
   Created:      2014-10-14   3:25:40 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    927620 Bytes = 905.9 kB
   Load Address: 80002000
   Entry Point:  801edab0
   Verifying Checksum at 0x81000040 ...OK
   Uncompressing Kernel Image ... 

[...]

Download and flash LEDE image from TFTP server

  1. Check TFTP IP server in U-Boot with: printenv serverip command (on my board it's 192.168.100.11).
  2. Setup TFTP server on your PC (with static IP from previous point, 192.168.100.11/24 in my case).
  3. Make image lede-ar71xx-generic-alfa-ap120c-squashfs-sysupgrade.bin available to download from configured TFTP server.
  4. Interrupt booting process in U-Boot and issue below commands:

tftp 0x80060000 lede-ar71xx-generic-alfa-ap120c-squashfs-sysupgrade.bin
erase 0x9f050000 +0xe80000
cp.b 0x80060000 0x9f050000 $filesize
reset

Example output from a successful update:


EAP9112A> tftp 0x80060000 lede-ar71xx-generic-alfa-ap120c-squashfs-sysupgrade.bin

Trying eth0
Using eth0 device
TFTP from server 192.168.100.11; our IP address is 192.168.100.46
Filename 'lede-ar71xx-generic-alfa-ap120c-squashfs-sysupgrade.bin'.
Load address: 0x80060000
Loading: *#################################################################
 #################################################################
 [...]
 #####
done
Bytes transferred = 15001125 (e4e625 hex)
EAP9112A> erase 0x9f050000 +0xe80000

Erase Flash from 0x9f050000 to 0x9fecffff in Bank # 1 erase flash#0

First 0x5 last 0xec sector size 0x10000

Erased 232 sectors
EAP9112A> cp.b 0x80060000 0x9f050000 $filesize

Copy to Flash... write flash#0
write addr: 50000
done
EAP9112A> reset


Resetting...

And that's all, if everything goes well, you should have LEDE on board :slight_smile:

1 Like

I greatly appreciate you taking the time to document this process.

Once it is installed, after booting the Lede firmware does anything special wireless configuration need to be created by editing files from the command line or does the wireless configuration show up in the web based GUI?

Thanks again,
Jeff

WiFi works just fine but it turned out that sysupgrade is broken for this board, I will fix it.
Just remember, if you need GUI, install release image. In case of snapshot image, you would need to install LuCI manually as it's not included by default.

Worked perfectly. Added some packages like SQM QOS to address buffer bloat and SNMPD.

Thanks again for the great documentation.