HID Mini Driver - USB Communication Problem

Hi All,
I have written a HID Mini driver to which a HIDClass Driver sends read
reports continuously.Now I have a touch screen device connected to the USB
port and I am reading the data sent by the touch screen with bulkusb.

We are basically trying to do Mouse Emulation.So all we need to do is take
the packet from Touch Screen and give it to HID Mini driver.The HID Mini
driver frames the mouse report and gives it to Hid class driver.

As of now what is happening is HID class driver is sending
ioctl_hid_read_report to HID Mini driver.This inturn has to get the device
object pointer of bulkusb,build IRP_MJ_READ, set a completion routine,send
the irp to bulkusb and wait for an event .

But when I wait for the event(KeWaitForSingleObject) the system crashes.I
get something like KeBugCheckEX.What exactly is this ?..I have checked the
IRQL at which the IOCTL_HID_READ_REPORT is executed is DISPATCHLEVEL.

Can anybody give some hints on this.

Kindly let me know if i am not clear with the explanation.

Thanks.
Best Regards,
Sai Prasad

**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

First, if your device is already USB, why not just declare it as a HID
device and forgo the translation layer that you are putting in between
hidclass and the device? If you simply describe your device as a HID
and then in your HID report describe yourself as an absolute pointing
device, you don’t have to do any translation at all.

The read irps sent by hidclass are meant to be completely asynchronous.
You can set a completion for the IRP, BUT you must do all your
processing in the *completion routine* (since it sounds like you are
modifying data coming back from the device). That means that you can’t
synchronously wait for the data to come back in the calling thread by
waiting on an event.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Sai_Prasad [mailto:xxxxx@satyam.com]
Sent: Tuesday, February 26, 2002 6:47 AM
To: NT Developers Interest List
Subject: [ntdev] HID Mini Driver - USB Communication Problem

Hi All,
I have written a HID Mini driver to which a HIDClass Driver sends
read
reports continuously.Now I have a touch screen device connected to the
USB
port and I am reading the data sent by the touch screen with bulkusb.

We are basically trying to do Mouse Emulation.So all we need to do is
take
the packet from Touch Screen and give it to HID Mini driver.The HID Mini
driver frames the mouse report and gives it to Hid class driver.

As of now what is happening is HID class driver is sending
ioctl_hid_read_report to HID Mini driver.This inturn has to get the
device
object pointer of bulkusb,build IRP_MJ_READ, set a completion
routine,send
the irp to bulkusb and wait for an event .

But when I wait for the event(KeWaitForSingleObject) the system
crashes.I
get something like KeBugCheckEX.What exactly is this ?..I have checked
the
IRQL at which the IOCTL_HID_READ_REPORT is executed is DISPATCHLEVEL.

Can anybody give some hints on this.

Kindly let me know if i am not clear with the explanation.

Thanks.
Best Regards,
Sai Prasad

************************************************************************
**
This email (including any attachments) is intended for the sole use of
the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
distribution or forwarding of any or all of the contents in this message
is
STRICTLY PROHIBITED. If you are not the intended recipient, please
contact
the sender by email and delete all copies; your cooperation in this
regard
is appreciated.
************************************************************************
**


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to %%email.unsub%%

Actually the device doesn’t send the data in the form of HID reports…the
device vendors send the data ina particular format…we have to convert
the data into HID reports and give it to HIDClass driver.


From: Doron Holan[SMTP:xxxxx@windows.microsoft.com]
Reply To: NT Developers Interest List
Sent: Tuesday, February 26, 2002 11:48 PM
To: NT Developers Interest List
Subject: [ntdev] RE: HID Mini Driver - USB Communication Problem

First, if your device is already USB, why not just declare it as a HID
device and forgo the translation layer that you are putting in between
hidclass and the device? If you simply describe your device as a HID
and then in your HID report describe yourself as an absolute pointing
device, you don’t have to do any translation at all.

The read irps sent by hidclass are meant to be completely asynchronous.
You can set a completion for the IRP, BUT you must do all your
processing in the *completion routine* (since it sounds like you are
modifying data coming back from the device). That means that you can’t
synchronously wait for the data to come back in the calling thread by
waiting on an event.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Sai_Prasad [mailto:xxxxx@satyam.com]
Sent: Tuesday, February 26, 2002 6:47 AM
To: NT Developers Interest List
Subject: [ntdev] HID Mini Driver - USB Communication Problem

Hi All,
I have written a HID Mini driver to which a HIDClass Driver sends
read
reports continuously.Now I have a touch screen device connected to the
USB
port and I am reading the data sent by the touch screen with bulkusb.

We are basically trying to do Mouse Emulation.So all we need to do is
take
the packet from Touch Screen and give it to HID Mini driver.The HID Mini
driver frames the mouse report and gives it to Hid class driver.

