Just discovered that, too. But itās a bit cumbersomeā¦
I want to share the solution I came up with with the other forum members, just in case someone needs it someday:
To send out a string over a serial port, you can use this:
/interface ppp-client add name="scripttemp" port=serial0 modem-init="I am the string" null-modem=yes disabled=no
:delay 1
/interface ppp-client remove [/interface ppp-client find name="scripttemp"]
This assumes that:
you want to use port serial0
you have configured port serial0 (baud rate etc.)
port serial0 is not used by serial-console
It will print the string configured as modem-init string to the serial port (in the example that would be āI am the stringā (without the quotes)).
Setting null-modem to yes stops RouterOS to send an āATHā command (hang up) before doing anything else.
You have to disable (or remove, like above) the interface quickly after creating or enabling it, because some seconds after the init string RouterOS will try to negotiate PPP over the link anyway, and we donāt want to get this to get out over the serial port.
Perhaps someone can come up with a more elegant solution, but this seems to work.
What does not always work, though, is to just have the ppp-plient configured and disabled and then just enabling it for one second to send out the text. Sometimes after enabling it would send out the init string in my tests, but sometimes not and just start PPP ngeotiation right awayā¦