USB论坛-百合电子工作室USB专题站

 找回密码
 我要注册
搜索
热搜: USB学习板
查看: 9436|回复: 10

蓝牙鼠标HID

[复制链接]

2

主题

0

好友

48

积分

新手上路

Rank: 1

发表于 2015-3-9 14:22:18 |显示全部楼层
请问一下,在同样CPU使用率高的情况下,如在空闲CPU为:40%时,我本人开发的蓝牙鼠标移动时有出现卡与丢掉数据情况,而在市面买 回来的蓝牙鼠标却不会,一切都正常?
      我开发的鼠标端口是已经是中断传输的了,还不知为什么会卡,请高手指点?
回复

使用道具 举报

6

主题

0

好友

1063

积分

管理员

Rank: 9Rank: 9Rank: 9

发表于 2015-3-10 08:54:14 |显示全部楼层
是否是蓝牙传输环节有问题?可以用排除法,直接用接收端模拟发USB鼠标数据看有这种情况没有
回复

使用道具 举报

2

主题

0

好友

48

积分

新手上路

Rank: 1

发表于 2015-3-12 14:19:07 |显示全部楼层
谢谢,可以试一试。
回复

使用道具 举报

2

主题

0

好友

48

积分

新手上路

Rank: 1

发表于 2015-3-13 17:47:58 |显示全部楼层
还是不行的,不知什么原因
回复

使用道具 举报

6

主题

0

好友

1063

积分

管理员

Rank: 9Rank: 9Rank: 9

发表于 2015-3-14 10:07:16 |显示全部楼层
用接收端直接模拟鼠标数据也是同样现象?
回复

使用道具 举报

2

主题

0

好友

48

积分

新手上路

Rank: 1

发表于 2015-3-17 09:04:01 |显示全部楼层
是的. 谢谢。
回复

使用道具 举报

6

主题

0

好友

1063

积分

管理员

Rank: 9Rank: 9Rank: 9

发表于 2015-3-17 19:11:24 |显示全部楼层
设备的各种描述符发上来看看,以及设备枚举时的数据也抓下来看看,你自己也可以比较一下枚举的数据是否正确
回复

使用道具 举报

2

主题

0

好友

48

积分

新手上路

Rank: 1

发表于 2015-3-26 12:01:39 |显示全部楼层
现在如果网页上打开网络教程,也会卡卡的。
我把相关设置发上来,请你帮看看》
我的驱动是在TI上面作小修改,只是改了设备名称。
具体的HID描述符为:
This device is part of a composite device.

Connection Information
Port: 2
Speed: Full Speed
Device address: 3
Open pipes: 3
Connection status: Device connected

Device Descriptor
USB version: 2.0
Device class: 0x0 - (Defined at Interface level)
Device subclass: 0x0 - Unknown
Device protocol: 0x0 - Unknown
Control pipe max size: 32 bytes
Vendor ID: 0x45e (Microsoft Corp.)
Product ID: 0x16b4 (Unknown)
Product version: 1.0
Manufacturer: CHEN YEYICOMPANY
Product: USB MOUSE0 HID
Serial Number: 001
Configurations: 1
---------------------------------------------------------------------------------
This device is part of a composite device.

Configuration Descriptor
Number of interfaces: 3
Configuration value: 0x1
Attributes: Remote wakeup, Bus powered
Max power: 50 mA

Interface Descriptor: 0, Alternate setting: 0
Number of endpoints: 1
Interface class: 0x3 - Human Interface Device
Interface subclass: 0x1 - Boot Interface Subclass
Interface protocol: 0x1 - Keyboard
Endpoint address 0x1, Input, Interrupt, max packet size: 8 bytes, update interval: 8 1-millisecond frames

Interface Descriptor: 1, Alternate setting: 0
Number of endpoints: 1
Interface class: 0x3 - Human Interface Device
Interface subclass: 0x0 - No Subclass
Interface protocol: 0x0 - None
Endpoint address 0x2, Input, Interrupt, max packet size: 12 bytes, update interval: 8 1-millisecond frames

Interface Descriptor: 3, Alternate setting: 0
Number of endpoints: 1
Interface class: 0x3 - Human Interface Device
Interface subclass: 0x1 - Boot Interface Subclass
Interface protocol: 0x2 - Mouse
Endpoint address 0x4, Input, Interrupt, max packet size: 15 bytes, update interval: 8 1-millisecond frames

This device is part of a composite device.

HID Descriptor
Usage Page: 1 (Generic Desktop Controls)
Usage: 6 (Keyboard)
Collection
Report Count: 8
Report Size: 1
Usage Page: 7 (Keyboard)
Usages (224-231): Control Left, Shift Left, Alt Left, GUI Left, Control Right, Shift Right, Alt Right,
GUI Right
Logical Minimum: 0
Logical Maximum: 1
Input: 2 (Data,Variable,Absolute,No Wrap,Linear,Preferred State,No Null Position)

Report Count: 1
Report Size: 8
Input: 1 (Constant,Array,Absolute,No Wrap,Linear,Preferred State,No Null Position)

