You are here

Installation Instructions for Mikrotik Devices

14 posts / 0 new
Last post
WU2S
WU2S's picture
Installation Instructions for Mikrotik Devices


Installation Instructions for Mikrotik Devices


Download the Mikrotik .bin and the .elf file from downloads.arednmesh.org location:

  •  elf  :  this is the image to boot the mikrotik device with.  It only uses RAM on the device (which is lost with a power cycle and still boots with Mikrotik OS)
  • .bin :  once the device is booted with the .elf image and running,  you copy this up to /tmp and type a command that will update the flash with AREDN, so it then boots AREDN on a power cycle.
 
The procedure is very different and it is the opposite of a ubiquity installation.  Opposite in that with Ubiquiti, the device is a tftp server and you run a tftp client on your laptop to send up the image.  With Mikrotik, the device is a tftp client and you have to configure and run a tftp server (also dhcp and bootp server)  on your linux or windows machine.    This is all done by a program called dnsmasq (it has all 3 servers).  
 

Linux procedure:

 
  1. Create a directory on your laptop /tftp and copy down the mikrotik .elf image
  2. Rename this image to rb.elf
  3. Set your laptop to static IP address 192.168.100.10
  4. Become root to execute the dnsmasq command in step 5 
  5. Figure out what your network card interface name  is with an 'ifconfig'  ('ipconfig' on windows.)    this is the interface you set to 192.168.100.10.  replace the name of the interface in the following command from "eno1" to what ever yours is.   replace your typical log in name in the command from 'joe' to whaterver you log with:
     

    Command Line Example:

    dnsmasq -i eno1 --dhcp-range=192.168.1.100,192.168.1.200 --dhcp-boot=rb.elf --enable-tftp --tftp-root=/tftp/ -d -u joe -p0 -K --log-dhcp --bootp-dynamic
  6. Connect the Mikrotik device with your laptop ideally through a dump switch.   Although, you may be able to connect them direct
  7. Push the reset button on the mikroti, then power it on.  Hold the button until you see output log information from the laptop window where you ran the dnsmasq command, around 20 seconds.  Let up the button as they start communicating.   When you see the "sent" message, this is success and the mikrotick has downloaded the image and will reboot. 
  8. After the image is sent, as show in the dnsmasq log, you need to <ctrl>C or kill dnsmasq.  
  9. The node has booted AREDN,  it looks like a firstboot, but no settings can be saved.   Don't bother with the browser and trying to configure it.  It is in a mode where you have to load the image to the devices' flash now. 
  10. Change your laptop back to DHCP mode to obtain an address from the mesh node, after it boots.   You should be able to "ping" it at 192.168.1.1.  If this doesn't work, then something isn't right. Don't proceed until you can ping it.
  11. Now log into the device, "telnet 192.168.1.1"   user = 'root' password = 'hsmm'. 
  12. Copy up the .bin file.    typically this is done, "scp -P 2222  <the .bin file name>   root@192.168.1.1:/tmp/rb.bin
  13. Type the following command in the telnet window on the device:   "sysupgrade -n /tmp/rb.bin"    wait for it to reboot, now it has AREDN installed and you can go in and set it up.  Be sure to renew your IP address after it reboots.  


 

 

 
WU2S
WU2S's picture
Installing using Windows

I just uploaded a short presentation on installing AREDN firmware using Windows that might help other local hams get started.

K9CQB
K9CQB's picture
Great presentation - very detailed

Randy,
This is one of the most detailed presentations I've seen. I do my MikroTik flashing with Ubuntu and I do Ubiquiti flashing on my MacBook's OSX, but after going through your presentation I could do it on Windows in a snap. Thank you.
On a side note I noticed your marketing abilities when I saw the "Emergency PrepAREDNess" title on the slide. We should all use that in our presentations.

-Damon K9CQB

WU2S
WU2S's picture
Emergency PrepAREDNess

Thanks but full credit goes to Darryl K5DLQ for creating that slogan. It is catchy, isn't it?

K6CCC
K6CCC's picture
This procedure worked!

I'm happy to note that I followed these instructions, and an AREDN installation went perfectly on brand new RB952Ui-5ac2nD (hAP AC Lite) - at least when I didn't miss a step in the procedure.

WU2S
WU2S's picture
Congratulations on your successful installation

And thank you for confirming that the instructions are correct.

K9CQB
K9CQB's picture
Yeah, well done, Darryl.

Then kudos to ​Darryl K5DLQ. I'm using that "Emergency PrepAREDNess" slogan in every presentation I do. 

-Damon K9CQB

WU2S
WU2S's picture
Oops - a correction

My ancient memory has failed me. My apologies to Andre K6AH who came up with the idea first and to Darryl K5DLQ who refined it.
If you care as passionately about the use of AREDN mesh networking for emergency communications as they do, please feel free to use our slogan in your presentations.

K6AH
K6AH's picture
The original slogan

The original slogan was... "AREDN: At the center of Emergency Preparedness".
 

K9CQB
K9CQB's picture
Ok - that's a winner.

"AREDN: At the center of Emergency PrepAREDNess"

I like this one the best.

AK4FA
Combo Approach with Mac and Windows

Thanks for your detailed instructions! I've had issues getting the GUI method to take without a bad gateway error.

I had success using the PXE server approach described here https://www.arednmesh.org/sites/default/files/AREDN%20Mikrotik%20Installation%20Steps%20April%202019%20NB%20edit.pdf

And then using the last three steps of your instructions from my mac:


11. Now log into the device, "telnet 192.168.1.1"   user = 'root' password = 'hsmm'. 

12. Copy up the .bin file.    typically this is done, "scp -P 2222  <the .bin file name>   root@192.168.1.1:/tmp/rb.bin

13. Type the following command in the telnet window on the device:   "sysupgrade -n /tmp/rb.bin"    wait for it to reboot, now it has AREDN installed and you can go in and set it up.  Be sure to renew your IP address after it reboots.  

I had to install homebrew (http://osxdaily.com/2018/07/18/get-telnet-macos/)and telnet on my mac to get it to work, the added bonus was that I didn't have to keep setting the static ip and then going back to DNS when doing multiple devices.

This may help others who are getting timeouts or bad gateways even after succesfully loading the .elf file and unchecking the keep settings box.

KC0EUW
Possible fix for Bad Gateway issues

Bad Gateway is an HTTP Status Code that can mean any of several things. Often it indicates a network communication glitch between your web browser and a web server. During AREDN firmware installs you can usually resolve a Bad Gateway issue by doing one of the following things:

  • Refresh or Reload the URL for your node.
  • Clear your browser cache and delete cookies.
  • Close your browser and restart a new session.
  • Use a different web browser program or a Safe Mode / Incognito browser window.
  • Unplug and reconnect the Ethernet cable from your computer to ensure that your machine has received a new DHCP IP address on the same subnet as the node's updated IP.
AK4FA
Those are great additional

Those are great additional tips, I had tried those across chrome, Firefox, IE, Edge, all resulting in a load of about 97% and then bad gateway on my most recent device. Loading using scp and telnet was the only one that worked for me on the new HAP AC Lite I purchased, the browser method was fine for one I got a while ago, as well as the LDF. It may be because I have an older computer, or something changed. I hoped those tips might help someone else who couldn't get a successful load trying the methods you mentioned.

KC0EUW
Clarified the docs with your input

AK4FA, thanks very much for your input.  We've clarified the AREDN docs to include the case that you ran into.  Really appreciate your efforts!  THX
https://arednmesh.readthedocs.io/en/latest/arednGettingStarted/installing_firmware.html#troubleshooting-tips

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer