简体   繁体   English

用于SAM7串行的嵌入式Linux USB驱动程序

[英]Embedded Linux USB driver for SAM7 serial

I have a device using an Atmel processor running under Linux. 我有一台使用在Linux下运行的Atmel处理器的设备。 To this device I want to connect a remote device using a AT91SAM7 processor. 我想使用AT91SAM7处理器将远程设备连接到此设备。 This remote device is configured to do a pseudo-serial over the USB, under Windows this works fine and shows up as "AT91 USB to Serial Converter (COM3)". 将此远程设备配置为通过USB执行伪串行,在Windows下可以正常工作,并显示为“ AT91 USB到串行转换器(COM3)”。

Under Linux the device appears in the /dev as following: 在Linux下,设备显示在/ dev中,如下所示:

crw-rw----    1 root     root     253,   7 Aug 30 10:52 /dev/usbdev2.2_ep00
crw-rw----    1 root     root     253,   5 Aug 30 10:52 /dev/usbdev2.2_ep01
crw-rw----    1 root     root     253,   6 Aug 30 10:52 /dev/usbdev2.2_ep82
crw-rw----    1 root     root     253,   4 Aug 30 10:52 /dev/usbdev2.2_ep83

What must I do in order to communicate with the device? 为了与设备通信,我该怎么做? Some driver to bind into the kernel? 一些驱动程序绑定到内核? Or does a loadable driver (.ko) exist? 还是存在可加载的驱动程序(.ko)?

Based on what yo wrote, the embedded board with the AT91SAM7 processor is correctly configured, since it works when you connect it to a windows host. 根据您所写的内容,带有AT91SAM7处理器的嵌入式板已正确配置,因为当您将其连接到Windows主机时它可以工作。

If it does not work under linux, probably it is due to the fact that it does not recognize the vendorid:productid values. 如果它在Linux下不起作用,则可能是由于它无法识别vendorid:productid值。

On the linux host check the output of lsusb : 在linux主机上,检查lsusb的输出:

ottavio@ottavio:~$ lsusb 
Bus 004 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
ottavio@ottavio:~$

in this case, that a USB<->RS232 converter I have on my computer. 在这种情况下,我的计算机上装有USB <-> RS232转换器。 You should have a line related to your board when you plug it. 插入时,您的电路板应与线路相关。

Now, depending on your system you may need to user usbserial or ftdi_sio . 现在,根据您的系统,您可能需要使用usbserialftdi_sio So try first to load usbserial 因此,请先尝试加载usbserial

modprobe usbserial vendor=0x067b product=0x2303

if this does not work try loading ftdi_sio 如果这不起作用,请尝试加载ftdi_sio

modprobe ftdi_sio vendor=0x067b product=0x2303

Pay attatention that if the modules are already loaded you need to rmmod them. 请注意,如果模块已经加载,则需要对其进行rmmod Finally, in my example vendrid is 0x067b and product is 0x2303, you'll need to use the correct values. 最后,在我的示例中,vendrid为0x067b,乘积为0x2303,您将需要使用正确的值。

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

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