Development workflow for newer Routers?

Hi there,
after a long time I had a working solution, I will now renew my networking all over.

Part of this is a couple of new router configs, so I need to work myself into the magic of RouterOS. Formerly I had a 3011 with a console port. There it was easy: I developed a setup file, uploaded it to the router via ssh and reset the router config giving it the filename to run after reset. Worked brillantly.

Times have changed: now my routers (e.g. CRS310 and CRS305, soon a 5009) do not have a console port anymore. And up until now I simply failed to implement a working console connection via USB and WBOOM are no to be gotten anywhere in the market.

Problem is: I play a lot with VLANs and Firewall-rules and as such I tend to lock myself out of the router or otherwise brick the engine. So I need to reset the router config. Doing a full resel comes with manually going through the intial configuration. I tried to script that - half successful - via TCL/Expect, but I am not overly happy with the solution.

Here my question: how do you configure a router - automated - from full config reset to workable state?

Also: is there a clear description on how to get a stable connection to a router via USB/serial … what products … what config.

Keep in mind: my workstation to configure my routers is Linux … practically a Raspberry Pi 5.

Thanks in advance for any help, hints, ideas and discussion on this matter. (But please: “it is simple with Windows” does not help me further :sunglasses: )

PS: and yes, I intentionally posted this into the hardware topic, as the expected best probability for a solution for me is in getting the USB/Serial to work.

See here regarding serial over usb connection from Linux.
Expect can be usefull to automate login and execute commands on ROS for restoring configuration from backup after configuration reset.
Keep saved backups on flash or preferably on external USB drive (in this case you need USB hub connected to MT device) which will be persisted after reset.

For devices without console port (no usb or serial port) you are stuck with Winbox connection using MAC address.
Winbox can run over Wine on Linux and even executed from remote drvice which doesn’t run X windows, it is possible forward display to other system which runs X windows. But this is over GUI, I’m not familiar with tool/script engine on Linux which can perform GUI automation (probably exists), for eg. on MacOS it is possible to do such automations over AppleScript.

Thanks for the hint.

It gives me a holding point to start working at. So far my experiments on the USB-serial involved two Logilink-Adapters (FTDI) and either a nullmodem Adapter (no cable) and as an alternative a null-modem-cable. I got a connection and some characters went over the line and then the stream dropped and only sporadically a few characters went through in each direction. At 9600 baud I did not suspect a protocol issue like CTS/RTS config or Xon/Xoff. So my suspicion targetted the Logilink adapters. Knowing now that the Trendnet S9 is reported to work, give me a chance to eliminate one cause of trouble.

I’ll order two and report if that got me closer to a solution.

Thx for now.

RPi 5 has also BT, you can use just single usb to serial adapter connected to MT device and connect to it RS232 BT adapter like this one. In such case there is no need for physical connection with null-modem cable, over BT SPP is possible to establish serial connection.