output data to serial port using script

already asked somewhere but no one answered. Maybe I asked in the wrong section of the forum. I’ll ask separately again: is it possible to somehow use a script to output data to the serial port of Mikrotik? As far as I understand from the descriptions, the output comes only from the keyboard, and I would need to output something like :put with the command, but it seems like such output only appears on the screen, but not to the port.

I am wrong ?

I’ll explain why this is necessary. I want to connect a device to the serial port, to which I need to output hexadecimal data, which are commands for it. This needs to be done with a script, not with the keyboard. Why doesn’t Mikrotik’s :put work as well as in Linux, where you can output it anywhere with a similar command?

Nothing from GPT4?


http://forum.mikrotik.com/t/serial2http-container-to-bridge-serial-to-the-routeros-cli/164589/1
http://forum.mikrotik.com/t/get-the-data-over-serial-port/21656/4

Thanks Rex, but it’s too complicated for me. I’ve found another way so far. I have a device that can do this and it is controlled by http requests. That is, I can send an http request to this device from Mikrotik, and it will already transfer the data to whoever needs it.
It’s a pity that Mikrotik cannot transfer data to the port from scripts directly. This is a developer flaw that they can easily fix if they want.