You are here

MikroTik SW load via Mac?

15 posts / 0 new
Last post
ke3kq
MikroTik SW load via Mac?
I have a MikroTik LHG XK dish that I am attempting to flash.

I use Macs or Raspberry Pi HW and have been ok with TP-Link and Ubiquiti.

I followed the Linux procedure to step 5 but the Mac OS does not seem to support dnsmasq.

I tried using the latest Raspian but my Linux is weak and I could not get a static IP of 192.186.1.10.

I guess my question is whether anyone has been successful getting a fresh load of AREDN SW via a Mac?  Seems like this should be doable via a Mac but don't see much posting related to the Mac.

Then if not the Mac, I guess I could load a difference OS on the Pi HW and have more success.

So, any MikroTik success with the Mac?    Using Big Sur on a Mac Mini.
nc8q
nc8q's picture
could not get a static IP of 192.168.1.10.

"I tried using the latest Raspian but my Linux is weak and I could not get a static IP of 192.186.1.10."

Typo: Network is 192.168.1.0/24

sudo ifconfig eth0 192.168.1.10

I hope this helps,
Chuck
 

ke3kq
Typo: Network is 192.168.1.0

Typo: Network is 192.168.1.0/24

sudo ifconfig eth0 192.168.1.10


Correct on the typo<grin>.

Thanks for the sudo command.  This may open the gate for me.

*** Ben

ke3kq
Update!  Yes the "sudo

Update!  Yes the "sudo ifconfig eth0 192.168.1.10" worked on the Raspberry Pi.   This gets me to step 5 in the Linux flashing process for the Mikrotik.

I did get a fail again however.   Here is the process I followed on a Raspberry Pi 4 recently updated.

1.  2 files rb.elf and the .bin file copied to fresh tftp directory on the pi.   Working directory pwd = /home/pi/tftp
2.  Turn off WiFi
3  sudo ifconfig eth0 192.168.1.10 and confirm eth0 address with ifconfig command
4  Become root via command sudo su and confirm with whoami
5  Using copy and paste grab the dnsmasq command line from the instructions in step 5.  I put this on the Pi in a text file where I did the edits to change "eno1" to "eth0" and "joe" to "pi".   I then used copy and past to put this on the command line but did not execute it.
6  I plugged a cat 5 cable into the MikroTik dish port and into the POE adapter (no power yet).  I then plugged the POE adapter in the Pi.  At this point everything is cabled up except for power to the MikroTik POE adapter.
7  I then executed the dnsmasq command as root and was prepared to power up the POE while pressing the MikroTik reset button.  FAIL

Again, similar to the Mac experience, the dnsmasq command failed with a message "BASH: dnsmasq: command not found".  So either I am making a dnsmasq mistake or neither the Mac nor the Raspbian version of Linux support dnsmasq OR there is an error in the instruction process or the command string.  It certainly could be my error.

Comments?

*** Ben KE3KQ



 

nc8q
nc8q's picture
sudo dnsmsq ...
Is dnsmasq in the working Path of user root?
Try
sudo dnsmasq instead.

 
ke3kq
Is dnsmasq in the working
Is dnsmasq in the working Path of user root?
Try
sudo dnsmasq instead.


That seems to make a difference.   I will report back.

*** Ben KE3KQ
ke3kq
Turns out I had to download
Turns out I had to download and install dnsmasq.  I got that done with the help of a local networking angel (thanks Alex).

I got the ipconfig working.

I had to move the tftp directory to / to get it to work per the command string.

Finally dnsmasq and the command string worked on the Raspberry Pi.   The initial node booted up (.elf) and I was able to install the .bin file but with an error.

The error message was "Untested Hardware".   There are some other threads of discussion related to the message on some 5 Ghz nodes.  The node rebooted when I clicked "save" into routerOS.

I downloaded the nightly build of .bin file and repeated the install but same result.   I downloaded the "support data" from AREDN screen the second time.  There is a text file with a lot of device data.

I think others are running this node hardware under AREDN so hummmm.  Still could be some mistake by me of course.

Got this node from Senetic and their PN is RBLHG-2nd-XL.   Description notes LHG XL 2.

Comments/suggestions?

*** Ben KE3KQ
 
nc8q
nc8q's picture
Comments/suggestions?

Ben:

Which .elf, bin ?

IMHO, you should be loading the current Nightly Build.

I had similar problems with brand new Mikrotik devices.
I found a work-around, but now the current Nightly Build fixed my issue with 5 GHz devices.

This may sound kinda snarky, but, would you please post your console commands and responses
rather than explaining in words what you see.

 I also put the .elf and .bin in '/tftp/'.
