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

  • Home
  • SEARCH
  • 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 294663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:23:15+00:00 2026-05-12T06:23:15+00:00

This may not be considered to be directly programming related but I am at

  • 0

This may not be considered to be directly programming related but I am at a loss to know where else to ask. I have tried looking at a variety of websites but so far Google has not been my friend.

I am having trouble finding out whether I need to write my own device driver for the various windows/linux/mac platforms that the device I am developing may be connected to, or whether the functionality is provided by the standard drivers.

My device is a USB CDC (communications device) that appears as a COM: port. It also includes a battery charger that will, once the device has been enumerated require the full 5 unit load (500mA) supply current that can be drawn from the USB connector. My problem is that if the USB driver in the host decides that it cannot deliver the full supply current then it should fail to enumerate the device.

If, as a fallback, I provide a second configuration set that only allows the device to draw 1 unit load from the interface connector will the standard drivers enumerate the device using this configuration.

  • 1 1 Answer
  • 2 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-12T06:23:15+00:00Added an answer on May 12, 2026 at 6:23 am

    You need to write a .inf file for Windows that ties up your device VID and PID with the system usbser.sys. Mine looks like this (Replace YourCompany as necessary, put in your VID and PID (in hex), and change the DriverVer line to whatever date and version you want):

    ; -----------------------------------------------------------------------------
    ; XP/2000 USB Comms Port Setup
    ; -----------------------------------------------------------------------------
    
    [Version] 
    DriverVer=12/03/2008,1.0.0000.0000
    Signature="$Windows NT$"
    Class=Ports 
    ClassGUID={4d36e978-e325-11ce-bfc1-08002be10318} 
    Provider=%YourCompany% 
    
    [DestinationDirs]
    DefaultDestDir=10,system32\drivers
    DriverCopyFiles=12
    
    [ControlFlags]
    ExcludeFromSelect = *
    
    [Manufacturer] 
    %YourCOmpany%=YourCompanySerialPort 
    
    [YourCompanySerialPort] 
    %YourCompanyUSBSerialPort%=YOURCOMPANYUSB,USB\VID_1234&PID_ABCD
    
    ; 
    ; Win 2000/XP
    ;
    [YOURCOMPANYUSB]
    Include=mdmcpq.inf
    CopyFiles=FakeModemCopyFileSection
    
    [YOURCOMPANYUSB.HW] 
    AddReg=YOURCOMPANYUSBAddReg.HW 
    
    [YOURCOMPANYUSBAddReg.HW] 
    HKR,,DevLoader,0,*ntkern 
    HKR,,NTMPDriver,,"usbser.sys" 
    
    [YOURCOMPANYUSB.Services] 
    AddService=usbser, 0x00000002, FuncDrv_Service_Inst 
    
    [FuncDrv_Service_Inst] 
    DisplayName=%USBFilterString% 
    ServiceType= 1 
    StartType = 3 
    ErrorControl = 0 
    ServiceBinary = %12%\usbser.sys 
    
    [Strings] 
    YourCompany="YourCompany" 
    YourCompanySerialPort="Your Company USB Serial Port" 
    USBFilterString = "USB Serial Service"
    

    Note this works with 32 bit OSs only. It also works with Vista although the file header doesn’t say so!

    Be aware that some versions of usbser.sys have significant problems, including bluescreening, for example when transferring packets that are exact multiples of 64 bytes. If you’re using XP SP2 or previous then install hotfix KB943198. XP SP3 and Vista are fine.

    For the Mac you simply need to report your device class correctly and the driver scan picks up the correct drivers. (Windows ignores the device class which is why you need to supply the .inf file).

    EDIT: Sorry, I should have been clearer. This will not fail to enumerate if it can’t draw the full load – I’m not sure that’s possible.

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

Sidebar

Related Questions

This may not be a programming question, but I don't know where to ask
Sorry, this may or may not be a programming question directly, but I am
This question may not directly relate to programming. I have noticed that the technology
This may not be the kind of question one should ask on StackOverflow, but
This may not be possible for the carousel but is there a way to
I fear this just may not be possible, but I'm trying to create a
This may seem a basic question but my is not currently working. I am
Not quite sure how to phrase this, but will do my best. I have
Okay, This may be really simple or it may not even be possible, or
Since LESS is a pre-compile stylesheet language, this may not achieve what I'm after,

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.