Community discussions

MikroTik App
 
User avatar
Sertik
Member
Member
Topic Author
Posts: 435
Joined: Fri Sep 25, 2020 3:30 pm
Location: Russia, Moscow

output data to serial port using script

Thu Nov 23, 2023 12:47 pm

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?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: output data to serial port using script

Thu Nov 23, 2023 7:08 pm

 
User avatar
Sertik
Member
Member
Topic Author
Posts: 435
Joined: Fri Sep 25, 2020 3:30 pm
Location: Russia, Moscow

Re: output data to serial port using script

Thu Nov 23, 2023 8:35 pm

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.

Who is online

Users browsing this forum: No registered users and 15 guests