I have a few bash/csh/ash shell files (.sh) in there as well.
Which shell does Mac use?

Chuck
 

ke3kq
Which .elf, bin ?

Which .elf, bin ?

This is done in the Raspberry Pi with Raspbian.  At first I used the link provided in the instructions to get the .elf & .bin files.   I did note that the instructions for Windows used the nightly build.  After the first install problem I did download the nightly .bin file from October but continued to use the .elf file from the first attempt.

IMHO, you should be loading the current Nightly Build.

What I am seeing is from October so using that going forward.

I had similar problems with brand new Mikrotik devices.
I found a work-around, but now the current Nightly Build fixed my issue with 5 GHz devices.


Our local group has a user who installed on the same HW via Windows and it installed ok.  MikroTik might be part of th issue.

This may sound kinda snarky, but, would you please post your console commands and responses
rather than explaining in words what you see.


No snarky taken <grin>.  If I can figure out how to do this on the Pi, I will try.  Their (Raspbian) version of the browser "Chrome" works poorly for me.
 
I also put the .elf and .bin in '/tftp/'.
I have a few bash/csh/ash shell files (.sh) in there as well.

Yes, I have put .elf and .bin in /tftp.

Which shell does Mac use?

Mac uses BASH  with a choice to use ZSH.  I think I would have to download dnsmasq on the Mac just as I had to do on the Pi.

I two existing nodes up now and I am trying to get both nodes to work with a switch with poor success and I want to work on that today a bit.  If I can capture my PI session, I will post it.

Thanks, I am grateful for the extra eyeballs looking over my shoulder to see what I might (probably certainly) be doing.

*** Ben KE3KQ

nc8q
nc8q's picture
What I am seeing is from October so using that going forward.
October 19, 2020 is the current Night Build that I call '1866'.
Marvelous.
 
ke3kq
Hi Chuck,

Hi Chuck,

Here is the terminal session from my last install using the nightly build .bin file.  There is some playing at the beginning with commands so might want to start at the end and work back.  It ends where I hit <cont> "c" to exit dnsmasq.
===============================================================

