Outdoor AP/CPE
→ Install OpenWrt (generic explanation)
Please add the installation procedure here for V2 and non-C devices.
The N2C-variation by default comes with a firmware that bugs out when attempting to upload a new firmware. This likely has something to do with the uploader being unable to extract kernel.image and rootfs.image to the filesystem root, where the upgrading script of this device looks for them. Working around this is fairly trivial, but somewhat risky - I have done four devices by this procedure, and none of them bricked, but there's no guarantee it might go awry for you. Double check every step you take. The only way to drop into the bootloader on these seems to be using the serial header, for which you have to open up the device. Only proceed if you're prepared to do this as a back-up plan.
Furthermore, given the hardware restrictions of this device, OpenWRT updates might be far and few between for this device, though I will look into what it takes to keeping the images up-to-date.
These instructions were written and executed on a (at the time) Debian Stable install running on the admin PC. Most commands should be similar in macos. On windows, it might be good to do this in the Ubuntu subsystem.
cat kernel.image | ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.57.10 "cat > /tmp/kernel.image"
cat rootfs.image | ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.57.10 "cat > /tmp/rootfs.image"
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.57.10
/usr/sbin
, like so:
cd /usr/sbin
ls /tmp
cat uploadFirmware.sh
flashcp -v /kernel.image /dev/mtd3 > /dev/console
and
flashcp -v /rootfs.image /dev/mtd2 > /dev/console
- If these lines are present, you are rocking the same stock firmware I am and you can proceed with caution.
./sysupgrade.sh
- it dinks out because we're using /tmp and pivot_root is not there, but it handily kills all most of the processes, which intuitively seems important. You might be able to skip this step, but I didn't, and judging from the contents of this script, it really can't do harm so long as there are no .image's in the filesystem root
./flashcp -v /tmp/kernel.image /dev/mtd3
to write the kernel image to the mtd3 block device. Writing the firmware will be done faster than erasing.
./flashcp -v /tmp/rootfs.image /dev/mtd2
to write the rootfs image to the mtd2 block device. This will take a bit longer than the kernel. Furthermore, it's going to verify to 100% and then yell at you with a 'Bus Error'. That's probably happening because it's dropping back into the shell and trying to execute code that isn't memory resident. I would've done more research but I needed some functional access points in a pinch.
ssh root@192.168.1.1
- set your
passwd
and have blast with the web interface at http://192.168.1.1/
alfa_nx_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)