Community discussions

MikroTik App
 
User avatar
tplecko
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Mon Jun 11, 2007 12:18 pm
Location: Croatia
Contact:

Forwarding data from serial port to specific IP and port

Mon Sep 14, 2009 8:46 am

Good morning everybody.

Is it possible, using RouterOS to do the following.

I have a device on the serial port.
The device just outputs data to serial port.
I usualy used a serial to ip module (from TIBBO). That module connected to an ip address and port and just forwarded that serial data to that ip (where an application knew what to do with the data)

So, what i am trying is to forward data from serial port to an ip (eg. 10.0.0.50:1001) (on any condition and without having to enter username or password anywhere)
My serial port is allready configured for remote access (since i wanted to connect to the device for configuration purposes)



thanks
 
User avatar
tplecko
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Mon Jun 11, 2007 12:18 pm
Location: Croatia
Contact:

Re: Forwarding data from serial port to specific IP and port

Mon Sep 14, 2009 8:56 am

I don't have the device here so here is just a thought (and i'll test later)
if i create a ppp-client named ppp-serial0 (with no user data) on my serial0 port and create a dst nat rule that translates all data with incoming port ppp-serial0 to ip 10.0.0.50?

could this work?



thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Forwarding data from serial port to specific IP and port

Mon Sep 14, 2009 10:31 am

 
User avatar
tplecko
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Mon Jun 11, 2007 12:18 pm
Location: Croatia
Contact:

Re: Forwarding data from serial port to specific IP and port

Mon Sep 14, 2009 6:28 pm

No.... the other way around...
Now i have a problem that some ISP's block traffic (one way) to mobile devices, so from my server i can't connect to some routerboards with hsdpa , bud those same routers can connect to that server.

So, out of 50 devices, 40 works fine. The remaining ten are unreachable from the server, but can connect to the server.
Now, if only there was a way to forward incoming data on serial port to a specific IP address and port.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Forwarding data from serial port to specific IP and port

Mon Sep 14, 2009 7:55 pm

well, your RBs may initiate some tunnel to your server (like eoip, pptp, etc.), and you will connect via tunnel
 
User avatar
tplecko
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Mon Jun 11, 2007 12:18 pm
Location: Croatia
Contact:

Re: Forwarding data from serial port to specific IP and port

Mon Sep 14, 2009 8:51 pm

That's what i would do, but there is a dumb router for internet access which has no VPN capabilityes.
If i had MT there, i would have no questions. I am forced to adapt to the situation.
 
User avatar
tplecko
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Mon Jun 11, 2007 12:18 pm
Location: Croatia
Contact:

Re: Forwarding data from serial port to specific IP and port

Tue Sep 15, 2009 9:57 pm

anyone?

is there a way to forward data from serial port to an ip address and port?
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: Forwarding data from serial port to specific IP and port

Thu Sep 17, 2009 7:21 pm

use /port remote-access and add a new entry with type = RAW and tell it what port to listen on. you can then use netcat or other utility to talk directly to the serial port over ethernet.

Sam
 
User avatar
tplecko
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Mon Jun 11, 2007 12:18 pm
Location: Croatia
Contact:

Re: Forwarding data from serial port to specific IP and port

Tue Sep 22, 2009 1:42 pm

use /port remote-access and add a new entry with type = RAW and tell it what port to listen on. you can then use netcat or other utility to talk directly to the serial port over ethernet.

Sam
I am allready able to comunicate with my serial-only device that is connected to my routerboard.
What i need now is for routerboard to initiate a connection to that server and relay data from serial0 to server IP and back again (serial device sends rfid card number and server responds with a simple 'got it' so device can send the next number.


Like i said. it works fine if server initiates the connection to rb.
i need instructions on how to make rb to initiate a connection to seerver.

Who is online

Users browsing this forum: glueck05, pedroush, Tobi26 and 51 guests