How to flash Ubiquiti Bullet M2 with OpenWRT

Last Updated on May 30, 2019 EDT by Jordan

This article will guide you through the steps of flashing your newly purchased Ubiquiti Bullet M2 with OpenWRT. Now I am actually flashing my Bullet M2 for a second time, I set the transmit power too high and it won’t boot up. The instructions below are pretty much from a re-flashing perspective.

Finding the right OpenWRT Firmware

You don’t need the AirOS firmware as you will be using the OpenWRT firmware. There isn’t any official packages from the OpenWRT for the Bullet M2. You can download nightly builds from their trunk. Here is a location that seems to be building images for the Bullet M2:

http://wifi.ozo.com/airo/openwrt/firmware/kamikaze/2.6/ar71xx

The following forum posts shows proof that the firmware boots on the device.

https://forum.openwrt.org/viewtopic.php?id=21970

Getting into Firmware Recovery Mode

This part is rather easy, you can follow the instructions on Ubiquiti Networks website. Here’s the simple rundown, and you can complete this using Windows/Mac/Linux.

1. You need a TFTP client, you can use a GUI or you can used the built in OSX or Linux utility.

2. Set you network card to the following network IP Address: 192.168.1.254, Subnet Mask : 255.255.255.0

3. Plug the Bullet M2 into your network card.

4. Begin by depressing the reset button. Keep holding, then power the unit on. Wait 8 seconds then release the button (if you want to reset the unit to factory defaults, wait at least 15 seconds). Signal LEDs will be lit indicating that the device is ready for recovery

5. Make sure that AirOS device responds to pings, ping 192.168.1.20 if it does not, go back to the first step.

6. Upload firmware image file .bin to 192.168.1.20, using a TFTP client software (binary mode).

7. Signal LEDs will keep blinking one by one in 4 different colors during firmware upgrade. Wait for about 7-10 minutes (devices and firmware depending) – do not power off the device during the procedure!

You’re done!

Setting up OpenWRT on the Bullet M2

When you flash OpenWRT on the Bullet M2, it will be available on the IP Address 192.168.1.1 using telnet without a password. First lets secure the device and type “passwd” and set a root password.

root@OpenWrt:/# passwd
Changing password for root
New password:
Bad password: too weak
Retype password:
Password for root changed by root
root@OpenWrt:/#

Secured! Telnet will be disabled and SSH will now be enabled so remember you can only SSH in using “root” past this point.

There isn’t much you can do at this point, since you’ve flashed the micro version of the firmware. There is no web interface (Luci) or anything of real use, so we need to install some packages.

So we will need to give the Bullet M2 some sort of internet access, you can also just upload and install packages via SCP but I don’t really like that so much. The best way is  the following method.

With the Bullet connected to ethernet port, SSH/Telnet in and run “udhcpc -i br-lan”. You will get disconnected, but if you do a “tcpdump -i en0” you should see DHCP requests coming from the Bullet, which will continue until it gets a DHCP lease or until you power the device off. Now all you need to do is plug the Bullet into your router and viola! It will grab an IP, you just need to login to your router and check the DHCP leases and you should see the Mac for the Bullet with an IP.

You should now be able to SSH into the Bullet with its new IP Address it got from your router’s DHCP server!

Now lets install some packages, but we will first update opkg!

root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Inflating http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/snapshots.

Lets install Luci so we can access the OpenWRT Web Interface:


Did you like this article?