As of now what is happening is HID class driver is sending
ioctl_hid_read_report to HID Mini driver.This inturn has to get the
device
object pointer of bulkusb,build IRP_MJ_READ, set a completion
routine,send
the irp to bulkusb and wait for an event .

But when I wait for the event(KeWaitForSingleObject) the system
crashes.I
get something like KeBugCheckEX.What exactly is this ?..I have checked
the
IRQL at which the IOCTL_HID_READ_REPORT is executed is DISPATCHLEVEL.

Can anybody give some hints on this.

Kindly let me know if i am not clear with the explanation.

Thanks.
Best Regards,
Sai Prasad

************************************************************************
**
This email (including any attachments) is intended for the sole use of
the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
distribution or forwarding of any or all of the contents in this message
is
STRICTLY PROHIBITED. If you are not the intended recipient, please
contact
the sender by email and delete all copies; your cooperation in this
regard
is appreciated.
************************************************************************
**


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntdev as: xxxxx@bla.satyam.com
To unsubscribe send a blank email to %%email.unsub%%

**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

if all you are doing is converting data and you can change your hardware, I would recommend a straight HID solution w/out a driver :slight_smile: … otherwise, if you writing your own miniport (which is what it seems to be), do your conversion inline on writes (before it is sent to the hardware) and reads (after the device has returne data to you). You probably want to send your own buffers down to your device in your USB transfers and then copy the data out into the HID request buffers during the conversion process.

-----Original Message-----
From: Sai_Prasad [mailto:xxxxx@satyam.com]
Sent: Tue 2/26/2002 7:44 PM
To: NT Developers Interest List
Cc:
Subject: [ntdev] RE: HID Mini Driver - USB Communication Problem

Actually the device doesn’t send the data in the form of HID reports…the
device vendors send the data ina particular format…we have to convert
the data into HID reports and give it to HIDClass driver.


> From: Doron Holan[SMTP:xxxxx@windows.microsoft.com]
> Reply To: NT Developers Interest List
> Sent: Tuesday, February 26, 2002 11:48 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: HID Mini Driver - USB Communication Problem
>
> First, if your device is already USB, why not just declare it as a HID
> device and forgo the translation layer that you are putting in between
> hidclass and the device? If you simply describe your device as a HID
> and then in your HID report describe yourself as an absolute pointing
> device, you don’t have to do any translation at all.
>
> The read irps sent by hidclass are meant to be completely asynchronous.
> You can set a completion for the IRP, BUT you must do all your
> processing in the *completion routine* (since it sounds like you are
> modifying data coming back from the device). That means that you can’t
> synchronously wait for the data to come back in the calling thread by
> waiting on an event.
>
> D
>
> This posting is provided “AS IS” with no warranties, and confers no
> rights.
>
> -----Original Message-----
> From: Sai_Prasad [mailto:xxxxx@satyam.com]
> Sent: Tuesday, February 26, 2002 6:47 AM
> To: NT Developers Interest List
> Subject: [ntdev] HID Mini Driver - USB Communication Problem
>
> Hi All,
> I have written a HID Mini driver to which a HIDClass Driver sends
> read
> reports continuously.Now I have a touch screen device connected to the
> USB
> port and I am reading the data sent by the touch screen with bulkusb.
>
> We are basically trying to do Mouse Emulation.So all we need to do is
> take
> the packet from Touch Screen and give it to HID Mini driver.The HID Mini
> driver frames the mouse report and gives it to Hid class driver.
>
> As of now what is happening is HID class driver is sending
> ioctl_hid_read_report to HID Mini driver.This inturn has to get the
> device
> object pointer of bulkusb,build IRP_MJ_READ, set a completion
> routine,send
> the irp to bulkusb and wait for an event .
>
>
> But when I wait for the event(KeWaitForSingleObject) the system
> crashes.I
> get something like KeBugCheckEX.What exactly is this ?..I have checked
> the
> IRQL at which the IOCTL_HID_READ_REPORT is executed is DISPATCHLEVEL.
>
> Can anybody give some hints on this.
>
> Kindly let me know if i am not clear with the explanation.
>
> Thanks.
> Best Regards,
> Sai Prasad
>
>
> ************************************************************************
> **
> This email (including any attachments) is intended for the sole use of
> the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
> or
> distribution or forwarding of any or all of the contents in this message
> is
> STRICTLY PROHIBITED. If you are not the intended recipient, please
> contact
> the sender by email and delete all copies; your cooperation in this
> regard
> is appreciated.
> ************************************************************************
> **
>
> —
> You are currently subscribed to ntdev as: xxxxx@microsoft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
> —
> You are currently subscribed to ntdev as: xxxxx@bla.satyam.com
> To unsubscribe send a blank email to %%email.unsub%%
>
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************


You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com