简体   繁体   中英

How to generate specific IDs for USB ports in Java?

I am developing an application using Java. I am connecting 10 USB devices through external USB ports. I want a specific ID when I connect a device with a specific port. So, for example, if I connect a device on 10th port, I should get a specific ID for that port; which will help me in showing that device in 10th position only. I tried Jusb and other similar third party APIs but they didn't work out. Please suggest some techniques to accomplish this.

你试过 JSR-80 API (javax.usb) 作为解释在这里http://www.ibm.com/developerworks/library/j-usb/index.html

Based on your comment on the previous answer you can download that jar from here. Then try following the steps given in this link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM