You are here

Mikrotik Router boards

28 posts / 0 new
Last post
N7JYS
Mikrotik Router boards
I know a lot people who have had their share of struggels loading AREDN software onto the Mikrotik Routers no matter if its a hAP lite or a RBLHG-5HPnD-XL
the procedures are the same using a dumb switch and tinypxeserver to load the temp software in the rom of the router board then to proceed to upload the downloaded AREDN software from your computer to complete the process.

I have been away from AREDN for a few years but have been successful in the past with all procedures involved in uploading AREDN software and making
several nodes work. Recently I have decided to use AREDN again to bridge a repeater site running Allstar (VOIP) with free internet access from a local ham.

However it seems as though I have run into problems recently getting ARDEN software loaded and running on a Mikrotik LHG-5HP-XL. I can get as far as
loading the temp rd.elf file loaded into the rom of the router board. After uploading the AREDN software form the Web gui  I patiently await the installation and
it never successfully reboots with the software running. I have exhausted all my resources including my time into making  this work. I would appreciate any
and all help in getting this working. Please feel free to share your  failures and succcessus in what worked for you. Thanks

 
nc8q
nc8q's picture
rd.elf file loaded into the rom of the router board. After uploa
"rd.elf file loaded into the rom of the router board. After uploading the AREDN software form the Web gui  I patiently await the installation and
it never successfully reboots with the software running."

Hi, Eric:

The 'factory.bin' file gets renamed 'rb.elf'.

'rb.elf' gets uploaded into the node's RAM.

The node boots the .elf image and should be found at http://192.168.1.1

You may need to load 'http://192.168.1.1' from your web browser.

Next upload the 'sysupgrade.bin' file.

Continue with the install instructions.

https://docs.arednmesh.org/en/latest/_downloads/45c3c92b35d89f810b754d77...
https://docs.arednmesh.org/en/latest/arednGettingStarted/installing_firm...

I hope this helps,
Chuck
 
N7JYS
Mikrotik Router
Chuck, these are the files Im using from the AREDN download page.

https://downloads.arednmesh.org/afs/www/?version=3.25.2.0&target=ath79%2...

My understanding is the kenral file is the one I rename to rb.elf according to the download page and load into rom via tinypexeserver. Then after its loaded I proceed to http://192.168.1.1.
This brings up a web gui with the AREDN logo and a box to enter the second file (systemupgrade.) After this is done I am never  able to get it to successfully  reboot with a valid IP, and using local.mesh:8080 reaps no results either. There seem to be a loading error that I can not detect. Am I using the right file to load into rom as you said "The 'factory.bin' file gets renamed 'rb.elf'.? Just asking to see if I missed something   . I have seen a alterative method using putty accessing port 2222 and up loading the systemupgrade file via winscp and issuing the command systemupgrade -n (filename) from the tmp directory but get a file upload error. I seem to be hitting a brick wall and not understanding why. Not sure what Im missing.

 
nc8q
nc8q's picture
I am never able to get it to successfully reboot with a valid
As Orv mentioned, use the current stable release; 3.25.2.0.

" I am never  able to get it to successfully  reboot with a valid IP"

How are you determining the above statement?
IIRC, after uploading the 'sysupgrade' firmware,
the device will reboot and then be a DHCP server.
When that happens, your computer needs to drop its static address and
enable its DHCP client.

Semantics:
I think...
The factory.bin (rb.elf) file is stored into RAM not ROM/rom.
The sysupgrade.bin file is stored into 'FLASH' (eePROM).

73, Chuck
 
w6bi
w6bi's picture
Mikrotik first install
It turns out that the Mikrotik nightly builds won't install into RAM.  I discovered this yesterday. There's a fix coming for that in the 20250331 nightly build.  As a workaround, use the 3.25.2.0 production release.  Once that's installed (into RAM, then into flash), and configured, you can update to a nightly build if you wish (recommended)

