11
Deploying prplMesh on Axepoint or NEC AX3000HP
Maarten De Decker edited this page 2022-06-01 14:53:27 +00:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[[TOC]]

Axepoint

Variants

There are at least two variants of the Axepoint. The one that uses an A1 chip is known to be working for wireless backauls, while the A0 variant doesn't.

You can check which chip your device is using by running: cat /proc/net/mtlk/wlan0/eeprom_parsed For an A1 chip, the output should contain '0x910': HW ID : 0x1a30,0x910,0x0,0x0

Flashing via bootloader

This approach works both with the original UGW firmware and after the upgrade to prplWrt.

Setup

  • Connect a USB cable to the microUSB port on the front. Open a serial console (microcom, picocom, ...) on this port (normally /dev/ttyUSB0).
  • Connect a network cable to one of the 4 LAN ports.

Flow

  1. Set your computer ip to static 192.168.1.2 / 255.255.255.0 no gw
  2. Start TFTP server
  3. Drop the generated full image file from your build into the TFTP server's folder. If required, change the file mode bits of the file so the TFTP server can read an serve it (example: sudo chmod 777 /tftpboot/AX3000_1600_ETH_11AXUCI-squashfs-fullimage.img)
  4. Power up the Axepoint
  5. On the target (in the serial console), stop it in u-boot (press enter 5-10 sec after power on, when it tells you "Hit any key to stop autoboot")
  6. On the target execute: setenv fullimage AX3000_1600_ETH_11AXUCI-squashfs-fullimage.img
  7. On the target execute: setenv ipaddr 192.168.250.173
  8. On the target execute: setenv serverip 192.168.250.199
  9. On the target execute: saveenv
  10. On the target execute: run update_fullimage
  11. On the target execute: reset

Make sure to adapt the IP addresses and image name to your configuration. Steps 6 to 9 don't need to be repeated when you've done them once.

Other configuration

Resizing the overlay

The default configuration of the axepoint has an overlayfs which is rather small, and a lot of free space in the flash. Because of this, there is not enough space to re-install prplmesh. To make more space available in the overlay, use the following steps.

Note: this will remove all your customizations

  1. Power up the axepoint with a serial port console connected.
  2. When the message "Press the [f] key and hit [enter] to enter failsafe mode" appears, press f and enter.
  3. Run "ubirmvol /dev/ubi0 -N rootfs_data"
  4. Run "ubimkvol /dev/ubi0 -N rootfs_data -s 120MiB"
  5. Reboot.

Disable the firewall

By default, a firewall is enabled that, among other things, blocks ssh access. The easiest is to disable the firewall entirely:

/etc/init.d/firewall disable
/etc/init.d/firewall stop

NEC AX3000HP

The NEC AX3000HP is a platform based on Intel Axepoint, and so instructions will generally be similar for prplMesh on Axepoint and prplMesh on Nighthawk RAX40 (another Axepoint-based platform). If something is not mentioned here, consult these other pages for hints on how to proceed.

Hardware

Power supply

The device comes with a Japan-specific (100V) power supply.

It's possible to buy compatible power supplies that work with your local power sockets and voltages by looking for one with the same barrel connector (probably it's an EIAJ-04 plug, but this hasn't been confirmed):

connector_measurements center_pin barrel_length

Here are the specifications of a compatible power supply (not exactly the same as the one that comes with the device): 12V, 5A output. Probably a lower current is sufficient.

power_supply_specs

Building and running

Pinout

  • The pinout and location for the UART connector is attached. It says: “PWR GND ____ TX RX”

image001

Flashing a new uboot version

image2020-11-2_15-6-35

  1. First, short the pin highlighted in red in the picture above (shorting that pin while booting the device will make the device print "UART" instead of the uboot output.)
    NOTE: do not solder the short permanently unless after reboot device will go back to UART (no UBOOT)

  2. Next, copy the u-boot-gphy.asc file in your clipboard.

  3. Paste the content through the program you use to communicate with the device (screen, tio, minicom, ...).

  4. You should now get a new uboot prompt.

  5. Next, copy 'u-boot-nand_asurada.bin' to the root of your tftp server and name it u-boot-nand.bin.

  6. Give your tftp server the IP '192.168.1.10' (or whatever value the device has for 'serverip').

  7. At the u-boot prompt, enter: run update_nandboot.

