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 6672897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:33:45+00:00 2026-05-26T03:33:45+00:00

Having read up on this question regarding working with USB devices, I got to

  • 0

Having read up on this question regarding working with USB devices, I got to wondering what method is being used by the operating system to differentiate between types of USB device?

For example, I can plug in a USB mouse and the computer “just knows” it’s a mouse. If I plug in my 1GB USB drive it “just knows” it’s 1GB’s worth of removable storage.

What sort of code is being used by the device to ‘announce’ what type it is? Or is the operating system polling the device and getting some standardised response?

How would I program a device to identify itself as, say, a keyboard?

  • 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-05-26T03:33:46+00:00Added an answer on May 26, 2026 at 3:33 am

    In order to build a device that works over USB, you will almost certainly have to read the USB specification available from http://www.usb.org/developers/docs/

    In regards to your specific question, there are GET methods associated with various standard USB variables. These are stored in the firmware of the device and provided when requested. Eg, GET_DESCRIPTOR, GET_STATUS etc are request types that can be sent to the device.

    USB has its own set of protocols that would be quite a task to implement in their entirety, so most device manufacturers buy a USB controller chip from some third party.

    If you’re just interested in hacking something together, then I think the specification will be enough to get you sending a few packets.

    The only other option I can think of may not be suitable for your project; wire-tap a real keyboard, let the keyboard to all the complicated address resolution and device identification etc, then just have your device push data onto the wires as and when.

    This is something I have managed before when I build a keyboard black-box for password sniffing at high-school, the black-box stored keypresses then regurgitated them onto the wires as if it were a keyboard. Once it had stored a few passwords, and I retrieved it, I had to plug it in attached to the keyboard, then unplug the keyboard before setting it to output the keypresses (with a handy gedit window open :P) otherwise the keyboard would interrupt the transmission with its own data.

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

Sidebar

Related Questions

Having read this question Immutable or not immutable? and reading answers to my previous
After googling and landing on SO and having read this other question Is it
I am fairly certain this is a ten penny closure question. But having read
Having read this link on RBAR and this , my understanding of RBAR amounts
Having read around it appears this should be possible. I have the following content
I have a .txt file having some text. I want to read this file
Scenario Having already read a post on this on the same site, which didn't
I am having problems with code completion and read that this will fix it
I'm having problems reading this one JPEG file using ImageIO.read(File file) - it throws
This question is probably quite different from what you are used to reading here

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.