| 
		
	
	
	
		
	Posts: 19 
	Threads: 3 
	Joined: Feb 2015
	
 Reputation: 
0 
	
	
		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?
	 
	
	
	
		
	Posts: 1,484 
	Threads: 96 
	Joined: Mar 2014
	
 Reputation: 
0 
	
	
		Hi,
If you Google for " reading serial port data in linux " There is a wealth of info on doing it from the connected device.
Which if I understand your comment you say "The Laptop is not an issue" implies that you can get the data O.K.
But you want to do it from another PC on the network. The only thing that springs to mind is doing a "ssh" session
"FROM" the Laptop that needs to access the data, "TO" the other Laptop(Remote) with the USB/GPS device.
Take a look at this on doing "ssh"
https://dfgkh547-jsdfv8.iyhkj.tk/forums/on-to...2/#msg8742
Dave
	 
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks  Computers Early days: 
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
 
	
	
	
		
	Posts: 19 
	Threads: 3 
	Joined: Feb 2015
	
 Reputation: 
0 
	
	
		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.
	 
	
	
	
		
	Posts: 1,484 
	Threads: 96 
	Joined: Mar 2014
	
 Reputation: 
0 
	
	
		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
	
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks  Computers Early days: 
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
 
	
	
	
		
	Posts: 201 
	Threads: 21 
	Joined: Jun 2014
	
 Reputation: 
0 
	
	
		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
1) Lenovo T520 i5 LL3.8 8GB ram, fast & stable 2) Medion P4 32bit LL3.8 1GB ram, quite fast & stable
 3) eeePC 901 32bit LL3.8 1GB ram, fast & stable
 4) eeePC 701 32bit LL3.8 1GB ram, slower & stable but small and light enough to travel with me to New Zealand when visiting family in Blenheim.
 
	
	
	
		
	Posts: 1,484 
	Threads: 96 
	Joined: Mar 2014
	
 Reputation: 
0 
	
	
		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
 
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks  Computers Early days: 
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
 
	
	
	
		
	Posts: 19 
	Threads: 3 
	Joined: Feb 2015
	
 Reputation: 
0 
	
	
		 (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?
	 
	
	
	
		
	Posts: 201 
	Threads: 21 
	Joined: Jun 2014
	
 Reputation: 
0 
	
		
		
		05-12-2015, 09:12 AM 
(This post was last modified: 05-12-2015, 09:23 AM by justme2.)
		
	 
		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. 
	
1) Lenovo T520 i5 LL3.8 8GB ram, fast & stable 2) Medion P4 32bit LL3.8 1GB ram, quite fast & stable
 3) eeePC 901 32bit LL3.8 1GB ram, fast & stable
 4) eeePC 701 32bit LL3.8 1GB ram, slower & stable but small and light enough to travel with me to New Zealand when visiting family in Blenheim.
 
	
	
	
		
	Posts: 19 
	Threads: 3 
	Joined: Feb 2015
	
 Reputation: 
0 
	
	
		 (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?
	 
	
	
	
		
	Posts: 1,484 
	Threads: 96 
	Joined: Mar 2014
	
 Reputation: 
0 
	
	
		Nice work justme2, Thanks.I've bookmarked this myself.
 
 Dave
 
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks  Computers Early days: 
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
 |