0

I need to map one serial port converter to static usb port so after my raspberry gets restarted I still have the right mapping.

I bought this USB-> serial port RS485 converter http://www.dx.com/p/usb-to-rs485-adapter-black-green-296620#.VZ5TnPmvXco And it looks like it is using chip CH-340. I need to change the serial number of this chip to be able to give it the same /dev/ttyUSBx in Linux after reboot.

I tried to find unique attributes using udevadm info -a -n /dev/ttyUSB1 but nothing is unique there, I have 4 of these converters connected and they all show the same serial number and vendor. Is there any chance to change the serial number or map them staticaly?

1
  • Is this the only USB->serial in the system or will there be others too? What is at ttyUSB0 when your RS485 become ttyUSB1? Jul 30, 2015 at 6:42

1 Answer 1

1

There is an article here which discusses this same issue and also another one here.

They both describe how to identify the specific device and then create a udev rule set to assign a static mapping.

3
  • Their rules are based on unique serial numbers. My usb2rs485 converters dont have unique serial numbers. Otherwise it would be easy for me to write some udev rulers but I cant find any unique parameter for them
    – Simon
    Jul 29, 2015 at 23:51
  • @Simon its odd that they don't have different serial numbers as by definition a serial number should be unique. However in the second link at the bottom it refers to the fact no serial number was available so they used the actual USB port as the unique identifier (assuming you always leave the devices plugged into the same port) as the way to map them Jul 30, 2015 at 7:31
  • I think that they are lowering the cost of production by not giving the unique serial number. Sorry I might not read correctly the second article. Will read it now. Thank you.
    – Simon
    Jul 30, 2015 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.