How to get Ubuntu/Raspian to recognise a Crouzet Millenium 3 PLC as tty device

一个人想着一个人 提交于 2019-12-11 15:17:41

问题


When I connect the 'Crouzet - Millenium 3 PLC' to my Ubuntu laptop via a USB serial cable the following dmesg output is given:

    [ 3494.555189] usb 1-2: new full-speed USB device number 21 using xhci_hcd
    [ 3494.711593] usb 1-2: New USB device found, idVendor=0403, idProduct=7d51, bcdDevice= 6.00
    [ 3494.711596] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 3494.711598] usb 1-2: Product: Millenium 3 USB cable
    [ 3494.711600] usb 1-2: Manufacturer: Crouzet Automatisme SAS
    [ 3494.711601] usb 1-2: SerialNumber: A62C샚ሐ•फ

And the device appears under: /dev/bus/usb/001/021

But in order to establish a serial connection in my program I believe the device needs to be registered in the tty subsystem and appear as /dev/tty*.

The lsusb output is as follows:

Bus 001 Device 021: ID 0403:7d51 Future Technology Devices International, Ltd

I have tried adding a udev rule to register the device as such under the file: /etc/udev/rules.d/10-microontroller.rules

  ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="7d51", ATTRS{serial}=="00492F60", MODE="666",SYMLINK+="millenium-3"

My goal is to register this PLC as a tty* device in order to establish a serial connection to the device. I have tried on both my Ubuntu laptop and also a Raspberrypi3 with the same results.

I am not sure if I require specific drivers in order for this to work, none are provided on the manufacturers website for any OS.

This type of software development is all fairly new to me so any help would be greatly appreciated!


回答1:


I had this very same problem with a USB cable from Schneider (Telemecanique TSXCUSB485) very recently.

It seems that your device uses the same FTDI chip inside, so this might also work for you.

This is how I fixed it:

Elevate yourself:

sudo -i

Move to the driver tree folder:

cd /sys/bus/usb-serial/drivers/ftdi_sio/

Assign the VID and PID of your product to the driver's new_id file:

echo 0403 7d51 >new_id

Sources: Debian Forums, StackOverflow Question. The second source includes a way to make this change permanent, in case you need to.



来源:https://stackoverflow.com/questions/56443367/how-to-get-ubuntu-raspian-to-recognise-a-crouzet-millenium-3-plc-as-tty-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!