73
Orv W6BI
N7JYS
Mikrotik first install
Orv, what I have notice and observed with several versions of ARDEN softare including the nightly build, I get the same results. Even though is says for initial install and system upgrades It stills fails. I can reload the factory mipbse file using netinstall and the mikrotik router board functions normally.  My hAP lite exhibits  the same behavior using windows 10  and tinypexeserver as well as my LHG 5HPnD-XL. If it wasn't mention in the beginning this is a first time install for the ARDEN software on these devises and it makes me wounder if the software is not being excepted as it thinks its a upgrade not a first time install like a factory.bin file. I would really like to get to the bottom of this as it's bugging me and I don't give up easy. Thoughts?
w6bi
w6bi's picture
Mikrotik first installs
Eric, I don't use tinypxe server much any more.  I find the Linux procedure for Mikrotik first installs much more reliable.  You might give that a shot.

Orv W6BI
N7JYS
Mikrotik First Installs
Orv, I get the same results using linux. The kernal fire loads fine and works.  When I go to install the sysupgrade.bin file is where is fails to work.
I have 3 Mikrotik LHG 5HPnD-xl's and they all fail.
nc8q
nc8q's picture
When I go to install the sysupgrade.bin file is where is fails t
"The kernal firle loads fine and works. When I go to install the sysupgrade.bin file is where is fails to work."

How is it failing?
See #10 (Jim K6CCC's post).

73, Chuck
 
N7JYS
Mikrotik Failure
   After uploading sysupgrade.bin file and letting it install (about 5 minuets) I change my Ethernet  interface to DHCP reboot the Mikrotik node and get a   169.254.172.53 ip with a 255.255.0.0 net mask. This is not a privet ip. I can ping this ip but in a web browser dose nothing. This node should have a DHCP
  range wifi ip of (10.x.x.x) there for failing. I can reinstall the factory OS with netinstall64 and work as expected. 
nc8q
nc8q's picture
! reboot the Mikrotik node !
"I change my Ethernet  interface to DHCP reboot the Mikrotik node"

I read this as

"I ... reboot the node."
or
Did you click the Upload and Reboot button?

You are not supposed to reboot the node...it reboots itself.
https://docs.arednmesh.org/en/latest/arednGettingStarted/installing_firm...
...

After successfully installing the sysupgrade file the node will automatically reboot to the new AREDN® firmware image.

 

Please specify which sysupgrade.bin file you are uploading.

73, Chuck
 
Image Attachments: 
K6CCC
K6CCC's picture
Confirm after loading the
Confirm after loading the upgrade file that you force your computer to request a new DHCP address.  This can be done simply by unplugging and then reconnecting the LAN connection to the computer or issuing a "ipconfig /renew" (without the quotes) in a Windows command prompt.

