0

One of the scripts that i have been given to work with uses port numbers to communicate to the serial port like

 4001
 4002

Using a USB Serial hub which is connected to one machine and running the script from another machine but the actual ports are like,

/dev/ttyUSB0 
/dev/ttyUSB1 

How do i map /dev/ttyUSB0 with 4001 so that when i call the script and pass 192.168.X.X:4001, it should be able to communicate to the serial port ?

Vidur Oberoi
  • 75
  • 1
  • 3
  • 12

1 Answers1

2

In order to do the mapping, you are going to need some sort of daemon that can do the job. I have used ser2net to good effect to accomplish this. The ser2net daemon uses a configuration file to set up the port to service wrapper(s).

Jon Trauntvein
  • 4,453
  • 6
  • 39
  • 69