Report Count: 5
Report Size: 1
Usage Page: 8 (LEDs)
Usages (1-5): NumLock, CapsLock, Scroll Lock, Compose, Kana
Output: 2 (Data,Variable,Absolute,No Wrap,Linear,Preferred State,No Null Position,Non Volatile)

Report Count: 1
Report Size: 3
Output: 1 (Constant,Array,Absolute,No Wrap,Linear,Preferred State,No Null Position,Non Volatile)

Report Count: 6
Report Size: 8
Usage Page: 7 (Keyboard)
Usages (0-101): No Event, Keyboard ErrorRollOver, Keyboard POSTfail, Keyboard Error Undefined, A,
B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z,
1 and ! (One and Exclamation), 2 and @ (2 and at), 3 and # (3 and Hash), 4 and $ (4 and Dollar Sign),
5 and % (5 and Percent Sign), 6 and ^ (6 and circumflex), 7 and & (Seven and Ampersand),
8 and * (Eight and asterisk), 9 and ( (Nine and Parenthesis Left), 0 and ) (Zero and Parenthesis Right),
Return (Enter), Escape, Delete (Backspace), Tab, Space Bar, - and _ (Minus and underscore),
= and + (Equal and Plus), [ and  (Bracket and Braces Left), ] and  (Bracket and Braces Right),
\ and | (Backslash and Bar), # and ~ (Hash and Tilde, Non-US Keyboard near right shift),
; and : (Semicolon and Colon), ґ and " (Accent Acute and Double Quotes),
` and ~ (Accent Grace and Tilde), , and < (Comma and Less), . and > (Period and Greater),
/ and ? (Slash and Question Mark), Caps Lock, F1, F2, F3, F4, F5, F6, F7, F8,
F9, F10, F11, F12, Print Screen, Scroll Lock, Pause, Insert, Home, Page Up,
Delete Forward (without Changing Position), End, Page Down, Right Arrow, Left Arrow,
Down Arrow, Up Arrow, Num Lock and Clear, Keypad / (Division Sign), Keypad * (Multiplication Sign),
Keypad - (Subtraction Sign), Keypad + (Addition Sign), Keypad Enter, Keypad 1 and END,
Keypad 2 and Down Arrow, Keypad 3 and Page Down, Keypad 4 and Left Arrow, Keypad 5 (Tactilei Raised),
Unknown, Keypad 6 and Right Arrow, Keypad 7 and Home, Keypad 8 and Up Arrow,
Keypad 8 and Page Up, Keypad . (decimal delimiter) and Delete, \ and | (Backslash and Bar, UK and Non-US Keyboard near left shift),
Keyboard Application (Windows Key for Win95 or Compose)
Logical Minimum: 0
Logical Maximum: 101
Input: 0 (Data,Array,Absolute,No Wrap,Linear,Preferred State,No Null Position)

End Collection

回复

使用道具 举报

6

主题

0

好友

1063

积分

管理员

Rank: 9Rank: 9Rank: 9

发表于 2015-3-26 13:54:31 |显示全部楼层
gason 发表于 2015-3-26 12:01
现在如果网页上打开网络教程,也会卡卡的。
我把相关设置发上来,请你帮看看》
我的驱动是在TI上面作小修 ...

大概看了下,TI原示例应该是个复合HID设备(复合鼠标和键盘),你做的是鼠标,那最好不用复合设备,把键盘去掉,不防试试
回复

使用道具 举报

2

主题

0

好友

48

积分

新手上路

Rank: 1

发表于 2015-3-26 19:30:13 |显示全部楼层
不过同样是复合的鼠标和键盘的另一家厂做的HID,却不会出现卡的问题。
它的描述符合为:
This device is part of a composite device.

Connection Information
Port: 1
Speed: Low Speed
Device address: 6
Open pipes: 2
Connection status: Device connected

Device Descriptor
USB version: 1.10
Device class: 0x0 - (Defined at Interface level)
Device subclass: 0x0 - Unknown
Device protocol: 0x0 - Unknown
Control pipe max size: 8 bytes
Vendor ID: 0x258a (Unknown)
Product ID: 0x1002 (Unknown)
Product version: 42.17
Manufacturer: SINO WEALTH
Product: USB Composite Device
Serial Number: Not specified
Configurations: 1
----------------------------------------------------------------------------
This device is part of a composite device.

Configuration Descriptor
Number of interfaces: 2
Configuration value: 0x1
Attributes: Remote wakeup, Bus powered
Max power: 100 mA

Interface Descriptor: 0, Alternate setting: 0
Number of endpoints: 1
Interface class: 0x3 - Human Interface Device
Interface subclass: 0x1 - Boot Interface Subclass
Interface protocol: 0x1 - Keyboard
Endpoint address 0x1, Input, Interrupt, max packet size: 8 bytes, update interval: 8 1-millisecond frames

Interface Descriptor: 1, Alternate setting: 0
Number of endpoints: 1
Interface class: 0x3 - Human Interface Device
Interface subclass: 0x1 - Boot Interface Subclass
Interface protocol: 0x2 - Mouse
Endpoint address 0x2, Input, Interrupt, max packet size: 8 bytes, update interval: 8 1-millisecond frames
--------------------------------------------------------
This device is part of a composite device.

HID Descriptor
Usage Page: 1 (Generic Desktop Controls)
Usage: 6 (Keyboard)
Collection
Usage Page: 7 (Keyboard)
Usages (224-231): Control Left, Shift Left, Alt Left, GUI Left, Control Right, Shift Right, Alt Right,
GUI Right
Logical Minimum: 0
Logical Maximum: 1
Report Size: 1
Report Count: 8
Input: 2 (Data,Variable,Absolute,No Wrap,Linear,Preferred State,No Null Position)

Report Count: 1
Report Size: 8
Input: 1 (Constant,Array,Absolute,No Wrap,Linear,Preferred State,No Null Position)

Report Count: 3
Report Size: 1
Usage Page: 8 (LEDs)
Usages (1-3): NumLock, CapsLock, Scroll Lock
Output: 2 (Data,Variable,Absolute,No Wrap,Linear,Preferred State,No Null Position,Non Volatile)

Report Count: 5
Report Size: 1
Output: 1 (Constant,Array,Absolute,No Wrap,Linear,Preferred State,No Null Position,Non Volatile)

Report Count: 6
Report Size: 8
Logical Minimum: 0
Logical Maximum: 255
Usage Page: 7 (Keyboard)
Usages (0-255): No Event, Keyboard ErrorRollOver, Keyboard POSTfail, Keyboard Error Undefined, A,
B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z,
1 and ! (One and Exclamation), 2 and @ (2 and at), 3 and # (3 and Hash), 4 and $ (4 and Dollar Sign),
5 and % (5 and Percent Sign), 6 and ^ (6 and circumflex), 7 and & (Seven and Ampersand),
8 and * (Eight and asterisk), 9 and ( (Nine and Parenthesis Left), 0 and ) (Zero and Parenthesis Right),
Return (Enter), Escape, Delete (Backspace), Tab, Space Bar, - and _ (Minus and underscore),
= and + (Equal and Plus), [ and  (Bracket and Braces Left), ] and  (Bracket and Braces Right),
\ and | (Backslash and Bar), # and ~ (Hash and Tilde, Non-US Keyboard near right shift),
; and : (Semicolon and Colon), ґ and " (Accent Acute and Double Quotes),
` and ~ (Accent Grace and Tilde), , and < (Comma and Less), . and > (Period and Greater),
/ and ? (Slash and Question Mark), Caps Lock, F1, F2, F3, F4, F5, F6, F7, F8,
F9, F10, F11, F12, Print Screen, Scroll Lock, Pause, Insert, Home, Page Up,
Delete Forward (without Changing Position), End, Page Down, Right Arrow, Left Arrow,
Down Arrow, Up Arrow, Num Lock and Clear, Keypad / (Division Sign), Keypad * (Multiplication Sign),
Keypad - (Subtraction Sign), Keypad + (Addition Sign), Keypad Enter, Keypad 1 and END,
Keypad 2 and Down Arrow, Keypad 3 and Page Down, Keypad 4 and Left Arrow, Keypad 5 (Tactilei Raised),
Unknown, Keypad 6 and Right Arrow, Keypad 7 and Home, Keypad 8 and Up Arrow,
Keypad 8 and Page Up, Keypad . (decimal delimiter) and Delete, \ and | (Backslash and Bar, UK and Non-US Keyboard near left shift),
Keyboard Application (Windows Key for Win95 or Compose), Power (not a key),
Keypad = (Equal Sign), F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23,
F24, Execute, Help, Menu, Select, Stop, Again, Undo, Cut, Copy, Paste, Find,
Mute, Volume Up, Volume Down, Locking Caps Lock, Locking Num Lock, Locking Scroll Lock,
Keypad Comma, Keypad Equal Sign (AS/400), International 1 (PC98), International 2 (PC98),
International 3 (PC98), International 4 (PC98), International 5 (PC98), International 6 (PC98),
International 7 (Toggle Single/Double Byte Mode), International 8, International 9,
LANG 1 (Hangul/English Toggle, Korea), LANG 2 (Hanja Conversion, Korea), LANG 3 (Katakana, Japan),
LANG 4 (Hiragana, Japan), LANG 5 (Zenkaku/Hankaku, Japan), LANG 6, LANG 7,
LANG 8, LANG 9, Alternate Erase, SysReq/Attention, Cancel, Clear, Prior, Return,
Separator, Out, Open, Clear/Again, CrSel/Props, ExSel, Unknown, Unknown, Unknown,
Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown, Unknown, Control Left, Shift Left, Alt Left, GUI Left, Control Right,
Shift Right, Alt Right, GUI Right, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown,
Unknown
Input: 0 (Data,Array,Absolute,No Wrap,Linear,Preferred State,No Null Position)

End Collection
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 我要注册

USB开发网 (渝ICP备09006681号-4)

GMT+8, 2022-8-14 02:31 , Processed in 0.068426 second(s), 27 queries .

百合电子工作室版权所有
回顶部