This is required because as long as the computer does not see the LAN connection drop (and it won't if you have a recommended dumb switch between the AREDN node and the computer), the computer will not attempt to obtain a new DHCP address - and therefore never get on the right LAN segment for the node.
 
K5RA
Dumb Switch for Mikrotik
I was working with a Mikrotik SXTsq 5ac last month using NetInstall to get it back to RouterOS.  Mikrotik instructions were pretty clear to make a direct connection from your PC to the node.
The "unplug the connection" trick is easier than cycling the network card from Windows Control Panel/Network & Sharing Center.
--  Tim  K5RA
K6CCC
K6CCC's picture
Mikrotik instructions were

Mikrotik instructions were pretty clear to make a direct connection from your PC to the node.


Correct.  The suggestion for the dumb switch is not there for the benefit of the node, but rather the computer.  The AREDN flash process results in several reboots of the node.  If you are direct connected, the computer will see each of those as a loss of the LAN connection and may not be completely happy with that.  By putting a dumb switch in between the node and the computer, the computer does not see the multiple LAN connection drops.  By contrast the Mikrotik NetInstall is written to expect the LAN connection drops - and if I recall right, it depends on it.
 
kf7yrs
I have a similar problem occasionally
I pasted a link to the thread from last Oct. below,  I hope it is still clickable.  The rb.elf loaded just fine and asked me to specify the sys-upgrade as normal.  After that, nothing happens.  I waited 15 or more minutes.   In the end, Mikrotik RouterOS was still at 192.168.88.1   I have 3 Mikrotik nodes (2 LHGs and an SXTsq) that do the same thing.   The RouterOS has survived every time.

I'll try loading 3.25.2.0 and/or a recent nightly build.    

Flashed 9 LHG5nD-US nodes, 7 worked and 2 refused conversion | Amateur Radio Emergency Data Network
or
https://www.arednmesh.org/content/flashed-9-lhg5nd-us-nodes-7-worked-and...
 
73, Lee
nc8q
nc8q's picture
Loading AREDN firmware onto a Mikrotik LHG/SXT
Hi, Lee:

Perhaps try after booting the rb.elf and
using the real sysupgrade file for <sysupgrade.bin>:

scp the sysupgrade file to /tmp/
scp -P2222 <sysupgrade.bin> root@192.168.1.1:/tmp
ssh to the node on 192.168.1.1
ssh -p2222 root@192.168.1.1
cd /tmp

sysupgrade <sysupgrade.bin>
if that balks
sysupgrade -F <sysupgrade.bin>

On the other hand:
If your Mikrotik device has “Protected Routerboot” enabled, then you will need to disable it before proceeding.
Use the manufacturer’s instructions to connect to your device and display the RouterOS web interface or command line.
Navigate to System > Routerboard > Settings > Boot Device to uncheck or deselect Protected Routerboot.
Click the Apply button, then you should be able to power down the device and continue with the steps in the AREDN® firmware install checklist.


73, Chuck
 
nc8q
nc8q's picture
rb.elf loaded just fine and asked me to specify the sys-upgrade
"rb.elf loaded just fine and asked me to specify the sys-upgrade as normal."

Hi, Lee:

Exactly which device?
Exactly which file did you rename rb.elf for the above device?
Exactly which sysupgrade file did you 'Upload and Reboot' next?

"In the end, Mikrotik RouterOS was still at 192.168.88.1"
Since you last booted rb.elf and the device responded at 192.168.1.1, then
the device was running the first install firmware in RAM.

For the device to respond next at 192.168.88.1, it likely had rebooted.
The sysupgrade file was never loaded into FLASH (ROM) memory, thus
the device booted into Router OS which still resided in FLASH (ROM).

73, Chuck
 
K5RA
Kernel Loaded?
Lee -

According to the AREDN docs, after the kernel goes in, the node should have a IP of 192.168.1.1.  What is the indication that rb.elf got in right? 
What was the RouterOS version before you started the AREDN install?  Did you use Tiny PXE with Windows or dnsmasq with Linux?  Thanks.

--Tim K5RA
 
nc8q
nc8q's picture
What is the indication that rb.elf got in right?
"The rb.elf loaded just fine and asked me to specify the sys-upgrade as normal."
 
kf7yrs
maybe I should say "it looks like it loaded just fine"
I get the "Welcome Congratulations on booting AREDN®" screen.  I guess that means that it is there, at least in part ;-)

I can poke around in the various files using WinSCP, but as I understand it,  rb.elf is in temporary memory and I don't know where to look, if it is accessable at all.     I could swear I saw it in the tmp folder yesterday, but I loaded rb.elf again today and can't see it.   


 
nc8q
nc8q's picture
rb.elf is in temporary memory: Ah, err, the data, not the file.
The contents of the file rb.elf get loaded into RAM on the AREDN device.
rb.elf is a file
Example: /tmp is a file system folder
Example: /tmp/rb.elf could be a folder named '/tmp' containing the file 'rb.elf'.

During the first installation of AREDN firmware,
you upload rb.elf into the AREDN device then
the device boots and executes
the instructions that were in the file rb.elf.
The file rb.elf does not get transferred to the AREDN device's filesystem.
The data in the file rb.elf gets transferred to the RAM in the AREDN device.
I hope this helps, Chuck


 
kf7yrs
Thanks
Your comments have been very helpful over the past few years I've been working on this, especially your comments on point-to-point vs mesh topography.  We started out very naive and were just putting up radios and expecting them to work together.  We are now building a mesh of PtP strings and getting relatively fast data rates.  Thanks!
Lee  
nc8q
nc8q's picture
We started out very naive and were just putting up radios and ex
"We started out very naive and were just putting up radios and expecting them to work together."