pi@raspberrypi:~ $ cd /tftp
pi@raspberrypi:/tftp $ ls
pi@raspberrypi:/tftp $ sudo dnsmasq -i eth0 --dhcp-range=192.168.1.100,192.168.1.200 --dhcp-boot=rb.elf --enable-tftp --tftp-root=/tftp/ -d -u pi -p0 -K --log-dhcp --bootp-dynamic
dnsmasq: started, version 2.80 DNS disabled
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
dnsmasq: warning: interface eth0 does not currently exist
dnsmasq-dhcp: DHCP, IP range 192.168.1.100 -- 192.168.1.200, lease time 1h
dnsmasq-tftp: TFTP root is /tftp/ 
^Cpi@raspberrypi:/tftp $ ls
aredn-1866-bf944df-ar71xx-mikrotik-rb-nor-flash-16M-sysupgrade.bin  rb.elf
pi@raspberrypi:/tftp $ sudo ifconfig eth0 192.168.1.10
pi@raspberrypi:/tftp $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.10  netmask 255.255.255.0  broadcast 192.168.1.255
        ether dc:a6:32:02:98:8f  txqueuelen 1000  (Ethernet)
        RX packets 3482  bytes 1367602 (1.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3153  bytes 540339 (527.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 10560  bytes 711097 (694.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10560  bytes 711097 (694.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.200  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::aace:e8f:c504:7dc5  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:02:98:90  txqueuelen 1000  (Ethernet)
        RX packets 11840  bytes 14870445 (14.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8236  bytes 848579 (828.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pi@raspberrypi:/tftp $ 
pi@raspberrypi:/tftp $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.10  netmask 255.255.255.0  broadcast 192.168.1.255
        ether dc:a6:32:02:98:8f  txqueuelen 1000  (Ethernet)
        RX packets 3482  bytes 1367602 (1.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3153  bytes 540339 (527.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 10641  bytes 716874 (700.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10641  bytes 716874 (700.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pi@raspberrypi:/tftp $ sudo dnsmasq -i eth0 --dhcp-range=192.168.1.100,192.168.1.200 --dhcp-boot=rb.elf --enable-tftp --tftp-root=/tftp/ -d -u pi -p0 -K --log-dhcp --bootp-dynamic
dnsmasq: started, version 2.80 DNS disabled
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
dnsmasq-dhcp: DHCP, IP range 192.168.1.100 -- 192.168.1.200, lease time 1h
dnsmasq-tftp: TFTP root is /tftp/ 
dnsmasq-dhcp: 2929293149 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 2929293149 vendor class: Mips_boot
dnsmasq-dhcp: 2929293149 tags: bootp, eth0
dnsmasq-dhcp: 2929293149 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 2929293149 bootfile name: rb.elf
dnsmasq-dhcp: 2929293149 next server: 192.168.1.10
dnsmasq-dhcp: 2929293149 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 2929293149 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 2929293149 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 2277453138 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 2277453138 vendor class: Mips_boot
dnsmasq-dhcp: 2277453138 tags: bootp, eth0
dnsmasq-dhcp: 2277453138 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 2277453138 bootfile name: rb.elf
dnsmasq-dhcp: 2277453138 next server: 192.168.1.10
dnsmasq-dhcp: 2277453138 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 2277453138 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 2277453138 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 3560200721 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 3560200721 vendor class: Mips_boot
dnsmasq-dhcp: 3560200721 tags: bootp, eth0
dnsmasq-dhcp: 3560200721 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 3560200721 bootfile name: rb.elf
dnsmasq-dhcp: 3560200721 next server: 192.168.1.10
dnsmasq-dhcp: 3560200721 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 3560200721 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 3560200721 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 3344742771 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 3344742771 vendor class: Mips_boot
dnsmasq-dhcp: 3344742771 tags: bootp, eth0
dnsmasq-dhcp: 3344742771 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 3344742771 bootfile name: rb.elf
dnsmasq-dhcp: 3344742771 next server: 192.168.1.10
dnsmasq-dhcp: 3344742771 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 3344742771 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 3344742771 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 2058321529 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 2058321529 vendor class: Mips_boot
dnsmasq-dhcp: 2058321529 tags: bootp, eth0
dnsmasq-dhcp: 2058321529 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 2058321529 bootfile name: rb.elf
dnsmasq-dhcp: 2058321529 next server: 192.168.1.10
dnsmasq-dhcp: 2058321529 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 2058321529 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 2058321529 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 295923752 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 295923752 vendor class: Mips_boot
dnsmasq-dhcp: 295923752 tags: bootp, eth0
dnsmasq-dhcp: 295923752 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 295923752 bootfile name: rb.elf
dnsmasq-dhcp: 295923752 next server: 192.168.1.10
dnsmasq-dhcp: 295923752 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 295923752 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 295923752 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 2698447074 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 2698447074 vendor class: Mips_boot
dnsmasq-dhcp: 2698447074 tags: bootp, eth0
dnsmasq-dhcp: 2698447074 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 2698447074 bootfile name: rb.elf
dnsmasq-dhcp: 2698447074 next server: 192.168.1.10
dnsmasq-dhcp: 2698447074 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 2698447074 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 2698447074 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 2482978660 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 2482978660 vendor class: Mips_boot
dnsmasq-dhcp: 2482978660 tags: bootp, eth0
dnsmasq-dhcp: 2482978660 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 2482978660 bootfile name: rb.elf
dnsmasq-dhcp: 2482978660 next server: 192.168.1.10
dnsmasq-dhcp: 2482978660 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 2482978660 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 2482978660 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 2267514170 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 2267514170 vendor class: Mips_boot
dnsmasq-dhcp: 2267514170 tags: bootp, eth0
dnsmasq-dhcp: 2267514170 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 2267514170 bootfile name: rb.elf
dnsmasq-dhcp: 2267514170 next server: 192.168.1.10
dnsmasq-dhcp: 2267514170 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 2267514170 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 2267514170 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-dhcp: 2052105270 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 2052105270 vendor class: Mips_boot
dnsmasq-dhcp: 2052105270 tags: bootp, eth0
dnsmasq-dhcp: 2052105270 BOOTP(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 2052105270 bootfile name: rb.elf
dnsmasq-dhcp: 2052105270 next server: 192.168.1.10
dnsmasq-dhcp: 2052105270 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 2052105270 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 2052105270 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-tftp: sent /tftp/rb.elf to 192.168.1.103
dnsmasq-dhcp: 1656508115 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 1656508115 vendor class: udhcp 1.30.1
dnsmasq-dhcp: 1656508115 DHCPDISCOVER(eth0) 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 1656508115 tags: eth0
dnsmasq-dhcp: 1656508115 DHCPOFFER(eth0) 192.168.1.103 48:8f:5a:79:7b:a1 
dnsmasq-dhcp: 1656508115 requested options: 1:netmask, 3:router, 6:dns-server, 12:hostname, 
dnsmasq-dhcp: 1656508115 requested options: 15:domain-name, 28:broadcast, 42:ntp-server
dnsmasq-dhcp: 1656508115 bootfile name: rb.elf
dnsmasq-dhcp: 1656508115 next server: 192.168.1.10
dnsmasq-dhcp: 1656508115 sent size:  1 option: 53 message-type  2
dnsmasq-dhcp: 1656508115 sent size:  4 option: 54 server-identifier  192.168.1.10
dnsmasq-dhcp: 1656508115 sent size:  4 option: 51 lease-time  1h
dnsmasq-dhcp: 1656508115 sent size:  4 option: 58 T1  30m
dnsmasq-dhcp: 1656508115 sent size:  4 option: 59 T2  52m30s
dnsmasq-dhcp: 1656508115 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 1656508115 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 1656508115 sent size:  4 option:  3 router  192.168.1.10

ke3kq
After another attempt at

After another attempt at flashing, I think I see things in a different light.  I think the rb.elf file is loading but I think the .bin file is not making it. 

At the point where I hit "upload" the browser (Chrome) issues a message " bad gateway".   I hit reload button and there see an indication of a growing percentage that looks like a file loading.  After that point, the instructions suggest that the node will reboot by itself but it does not.   When I reboot, I get RouterOS.

So I think the functional problem is that the .bin file does not get a properl upload.

*** Ben KE3KQ
 

nc8q
nc8q's picture
"bad gateway"

Uh, huh. That is the old "bad gateway".
Mikrotik may have started using...yet another...new board_name. Grrrrr. :-(
After you load the .elf file, you may need to fool the node into thinking it is a valid node name.

ssh into the node (root/hsmm) and issue
cat sysinfo/board_name
if the value is "unknown".
Issue:
echo "rb-lhg-5hpnd" > sysinfo/board_name
Then try to upload the .bin.
Ensure that the .elf and .bin are from the same Nightly Build.

Be very careful when selecting a channel if this is the fix.

And, if this is the fix, go to the Administration page, download the 'Download Support Data' file
and append it to a message in this thread. ;-)

I hope this helps,
Chuck
 

ke3kq
Success on the Raspberry Pi!

Success on the Raspberry Pi!

Hi Chuck,

Ensure that the .elf and .bin are from the same Nightly Build.

This caught my attention.  I had used the nightly build for the .bin file assuming that since I could get the .elf file to seemingly work that it was ok.

I did a fresh download of the nightly builds for botht he .elf and .bin files.

Installed up to the point where I would get the "Bad Gateway" before but now got a different message, yeah!

Where the instructions say to return to DHCP, I did not know how to do this with "ifconfig" so I rebooted the Pi to proceed which seemed to work ok.

I also confirmed that ping to 192.168.1.1 worked.

It looked like it might reboot when expected but did not.  Waited 40 minutes.

Rebooted Pi again rather than unplug node.  Browsed to setup again after some hunting for it.  Did the setup essentials, node name, password, save.  This time it seemed to reboot on its own after correcting an error in the node name.

This time the regular AREDN SW came up.

So it seems the existing nightly build code works for this HW.

Thanks very much for your kind help and patience. 

I will add some Pi specific comments such as loading dnsmasq when it is not present to perhaps help others.

*** Ben KE3KQ
 

ke3kq
Success! MikroTik & Rasp Pi

Success! MikroTik & Rasp Pi to flash the MikroTik  RBLHG-XL 2 Dish

Alex KA2VLP was an enormous help as well as Chuck NC8Q

I wanted to see if the Raspberry Pi could be used to do the AREDN flashing on MikroTik hardware.  The Pi has increasing usefulness and it can be configured on an SD card to do a specific task.  it is easy to swap SD cards for specific tasks.  It seems to me the Pi is only going to get more useful in the Mesh world.

There are several things that have to be resolved when using the Pi for MikroTik products where the utility "dnsmasq" is used.  This program will need to be downloaded to complete the installation flashing.  The next thing is the requirement to set a static IP address for the Pi so it can be found by the MikroTik.  This uses a command called "ifconfig" to set the required address.  Third there is a time when the static IP address needs to be changed back to a mode called DHCP but I could not figure out how to do this so I rebooted (in SW not a physical hard reboot) the Pi since DHCP is the default mode on boot.  In the end, I was able to complete the AREDN SW flashing without the need of a dumb switch.

Please start by  becoming familiar with the https://www.arednmesh.org/ web site and in particular the Software section.  You will need to choose and download the files according to their guidance.   MikroTik is a slightly different process compared to Ubiquiti or TP-Link.  MikroTik may be more recent so a nightly build of the lastest SW worked better for me (dated October).  

You also need to know your Raspberry Pi Password.  You need your MikroTik device, a cat 5 cable and access to power for the MikroTik and an empty cat 5 port on the Pi.

The Raspberry Pi benefits from running the latest SW but this part could be skipped.   I start by grabbing the latest updates.   I open the command line and use these 2 commands followed by the return key.)

sudo apt update
sudo apt dist-upgrade -y

Then reboot.

Open the Chrome browser, navigate to the AREDN nightly downloads and find the correct files for your hardware and download them(double-click).  Chrome puts the files in the "Downloads" directory.  Now the file ending in .elf must be renamed.  There is a file browser (resembles a folder) on the top toolbar.  Use the browser to find and rename the file ending in .elf to rb.elf.

Now open the terminal program from top toolbar so we can download dnsmasq, move the files and assign a static IP address.  I will put my comments in parenthesis ( ).

(assign a static address to the Pi)

sudo ifconfig eth0 192.168.1.10

(create the directory we need for our files)

sudo mkdir /tftp/

(move to the new directoy, this confirms it properly exists too)

sudo cd /tftp/

(move the required files to this directory)

sudo cp /home/pi/Downloads *.elf /tftp/
sudo cp /home/pi/Downloads *.bin /tftp/

(confirm the files are in place)

ls

(Now we are going to download and install dnsmasq which we can do since we are still online)

sudo apt install dnsmasq

(now we have the files we need, the program and the OP settings.  Now a tricky part in that you have to copy and edit a command string from the AREDN site.  The string is:
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
You have to edit and change the word "eno1" to be "eth0" and edit "joe" to your id which is probably "pi" so the string of text is probably:
dnsmasq -i eth0 --dhcp-range=192.168.1.100,192.168.1.200 --dhcp-boot=rb.elf --enable-tftp --tftp-root=/tftp/ -d -u pi -p0 -K --log-dhcp --bootp-dynamic
Now you are going to paste this edited string on the command line but first you will become "root" in order to be able to issue the dnsmasq command.)

sudo su

(You will be asked for your raspberry pi password at this point so enter you password and hit enter)

(Next enter the edited string similiar to this but DO NOT hit return yet.)

dnsmasq -i eth0 --dhcp-range=192.168.1.100,192.168.1.200 --dhcp-boot=rb.elf --enable-tftp --tftp-root=/tftp/ -d -u pi -p0 -K --log-dhcp --bootp-dynamic

(Now you need to connect the cat 5 cable between the Pi and the MikroTik node and arrange to be able to hold in the MikroTik reset button at the same time as plugging in the power to boot up the MikroTik)

(When you have the parts and buttons all set, you can hit return to invoke dnsmasq.  Next, you can press the reset button as the same time as applying power)

(now you wait about a minute.   At this point there will be output in the command window that looks similar to this "dnsmasq-tftp: sent /tftp/rb.elf to 192.168.1.103"  The important part is "sent".  Now you can release the reset button and relax a bit.   The final string looks like "dnsmasq-dhcp: 1656508115 sent size:  4 option:  3 router  192.168.1.10".  Wait 5 minutes just to be safe but this seems to be the end of what dnsmasq outputs.)

(now enter the key strokes <control> C to exit out of dnsmasq)

(next we want to exit root mode)

exit

At this point we are essentially done using terminal mode.  The rb.elf file has been downloaded and the node has booted in the initial setup mode.  The problem we have is that the Pi needs to reboot to finish the process so that the static IP address goes away.   Do not cycle the power, just reboot the Pi. Click on the "Raspberry image", select "logout" and select "reboot".

After reboot, you should be able to confirm the connection from the Pi to the MikroTik via a terminal ping request like this:

ping 192.168.1.1

This should result in a ping return that continues until you enter <control> C

Now you have to use the browser to bring up MikroTik setup screen (http://192.168.1.1:8080/cgi-bin/admin) and then the "Administration" screen and login screen (root,hsmm).   There you will follow the AREDN instructions to select the .bin file, uncheck "keep settings" and upload it.  This will take more than 10 minutes or so.  It is supposed to reboot but mine did not and I waited 40 minutes.   

Again, reboot the Pi via software.  Browse to the http://192.168.1.1:/cgi-bin/setup (I think, you may have to try some other combinations "http://localnode" etc but the node is waiting to be setup the first time.  It requires the password again (root,hsmm). Note the IP address of the node for reference and then name the node and enter a new password and save changes and it should reboot into AREDN software under your new password.

This ended up longer than I intended and must surely need edits. I could not wait and expect to remember all this. I welcome refining, corrections and improvements or discard it if it is seriously flawed.  No hurt feelings here.

*** Ben KE3KQ

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer