谁做过CH375同无线GPRS无线上网卡的接口?

能给点提示吗?YanHongLiDing@163.COM

我们用CH375/CH374操作过3G、CDMA上网模块,仅与其建立通讯通道,拨号和数据收发由用户自行完成,GPRS与此也应该类似,通常的做法,把GPRS插在电脑上,用bushound抓取电脑操作它的流程,然后用单片机模拟这个流程就可以了


呵呵,不好意思,能不能提供个简单的c语言例子,还是在无头绪中,bushound所抓的SETUP包通过那个命令传给ch375?谢谢。


没有完全适合您的例程,每个设备的操作都有一些区别,这是华为E220上网模块的枚举例程,仅供参考:UploadImages/2009948272225.rar


万分感谢!


Bus Hound 5.00 capture. Complements of www.perisoft.net

Device - Device ID (followed by the endpoint for USB devices) (16) P100E-U Edge Modem Phase - Phase Type CTL USB control transfer DI Data in DO Data out LEN Data length Data - Hex dump of the data transferred Descr - Description of the phase Cmd... - Position in the captured data Delta - Elapsed time from the previous phase to the current phase

Device Phase Data Description Cmd.Phase.Ofs(rep) Delta ------ ----- -------------------------------------------------- ---------------- ------------------ ----- 16.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR 1.1.0 30sc 16.0 LEN 12 00 00 00 18 1.2.0 1.6ms 16.0 DI 12 01 00 02 02 00 00 08 71 04 34 12 00 01 01 02 ........q.4..... 1.3.0 2us 03 01 .. 1.3.16 16.0 CTL 80 06 00 02 00 00 09 01 GET DESCRIPTOR 2.1.0 11us 16.0 LEN 43 00 00 00 67 2.2.0 3.9ms 16.0 DI 09 02 43 00 02 01 00 c0 01 09 04 00 00 01 02 02 ..C............. 2.3.0 1us 01 04 05 24 00 10 01 05 24 06 00 01 05 24 01 03 ...$....$....$.. 2.3.16 01 04 24 02 07 07 05 81 03 10 00 10 09 04 01 00 ..$............. 2.3.32 02 0a 00 00 05 07 05 03 02 40 00 00 07 05 83 02 .........@...... 2.3.48 40 00 00 @.. 2.3.64 16.0 CTL 00 09 01 00 00 00 00 00 SET CONFIG 3.1.0 9us 16.0 CTL a1 21 00 00 00 00 07 00 GET LINE CODING 4.1.0 90ms 16.0 LEN 07 00 00 00 7 4.2.0 1.1ms 16.0 DI 00 c2 01 00 00 00 08 ....... 4.3.0 1us 16.0 CTL 21 22 00 00 00 00 00 00 SET CTRL LINE ST 5.1.0 179us 16.0 CTL 21 22 01 00 00 00 00 00 SET CTRL LINE ST 6.1.0 1.1sc 16.0 CTL a1 21 00 00 00 00 07 00 GET LINE CODING 7.1.0(4) 2.1ms 16.0 LEN 07 00 00 00 7 7.2.0 911us 16.0 DI 00 c2 01 00 00 00 08 ....... 7.3.0 2us 16.0 CTL 21 20 00 00 00 00 07 00 SET LINE CODING 11.1.0 3.0ms 16.0 LEN 07 00 00 00 7 11.2.0 1.9ms 16.0 DO 00 c2 01 00 00 00 08 ....... 11.3.0 2us 16.0 CTL a1 21 00 00 00 00 07 00 GET LINE CODING 12.1.0 7us 16.0 LEN 07 00 00 00 7 12.2.0 991us 16.0 DI 00 c2 01 00 00 00 08 ....... 12.3.0 2us 16.0 CTL 21 22 02 00 00 00 00 00 SET CTRL LINE ST 13.1.0 21us 16.0 CTL 21 20 00 00 00 00 07 00 SET LINE CODING 14.1.0 987us 16.0 LEN 07 00 00 00 7 14.2.0 1.9ms 16.0 DO 00 c2 01 00 00 00 08 ....... 14.3.0 1us 16.0 CTL a1 21 00 00 00 00 07 00 GET LINE CODING 15.1.0 35us 再次请教所显示的GET LINE CODING数据的意思,实在找不到资料,多次打扰万分歉意。


