Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


USB Custom Mouse Device with 2 Interface

OSR_Community_UserOSR_Community_User Member Posts: 110,217
I'm facing the following question in customizing the AchorChip's device
driver to work for my custom USB device which expose 2 interface.

a.) Mouse
b.) A Reader Device

I am thinking of the follwing possible solutions :

Method1:
1.) How to call the vmouse.vxd from WDM USB device driver

- I've the sample source code to talk to the USB chip from AnchorChip:
ezusb.sys
- If I receive the mouse position information from the firmware, how do
I talk
to the vmouse.vxd (should I?) to control the mouse pointer?

OR

Method2:
2.) How to layer the WDM USB device driver(ezusb.sys) properly to let
the mouse
work as
HID while we can still CreateFile into our device driver to do
DeviceIO...

-I've tried to place the ezusb.sys as a filter driver or mini driver,
but if it
is in the middle layer, I cannot do a CreateFile and sending IRP to it.
If I
put it as the Upper Filter driver. The mouse stop talking to the HID.

OR
Method3:
3.) How to interface a USB device which has 2 interface :

- mouse
- custom device
-Maybe my understanding on the driver is not right as the above. Could
u
recommend the right way to do the job?


I've posted my message to a few newsgroups but nobody reply to me, please
anybody help me, I am desparate to seek for the solution.
Thanks.

