多媒体问题请教 请电脑圈圈帮忙指点一下

[复制链接]
3681|14
 楼主| Mr.Cobain 发表于 2009-12-31 11:44 | 显示全部楼层 |阅读模式
本帖最后由 Mr.Cobain 于 2010-1-11 10:40 编辑

现象:
  通过USB发送光驱弹出信号后 光驱没有弹出。
  bushound显示发送数据成功。
;=================================================
问题:
   是报告描述有问题,还是发送的资料不对。
;=================================================
问题发生的环境:

硬件:
      【光驱是好的】
;=================================================
软件:
       多媒体的报表如下:
    ;REPORT ID 3
        db      0Ch, 09h    ; usage page (consumer)
        db      01h, 0A1h    ; usage (remote control)
        db      01h, 85h    ; collection (application)
        db      03h, 19h    ;   report id (3)
        db      00h, 2Ah    ;   usage minimum (00)
        db      3Ch, 02h    ;   usage maximum (572)
        db      15h, 00h        ;   logical minimum (0)
        db      26h, 3Ch    ;   logical maximum (572)
        db      02h, 75h    ;   report size (16 bits each)
        db      10h, 95h    ;   report count (1 report)
        db      02h, 81h    ;   input (data, array, abs)
        db      00h, 0C0h    ; end collection

bushound抓出数据如下:
    03 23 02  00  00 00 00 00  开默认主页
    03 00 00  00  00 00 00 00
    03 27 02  00  00 00 00 00  刷新网页
    03 00 00  00  00 00 00 00
    03 E9 00  00  00 00 00 00   vol+
    03 00 00  00  00 00 00 00
    03 EA 00  00  00 00 00 00   vol-
    03 00 00  00  00 00 00 00
      
   以上数据送给电脑后都有功能,为什么发送如下数据后不能弹出光驱呢?
   光驱是好的,可以用鼠标点右键-弹出。
   03 B8 00  00   00  00 00 00   
   03 00 00  00   00  00 00 00
;=================================================
 楼主| Mr.Cobain 发表于 2010-1-6 20:45 | 显示全部楼层
这层楼好冷清啊,高手们进来指点一下啊。好冷,沙发我自己先坐了。
sz_n053 发表于 2010-1-6 21:00 | 显示全部楼层
是描述符错了吧, 描述符里并没有描述退出的命令啊
 楼主| Mr.Cobain 发表于 2010-1-7 09:48 | 显示全部楼层
弹出光驱 与 开默认主页 刷新网页等同属于多媒体吧,为什么开默认主页 刷新网页有功能而同类的弹出光驱却没有功能呢?描述符错在哪里呢?能否再指出一个确定的位置点。
宇容创行 发表于 2010-1-7 09:53 | 显示全部楼层
你用右键弹出时,抓个包
比较一下,不就知道了
 楼主| Mr.Cobain 发表于 2010-1-7 10:01 | 显示全部楼层
右键弹出 是鼠标信号00 02 00 00 与键盘多媒体信号比较没有任何意义
 楼主| Mr.Cobain 发表于 2010-1-11 10:44 | 显示全部楼层
computer00大侠路过的时候高抬贵手指点一下啊。
mohanwei 发表于 2010-1-11 12:27 | 显示全部楼层
高抬贵手一般后半句就是“放我一马”……
 楼主| Mr.Cobain 发表于 2010-1-13 09:03 | 显示全部楼层
弟子愚眉肉眼,感谢8楼正解,只望再出贵手,与我解答难题
computer00 发表于 2010-1-13 09:47 | 显示全部楼层
你这个描述有点不大对劲。你可以参考一下我书中光盘里多媒体键盘的代码(我的blog中也有下载),你改成用每个位为0或1的方式去控制,不要用这种键盘模式的数组形式(sel),HUT里写的弹出光驱是OSC的,不是SEL的。