这是一个CDC类设备,是一个标准的USB设备,有2个接口:通讯接口和数据接口,这些类请求的详细介绍参考:Universal Serial Bus Class Definitions for Communication Devices 可以在www.usb.org上下载


GET LINE CODING在USB CDC类资料上有的.上传资料给你: 资料太大无法上传,文档名称: Universal Serial Bus Class Definitions for Communication Devices


GET LINE CODING:Requests current DTE rate, stop-bits, parity, and number-of-character bits. SET CTRL LINE ST:This request generates RS-232/V.24 style control signals. 上面是CDC的资料中的一些简单的说明.详细了解就要去看楼上所说的pdf资料.


补充:这个设备在电脑上应该是一个串口设设备,以前我们操作过类似GPRS的设备,流程并不复杂,这些类请求的具体含义即使不知道也没关系,单片机照着流程做就可以了。 这个是我们以前操作GPRS的例程:UploadImages/200999910761.rar


比着葫芦画瓢是个简单的方法,但也失去学习的意义,想把它搞懂,谢谢您的回帖。


16.0 CTL a1 21 00 00 00 00 07 00 GET LINE CODING/*取得波特率信息*/ 00 c2 01 00 00 00 08/*00 c2 01 00波特率0001c200=115200,00stop bits,00 parity,08 data bits。 基本上搞懂了。谢谢您的帮助。


16.0 CTL 80 06 00 02 00 00 20 00 GET DESCRIPTOR 16.0 LEN 20 00 00 00 32 16.0 DI 09 02 20 00 01 01 00 c0 01 09 04 00 00 02 08 06 .. .....地........ 50 04 07 05 03 02 40 00 00 07 05 83 02 40 00 00 第一次获得的配置描述

8.0 CTL 80 06 00 02 00 00 ff 00 GET DESCRIPTOR 8.0 LEN 43 00 00 00 67 8.0 DI 09 02 43 00 02 01 00 c0 01 09 04 00 00 01 02 02 ..C............. 01 04 05 24 00 10 01 05 24 06 00 01 05 24 01 03 01 04 24 02 07 07 05 81 03 10 00 10 09 04 01 00 02 0a 00 00 05 07 05 03 02 40 00 00 07 05 83 02 40 00 00 第二次获得的配置描述符 我用的是P100E那种不要驱动的usb mode,也就是说在应用软件没有启动的时候她是个U盘,里面有驱动程序可以安装。应用软件启动后获得的配置描述符就是第二次获得的,用单片机获得的是第一次得到的描述符,两个描述符天地之别,仔细观察BUSBOUND感觉没有什么特殊的设置啊。只好再次到此求救。希望得到您的帮助,谢谢。


Connection Status Device connected Current Configuration 1 Speed Full Device Address 1 Number Of Open Pipes 2

Device Descriptor P100EU USB Mass Storage Offset Field Size Value Description 0 bLength 1 12h 1 bDescriptorType 1 01h Device 2 bcdUSB 2 0200h USB Spec 2.0 4 bDeviceClass 1 02h CDC Control 5 bDeviceSubClass 1 00h 6 bDeviceProtocol 1 00h 7 bMaxPacketSize0 1 08h 8 bytes 8 idVendor 2 0471h Philips 10 idProduct 2 BEAFh 12 bcdDevice 2 0100h 1.00 14 iManufacturer 1 01h "POPULAR" 15 iProduct 1 02h "P100EU USB Mass Storage" 16 iSerialNumber 1 03h "352369-02-015213....0" 17 bNumConfigurations 1 01h

Configuration Descriptor 1 Self Powered Offset Field Size Value Description 0 bLength 1 09h 1 bDescriptorType 1 02h Configuration 2 wTotalLength 2 0020h 4 bNumInterfaces 1 01h 5 bConfigurationValue 1 01h 6 iConfiguration 1 00h 7 bmAttributes 1 C0h Self Powered 4..0: Reserved ...00000 5: Remote Wakeup ..0..... No 6: Self Powered .1...... Yes 7: Reserved (set to one) (bus-powered for 1.0) 1....... 8 bMaxPower 1 01h 2 mA

Interface Descriptor 0/0 Mass Storage, 2 Endpoints Offset Field Size Value Description 0 bLength 1 09h 1 bDescriptorType 1 04h Interface 2 bInterfaceNumber 1 00h 3 bAlternateSetting 1 00h 4 bNumEndpoints 1 02h 5 bInterfaceClass 1 08h Mass Storage 6 bInterfaceSubClass 1 06h SCSI transparent command set 7 bInterfaceProtocol 1 50h Bulk-Only Transport 8 iInterface 1 04h "Mass Storage Device"

Endpoint Descriptor 03 3 Out, Bulk, 64 bytes Offset Field Size Value Description 0 bLength 1 07h 1 bDescriptorType 1 05h Endpoint 2 bEndpointAddress 1 03h 3 Out 3 bmAttributes 1 02h Bulk 1..0: Transfer Type ......10 Bulk 7..2: Reserved 000000.. 4 wMaxPacketSize 2 0040h 64 bytes 6 bInterval 1 00h

Endpoint Descriptor 83 3 In, Bulk, 64 bytes Offset Field Size Value Description 0 bLength 1 07h 1 bDescriptorType 1 05h Endpoint 2 bEndpointAddress 1 83h 3 In 3 bmAttributes 1 02h Bulk 1..0: Transfer Type ......10 Bulk 7..2: Reserved 000000.. 4 wMaxPacketSize 2 0040h 64 bytes 6 bInterval 1 00h /************************************************************************/