Hi, Lee:

Your wise statement bears repeating, so I did.
;-)

73, Chuck
 
kf7yrs
Answer for you and Chuck
First, I want to thank both of you for the suggestions/comments!

In this case, the routerOS version was 6.49.11 and then 6.49.13, I tried both.   Yes, I used Tiny PXE to load the rb.elf file and after a couple minutes I could ping 192.168.1.1.  When I put 192.168.1.1 in a browser, I got the "welcome, congratulations for booting AREDN" screen (attached).    That screen let me choose a sysupgrade.bin file, which I did.  I clicked the "upload and reboot" button, and nothing happened.  I waited 10 minutes and when I went to 192.168.1.1.  I was back at the "welcome, congratulations for booting AREDN" screen.   It did not load the sysupgrade.bin file just like the last 20 times I tried.  I have tried maybe 7 different FW versions, including the most recent nightly and they all do the exact same thing, the rb.elf loads but the sysupgrade.bin does not.

I also tried Chuck's suggestion to SCP the sysupgrade.bin file into the node after loading the rb.elf.  The rb.elf file loads fine.  The SCP process starts up fine but soon after starting there is a problem,  WinSCP tells me that the tmp folder has run out of space. After this, in the node's memory, there is a truncated sysupgrade.bin file, maybe a few 10s of kB.   The Windows command prompt window just fails.

I think this is the real problem.  Only a few 10s of Kilobytes are transferred before the scp process (either the command prompt window or WinSCP) stops. WinSCP says it ran out of space in the target folder.  So, I think the problem is that Mikrotik may have gotten some faulty memory chips, or their system added too many files, whatever, the TMP folder free space is too small to store the sysupgrade.bin file.  All my MIkrotik FW loading  failures occurred in a relatively small time window last fall (2 LHGs and an SXTsq).  Since then, things have been fine.  I'm just glad RouterOS stays intact and I can use the radios for some future WiFi project. 

Sincere thanks for your comments!!!
Lee
Image Attachments: 
nc8q
nc8q's picture
WinSCP tells me that the tmp folder has run out of space. After
"WinSCP tells me that the tmp folder has run out of space. After this, in the node's memory, there is a truncated sysupgrade.bin file, maybe a few 10s of kB."

Hi, Lee:

I renamed
aredn-3.25.2.0-ath79-mikrotik-mikrotik_routerboard-lhg-5nd-initramfs-kernel.bin (which is size 5.7 MB)
to rb.elf and tftp'ed it to my LHG-5nD device.
The data in rb.elf then resides in RAM and the device reboots using the information in RAM.
Next I SCP'ed the sysupgrade.bin file to /tmp on the LHG-5nD:
gelmce@nc8q-acer:/tftp$ scp -P2222 aredn-3.25.2.0-ath79-mikrotik-mikrotik_routerboard-lhg-5nd-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
root@192.168.1.1's password:
aredn-3.25.2.0-ath79-mikrotik-mikrotik_routerboard-lhg-5nd-squashfs-sysupgrade.bin  100% 6081KB   1.9MB/s   00:03    

Then I SSH'ed into the LGH-5nD:

gelmce@nc8q-acer:/tftp$ ssh -p2222 root@192.168.1.1
The authenticity of host '[192.168.1.1]:2222 ([192.168.1.1]:2222)' can't be established.
ECDSA key fingerprint is SHA256:1pNPXEmqqjiurG2x35k5mMzmCq1jAq51KvF9CTfGV1E.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[192.168.1.1]:2222' (ECDSA) to the list of known hosts.
root@192.168.1.1's password:

OK, now I ssh into 192.168.1.1:

