Click here to Skip to main content
15,918,243 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can Sombody help ??? Pin
khyap25-Apr-05 23:03
khyap25-Apr-05 23:03 
GeneralAcitveX container hanging problem Pin
kostik125-Apr-05 21:12
kostik125-Apr-05 21:12 
Generalimport a type lib in VS 2002… Pin
anderslundsgard25-Apr-05 20:46
anderslundsgard25-Apr-05 20:46 
Generalthe union and intercestion of two sets Pin
nuhcoskun25-Apr-05 20:16
nuhcoskun25-Apr-05 20:16 
GeneralRe: the union and intercestion of two sets Pin
LunaticFringe26-Apr-05 3:09
LunaticFringe26-Apr-05 3:09 
Generalvc++ explorer Pin
arnabpodder25-Apr-05 19:20
arnabpodder25-Apr-05 19:20 
GeneralRe: vc++ explorer Pin
ThatsAlok25-Apr-05 21:43
ThatsAlok25-Apr-05 21:43 
GeneralDriver or User Application Pin
phoenix1825-Apr-05 18:23
phoenix1825-Apr-05 18:23 
Device information as obtained from Jungo's WinDriver.
----------------------------------------------------------------------------------
1. Config. 1: interface no. 0 , alternate setting : 0
endpoints: 0 , class : 0x1 , subclass : 0x1 , protocol : 0x0
Pipe 00 , Control , direction : IN & OUT , packetsize : 8

2. Config. 1: interface no. 1 , alternate setting : 0
endpoints : 0 , class : 0x1 , subclass :0x2 , protocol :0x0

3. Config. 1: interface no. 1 , alternate setting : 1
endpoints : 1 , class : 0x1 , subclass :0x2 , protocol :0x0
1: endpoint address : 0x1,attributes : 0xd
max packet size : 8 (0x8) , Interval : 1
Pipe 01 , Isochronous , direction : OUT , packetsize : 8

4. Config. 1: interface no. 2 , alternate setting : 0
endpoints : 0 , class : 0x1 , subclass :0x2 , protocol :0x0

5. Config. 1: interface no. 2 , alternate setting : 1
endpoints : 1 , class : 0x1 , subclass :0x2 , protocol :0x0
1: endpoint address : 0x82,attributes : 0xd
max packet size : 8 (0x8) , Interval : 1
Pipe 82 , Isochronous , direction : IN , packetsize : 8

6. Config. 1: interface no. 3 , alternate setting : 0
endpoints : 1 , class : 0x3 , subclass :0x1 , protocol :0x1
1: endpoint address : 0x83,attributes : 0x3
max packet size : 8 (0x8) , Interval : 10
Pipe 83 , Interrupt , direction : IN , packetsize : 8



Windows XP Device Manager Detection
--------------------------------------------------------

KeyPad : Usb Human Interface Device
--------------------------------------------------------
hidclass.sys
hidhub.sys
hidparse.sys
hid.dll

Audio : Usb Audio Device
-----------------------------------------
drmk.sys
ks.sys
portcls.sys
stream.sys
USBAUDIO.sys
ksproxy.sys
kuser.dll
wdaud.drv

Usb Composite Device
-----------------------------------------
usbccgp.sys

They all use the Windows standard driver. No other driver are needed.


Requirements :
-------------------------
I have to send some Control Setup packets to a USB composite device on which i have to carry out the following operations.

1. Detect the On-hook / Off-hook status of a telephone.
2. Set a relay on the board On/Off.
3. Set a buzzer on the board On/Off.



Using WinDriver user interface I sent the following 8-byte Control Setup packets.

1. On-hook/Off-hook status:
--------------------------------------------
C.S packet : C0 00 00 00 00 00 01 00 [ C0 - specifies a vendor specific packet ]
[ 00 (second byte) - request type ]
[ 01 - size of the packet to be returned ]
Nt : The controller onboard the device detected the packet and sent a byte representing the status back ]

