You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Serial ports to IP

Author (Read 10268 times)

0 Members and 2 Guests are viewing this topic.

Re: Serial ports to IP
« Reply #11 on: May 14, 2015, 05:04:06 AM »
 

justme2

  • PayPal Supporter
  • Forum Regular
  • *****
  • 201
    Posts
  • Reputation: 25
  • Linux Lite Member
    • View Profile

  • CPU: Intel i5 vPro

  • MEMORY: 8Gb

  • VIDEO CARD: Intel
@Quinco - to close ser2net just close the terminal window or if run as a service, 'service ser2net stop' as a terminal command.
'service ser2net start' to run again.

Pleased to be giving help instead of just being a recipient. Just passing on info learned from others.  ;)
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.
 

Re: Serial ports to IP
« Reply #10 on: May 13, 2015, 08:49:09 PM »
 

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1484
    Posts
  • Reputation: 405
  • Linux Lite "Advocate"
    • View Profile

  • CPU: i7-4790S

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD4600 (Integrated)
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)
 

Re: Serial ports to IP
« Reply #9 on: May 13, 2015, 06:54:36 PM »
 

Quinco

  • New to Forums
  • *
  • 19
    Posts
  • Reputation: 1
  • Linux Lite Member
    • View Profile
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/connecting-to-a-remote-serial-port-over-tcpip/

Hope that helps, as I find ser2net provides all my serial requirements very reliably.


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/connecting-to-a-remote-serial-port-over-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?
 

Re: Serial ports to IP
« Reply #8 on: May 12, 2015, 05:12:59 AM »
 

justme2

  • PayPal Supporter
  • Forum Regular
  • *****
  • 201
    Posts
  • Reputation: 25
  • Linux Lite Member
    • View Profile

  • CPU: Intel i5 vPro

  • MEMORY: 8Gb

  • VIDEO CARD: Intel
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/connecting-to-a-remote-serial-port-over-tcpip/

Hope that helps, as I find ser2net provides all my serial requirements very reliably.

« Last Edit: May 12, 2015, 05:23:11 AM by justme2 »
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.
 

Re: Serial ports to IP
« Reply #7 on: May 12, 2015, 02:38:40 AM »
 

Quinco

  • New to Forums
  • *
  • 19
    Posts
  • Reputation: 1
  • Linux Lite Member
    • View Profile
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/utopic/man8/ser2net.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?
 

Re: Serial ports to IP
« Reply #6 on: May 11, 2015, 05:50:12 PM »
 

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1484
    Posts
  • Reputation: 405
  • Linux Lite "Advocate"
    • View Profile

  • CPU: i7-4790S

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD4600 (Integrated)
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)
 

Re: Serial ports to IP
« Reply #5 on: May 11, 2015, 07:17:10 AM »
 

justme2

  • PayPal Supporter
  • Forum Regular
  • *****
  • 201
    Posts
  • Reputation: 25
  • Linux Lite Member
    • View Profile

  • CPU: Intel i5 vPro

  • MEMORY: 8Gb

  • VIDEO CARD: Intel
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/utopic/man8/ser2net.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.
 

Re: Serial ports to IP
« Reply #4 on: May 10, 2015, 10:34:09 PM »
 

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1484
    Posts
  • Reputation: 405
  • Linux Lite "Advocate"
    • View Profile

  • CPU: i7-4790S

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD4600 (Integrated)
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)
 

Re: Serial ports to IP
« Reply #3 on: May 10, 2015, 10:17:51 PM »
 

Quinco

  • New to Forums
  • *
  • 19
    Posts
  • Reputation: 1
  • Linux Lite Member
    • View Profile
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.
 

Re: Serial ports to IP
« Reply #2 on: May 10, 2015, 09:06:00 PM »
 

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1484
    Posts
  • Reputation: 405
  • Linux Lite "Advocate"
    • View Profile

  • CPU: i7-4790S

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD4600 (Integrated)
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://www.linuxliteos.com/forums/on-topic/remote-'terminal'-access/msg8742/#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)
 

Serial ports to IP
« Reply #1 on: May 10, 2015, 07:44:36 PM »
 

Quinco

  • New to Forums
  • *
  • 19
    Posts
  • Reputation: 1
  • Linux Lite Member
    • View Profile
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?
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section