sincere,
cfchai

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Hi :
    If both interface are HID class, you can use the Microsoft's driver . Then
    talk to your device through HIDClient.

    Hope that help
    Michael Cheng




    xxxxx@[email protected] on 2000/07/28 08:45:35 AM

    Please respond to "NT Developers Interest List"

    Sent by: [email protected]


    To: "NT Developers Interest List"
    cc:

    Subject: [ntdev] USB Custom Mouse Device with 2 Interface



    I'm facing the following question in customizing the AchorChip's device
    driver to work for my custom USB device which expose 2 interface.

    a.) Mouse
    b.) A Reader Device

    I am thinking of the follwing possible solutions :

    Method1:
    1.) How to call the vmouse.vxd from WDM USB device driver

    - I've the sample source code to talk to the USB chip from AnchorChip:
    ezusb.sys
    - If I receive the mouse position information from the firmware, how do
    I talk
    to the vmouse.vxd (should I?) to control the mouse pointer?

    OR

    Method2:
    2.) How to layer the WDM USB device driver(ezusb.sys) properly to let
    the mouse
    work as
    HID while we can still CreateFile into our device driver to do
    DeviceIO...

    -I've tried to place the ezusb.sys as a filter driver or mini driver,
    but if it
    is in the middle layer, I cannot do a CreateFile and sending IRP to it.
    If I
    put it as the Upper Filter driver. The mouse stop talking to the HID.

    OR
    Method3:
    3.) How to interface a USB device which has 2 interface :

    - mouse
    - custom device
    -Maybe my understanding on the driver is not right as the above. Could
    u
    recommend the right way to do the job?


    I've posted my message to a few newsgroups but nobody reply to me, please
    anybody help me, I am desparate to seek for the solution.
    Thanks.

    sincere,
    cfchai

    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    The other device is custom reader device, we have been using the ezusb.sys
    (WDM device driver for their AnchorChip) to do the IOCTL before this.

    Can I use 2 inf files :
    1.) Inf files for HID mouse
    2.) Inf files for the USB Reader (Class = USB)

    With the same Vendor ID and Product ID?

    OR

    Is it possible for me to put the ezusb.sys as a lower filter driver and
    send IOCTL to it? (Upper filter is not possible so far as it block my
    mouse from being recognized as the HID to control the mouse pointer, or I
    am not correct in my test? )

    OR

    Whether it's possible for me to use the same ezusb.sys , but how can I call
    the vmouse.vxd?

    Thanks for ur reply.
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Hi:
    It should be composite device right? then hook up each interface with the
    driver which you like . you would need only one INF file. Take a look of
    Keyboard.inf

    Good Luck
    Michael Cheng






    xxxxx@[email protected] on 2000/07/28 09:36:03 AM

    Please respond to "NT Developers Interest List"

    Sent by: [email protected]


    To: "NT Developers Interest List"
    cc:

    Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface



    The other device is custom reader device, we have been using the ezusb.sys
    (WDM device driver for their AnchorChip) to do the IOCTL before this.

    Can I use 2 inf files :
    1.) Inf files for HID mouse
    2.) Inf files for the USB Reader (Class = USB)

    With the same Vendor ID and Product ID?

    OR

    Is it possible for me to put the ezusb.sys as a lower filter driver and
    send IOCTL to it? (Upper filter is not possible so far as it block my
    mouse from being recognized as the HID to control the mouse pointer, or I
    am not correct in my test? )

    OR

    Whether it's possible for me to use the same ezusb.sys , but how can I call
    the vmouse.vxd?

    Thanks for ur reply.

    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    But in single Inf file I can only have only one class type right? Either
    Class= USB or Class= Mouse.

    Can two line with the same VID and PID exist in the Inf?
    %USB\VID_0566&PID_2800.DeviceDesc%=USBMouse, USB\VID_0566&PID_2800
    %USB\VID_0566&PID_2800.DeviceDesc%=USBReader, USB\VID_0566&PID_2800

    Yet the user still need to setup the device twice, right?

    ***********

    By the way, I have a sample on Philips's PUSHKNOB mouse, the put a lower
    filter driver which provide a powerful functionality. Can I put the
    ezusb.sys as a filter driver as well? But do u know whether I can send
    IOCTL direct to the filter driver in Win98 SE? (I saw a article provided
    by Eliyas Yakub saying that it's possible in Win
    2000)

    Thanks.

    sincere,
    cfchai



    On 07/28/00, "[email protected]" wrote:
    > Hi:
    > It should be composite device right? then hook up each interface with the
    > driver which you like . you would need only one INF file. Take a look of
    > Keyboard.inf
    >
    > Good Luck
    > Michael Cheng
    >
    >
    >
    >
    >
    >
    > xxxxx@[email protected] on 2000/07/28 09:36:03 AM
    >
    > Please respond to "NT Developers Interest List"
    >
    > Sent by: [email protected]
    >
    >
    > To: "NT Developers Interest List"
    > cc:
    >
    > Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface
    >
    >
    >
    > The other device is custom reader device, we have been using the ezusb.sys
    > (WDM device driver for their AnchorChip) to do the IOCTL before this.
    >
    > Can I use 2 inf files :
    > 1.) Inf files for HID mouse
    > 2.) Inf files for the USB Reader (Class = USB)
    >
    > With the same Vendor ID and Product ID?
    >
    > OR
    >
    > Is it possible for me to put the ezusb.sys as a lower filter driver and
    > send IOCTL to it? (Upper filter is not possible so far as it block my
    > mouse from being recognized as the HID to control the mouse pointer, or I
    > am not correct in my test? )
    >
    > OR
    >
    > Whether it's possible for me to use the same ezusb.sys , but how can I call
    > the vmouse.vxd?
    >
    > Thanks for ur reply.
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Hi :
    Look more carefully of Keyboard.inf. Beside VID, PID , composite device
    also include interface for its Hardware ID.

    Good Luck
    Michael




    xxxxx@[email protected] on 2000/07/28 10:57:50 AM

    Please respond to "NT Developers Interest List"

    Sent by: [email protected]


    To: "NT Developers Interest List"
    cc:

    Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface



    But in single Inf file I can only have only one class type right? Either
    Class= USB or Class= Mouse.

    Can two line with the same VID and PID exist in the Inf?
    %USB\VID_0566&PID_2800.DeviceDesc%=USBMouse, USB\VID_0566&PID_2800
    %USB\VID_0566&PID_2800.DeviceDesc%=USBReader, USB\VID_0566&PID_2800

    Yet the user still need to setup the device twice, right?

    ***********

    By the way, I have a sample on Philips's PUSHKNOB mouse, the put a lower
    filter driver which provide a powerful functionality. Can I put the
    ezusb.sys as a filter driver as well? But do u know whether I can send
    IOCTL direct to the filter driver in Win98 SE? (I saw a article provided
    by Eliyas Yakub saying that it's possible in Win
    2000)

    Thanks.

    sincere,
    cfchai



    On 07/28/00, "[email protected]" wrote:
    > Hi:
    > It should be composite device right? then hook up each interface with the
    > driver which you like . you would need only one INF file. Take a look of
    > Keyboard.inf
    >
    > Good Luck
    > Michael Cheng
    >
    >
    >
    >
    >
    >
    > xxxxx@[email protected] on 2000/07/28 09:36:03 AM
    >
    > Please respond to "NT Developers Interest List"
    >
    > Sent by: [email protected]
    >
    >
    > To: "NT Developers Interest List"
    > cc:
    >
    > Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface
    >
    >
    >
    > The other device is custom reader device, we have been using the
    ezusb.sys
    > (WDM device driver for their AnchorChip) to do the IOCTL before this.
    >
    > Can I use 2 inf files :
    > 1.) Inf files for HID mouse
    > 2.) Inf files for the USB Reader (Class = USB)
    >
    > With the same Vendor ID and Product ID?
    >
    > OR
    >
    > Is it possible for me to put the ezusb.sys as a lower filter driver and
    > send IOCTL to it? (Upper filter is not possible so far as it block my
    > mouse from being recognized as the HID to control the mouse pointer, or I
    > am not correct in my test? )
    >
    > OR
    >
    > Whether it's possible for me to use the same ezusb.sys , but how can I
    call
    > the vmouse.vxd?
    >
    > Thanks for ur reply.
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')

    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    You mean the MI_00 at the back?

    [PHILIPS_KBD]
    %USB\VID_0471&PID_0401.DeviceDesc%=USBKBD, USB\VID_0471&PID_0401
    %USB\VID_0471&PID_0402&MI_00.DeviceDesc%=USBKBD,
    USB\VID_0471&PID_0402&MI_00
    %USB\VID_0471&PID_0601&MI_00.DeviceDesc%=USBKBD,
    USB\VID_0471&PID_0601&MI_00

    Mmm... I don't have any information in hand on that yet. But I will try to
    find out.

    Thank you Michael!

    sincere,
    cfchai
    On 07/30/00, "[email protected]" wrote:
    > Hi :
    > Look more carefully of Keyboard.inf. Beside VID, PID , composite device
    > also include interface for its Hardware ID.
    >
    > Good Luck
    > Michael
    >
    >
    >
    >
    > xxxxx@[email protected] on 2000/07/28 10:57:50 AM
    >
    > Please respond to "NT Developers Interest List"
    >
    > Sent by: [email protected]
    >
    >
    > To: "NT Developers Interest List"
    > cc:
    >
    > Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface
    >
    >
    >
    > But in single Inf file I can only have only one class type right? Either
    > Class= USB or Class= Mouse.
    >
    > Can two line with the same VID and PID exist in the Inf?
    > %USB\VID_0566&PID_2800.DeviceDesc%=USBMouse, USB\VID_0566&PID_2800
    > %USB\VID_0566&PID_2800.DeviceDesc%=USBReader, USB\VID_0566&PID_2800
    >
    > Yet the user still need to setup the device twice, right?
    >
    > ***********
    >
    > By the way, I have a sample on Philips's PUSHKNOB mouse, the put a lower
    > filter driver which provide a powerful functionality. Can I put the
    > ezusb.sys as a filter driver as well? But do u know whether I can send
    > IOCTL direct to the filter driver in Win98 SE? (I saw a article provided
    > by Eliyas Yakub saying that it's possible in Win
    > 2000)
    >
    > Thanks.
    >
    > sincere,
    > cfchai
    >
    >
    >
    > On 07/28/00, "[email protected]" wrote:
    > > Hi:
    > > It should be composite device right? then hook up each interface with the
    > > driver which you like . you would need only one INF file. Take a look of
    > > Keyboard.inf
    > >
    > > Good Luck
    > > Michael Cheng
    > >
    > >
    > >
    > >
    > >
    > >
    > > xxxxx@[email protected] on 2000/07/28 09:36:03 AM
    > >
    > > Please respond to "NT Developers Interest List"
    > >
    > > Sent by: [email protected]
    > >
    > >
    > > To: "NT Developers Interest List"
    > > cc:
    > >
    > > Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface
    > >
    > >
    > >
    > > The other device is custom reader device, we have been using the
    > ezusb.sys
    > > (WDM device driver for their AnchorChip) to do the IOCTL before this.
    > >
    > > Can I use 2 inf files :
    > > 1.) Inf files for HID mouse
    > > 2.) Inf files for the USB Reader (Class = USB)
    > >
    > > With the same Vendor ID and Product ID?
    > >
    > > OR
    > >
    > > Is it possible for me to put the ezusb.sys as a lower filter driver and
    > > send IOCTL to it? (Upper filter is not possible so far as it block my
    > > mouse from being recognized as the HID to control the mouse pointer, or I
    > > am not correct in my test? )
    > >
    > > OR
    > >
    > > Whether it's possible for me to use the same ezusb.sys , but how can I
    > call
    > > the vmouse.vxd?
    > >
    > > Thanks for ur reply.
    > >
    > > ---
    > > You are currently subscribed to ntdev as: [email protected]
    > > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Hi:
    This is what I mean. May be you would like look KEYTRONIC_KBD as a example
    , it specify the keyboard interface hardware ID as
    USB\VID_03F9&PID_0102&MI_00. and Mouse interface hardware ID ( in
    MsMouse.inf) as USB\VID_03F9&PID_0102&MI_01

    Hope that make more clear

    Michael Cheng




    xxxxx@[email protected] on 2000/07/31 05:11:26 AM

    Please respond to "NT Developers Interest List"

    Sent by: [email protected]


    To: "NT Developers Interest List"
    cc:

    Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface



    You mean the MI_00 at the back?

    [PHILIPS_KBD]
    %USB\VID_0471&PID_0401.DeviceDesc%=USBKBD, USB\VID_0471&PID_0401
    %USB\VID_0471&PID_0402&MI_00.DeviceDesc%=USBKBD,
    USB\VID_0471&PID_0402&MI_00
    %USB\VID_0471&PID_0601&MI_00.DeviceDesc%=USBKBD,
    USB\VID_0471&PID_0601&MI_00

    Mmm... I don't have any information in hand on that yet. But I will try to
    find out.

    Thank you Michael!

    sincere,
    cfchai
    On 07/30/00, "[email protected]" wrote:
    > Hi :
    > Look more carefully of Keyboard.inf. Beside VID, PID , composite device
    > also include interface for its Hardware ID.
    >
    > Good Luck
    > Michael
    >
    >
    >
    >
    > xxxxx@[email protected] on 2000/07/28 10:57:50 AM
    >
    > Please respond to "NT Developers Interest List"
    >
    > Sent by: [email protected]
    >
    >
    > To: "NT Developers Interest List"
    > cc:
    >
    > Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface
    >
    >
    >
    > But in single Inf file I can only have only one class type right? Either
    > Class= USB or Class= Mouse.
    >
    > Can two line with the same VID and PID exist in the Inf?
    > %USB\VID_0566&PID_2800.DeviceDesc%=USBMouse, USB\VID_0566&PID_2800
    > %USB\VID_0566&PID_2800.DeviceDesc%=USBReader, USB\VID_0566&PID_2800
    >
    > Yet the user still need to setup the device twice, right?
    >
    > ***********
    >
    > By the way, I have a sample on Philips's PUSHKNOB mouse, the put a lower
    > filter driver which provide a powerful functionality. Can I put the
    > ezusb.sys as a filter driver as well? But do u know whether I can send
    > IOCTL direct to the filter driver in Win98 SE? (I saw a article provided
    > by Eliyas Yakub saying that it's possible in Win
    > 2000)
    >
    > Thanks.
    >
    > sincere,
    > cfchai
    >
    >
    >
    > On 07/28/00, "[email protected]" wrote:
    > > Hi:
    > > It should be composite device right? then hook up each interface with
    the
    > > driver which you like . you would need only one INF file. Take a look
    of
    > > Keyboard.inf
    > >
    > > Good Luck
    > > Michael Cheng
    > >
    > >
    > >
    > >
    > >
    > >
    > > xxxxx@[email protected] on 2000/07/28 09:36:03 AM
    > >
    > > Please respond to "NT Developers Interest List"
    > >
    > > Sent by: [email protected]
    > >
    > >
    > > To: "NT Developers Interest List"
    > > cc:
    > >
    > > Subject: [ntdev] Re: USB Custom Mouse Device with 2 Interface
    > >
    > >
    > >
    > > The other device is custom reader device, we have been using the
    > ezusb.sys
    > > (WDM device driver for their AnchorChip) to do the IOCTL before this.
    > >
    > > Can I use 2 inf files :
    > > 1.) Inf files for HID mouse
    > > 2.) Inf files for the USB Reader (Class = USB)
    > >
    > > With the same Vendor ID and Product ID?
    > >
    > > OR
    > >
    > > Is it possible for me to put the ezusb.sys as a lower filter driver and
    > > send IOCTL to it? (Upper filter is not possible so far as it block my
    > > mouse from being recognized as the HID to control the mouse pointer, or
    I
    > > am not correct in my test? )
    > >
    > > OR
    > >
    > > Whether it's possible for me to use the same ezusb.sys , but how can I
    > call
    > > the vmouse.vxd?
    > >
    > > Thanks for ur reply.
    > >
    > > ---
    > > You are currently subscribed to ntdev as: [email protected]
    > > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')

    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Thank you Michael, I got it.

    sincere,
    cfchai

    On 07/30/00, "[email protected]" wrote:
    > Hi:
    > This is what I mean. May be you would like look KEYTRONIC_KBD as a example
    > , it specify the keyboard interface hardware ID as
    > USB\VID_03F9&PID_0102&MI_00. and Mouse interface hardware ID ( in
    > MsMouse.inf) as USB\VID_03F9&PID_0102&MI_01
    >
    > Hope that make more clear
    >
    > Michael Cheng
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online