Community discussions

 
el berto
Member Candidate
Member Candidate
Topic Author
Posts: 197
Joined: Wed Sep 26, 2007 10:53 am

Beginner: possible send/receive data through serial port?

Tue Oct 30, 2007 2:04 pm

Hi, it's first time I'm trying to use routerboard scripts:
I would like to know if it's possible excange data through serial port.
Example:
I have a PC connected to routerboard througn serial port: I need the routerboard sends 3 bytes to PC, then read the 3 bytes answer.
Is it possible?
Which commands have I to use?
Thanks.
 
User avatar
krigevr
Member Candidate
Member Candidate
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Re: Beginner: possible send/receive data through serial port?

Tue Oct 30, 2007 2:08 pm

Mikrotik's Serial setup responds to standard AT commands.

http://en.wikibooks.org/wiki/Serial_Pro ... T_Commands

I'm not sure which of these commands are (or are not) supported by (or necessary for) Mikrotik.
 
el berto
Member Candidate
Member Candidate
Topic Author
Posts: 197
Joined: Wed Sep 26, 2007 10:53 am

Re: Beginner: possible send/receive data through serial port?

Tue Oct 30, 2007 2:50 pm

Ok, but if I have the At command "A" and I'm talking with a modem, how can I send the "A" command to modem without using keyboard?
 
User avatar
krigevr
Member Candidate
Member Candidate
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Re: Beginner: possible send/receive data through serial port?

Wed Oct 31, 2007 8:30 am

... script?

I've not dealt with communicating with the Serial port before, but a script can execute just about any console command. See what commands you will use to send the comms using a Keyboard, and put it down in a script, and see what happens.

I'm going to start experimenting with it as well, because I want to attach a Duxbury GSM modem to a RouterBoard to send text messages as part of my netwatcher.

-K
 
el berto
Member Candidate
Member Candidate
Topic Author
Posts: 197
Joined: Wed Sep 26, 2007 10:53 am

Re: Beginner: possible send/receive data through serial port?

Mon Nov 19, 2007 12:53 pm

Ok, I've found It's possible connect to serial GPRS modem through System->Serial-terminal, but If I try to use the serial port (Serial0) I have a message the port is already in use: anyone can tell me why?
 
kutuz
just joined
Posts: 24
Joined: Thu Dec 15, 2005 12:16 pm

Re: Beginner: possible send/receive data through serial port?

Tue Nov 27, 2007 8:48 am

Serial0 usually is used as Serial Console. You need to disable it:

http://forum.mikrotik.com/viewtopic.php?p=92576#p92576

First you need to disable the serial console.

/system console print
Flags: X - disabled, U - used, F - free
# PORT TERM
0 F serial0
/system console disable 0

Who is online

Users browsing this forum: No registered users and 13 guests