2. Set a Relay On/Off :
--------------------------------------------

C.S packet : C0 01 00 00 00 00 00 00 [ 01 - Put the Relay Off ]
C.S packet : C0 02 00 00 00 00 00 00 [ 02 - Put the Relay On ]

3. Set a buzzer On/Off :
--------------------------------------------

C.S packet : C0 03 00 00 00 00 00 00 [ 01 - Put the buzzer Off ]
C.S packet : C0 04 00 00 00 00 00 00 [ 02 - Put the buzzer On ]

I wrote a user application to enumerate the device using the SetupdiXxx functions from the Windows DDK. I succesfully got the device path and opened a handle to the device using CreateFile.


Question 1:
-------------------
Can i send vendor specific IOCTL's to the standard driver. I have come accross 2 files : usbioctl.h and usbuser.h in the WINDDK folder. In usbuser.h I have come accross USBUSER_OP_SEND_ONE_PACKET ioctl. Can i use this ioctl to send 8-byte Control Setup packets to the device. Will this work with the usbccgp.sys driver.

Question 2:
-------------------
If the above method does not work then i think that i will have to write a filter driver. Are there any problems with building filter driver for a windows standard driver. Also since i have a time restriction i want to know whether i can modify the filter driver boilerplate code given in windows ddk under .../src/wdm/usb/filter to handle these control packets.

GeneralRe: Driver or User Application Pin
Blake Miller26-Apr-05 13:17
Blake Miller26-Apr-05 13:17 
GeneralGlobal Windows Message Problem Pin
outoolcoe25-Apr-05 17:49
outoolcoe25-Apr-05 17:49 
GeneralRe: Global Windows Message Problem Pin
PJ Arends25-Apr-05 18:23
professionalPJ Arends25-Apr-05 18:23 
GeneralRe: Global Windows Message Problem Pin
outoolcoe25-Apr-05 18:59
outoolcoe25-Apr-05 18:59 
GeneralRe: Global Windows Message Problem Pin
PJ Arends25-Apr-05 21:42
professionalPJ Arends25-Apr-05 21:42 
GeneralRe: Global Windows Message Problem Pin
outoolcoe26-Apr-05 0:08
outoolcoe26-Apr-05 0:08 
GeneralPrint the CHtmlView content Pin
Fernando A. Gomez F.25-Apr-05 17:12
Fernando A. Gomez F.25-Apr-05 17:12 
GeneralRe: Print the CHtmlView content Pin
Jason Henderson26-Apr-05 3:21
Jason Henderson26-Apr-05 3:21 
GeneralTable in CRichEditCtrl Pin
Carc25-Apr-05 15:32
Carc25-Apr-05 15:32 
GeneralRe: Table in CRichEditCtrl Pin
Ravi Bhavnani25-Apr-05 16:59
professionalRavi Bhavnani25-Apr-05 16:59 
GeneralRe: Table in CRichEditCtrl Pin
Carc25-Apr-05 17:23
Carc25-Apr-05 17:23 
GeneralRe: Table in CRichEditCtrl Pin
Ravi Bhavnani25-Apr-05 17:30
professionalRavi Bhavnani25-Apr-05 17:30 
GeneralRe: Table in CRichEditCtrl Pin
Carc25-Apr-05 17:41
Carc25-Apr-05 17:41 
GeneralRe: Table in CRichEditCtrl Pin
Ryan Binns25-Apr-05 18:50
Ryan Binns25-Apr-05 18:50 
GeneralPlaying audio Pin
Anonymous25-Apr-05 15:30
Anonymous25-Apr-05 15:30 
GeneralRe: Playing audio Pin
Ravi Bhavnani25-Apr-05 16:57
professionalRavi Bhavnani25-Apr-05 16:57 
GeneralRe: Cstring comparision problem Pin
Ravi Bhavnani25-Apr-05 16:55
professionalRavi Bhavnani25-Apr-05 16:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.