Flashing a debug version of UGW:

  1. Copy the ugw debug fullimage to the root of the tftp server and name it 'fullimage.img' (or alternatively, change the value of 'fullimage' in u-boot). 2.At the u-boot prompt, enter 'run update_fullimage'.
  2. Power cycle the device (just using 'reset' won't work).
  3. Login on the device, using "admin" as the user, and "admin" as the password.
  4. Remove the overlay completely: rm -rf /overlay.
  5. Next, you can build and flash prplwrt.

Flashing prplwrt and deploying prplMesh

  1. Copy the fullimage for the NEC device ("AX3000_1600_ETH_11AXUCI_ASURADA-squashfs-fullimage.img") to the root of your tftp server, and name it "fullimage.img".
  2. Boot the device, stop it at the uboot prompt. 3.At the u-boot prompt, enter 'run update_fullimage'.
  3. Wait for the device to be flashed, then reboot it.

The prplMesh version that comes with prplwrt will not be the latest one. Use the prplmesh ipk you built from the prplMesh repository to update it.

On the device, run:

  1. opkg remove prplmesh-dwpal
  2. opkg install <path_to_the_new_ipk>

To check if prplMesh works, do:

  1. /etc/init.d/prplmesh certification_mode controller
  2. wait for 60 seconds
  3. /opt/prplmesh/scripts/prplmesh_utils.sh status

This should return the following output:

/opt/prplmesh/scripts/prplmesh_utils.sh: status
5018 /opt/prplmesh/bin/beerocks_agent
5025 /opt/prplmesh/bin/beerocks_fronthaul
5027 /opt/prplmesh/bin/beerocks_fronthaul
5012 /opt/prplmesh/bin/ieee1905_transport
executing operational test using grep on log files
OK Main agent operational
OK wlan0 radio agent operational
OK wlan2 radio agent operational

Troubleshooting

Corrupt system_sw UBI partition (error 22)

It was reported that in some cases, the system_sw partition can get corrupted.

In that case, ubi part system_sw reports:

ubi0: attaching mtd1
UBI init error 22

If this happens, download this dump from the system_sw partition and u-boot-nand_asurada.bin to the root of your tftp server.

Next, follow these steps:

1.	Go to uboot prompt.
2.	Next, copy 'u-boot-nand_asurada.bin' to the root of your tftp server and name it u-boot-nand.bin.
3.	Give your tftp server the IP '192.168.1.11' (or whatever value the device has for 'serverip').
4.	At the u-boot prompt, run the below commands : 
a.	To get eth address - p ethaddr
b.	run update_nandboot
c.	run reset_uboot_config
d.	re
e.	press any key to get uboot prompt
f.	set your serverip  setenv serverip 192.168.1.11;save
g.	set ethaddr  setenv ethaddr <eth addr>;save [ eth addr => got from step a]
h.	Copy the ASURADA image to the root of the tftp server and name it 'fullimage.img' (or alternatively, change the value of 'fullimage' in u-boot). 
i.	run update_fullimage
5.	To fix Corrupted system_sw UBI partition 
a.	download this dump from the system_sw partition to the root of your tftp server
b.	goto uboot prompt and run 
i.	nand erase.part system_sw; tftp ${loadaddr} system_sw.dump; nand write ${loadaddr} 0x002c0000 ${filesize}; ubi part system_sw
c.	Then, use run update_fullimage flash a new image like in the instructions above.

UCI settings not saved after reboot

If UCI settings are lost after a reboot, check that the overlay partition exists and is working.

Specifically, looks for these specific lines in the kernel logs:

[   12.043919] UBIFS error (ubi0:4 pid 609): ubifs_iget: failed to read inode 66, error -22
[   12.051993] UBIFS error (ubi0:4 pid 609): ubifs_lookup: dead directory entry 'upper', error -22
[   12.060666] UBIFS warning (ubi0:4 pid 609): ubifs_ro_mode.part.0: switched to read-only mode, error -22

If you get similar errors the UBI partition is corrupted, follow Corrupt system_sw UBI partition (error 22) to fix it.