Windows 系统上的 Java 应用程序作为 USB 外设运行
有没有办法让 USB 设备充当主机,并让基于 Windows 的系统上的应用程序充当外设?我们有一个作为主机的 USB 设备,我们需要它来连接到在基于 Windows 的系统上运行的应用程序。该设备使用 USB 2.0 On-the-go 规范,但需要以主机角色运行。我们已经找到了一些库,但它们似乎只有在应用程序是主机并且设备是外围设备时才起作用。任何信息或线索将不胜感激。
谢谢。
Is there a way to have a USB device act as a Host and an application on a Windows based system to act as the Peripheral? We have a USB device that is the host and we need it to connect to our application running on a Windows based system. The device is using USB 2.0 On-the-go specification, but it needs to run in Host role. We have found a few libraries and what not but they seem to only work if the application is host and the device is the peripheral. Any information or leads would be greatly appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
典型 Windows PC 上的 USB 端口只能在主机模式下通信。这意味着,如果您的设备直接连接到 PC(包括集线器),则它必须在设备模式下运行。
有些设备可以同时与 2 个 USB 主机通信(例如,某些 USB→USB PC 连接电缆)。这可能是解决您问题的一种方法,但对我来说,您似乎只需要对设备软件进行一些调整即可。
The USB Ports on a typical Windows PC can only talk in Host mode. This means that if your device is directly connected to a PC (including hubs), it has to run in device mode.
There are devices that can talk to 2 USB hosts at one (e.g. some USB<->USB PC connection cables). That could be one solution to your problem, but to me it looks more like you just have to adapt your devices software some bits.