如何让Ubuntu/Raspian将Crouzet Millenium 3 PLC识别为tty设备 [英] How to get Ubuntu/Raspian to recognise a Crouzet Millenium 3 PLC as tty device

查看:132
本文介绍了如何让Ubuntu/Raspian将Crouzet Millenium 3 PLC识别为tty设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我通过USB串行电缆将"Crouzet-Millenium 3 PLC"连接到我的Ubuntu笔记本电脑时,将给出以下dmesg输出:

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샚ሐ•फ

该设备显示在以下位置:/dev/bus/usb/001/021

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

但是为了在我的程序中建立串行连接,我相信设备需要在tty子系统中注册并显示为/dev/tty *.

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*.

lsusb输出如下:

The lsusb output is as follows:

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

我尝试添加udev规则在文件/etc/udev/rules.d/10-microontroller.rules下注册设备,

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"

我的目标是将该PLC注册为tty *设备,以便建立与该设备的串行连接.我已经在Ubuntu笔记本电脑和Raspberrypi3上尝试了相同的结果.

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!

推荐答案

我最近在使用Schneider(Telemecanique TSXCUSB485)的USB电缆遇到了同样的问题.

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

您的设备似乎在内部使用了相同的FTDI芯片,因此这也可能对您有用.

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

这是我固定的方法:

自我提升:

sudo -i

移动到驱动程序树文件夹:

Move to the driver tree folder:

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

将产品的VID和PID分配给驱动程序的new_id文件:

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

echo 0403 7d51 >new_id

来源: Debian论坛StackOverflow问题.第二个来源包括在需要时永久保留此更改的方法.

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

这篇关于如何让Ubuntu/Raspian将Crouzet Millenium 3 PLC识别为tty设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