BusyBox v1.36.1 (2025-02-03 23:09:37 UTC) built-in shell (ash)

              _____  ______ _____  _   _
        /\   |  __ \|  ____|  __ \| \ | |TM
       /  \  | |__) | |__  | |  | |  \| |
      / /\ \ |  _  /|  __| | |  | | . ` |
     / ____ \| | \ \| |____| |__| | |\  |
    /_/    \_\_|  \_\______|_____/|_| \_|
    AMATEUR  RADIO EMERGENCY DATA NETWORK
-----------------------------------------------
 1) Research AREDN and choose a supported device
 2) Download and install AREDN firmware
 3) Deploy and enjoy the mesh
-----------------------------------------------
  3.25.2.0, r28427-6df0e3d02a
 ----------------------------------------------
(Lets look at the filesystem on the LHG-5nD:)
root@NOCALL:~# df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                    28.4M     14.4M     13.9M  51% /
tmpfs                    28.4M      6.2M     22.2M  22% /tmp 
tmpfs                   512.0K         0    512.0K   0% /dev
root@NOCALL:~# ls -lh /tmp/aredn*
-rw-r--r--    1 root     root        5.9M Jan  1 00:28 /tmp/aredn-3.25.2.0-ath79-mikrotik-mikrotik_routerboard-lhg-5nd-squashfs-sysupgrade.bin

Note that after I put the sysupgrade.bin file in /tmp, there is still 22.2 MB available.
There was plenty of room for the sysupgrade file (which is 6.0 MB) to be uploaded into /tmp

Once that is done,
ssh into 192.168.1.1 and (example) enter
sysupgrade /tmp/aredn-3.25.2.0-ath79-mikrotik-mikrotik_routerboard-lhg-5nd-squashfs-sysupgrade.bin

Else, if that command balks, enter
sysupgrade -F /tmp/aredn-3.25.2.0-ath79-mikrotik-mikrotik_routerboard-lhg-5nd-squashfs-sysupgrade.bin

root@NOCALL:~# sysupgrade aredn-3.25.2.0-ath79-mikrotik-mikrotik_routerboard-lhg-5nd-squashfs-sysupgrade.bin
Cannot save config while running from ramdisk.
Thu Jan  1 00:52:47 UTC 1970 upgrade: Commencing upgrade. Closing all shell sessions.
Command failed: Connection failed
root@NOCALL:~# Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.
gelmce@nc8q-acer:/tftp$

73, Chuck
 
Image Attachments: 
kf7yrs
Thanks
I'll give it a try and report back.  THANKS!
kf7yrs
Overloaded brain ;-)
I've spent quite a few hours the last 2 days trying various ways to connect to the problem LHG and get the sysupgrade.bin loaded and run.   I can get the rb.elf in RAM and find the node in the "Welcome/Congratulations" state at 192.168.1.1, no problem.   I can reliably reach it using WinSCP, but when I start transferring the sysupgrade file it stalls after about 16 KB have been transferred (see attached).  There is another Aredn file in that folder that is about 1.06 KB?  I can ssh into the node and run commands.  There is plenty of space in the node's tmp folder (see attached), so that is not the issue.  Win SCP gives me an error suggestion, but if I make the suggested changes, WinSCP will no longer connect to the node?   I have many, many pages of discussion with the MS Copilot AI and with its help have tried various ways to transfer the file, including  SCP, TFTP, HTTP and NCAT (netcat).  None worked.  

I think I might setup a Linux computer, mine are all windows, and try your commands as written, not as translated by copilot.  The nodes memory seems adequate. It was very educational, if only I can remember what I learned ;-)

Thanks!  I wanted to report back in a relatively timely manner since you took the time to explore the problem.  I'll let you know if I have that aha moment...

Lee kf7yrs
Image Attachments: 
File Attachment: 
nc8q
nc8q's picture
I think I might setup a Linux computer...
Lee et alia:

Has anyone used 'Windows Subsystem for Linux' to transfer a sysupgrade.bin file to a 'rb.elf'ed device?

73, Chuck
 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer