UAC设备实例分析
+ -

USB音响 工作抓包分析

2021-02-09 113 314
欢迎加入官方QQ群:952873936或联系站长进行技术交流。

USB音响打开

Length    Phase  Data                                         
--------  -----  ------------------------------ --------------
          CTL    01 0b 01 00  01 00 00 00       SET INTERFACE 
          CTL    22 01 00 01  02 00 03 00       SET CUR       
       3  OUT    80 bb 00                       ...

第一行选择接口(接口ID=1,转换接口=1),使用该接口进行数据传输。
第二、三行是发送特定类请求,向端点2(等时传输端点)发送SET_CUR,设置采样率SAMPLING_FREQ_CONTROL(0x0100)选择子的请求,数据长度为3,附带的数据为 80 bb 00,表示采样率为48000。

  • 22 表示数据传输给端点.
  • 01 表示SET_CUR.
  • 00 01:即0x0100,表示选择子SAMPLING_FREQ_CONTROL
  • 02 00:低字节表示传输的端点。
  • 03 00:表示附带的数据长度为3字节。

USB音响关闭

关闭比较简单,直接选择转换接口为0的接口即可.

  CTL    01 0b 00 00  01 00 00 00                         SET INTERFACE

USB音响音量设置

向特性单元2发送特定类请求SET_CUR,选择子VOLUME_CONTROL(0x0200)设置音量,数据长度为2。单位是DB.

   CTL    21 01 00 02  00 02 02 00        SET CUR  
2  OUT    2a 80                           *.

USB音响静音

向特性单元2发送特定类请求SET_CUR,选择子MUTE_CONTROL(0x0100)设置静音,数据长度为1,值为1 表示静音。

     CTL    21 01 00 01  00 02 01 00    SET CUR  
  1  OUT    01                          .

USB静音时的数据

静音并不代表无数据

 192  ISOC 
 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00

1920  ISOC 
00 00 00 00  01 00 00 00  ff ff 00 00  00 00 ff ff  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
00 00 00 00  00 00 01 00  00 00 00 00  00 00 00 00  ff ff ff ff  00 00 ff ff  00 00 00 00  00 00 ff ff
00 00 00 00  00 00 00 00  01 00 01 00  ff ff 00 00  00 00 ff ff  ff ff 00 00  00 00 ff ff  00 00 00 00
ff ff 00 00  00 00 ff ff  01 00 ff ff  00 00 00 00  ff ff 00 00  00 00 00 00  00 00 00 00  00 00 00 00
01 00 00 00  00 00 ff ff  01 00 01 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 01 00
00 00 00 00  00 00 00 00  00 00 00 00  ff ff 00 00  00 00 ff ff  00 00 00 00  01 00 00 00  00 00 01 00
00 00 00 00  00 00 01 00  00 00 00 00  00 00 00 00  00 00 00 00  01 00 ff ff  00 00 00 00  00 00 01 00
00 00 ff ff  00 00 00 00  00 00 00 00  00 00 ff ff  00 00 00 00  00 00 00 00  01 00 00 00  00 00 01 00
00 00 00 00  00 00 01 00  00 00 00 00  00 00 00 00  00 00 01 00  00 00 00 00  00 00 00 00  00 00 00 00
00 00 01 00  00 00 00 00  00 00 00 00  ff ff 00 00  00 00 ff ff  ff ff 00 00  ff ff 00 00  00 00 01 00
01 00 02 00  00 00 01 00  00 00 00 00  01 00 00 00  01 00 00 00  00 00 01 00  00 00 01 00  00 00 00 00
01 00 01 00  00 00 00 00  00 00 00 00  00 00 ff ff  00 00 00 00  00 00 ff ff  00 00 00 00  00 00 00 00
00 00 00 00  00 00 01 00  01 00 01 00  01 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
00 00 00 00  00 00 00 00  01 00 00 00  00 00 00 00  ff ff 00 00  00 00 01 00  00 00 00 00  ff ff 01 00
00 00 00 00  00 00 01 00  ff ff 00 00  00 00 ff ff  00 00 00 00  00 00 01 00  00 00 01 00  00 00 00 00
00 00 00 00  00 00 00 00  ff ff 01 00  01 00 01 00  00 00 01 00  ff ff 00 00  ff ff 00 00  00 00 00 00
00 00 01 00  00 00 01 00  00 00 00 00  ff ff 00 00  ff ff 01 00  00 00 01 00  00 00 00 00  00 00 01 00
00 00 01 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 01 00  00 00 02 00  00 00 00 00  00 00 00 00
00 00 ff ff  00 00 00 00  ff ff 01 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 02 00
01 00 01 00  00 00 00 00  00 00 00 00  00 00 00 00  ff ff 00 00  00 00 00 00  00 00 00 00  00 00 ff ff
ff ff 00 00  00 00 00 00  00 00 00 00  01 00 00 00  01 00 ff ff  00 00 00 00  ff ff 00 00  00 00 00 00
01 00 00 00  00 00 00 00  00 00 01 00  00 00 02 00  01 00 01 00  01 00 01 00  00 00 00 00  ff ff ff ff
00 00 00 00  00 00 01 00  01 00 01 00  ff ff 00 00  00 00 00 00  00 00 01 00  00 00 00 00  00 00 01 00
00 00 00 00  00 00 00 00  00 00 00 00  00 00 01 00  00 00 01 00  00 00 00 00  00 00 00 00  01 00 00 00
00 00 00 00  00 00 00 00  00 00 00 00  00 00 01 00  00 00 00 00  00 00 00 00  ff ff ff ff  00 00 00 00
00 00 01 00  00 00 01 00  ff ff 01 00  ff ff 00 00  ff ff 00 00  00 00 00 00  00 00 00 00  01 00 01 00
00 00 00 00  00 00 00 00  ff ff 00 00  ff ff 00 00  00 00 00 00  00 00 00 00  01 00 00 00  00 00 ff ff
01 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 ff ff  01 00 00 00  00 00 ff ff
00 00 00 00  00 00 01 00  00 00 ff ff  00 00 00 00  00 00 00 00  00 00 00 00  00 00 01 00  ff ff 00 00
ff ff ff ff  ff ff ff ff  00 00 00 00  00 00 01 00  00 00 00 00  00 00 00 00  00 00 01 00  00 00 ff ff
ff ff 00 00  00 00 00 00  00 00 ff ff  00 00 ff ff  ff ff 00 00  ff ff 00 00  00 00 00 00  00 00 ff ff
01 00 00 00  01 00 00 00  01 00 01 00  00 00 ff ff  00 00 00 00  01 00 ff ff  01 00 ff ff  02 00 01 00

