Page 1 of 1

Add custom tool for routerboard upgrade

Posted: Wed Jan 22, 2025 3:35 am
by MaxwellSilver
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

Re: Add custom tool for routerboard upgrade

Posted: Thu Jan 23, 2025 12:30 pm
by stmx38
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"

Re: Add custom tool for routerboard upgrade

Posted: Thu Jan 23, 2025 6:58 pm
by MaxwellSilver
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.

Re: Add custom tool for routerboard upgrade

Posted: Thu Jan 23, 2025 7:04 pm
by rextended
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.

Re: Add custom tool for routerboard upgrade

Posted: Thu Jan 23, 2025 8:30 pm
by MaxwellSilver
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.

Re: Add custom tool for routerboard upgrade

Posted: Thu Jan 23, 2025 9:18 pm
by rextended
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.

Re: Add custom tool for routerboard upgrade

Posted: Thu Jan 23, 2025 9:23 pm
by MaxwellSilver
Thank you for clarifying that.