当前位置: 技术问答>linux和unix
嵌入式linux用usb接3G手机模块 以及usb虚拟串口的测试问题
来源: 互联网 发布时间:2017-02-27
本文导语: 我想将一个3G手机模块接到板子上,看看能不能上网。根据网上的资料,添加了USB GenericSerialDriver 和USB driver for GSM and CDMA modems。当我将手机模块插到板子上时,提示如下信息: # insmod usbserial.ko vendor=0x12D1 produ...
我想将一个3G手机模块接到板子上,看看能不能上网。根据网上的资料,添加了USB GenericSerialDriver 和USB driver for GSM and CDMA modems。当我将手机模块插到板子上时,提示如下信息:
# insmod usbserial.ko vendor=0x12D1 product=0x1001
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
# insmod option.ko
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
# usb 2-1: new full speed USB device using musb_hdrc and address 2
usb 2-1: device v12d1 p1001 is not supported
usb 2-1: rejected 1 configuration due to insufficient available bus power
usb 2-1: no configuration chosen from 1 choice
在dev下也没有看见虚拟出来的串口。
紧接着,我接了一个有外部供电的usb hub,将手机模块接到hub上,系统提示的信息如下:
# insmod usbserial.ko vendor=0x12D1 product=0x1001
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
# insmod option.ko
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
# usb 2-1: new high speed USB device using musb_hdrc and address 2
hub 2-1:1.0: USB hub found
hub 2-1:1.0: 4 ports detected
usb 2-1.2: new full speed USB device using musb_hdrc and address 3
usb 2-1.2: device v12d1 p1001 is not supported
option 2-1.2:1.0: GSM modem (1-port) converter detected
usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB0
option 2-1.2:1.1: GSM modem (1-port) converter detected
usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB1
option 2-1.2:1.2: GSM modem (1-port) converter detected
usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB2
我不大明白,为什么一直会提示device v12d1 p1001 is not supported,这个手机模块是华为的,vid,pid在option.c文件里也都有,后来我自己又在数组前添加了一次USB_DEVICE但是提示还是一样,有人知道是什么问题吗?
另外,我现在想测试一下ttyUSB0这些虚拟串口,不知道谁有没有这类的测试程序或者比较好的测试方法指点下,谢谢。
# insmod usbserial.ko vendor=0x12D1 product=0x1001
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
# insmod option.ko
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
# usb 2-1: new full speed USB device using musb_hdrc and address 2
usb 2-1: device v12d1 p1001 is not supported
usb 2-1: rejected 1 configuration due to insufficient available bus power
usb 2-1: no configuration chosen from 1 choice
在dev下也没有看见虚拟出来的串口。
紧接着,我接了一个有外部供电的usb hub,将手机模块接到hub上,系统提示的信息如下:
# insmod usbserial.ko vendor=0x12D1 product=0x1001
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
# insmod option.ko
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
# usb 2-1: new high speed USB device using musb_hdrc and address 2
hub 2-1:1.0: USB hub found
hub 2-1:1.0: 4 ports detected
usb 2-1.2: new full speed USB device using musb_hdrc and address 3
usb 2-1.2: device v12d1 p1001 is not supported
option 2-1.2:1.0: GSM modem (1-port) converter detected
usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB0
option 2-1.2:1.1: GSM modem (1-port) converter detected
usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB1
option 2-1.2:1.2: GSM modem (1-port) converter detected
usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB2
我不大明白,为什么一直会提示device v12d1 p1001 is not supported,这个手机模块是华为的,vid,pid在option.c文件里也都有,后来我自己又在数组前添加了一次USB_DEVICE但是提示还是一样,有人知道是什么问题吗?
另外,我现在想测试一下ttyUSB0这些虚拟串口,不知道谁有没有这类的测试程序或者比较好的测试方法指点下,谢谢。
|
在数组前添加是否符合要求的规格呀