简体   繁体   English

未检测到 FTDI 设备

[英]FTDI Device not detected

After connecting an FTDI device to the USB port, FT_OpenEx() returns an error code 2 which is FT_DEVICE_NOT_FOUND .将 FTDI 设备连接到 USB 端口后, FT_OpenEx()返回错误代码 2,即FT_DEVICE_NOT_FOUND However on running "lsusb" in the terminal, the FTDI device does show up.然而,在终端中运行“lsusb”时,FTDI 设备确实出现了。 What is causing FT_Open_Ex() to return FT_DEVICE_NOT_FOUND if the device is listed by lsusb?如果设备由 lsusb 列出,是什么导致FT_Open_Ex()返回FT_DEVICE_NOT_FOUND What are the possible issues and solutions?可能的问题和解决方案是什么?

Output of lsusb: lsusb的输出:

Bus 001 Device 003: ID 0bda:5776 Realtek Semiconductor Corp. 
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of dmesg | dmesg 的输出 | grep FTDI : grep FTDI:

[28153.244220] usbserial: USB Serial support registered for FTDI USB Serial Device
[28153.244260] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
[28153.244509] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0

Output of dmesg | dmesg 的输出 | grep -i FTDI: grep -i FTDI:

[28153.244206] usbcore: registered new interface driver ftdi_sio
[28153.244220] usbserial: USB Serial support registered for FTDI USB Serial Device
[28153.244260] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
[28153.244509] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0

After connecting an FTDI device to the USB port, FT_OpenEx() returns an error code 2 which is FT_DEVICE_NOT_FOUND .将 FTDI 设备连接到 USB 端口后, FT_OpenEx()返回错误代码 2,即FT_DEVICE_NOT_FOUND However on running "lsusb" in the terminal, the FTDI device does show up.但是,在终端中运行“lsusb”时,FTDI 设备确实出现了。 What is causing FT_Open_Ex() to return FT_DEVICE_NOT_FOUND if the device is listed by lsusb?如果 lsusb 列出了设备,是什么导致FT_Open_Ex()返回FT_DEVICE_NOT_FOUND What are the possible issues and solutions?可能出现的问题和解决方案是什么?

Output of lsusb: lsusb 的输出:

Bus 001 Device 003: ID 0bda:5776 Realtek Semiconductor Corp. 
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of dmesg | dmesg 的输出 | grep FTDI : grep FTDI :

[28153.244220] usbserial: USB Serial support registered for FTDI USB Serial Device
[28153.244260] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
[28153.244509] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0

Output of dmesg | dmesg 的输出 | grep -i FTDI: grep -i FTDI:

[28153.244206] usbcore: registered new interface driver ftdi_sio
[28153.244220] usbserial: USB Serial support registered for FTDI USB Serial Device
[28153.244260] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
[28153.244509] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0

One possible issue: 一个可能的问题:

If you have no root permissions while using the program (which uses the FT_OpenEx function) you get error code 2 如果您在使用程序(使用FT_OpenEx函数)时没有root权限,则会收到错误代码2

Solution to this specific issue: 解决此特定问题的方法:

sudo ./"your FT program"

Do you have read/write permissions on the device?您对设备有读/写权限吗? can you try sudo chmod 666 /dev/ttyUSB0你能试试 sudo chmod 666 /dev/ttyUSB0

to make this permanent make a udev rule使此永久生效 制定 udev 规则

create this file /etc/udev/rules.d/99-ftdi.rules创建此文件 /etc/udev/rules.d/99-ftdi.rules

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS={idProduct}=="6001" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS={idProduct}=="6001"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM