Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7733959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:07:49+00:00 2026-06-01T07:07:49+00:00

I want create module which update list of usb devices automatically (not only mass

  • 0

I want create module which update list of usb devices automatically (not only mass storage). Now it works very rude – it has additional thread, which after 1 second update list of devices. But maybe you know how to handle some plug event, which generate OS (for example windows XP and above) or another way how to simplify this process. Thank you for your time!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:07:50+00:00Added an answer on June 1, 2026 at 7:07 am

    This question appears to be half design, half implementation. It seems you’re most concerned about finding some way for Java USB services like jUSB to service hotplug events from the system, allowing you to have an event called via inversion of control instead of running a thread that passionately and iteratively polls the system in the background.

    The support you seek was implemented back in 2005 as JSR-80, and appears to live on, in the matter of all great projects that overstepped their commercial support, as javax-usb on SourceForge. Note that in their toy example (in javax-usb-example/src/ShowTopology.java), their preferred model is still polling based.

    Not all is lost, however! In the properties file for javax.usb, we find this:

    # If polling should be used instead of waiting for a hotplug
    notification.

    # Some kernel versions have a bug, and don’t update the device node(s) until
    many seconds after waking up threads waiting on the devices file.
    If you are not getting hotplug events on a moderately to heavily loaded system,
    use polling.

    # Note that since the new (buggy?) kernel behavior breaks javax.usb, this defaults
    to true!

    # If you know your kernel isn’t broken you can set this to false.

    #com.ibm.jusb.os.linux.LinuxUsbServices.topologyUpdateUsePolling = true

    And in javax-usb/src/javax/usb/event/UsbServicesListener.java, we see a model for setting up a USB event listener that you can proceed to use when a device is attached or detached from the system. No documentation is externally given on whether this works, however, and the docs themselves appear to be mostly 8 years old.

    Therefore, it’s reasonable assume that while the support theoretically exists, it’s lagged, stale, and in desperate need of an update by the community. This is the kind of thing that this fine community on SO could help fix, so I’ll begin to close by pointing directly to the project itself.

    For now, until enhanced hardware or hotplug support exists, polling is still the best solution.

    (Additional reference implementation of javax-usb)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I want to create a custom Module for Footer which shows the news
I think I want to use pythons built in calendar module to create an
i want create image animation , i have 50 images with png format now
I have a command line server for which I want to create a wrapper
I need to create module in Magento which will have few database tables. One
I wanna create a public repo (bare repo) which contains multiple submodules. I want
I created module for admin specific operations. I don't want to write the same
I want create a drop shadow around the canvas component in flex. Technically speaking
I want create a excel with Apache POI in java and I must insert
I want to create a Java application bundle for Mac without using Mac. According

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.