Here is the decoding of the Unknown Descriptors (derived from the CDC Spec):
- Code: Select all
CDC HEADER DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 05h 5
Descr Type: 24h CDC Interface
Descr SubType: 00h Header
CDC Version: 0110h 1.10
CDC ABSTRACT CONTROL DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 04h 4
Descr Type: 24h CDC Interface
Descr SubType: 02h Abstract Control Management
Supported Requests: 02h NO: Get/Set/Clear CommFtr
YES: Get/Set LineCode, SetCtlLineState, SerialState
NO: SendBreak
NO: NetworkConnection
CDC UNION DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 05h 5
Descr Type: 24h CDC Interface
Descr SubType: 06h Union
Master Interface Number: 00h Interface #0
Slave Interface Number: 01h Interface #1
CDC CALL MANAGEMENT DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 05h 5
Descr Type: 24h CDC Interface
Descr SubType: 01h Call Management
Capabilities: 00h Call Management = Class Interface Only
Does NOT handle Call Management Itself
Call Mgmt Data Intf #: 01h Interface #1
I haven't reviewed the Snoop details yet.
Based on my interpretation of this data compared to the CDC spec, though, this is a "virtual modem" that responds to Hayes AT commands. However, instead of going into command mode with a "+++" like you usually do with a modem, this is like a "special" modem that is dedicated (not dial-up), and has a set of lines dedicated to the AT commands separate from the normal data lines. The AT commands are sent to the device using a USB control request (Send_Encapsulated_Command) and responded to with a Get_Encapsulated_Response USB control request. In your particular case, I'm not sure why you would need to send any AT commands, except maybe an "ATD" to connect and an "ATH" to disconnect. I suspect you may be able to control everything with the virtual DTR & RTS leads and not even need to mess with AT commands at all.
You will control and monitor the virtual UART leads, and set the port speed, parity, etc. with USB control requests (Set_Line_Coding, Get_Line_Coding, Set_Control_Line_State, and Serial_State). Since this is not a real modem or even a real serial port that connects to a remote device, I'm not sure why it should matter what those things are set to, other than maybe DTR & RTS.
The data that gets sent across the "real" data lines (EndPoints 3 in your case) goes to the "virtual device" at the other end of the "virtual modem connection". That is where you are going to get your data from, using some device-specific commands. For example, the "V" you sent must be short for "Version", which is why it responded like it did. You will send data down the data lines with USB bulk requests, or could also do it with periodic interrupt requests if you wanted the polling to be handled "automatically".
The one thing I'm not sure of is what EndPoint 2 (associated Interface 0 and the AT commands) is for. It is a periodic interrupt end point, which returns 8 bytes of data, and needs to be polled every 2 milliseconds. But I have no idea what kind of data would be delivered from the Device. At least from a cursory reading of the CDC spec, I don't see anything related to that. I should point out that many USB mass storage devices (flash drives) also have an "extraneous" interrupt end point, which doesn't appear to be used for anything (at least none of the USB developers seems to know what it's for). So, it's possible that the interrupt endpoint doesn't really do anything at all, but is just there because interface 0 (the "AT command interface", which actually only uses control requests to endpoint 0) has to have at least one endpoint to be considered valid interface.
Again, this is my understanding based on what the CDC spec says. I could be completely wrong about a bunch of this.