另外,我不确认windows是否支持这个用途,因为在windows下,很多用途都是不支持的。
wjl2008 发表于 2010-1-20 22:38 | 显示全部楼层
现象:
  通过USB发送光驱弹出信号后 光驱没有弹出。
  bushound显示发送数据成功。
;=================================================
问题:
   是报告描述有问题,还是发送的资料不对。
;==================== ...
Mr.Cobain 发表于 2009-12-31 11:44

你的描述符有问题,个一项的项目代码和相应的值的位置全反了。
wjl2008 发表于 2010-1-20 22:42 | 显示全部楼层
本帖最后由 wjl2008 于 2010-1-20 22:51 编辑

REPORT ID 3
        db      0Ch, 09h    ; usage page (consumer)//应该是09,0c
        db      01h, 0A1h    ; usage (remote control)//a1,01
        db      01h, 85h    ; collection (application)
        db      03h, 19h    ;   report id (3)/应该是19,03
        db      00h, 2Ah    ;   usage minimum (00)
        db      3Ch, 02h    ;   usage maximum (572)//3cj是572吗?
        db      15h, 00h        ;   logical minimum (0)
        db      26h, 3Ch    ;   logical maximum (572)//25,3c
        db      02h, 75h    ;   report size (16 bits each)//75,02(2bit)
        db      10h, 95h    ;   report count (1 report)//95,10(32bit)
        db      02h, 81h    ;   input (data, array, abs)//81,02
        db      00h, 0C0h    ; end collection//0c,00
computer00 发表于 2010-1-21 17:41 | 显示全部楼层
这个是大小端模式的问题,也许楼主的机器是小端结构的。
 楼主| Mr.Cobain 发表于 2010-1-23 12:12 | 显示全部楼层
;REPORT ID 2
        ;; 98 hot key
        db      05h, 01h        ; usage page (generic desktop)
        db      09h, 80h        ; usage (system control)
        db      0A1h, 01h       ; collection (application)
        db      85h, 02h        ;   report id (2)
        db      19h, 81h        ;   usage minimum (power down)
        db      29h, 88h        ;   usage maximum (wake up)
        db      15h, 00h        ;     logical minimum (0)
        db      25h, 01h        ;   logical maximum (1)
        db      75h, 01h        ;   report size (1 bits each)
        db      95h, 08h        ;   report count (8 report)
        db      81h, 02h        ;   input (data, var, abs)
        db      0C0h,05h        ; end collection
;REPORT ID 3
        db      0Ch, 09h        ; usage page (consumer)
        db      01h, 0A1h        ; usage (remote control)
        db      01h, 85h        ; collection (application)
        db      03h, 19h        ;   report id (3)
        db      00h, 2Ah        ;   usage minimum (00)
        db      3Ch, 02h        ;   usage maximum (572)
        db      15h, 00h        ;   logical minimum (0)
        db      26h, 3Ch        ;   logical maximum (572)
        db      02h, 75h        ;   report size (16 bits each)
        db      10h, 95h        ;   report count (1 report)
        db      02h, 81h        ;   input (data, array, abs)
        db      00h, 0C0h        ; end collection
 楼主| Mr.Cobain 发表于 2010-1-23 12:21 | 显示全部楼层
把REPORT ID 3 独立出来的格式如下:                                         

;REPORT ID 3
    DB    05h,0Ch       ; usage page (consumer)
        DB      09h,01h       ; usage (remote control)
        DB      0A1h,01h      ; collection (application)
        DB      85h,03h       ; report id (3)
        DB      19h,00h       ; usage minimum (00)         
        DB      2Ah,3Ch,02h   ; usage maximum (572)
        DB      15h,00h       ; logical minimum (0)
        DB      26h,3Ch ,02h  ; logical maximum (572)      
        DB      75h,10h       ; report size (16 bits each)
        DB      95h,02h       ; report count (1 report)
        DB      81h,00h       ; input (data, array, abs)
        DB      0C0h          ; end collection
您需要登录后才可以回帖 登录 | 注册

本版积分规则

6

主题

76

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部