Connection Status Device connected Current Configuration 1 Speed Full Device Address 1 Number Of Open Pipes 3

Device Descriptor P100EU EDGE USB modem Offset Field Size Value Description 0 bLength 1 12h 1 bDescriptorType 1 01h Device 2 bcdUSB 2 0200h USB Spec 2.0 4 bDeviceClass 1 02h CDC Control 5 bDeviceSubClass 1 00h 6 bDeviceProtocol 1 00h 7 bMaxPacketSize0 1 08h 8 bytes 8 idVendor 2 0471h Philips 10 idProduct 2 1234h 12 bcdDevice 2 0100h 1.00 14 iManufacturer 1 01h "POPULAR" 15 iProduct 1 02h "P100EU EDGE USB modem" 16 iSerialNumber 1 03h "352369-02-015213....0" 17 bNumConfigurations 1 01h

Configuration Descriptor 1 Self Powered Offset Field Size Value Description 0 bLength 1 09h 1 bDescriptorType 1 02h Configuration 2 wTotalLength 2 0043h 4 bNumInterfaces 1 02h 5 bConfigurationValue 1 01h 6 iConfiguration 1 00h 7 bmAttributes 1 C0h Self Powered 4..0: Reserved ...00000 5: Remote Wakeup ..0..... No 6: Self Powered .1...... Yes 7: Reserved (set to one) (bus-powered for 1.0) 1....... 8 bMaxPower 1 01h 2 mA

Interface Descriptor 0/0 CDC Control, 1 Endpoint Offset Field Size Value Description 0 bLength 1 09h 1 bDescriptorType 1 04h Interface 2 bInterfaceNumber 1 00h 3 bAlternateSetting 1 00h 4 bNumEndpoints 1 01h 5 bInterfaceClass 1 02h CDC Control 6 bInterfaceSubClass 1 02h Abstract Control Model 7 bInterfaceProtocol 1 01h Common AT commands 8 iInterface 1 04h "WMC Modem"

Header Functional Descriptor Offset Field Size Value Description 0 bLength 1 05h 1 bDescriptorType 1 24h Header Functional 2 00 10 01

Union Functional Descriptor Offset Field Size Value Description 0 bLength 1 05h 1 bDescriptorType 1 24h Union Functional 2 06 00 01

Call Management Functional Descriptor Offset Field Size Value Description 0 bLength 1 05h 1 bDescriptorType 1 24h Call Management Functional 2 01 03 01

Abstract Control Management Functional Descriptor Offset Field Size Value Description 0 bLength 1 04h 1 bDescriptorType 1 24h Abstract Control Management Functional 2 02 07

