Difference between revisions of "Manual:sending text out over a serial port"
Jump to navigation
Jump to search
(Created page with "Sometimes there's a need to send out some (short) text over a serial port to control other devices.<br /> As RadioOS doesn't (yet?) provide a native command to do that, you ca...") |
|||
Line 1: | Line 1: | ||
Sometimes there's a need to send out some (short) text over a serial port to control other devices.<br /> | Sometimes there's a need to send out some (short) text over a serial port to control other devices.<br /> | ||
As RadioOS doesn't | As RadioOS doesn't provide a native command to do that, you can work around with the following little script: | ||
/interface ppp-client add name="scripttemp" dial-on-demand=no port=serial0 \ | /interface ppp-client add name="scripttemp" dial-on-demand=no port=serial0 \ |
Revision as of 17:46, 17 December 2015
Sometimes there's a need to send out some (short) text over a serial port to control other devices.
As RadioOS doesn't provide a native command to do that, you can work around with the following little script:
/interface ppp-client add name="scripttemp" dial-on-demand=no 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"]
The following assumptions were made:
- We want to use serial port "serial0"
- We have configured the serial port to match the other devices' setup (baud-rate etc.)
- serial0 (or whatever port you use) is not used by RadioOS serial-console
The script sends the text configured as modem-init string out over the serial port when run.
So in the example above, it would send "I am the string" (without the quotes).