How to load #OpenWRT Custom Firmware on CISCO #Meraki M42 WiFi #Router

Krishnendu Paul

Oct 17, 2021 3 min read


So, seems like you are having an idle non-used CISCO M42 router sitting with you which you may received as test device from CISCO or may be some company dumped old hardwares. So, licenses to manage all those are expired - and without meraki license , you can not use it as individual wireless router or access point ! Am I right ? So, lets dig into details how you can use your idle CISCO MR42 device again in optimul way.

Following are the hardware specification of CISCO Meraki 42 wireless router.

Hardware

Info

Architecture Arm v7
Vendor Cisco Meraki
Bootloader U-Boot
System-On-Chip IPQ8068
CPU/Speed 1.4 GHz
Flash size 128 MB
RAM 512MB
Wireless 2x QCA9992, 1x QCA9889
Ethernet 1x AR8033 (PoE input)
Serial Yes - not populated
JTAG Yes - not populated

So, it seems like it can run OpenWRT operating system on your MR42. So - lets begin.

List of Items Required :

  1. A Desktop or Laptop with network port on OS Windows 10.
  2. Download your preferrable TFTP server for Windows. My choice TFTPD64
  3. Download m42_u-boot.mbn
  4. Download openwrt-ipq806x-generic-meraki_mr42-initramfs-fit-uImage.itb
  5. Save both of the files in a folder. ( In my case c:\MR42\tftp )
  6. A network cable to connect system with the router.

And you are ready to start. 1st install TFTPD64 and point source folder to your folder where you saved both files. and then choose your network connection to router as server interfaces.

Connect the cable to the router and other end to your desktop/laptop. Don't plugin the power cable of the router yet. Set your IP to 192.168.1.250 and set TFTPD Server interface to that. Then take a pin and press it to reset hole - don't leave it yet.

Now, without releasing the reset pin - power on the router, router will power on with orange light, press hold until orange light is blinking. When it start blinking - use telnet and connect to 192.168.1.1. Run the following commands to install u-boot on telnet prompt after connecting.

cd /tmp
tftp-hpa 192.168.1.250 -m binary -c get mr42_u-boot.mbn
echo 1 > /sys/devices/platform/msm_nand/boot_layout
mtd erase /dev/mtd1
nandwrite -pam /dev/mtd1 mr42_u-boot.mbn
echo 0 > /sys/devices/platform/msm_nand/boot_layout

In this phase, it will show following output on shell prompt.

Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000

If not, check your TFTP server settings, firewall blocks etc and then retry those commands again until you are getting those reply. But, don't reboot the router yet.

Once you see all those above output, type following commands ( optional ) to remove meraki OS partitons.

for i in diagnostic1 part.old storage part.safe ; do ubirmvol /dev/ubi0 -N $i done

Once you are sure the image has been written you can proceed to power off the device and wait for few seconds. Don't stop your TFTPD server yet - as it is very important step. Then hold the reset button again and power on the device and release reset button immidiately this time. This will immediately begin downloading the appropriate initramfs image and boot into it. Once it is booted - you can see a static white light. Or else try this part till you see static white light. It takes around 20-30 seconds to boot.

Once you get static white light on router, open your browser and point to 192.168.1.1 . It will open OpenWRT login page - as it is not configured yet - password is blank. So, pass the login page and Goto system  --> Backup/Flash Firmware. Download updated firmware from here - https://github.com/bidhata/mix/blob/master/openwrt-ipq806x-generic-meraki_mr42-squashfs-sysupgrade-20210515.bin

Then choose the firmware from OpenWRT interface and upgrade the router openwrt from web interface. And .... voila.

You now have a fully working advance OpenWRT based wireless router. It is till now very stable and good storage to download openwrt applications.

There is another method using UART , but in that case you need to disassemble the router . But, better to try soft method before going to UART. Hope - you get your fully working CISCO Meriaki Openwrt enabled MR42 router now.

Image courtery - Openwrt forum



Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.