USB音响 工作抓包分析

欢迎加入字节流官方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
微信公众号
字节流公众号  字节流QQ群:952873936
取消
感谢您的支持,我会继续努力的!
扫码支持
扫码打赏,你说多少就多少

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

Powered by bytekits.com,汇天下文字,成非凡梦想!!!