Wiimote 的 Windows HID 设备驱动程序安装。我们可以改进它吗?
我们正在开发一个项目,其中有一个程序可以连接到 Wiimote 并从中读取数据。它有效,但我们希望改进连接过程。在成功建立与 Wiimote 的蓝牙连接之前,我们通常必须进行多次连接尝试。这一切都在 Windows 7 32 位上进行。
对于每次连接尝试,我们都会执行以下操作:
- 打开 Wiimote 电源
- 在 Windows 中将其启用为 HID 设备
- 测试连接。
- 如果连接良好,我们就完成了。否则 Wiimote 将关闭并进行新的尝试。
每次打开 Wiimote 电源时,Windows 都会尝试安装通用 HID 驱动程序。当连接不良时,驱动程序安装失败,我们必须重新开始。每次尝试安装这个通用驱动程序似乎效率很低。
我们有几个问题希望您能够帮助我们解决并为我们指明正确的方向:
- Windows 真的有必要为每次连接尝试安装驱动程序吗?例如,为什么 Windows 不能像普通 USB 鼠标一样识别/记住该设备。
- 为 Wiimote 编写我们自己的通用 HID 驱动程序是否会使安装更加可靠并帮助 Windows 识别设备?
- 是否可以禁用或隐藏 Windows 尝试安装通用 HID 驱动程序时显示的弹出消息?我们不想删除所有设备安装消息,只想删除与 Wiimote 有关的消息。
有关 Wiimote 电源的注意事项:我们使用稍微经过硬件改造的 Wiimote,它不使用电池,而是通过连接到计算机的 USB 电缆获取电源。到目前为止,我们发现每次连接尝试之间都必须打开和关闭电源,否则设备驱动程序安装通常会失败。
We’re working on a project in which we have a program that connects to a Wiimote and reads data from it. It works, however we would like to improve the connection process. We often have to make several connection attempts before we successfully establish a Bluetooth connection to the Wiimote. This is all on Windows 7 32bit.
For every connection attempt we do the following:
- Power on the Wiimote
- Enable it as a HID device in Windows
- Test the connection.
- If the connection is good, we’re done. Otherwise the Wiimote is powered off and a new attempt is made.
Each time the Wiimote is powered on, Windows tries to install a generic HID driver. When the connection is bad the driver installation fails and we have to start over. Installing this generic driver each attempt seems inefficient.
We have a few questions we hope you might be able to help us with and point us in the right direction:
- Is it really necessary for Windows to install the driver for each connection attempt? Why can’t Windows recognise/remember the device like a normal USB mouse, for example.
- Would writing our own generic HID driver for the Wiimote make the installation more reliable and help Windows recognise the device?
- Is it possible to disable or hide the popup message that is displayed when Windows tries to install the generic HID driver? We don’t want to remove all device install messages, only those concerning our Wiimote.
Note regarding Wiimote power: We use a slightly hardware modded Wiimote that doesn’t use batteries, but instead draws power through a USB cable connected to the computer. So far we have discovered that is is necessary to turn power on and off between each connection attempt, otherwise device driver installation usually fails.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在注册表项“SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching”中存在一个整数子项“SearchOrderConfig”。
当设置为 0 时,Windows 不会查找驱动程序,并且设备安装会快很多。
以编程方式设置此密钥时,请记住在安装完成后重置它。
In the registry key "SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" exists an integer subkey "SearchOrderConfig".
When set to 0, Windows, it will not look for drivers, and the device installation will go a lot quicker.
When setting this key programmatically, remember to reset it after you're done installing.