0 篇笔记 写笔记

USB音响 工作抓包分析
USB音响打开Length Phase Data -------- ----- ------------------------------ -------------- CTL 01......
USB音响 UAC设备描述符分析
这里看到,USB规范采用的是USB1.1版本,不过字符串中又显示的是”USB2.0 Device”,所以这里就有点迷~关于设备描述符各字段的详细解释,详见USB规范中设备描述符一节。从bDeviceClass,bDeviceSubClass和bDeviceSubClass都被置为0来看,这是一个典型......
USB音响 UAC Speaker 概述
手头有一个USB Speaker,插入电脑后在设备管理器中如下:从设备管理器中来看,这是一个单一功能的Usb Speaker。其硬件设备ID如下:USBVID_1908&PID_2070&REV_0100(USB Composite Device)USBVID_1908&......
UVC摄像头的关闭流程及抓包分析
通过UVC协议规范可以知道,UVC的数据传输支持USB四种传输中的批量传输和同步传输,所以对于UVC摄像头,当我们在摄像头正在工作时,需要停止摄像头工作,执行的操作是不同的。在Linux的源代码中,摄像头的流关闭是由函数uvc_video_stop_streaming完成的。代码比较简单,我们直接给......
USB音响 UAC配置描述符分析
该USB音箱的配置描述符和普通USB设备描述符结构体一致,并无特别区别。该配置描述符的总长度(包括后续的所有其它描述符)为110字节,这里相对华为耳机的要少了很多,这是因为少了像麦克风和HID。从配置描述符的字段bmAttributes来看,并不支持远程唤醒功能。 --------------......
华为UAC麦克风的工作过程数据分析
看完了耳机的数据分析,再来分析麦克风,就相对来说很简单了,这是因为:第一:麦克风没有音频控制特效单元描述符,所以少了很多特定类请求。第二:麦克风只有一个音频流转换接口,且只支持采样率为48000HZ 16位。具体的过程见下:Length Phase Data-------- ----- ......
BusHound的使用方法详解
在开始菜单日运行Bus Hound软件,将USB设备插入电脑U口。如图所示,进入”Devices”目录,在”Devices”内选择要监听的设备。例如:我的设备置是一个U盘,则装置为USB大容量储存设备,点选”USB大容量储存设备”图示,可以在下面的”Properties”图框内看到设备的设备树及设备......
HID键盘设备数据抓包分析实践
本文使用 Bus Hound 工具对 USB HID 设备数据包进行分析,并结合官方手册及网上文章进行整理。在进行数据分析前,我们先回顾一下USB相关的基础知识。USB描述符USB 主机是通过各种描述符来识别设备的,有设备描述符,接口描述符,端点描述符,字符描述符,报告描述符(HID)等。和普通的U......
Windows下使用Wireshark分析USB通信
USB技术的应用越来越广泛,我们常用的U盘、鼠标、键盘都是USB设备。我们有时也会遇见要对这种设备进行调试的情形,但是很少有人知道其实Wireshark也是可以胜任这一任务的。Wireshark可以像处理网络中的通信一样来捕获和解析USB设备的通信。Wireshark2.0之后就加入了对USB协议的......
UVC摄像头打开关闭数据分析
UVC相机在打开时,会使用SET_INTERFACE命令,在停止播放时,也会发送SET_INTERFACE命令。打开时,数据抓包为:CTL 01 0b 01 00 01 00 00 00 SET INTERFACE停播放时,数据抓包为:CTL 01 0b 00 00 01......
Linux源码分析UVC摄像头的打开流程及抓包分析
和关闭摄像头类似,Linux使用uvc_video_start_streaming函数打开摄像头int uvc_video_start_streaming(struct uvc_streaming *stream){ int ret; ret = uvc_video_clock_init......
UVC 描述符实例
通过BUSBOUND抓取USB摄像头插入电脑时的数据信息,这里只是选报设备描述符和接口描述符信息Device Phase Data Description Cmd.Phase.Ofs(rep)------ ----- ----------......
作者信息
USB中文网
Windows驱动开发,网站开发
好好学习,天天向上。
取消
感谢您的支持,我会继续努力的!
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

您的支持,是我们前进的动力!