I have a need to be able to map a serial port to an IP address. The situation is a Linux lite machine connected via USB to a GPS, this machine is connected to a router via Ethernet, a laptop is connected to this router via WiFi. The laptop needs to get the GPS data via an IP port. In windows this can be done using virtual serial port emulator. The laptop is not a problem, the Linux lite machine on the Ethernet is where I need a solution. Have tried without success to use serial port to network proxy.. Any ideas please?
The laptop is not an issue as the app I use can read data if it is provided on the net. This is required from the host Ethernet connected machine.
O.K,
I think I got it this time, Laptop with USB GPS and app works fine.
You want however to run the app from another network connected PC.
The only other thing I came across whilst looking at a similar need was "
socat"
It appears to allow you to tunnel/pass data from 1 device to another, maybe worth looking at..??
Scroll down to docs and examples, bit to techy for me...
http://www.dest-unreach.org/socat/
Dave
Hi justme2,
Thanks for that, looks a bit over my head, but hopefully helps Quinco out...
I may be missing it..??
I could not see how you define a port on on another machine to be the source of the data...
Maybe I just didn't look hard enough, it just looked like is was all on 1 machine.
Thanks - Dave
(05-11-2015, 11:17 AM)justme2 link Wrote: [ -> ]I run a serial port via IP address with ser2net which is in the LL repository. Its easy to use, configuration by means of a config file.
http://manpages.ubuntu.com/manpages/utop...net.8.html
Installed ser2net and tried the config file,, no go, so sent the following command to no result,,
ser2net /dev/ttyUSB0:192.168.0.2:1000:4800
also tried it this way,,
ser2net 192.168.0.2:1000:4800:/dev/ttyUSB0
still no good, any clues?
My configuration uses port 8010 to access the serial port via either the internet or local network. So if I understand your requirements, ser2net would be running on the machine with the serial port and accessed via the IP address and allocated port of the machine eg 192.168.1.5:8010. (or
www.yourUrl.org:8010) The port needs to be opened on the router and the machine firewall if one is used.
ser2net listens receives and sends via port 8010. Only one connection at a time is permitted, other connection attempts are rejected.
This is the ser2net config file for my system, change to suit:
8010:raw:60:/dev/ttyACM0:9600 NONE 1STOPBIT 8DATABITS XONXOFF
Here's a link which may explain better than I can:
http://techtinkering.com/2013/04/02/conn...ver-tcpip/
Hope that helps, as I find ser2net provides all my serial requirements very reliably.
(05-12-2015, 09:12 AM)justme2 link Wrote: [ -> ]My configuration uses port 8010 to access the serial port via either the internet or local network. So if I understand your requirements, ser2net would be running on the machine with the serial port and accessed via the IP address and allocated port of the machine eg 192.168.1.5:8010. (or www.yourUrl.org:8010) The port needs to be opened on the router and the machine firewall if one is used.
ser2net listens receives and sends via port 8010. Only one connection at a time is permitted, other connection attempts are rejected.
This is the ser2net config file for my system, change to suit:
8010:raw:60:/dev/ttyACM0:9600 NONE 1STOPBIT 8DATABITS XONXOFF
Here's a link which may explain better than I can:
http://techtinkering.com/2013/04/02/conn...ver-tcpip/
Hope that helps, as I find ser2net provides all my serial requirements very reliably.
(05-12-2015, 09:12 AM)justme2 link Wrote: [ -> ]My configuration uses port 8010 to access the serial port via either the internet or local network. So if I understand your requirements, ser2net would be running on the machine with the serial port and accessed via the IP address and allocated port of the machine eg 192.168.1.5:8010. (or www.yourUrl.org:8010) The port needs to be opened on the router and the machine firewall if one is used.
ser2net listens receives and sends via port 8010. Only one connection at a time is permitted, other connection attempts are rejected.
This is the ser2net config file for my system, change to suit:
8010:raw:60:/dev/ttyACM0:9600 NONE 1STOPBIT 8DATABITS XONXOFF
Here's a link which may explain better than I can:
http://techtinkering.com/2013/04/02/conn...ver-tcpip/
Hope that helps, as I find ser2net provides all my serial requirements very reliably.
Thanks, works great. Is there a command to turn it off?
Nice work justme2, Thanks.
I've bookmarked this myself.
Dave