ACM linux 驱动验证

1、load ko  

  The drivers/usb/class/cdc-acm.c drivers works with USB modems and USB ISDN terminal
adapters that conform to the Universal Serial Bus Communication Device Class
Abstract Control Model (USB CDC ACM) specification.

To use the modems you need these modules loaded:

        usbcore.ko
        uhci-hcd.ko ohci-hcd.ko or ehci-hcd.ko
        cdc-acm.ko

  After that, the modem[s] should be accessible. You should be able to use minicom, ppp and mgetty with them.

2. Verifying that it works

~~~~~~~~~~~~~~~~~~~~~~~~~~
  The first step would be to check /sys/kernel/debug/usb/devices, it should look like this:

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=6800
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  2
P:  Vendor=04c1 ProdID=008f Rev= 2.07
S:  Manufacturer=3Com Inc.
S:  Product=3Com U.S. Robotics Pro ISDN TA
S:  SerialNumber=UFT53A49BVT7
C:  #Ifs= 1 Cfg#= 1 Atr=60 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=acm
E:  Ad=85(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=128ms
C:* #Ifs= 2 Cfg#= 2 Atr=60 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=acm
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=128ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=acm
E:  Ad=85(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms

The presence of these three lines (and the Cls= 'comm' and 'data' classes) is important, it means it's an ACM device. The Driver=acm means the acm driver is used for the device. If you see only Cls=ff(vend.) then you're out of luck, you have a device with vendor specific-interface.

D:  Ver= 1.00 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  2
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=acm
I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=acm

In the system log you should see:

usb.c: USB new device connect, assigned device number 2
usb.c: kmalloc IF c7691fa0, numif 1
usb.c: kmalloc IF c7b5f3e0, numif 2
usb.c: skipped 4 class/vendor specific interface descriptors
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=3
usb.c: USB device number 2 default language ID 0x409
Manufacturer: 3Com Inc.
Product: 3Com U.S. Robotics Pro ISDN TA
SerialNumber: UFT53A49BVT7
acm.c: probing config 1
acm.c: probing config 2
ttyACM0: USB ACM device
acm.c: acm_control_msg: rq: 0x22 val: 0x0 len: 0x0 result: 0
acm.c: acm_control_msg: rq: 0x20 val: 0x0 len: 0x7 result: 7
usb.c: acm driver claimed interface c7b5f3e0
usb.c: acm driver claimed interface c7b5f3f8
usb.c: acm driver claimed interface c7691fa0

If all this seems to be OK, fire up minicom and set it to talk to the ttyACM device and try typing 'at'. If it responds with 'OK', then everything is working.
 

相关推荐

  1. ACM linux 驱动验证

    2024-04-05 14:38:05       43 阅读
  2. FPGA LCD1602驱动代码 (已验证

    2024-04-05 14:38:05       58 阅读
  3. 前端验收测试驱动开发

    2024-04-05 14:38:05       51 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-05 14:38:05       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-05 14:38:05       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-05 14:38:05       87 阅读
  4. Python语言-面向对象

    2024-04-05 14:38:05       96 阅读

热门阅读

  1. 每日一题 --- 前 K 个高频元素[力扣][Go]

    2024-04-05 14:38:05       36 阅读
  2. 蓝桥杯算法基础(37)BFS与DFS

    2024-04-05 14:38:05       27 阅读
  3. android studio中添加module依赖

    2024-04-05 14:38:05       35 阅读
  4. 其他元素

    2024-04-05 14:38:05       33 阅读
  5. [C++] 拷贝构造函数 && 深拷贝、浅拷贝

    2024-04-05 14:38:05       40 阅读
  6. 深入解析二叉树:理论与实践的完美结合

    2024-04-05 14:38:05       36 阅读
  7. 实验3-10 计算油费

    2024-04-05 14:38:05       37 阅读
  8. 什么是深度学习

    2024-04-05 14:38:05       35 阅读
  9. 实验6-1 近似求PI

    2024-04-05 14:38:05       34 阅读
  10. 【Python第三方库】lxml 解析器和xpath路径语言

    2024-04-05 14:38:05       41 阅读
  11. 多线程(31)StampedLock和ReadWriteLock

    2024-04-05 14:38:05       38 阅读