识别特定的 USB 调制解调器设备,以便在重置后可以重新连接
我的应用程序连接到映射到 COM 端口的 USB 调制解调器。
我正在尝试找到一种方法,使我的应用程序在系统重新启动后保持连接到同一设备(通过 com 端口),正如我所观察到的那样,它不断将不同的 COM 端口号重新分配给设备。
我正在寻找一个标识符,该标识符对于该调制解调器类型是恒定的,但对于每个物理调制解调器设备都是不同的,但尚未找到。
是否有通用的方法来实现这一点,或者是驱动程序/制造商特定的?
更新:我找到的解决方案与硬件相关,通过制造商提供的补丁更新调制解调器的PID号,然后可以通过注册表访问该PID并链接到分配的COM#。
My application is connected to a USB modem which maps to a COM port.
I am trying to find a way to keep my application connected to that same device (via a com port) after a system restart, which - as I obsereved - keeps reassiging different COM port numbers to the devices.
I was looking for an identifier which is constant for that modem type, but different for every physical modem device, but as yet to have found one.
Is there a generic way to accomplish that, or is it driver/manufacturer specific?
Update: The solution I found was hardware related, an update to the modem's PID number via a patch, given by the manufacturer, then this PID can be accessed and linked to the assigned COM# through the registry.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
前几天我正在阅读 FTDI 相关文档,试图解决同样的问题(但作为产品制造商而不是最终用户)。
该问题与驱动程序如何识别设备有关。您也许可以通过在启动时删除注册表项来“破解”它 - 有效地清除最后一个已知的分配。
他们的两个应用说明可能会有所帮助,位于此处 和此处
I was reading through FTDI documents about this the other day, trying to solve the same problem (but as a product manufacturer not an end user).
The problem is related to how the driver identifies the device. You might be able to "hack" it by deleting registry entries at startup - effectively clearing the last known assignment.
Two of their app notes which might help are here and here