Installing Cucumber on Cisco Meraki MR18

Before we get started, we need to thank OpenWRT and in particular  riptide_wave who did the work to enable OpenWRT on Meraki. You're all awesome! We'll buy you all a beer when you come to London.

This is a One-Way Road.

Read the full guide before proceeding and make sure you understand the implications of the flash commands. Any error is likely to brick your device. 
At this time there is no way to recover from a bricked Meraki short of desoldering the SOIC and reprogramming.

If anything goes wrong during the flash you will need access to console cable into the board to recover it. 

For the duration of this flashing process, keep this page open for reference.

If you don't want to use Cucumber to manage it, you're free to use OpenWrt instead.

If you get stuck at any point, feel free to ask in our  discuss forums

Sign-up

To create a free account with Cucumber,  sign-up here.

Handy Links


Setting up

Before you get started you will need to ensure you have the following:

  • MR18 (firmware build T-123302-gfc0d5962-aachary)
  • UART adapter
  • Computer connected to MR18 via Ethernet
  • Webserver app (e.g Python)
  • A Phillips or a Start screwdrivers ( we've found two different screws )
  • Remove the 4 Pads from the back of the AP and you will reveal the screws that are holding it together. Unscrew them and take the metal plate off.
  • Cucumber account
  • Copy of the initramfs image

Flashing:

1

In the directory that you have stored the Cucumber MR18 firmware, initialise your webserver. In this example, we are going to use python:

python -m SimpleHTTPServer
	

You should see an output similar to the following, make sure to take note of the port it is running on:

Serving HTTP on 0.0.0.0 port 8000 ...
	
2

Connect UART to your MR18 with the following settings:
- Speed: 115200
- Pinout (left to right): VCC/RX/TX/GND ( Make sure you don't use the VCC - far left pin )

3

Connect Ethernet cable between your computer and MR18, and set your computer's IP to 192.168.1.2

4

Open UART console, then hold down "s" while you power the unit on. Wait holding, and you will be put into a root shell.

If you are unable to get the root shell, follow this  workaround . After you have done this, reboot the AP and do step 4 again.

5

Now we need to run the following command:

cat > /storage/root.sh
	

This will bootstrap the rootfs filesystem.

6

You will see an empty console window. Copy and paste in the following script:

#!/bin/sh
ROOTFSMTD=$(cat /proc/mtd | grep -e "-1\"" | grep rootfs | awk '{ print substr($1, 4, length($1)-4) }')
if ! test -f /MERAKI_ARCH ; then
	# Mount new root
	mkdir /rootfs
	mount /dev/mtdblock$ROOTFSMTD /rootfs
	# Set up special filesystems
	mount -t devtmpfs dev /rootfs/dev
	mount -t proc proc /rootfs/proc
	mount -t sysfs sys /rootfs/sys
	mount -t tmpfs tmp /rootfs/tmp
	# Mount storage
	mount -t ubifs /dev/ubivol/storage /rootfs/storage
	# Switch to new root and continue execution
	cp "$0" /rootfs/tmp/root.sh
	busybox chroot /rootfs sh /tmp/root.sh
else
	# Setup network
	ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
	# Give ourselves a shell
	sh
fi
	
7

Once the code is added, exit back to the command prompt by pressing "CTRL + C" and run the following to run the script:

chmod +x /storage/root.sh
	
/storage/root.sh
	

You will find yourself back at the root prompt, but with working network connectivity.

8

Now we need to run the following command to flash the initramfs image to your MR18, making sure to replace the port with the port that your server is running on.

wget http://192.168.1.2:8080/openwrt-ar71xx-nand-mr18-initramfs-kernel.bin -O /storage/openwrt.bin
	
dd if=/storage/openwrt.bin of=/dev/mtdblock2
	

If both commands above complete without error, then you have successfully flashed the  initramfs image.

To boot initramfs, unplug the power from your MR18, hold down "2" and power on your MR18.

9

With initramfs running, brows to http://192.168.1.1 ( Make sure you enable DHCP on your laptop/MAC ethernet card ) to access the LuCI interface and log it with the username root and no password.

10

Login and go to the System Upgrade tab, selecting the downloaded Cucumber image. Then de-select the save config option, and confirm the upgrade.

After a short while you should notice the AP broadcasting a _Cucumber SSID, signalling a successful flash.