Access usbccgp.sys from user space

Hi,

I’m new to this group. I’ve developed a couple of WDM drivers before and I
sure wish that I would’ve known about this group earlier. Let me explain my
current problem. I think I know what needs to be done I just want to
confirm that I’m on the right track. Anyway, I have a USB composite device
with an Audio and a HID interface. The OS automatically installs the USB
Common Class Generic Parent driver and then loads the corresponding class
drivers for the upper level drivers. After this process the device can be
found from user space through HID and also through any of the numerous
audio APIs. Everything works fine.

My problem is that I need to access the default control pipe (endpoint 0).
This is for updating the firmware. I can write a filter driver that sits on
top of the usbccgp driver which I can interface with from user space, but I
was hoping that I could initiate an IRP from user space through the usbccgp
driver. I did a “CreateFile” on the usbccgp driver and got a handle back.
Now that I have the handle, I don’t know what I need to send to create an
IRP for endpoint 0? Do I use IOCTLs or do I use Write? My guess would be
that I should write the filter driver?

Thanks and regards
–Beat

Usbgccp does not expose an interface to write to the default control
pipe generically. Think of the things a user mode app could do to screw
up the state of a device b/c the functional driver expects to have
complete control over the control pipe.

Have you looked at the DFU spec?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Beat
Sent: Monday, January 24, 2005 11:25 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Access usbccgp.sys from user space

Hi,

I’m new to this group. I’ve developed a couple of WDM drivers before and
I
sure wish that I would’ve known about this group earlier. Let me explain
my
current problem. I think I know what needs to be done I just want to
confirm that I’m on the right track. Anyway, I have a USB composite
device
with an Audio and a HID interface. The OS automatically installs the USB

Common Class Generic Parent driver and then loads the corresponding
class
drivers for the upper level drivers. After this process the device can
be
found from user space through HID and also through any of the numerous
audio APIs. Everything works fine.

My problem is that I need to access the default control pipe (endpoint
0).
This is for updating the firmware. I can write a filter driver that sits
on
top of the usbccgp driver which I can interface with from user space,
but I
was hoping that I could initiate an IRP from user space through the
usbccgp
driver. I did a “CreateFile” on the usbccgp driver and got a handle
back.
Now that I have the handle, I don’t know what I need to send to create
an
IRP for endpoint 0? Do I use IOCTLs or do I use Write? My guess would be

that I should write the filter driver?

Thanks and regards
–Beat


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

Ok, that makes sense. Unfortunately, we buy the USB chips and it does
not support DFU. :frowning: That definitely would be the way to go.

I think the only option I have is to write a filter driver and
communicate with the device that way. I guess the tricky part will be to
install and uninstall the filter driver dynamically. I think I will be
able to do this with UpdateDriverForPlugAndPlayDevices.

Thanks
–Beat

“Doron Holan” wrote in news:xxxxx@ntdev:

> Usbgccp does not expose an interface to write to the default control
> pipe generically. Think of the things a user mode app could do to
> screw up the state of a device b/c the functional driver expects to
> have complete control over the control pipe.
>
> Have you looked at the DFU spec?
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Beat
> Sent: Monday, January 24, 2005 11:25 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Access usbccgp.sys from user space
>
> Hi,
>
> I’m new to this group. I’ve developed a couple of WDM drivers before
> and I
> sure wish that I would’ve known about this group earlier. Let me
> explain my
> current problem. I think I know what needs to be done I just want to
> confirm that I’m on the right track. Anyway, I have a USB composite
> device
> with an Audio and a HID interface. The OS automatically installs the
> USB
>
> Common Class Generic Parent driver and then loads the corresponding
> class
> drivers for the upper level drivers. After this process the device can
> be
> found from user space through HID and also through any of the numerous
> audio APIs. Everything works fine.
>
> My problem is that I need to access the default control pipe (endpoint
> 0).
> This is for updating the firmware. I can write a filter driver that
> sits on
> top of the usbccgp driver which I can interface with from user space,
> but I
> was hoping that I could initiate an IRP from user space through the
> usbccgp
> driver. I did a “CreateFile” on the usbccgp driver and got a handle
> back.
> Now that I have the handle, I don’t know what I need to send to create
> an
> IRP for endpoint 0? Do I use IOCTLs or do I use Write? My guess would
> be that I should write the filter driver?
>
> Thanks and regards
> --Beat