Community discussions

MikroTik App
 
MaxwellSilver
just joined
Topic Author
Posts: 19
Joined: Thu Oct 07, 2021 10:11 pm

Add custom tool for routerboard upgrade

Wed Jan 22, 2025 3:35 am

I'm new to using Dude. I'm trying to add a tool to upgrade the Routerboard after an OS upgrade by adding a Tool. This command runs successfully as a script on a router, but if I try to use it as a Tool in Dude, it fails. What's the correct way to easily run a command like this? Thanks in advance for your assistance.
Dude-Tool-fail.jpg
You do not have the required permissions to view the files attached to this post.
 
User avatar
stmx38
Long time Member
Long time Member
Posts: 653
Joined: Thu Feb 14, 2008 4:03 pm
Location: Moldova, Chisinau

Re: Add custom tool for routerboard upgrade

Thu Jan 23, 2025 12:30 pm

Manual:The Dude v6/Tools - command will be executed on the Dude client OS, bot on the Dude server.

We probably can use an example from the wiki
plink.exe -ssh [Device.UserName]@[Device.FirstAddress] -P 22 -pw [Device.Password] "/system routerboard upgrade"
 
MaxwellSilver
just joined
Topic Author
Posts: 19
Joined: Thu Oct 07, 2021 10:11 pm

Re: Add custom tool for routerboard upgrade

Thu Jan 23, 2025 6:58 pm

Manual:The Dude v6/Tools - command will be executed on the Dude client OS, bot on the Dude server.

We probably can use an example from the wiki
plink.exe -ssh [Device.UserName]@[Device.FirstAddress] -P 22 -pw [Device.Password] "/system routerboard upgrade"
Thanks for the response. This is indeed true. While digging deeper yesterday I discovered this and verified it by creating a Winbox tool. Obvious now that I see it, but at first pass it wasn't very clear.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12687
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Add custom tool for routerboard upgrade

Thu Jan 23, 2025 7:04 pm

This is not a routerboard / RouterOS upgrade, this is a firmware ("bios" / RouterBOOT) upgrade inside the RouterBOARD.

Enable auto-upgrade suffice, is useless upgrade the "bios" because often still the same for years,
because inside change only version number for follow RouterOS version.
Only if on changelog is needed the upgrade of the RouterBOOT ("bios"), it is worth doing it.
 
MaxwellSilver
just joined
Topic Author
Posts: 19
Joined: Thu Oct 07, 2021 10:11 pm

Re: Add custom tool for routerboard upgrade

Thu Jan 23, 2025 8:30 pm

I think I get what your saying. Essentially, the Routerboard firmware as listed by CLI output is actually a BIOS flash that is rarely required since the contents of the firmware doesn't change often, even though the version numbers change to keep pace with the RouterOS version.
[username@Router] > system/routerboard/p
       routerboard: yes
             model: CRS109-8G-1S-2HnD
     serial-number: F1D20FAGBC93
     firmware-type: ar9344
  factory-firmware: 6.47.9
  current-firmware: 7.16
  upgrade-firmware: 7.16.2
If this is the case, then I am somewhat less concerned about making sure the Routerboard firmware versions are fully up to date. For ease of management, I would still like to automate it. Because of the structure of my network, I cannot simply allow routers to auto-update or I would risk one router rebooting while another is still downloading. I am working out a solution using groups groups in Dude to solve this issue. Since I can't create a tool in Dude to push the routerboard upgrade, I've put together a script that runs on startup and checks current-firmware against upgrade-firmware and if they are different, it will initiate the upgrade and reboot.
 
 :if ([/system/routerboard get current-firmware] != [/system/routerboard/get upgrade-firmware]) do={ /system/routerboard/upgrade  
:log info "Routerboard updated"
/system reboot

}
There's still some details to work out, but I think I'm pretty close to making it work.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12687
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Add custom tool for routerboard upgrade

Thu Jan 23, 2025 9:18 pm

I cannot simply allow routers to auto-update or I would risk one router rebooting while another is still downloading.
Understand the point.

Yes, you can.
The auto-upgrade (of RouterBOOT / firmware / "BIOS") do not cause reboot on any way.
Simply next time RouterBOARD reboot for some reason (also a software update) new RouterBOOT is used.
 
MaxwellSilver
just joined
Topic Author
Posts: 19
Joined: Thu Oct 07, 2021 10:11 pm

Re: Add custom tool for routerboard upgrade

Thu Jan 23, 2025 9:23 pm

Thank you for clarifying that.