Endpoint Descriptor 81 1 In, Interrupt, 16 ms Offset Field Size Value Description 0 bLength 1 07h 1 bDescriptorType 1 05h Endpoint 2 bEndpointAddress 1 81h 1 In 3 bmAttributes 1 03h Interrupt 1..0: Transfer Type ......11 Interrupt 7..2: Reserved 000000.. 4 wMaxPacketSize 2 0010h 16 bytes 6 bInterval 1 10h 16 ms

Interface Descriptor 1/0 CDC Data, 2 Endpoints Offset Field Size Value Description 0 bLength 1 09h 1 bDescriptorType 1 04h Interface 2 bInterfaceNumber 1 01h 3 bAlternateSetting 1 00h 4 bNumEndpoints 1 02h 5 bInterfaceClass 1 0Ah CDC Data 6 bInterfaceSubClass 1 00h 7 bInterfaceProtocol 1 00h 8 iInterface 1 05h "WMC Modem bulk data"

Endpoint Descriptor 03 3 Out, Bulk, 64 bytes Offset Field Size Value Description 0 bLength 1 07h 1 bDescriptorType 1 05h Endpoint 2 bEndpointAddress 1 03h 3 Out 3 bmAttributes 1 02h Bulk 1..0: Transfer Type ......10 Bulk 7..2: Reserved 000000.. 4 wMaxPacketSize 2 0040h 64 bytes 6 bInterval 1 00h

Endpoint Descriptor 83 3 In, Bulk, 64 bytes Offset Field Size Value Description 0 bLength 1 07h 1 bDescriptorType 1 05h Endpoint 2 bEndpointAddress 1 83h 3 In 3 bmAttributes 1 02h Bulk 1..0: Transfer Type ......10 Bulk 7..2: Reserved 000000.. 4 wMaxPacketSize 2 0040h 64 bytes 6 bInterval 1 00h /*******************************************************************/ 这是用USBlyzer得到的同一个设备的描述符,我想应该是个组合设备,因为设备描述符idProduct部分不同,但是怎么获得第二次modem部分的描述符还要请各位给个提示,打开modem里面发现有AU6332芯片,只找到芯片各脚信息的资料,现在能通过单片机读取SD卡模式下的描述符,如论如何也获得不了modem部分的描述符。 还请各位给个提示或者大概方法,谢谢。


你有没有看过在计算机上面怎么获取的,如果是复合设备的话,那么在你获取第2个设备的描述符之前需要先设置下设备的接口,然后在获取相应的配置描述符。


两个设备不是同时出现的,插入modem后显示的是一个U盘,应用软件启动后U盘消失,用BUSHOUND监视usb口,发现usb HUB发出了如下数据 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 03 00 8.0 CTL CLEAR FEATURE 23 01 11 00 03 00 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 01 00 8.0 CTL CLEAR FEATURE 23 01 10 00 03 00 00 00 8.0 CTL CLEAR FEATURE 23 01 01 00 03 00 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 01 00 8.0 CTL GET STATUS a3 00 00 00 01 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 00 00 8.0 CTL GET STATUS a3 00 00 00 02 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 01 00 8.0 CTL CLEAR FEATURE 23 01 10 00 03 00 00 00 8.0 CTL GET STATUS a3 00 00 00 01 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 00 00 8.0 CTL GET STATUS a3 00 00 00 02 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 01 01 01 00 8.0 CTL CLEAR FEATURE 23 01 10 00 03 00 00 00 8.0 CTL GET STATUS a3 00 00 00 01 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 00 00 8.0 CTL GET STATUS a3 00 00 00 02 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 00 01 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 01 01 00 00 8.0 CTL SET FEATURE 23 03 04 00 03 00 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 03 01 10 00 8.0 CTL CLEAR FEATURE 23 01 14 00 03 00 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 03 01 00 00 8.0 CTL SET FEATURE 23 03 04 00 03 00 00 00 8.0 CTL GET STATUS a3 00 00 00 03 00 04 00 8.0 LEN 4 04 00 00 00 8.0 DI .... 03 01 10 00 8.0 CTL CLEAR FEATURE 23 01 14 00 03 00 00 00


只有登录才能回复,可以选择微信账号登录