Main Site Documentation

Help with usb_raw device



i am new to usb been reading a lot but cant get the clue of how to work wit the SendSetupTransfer, ive came across an example but is just dont get it.

SendSetupTransfer(0x00, 0x09, cd.bConfigurationValue, 0x00);
usb.SendSetupTransfer(0x21, 0x09, 0x0200, 0x0000, data, 0, data.Length);

can someone explain to me what the values are that have been used here?

This is the output of the device a want to write a driver for.

9:12 AM 4/14/2011[Device, Port 0]

Type: Printer

ProductID: 405

VendorID: 3540

=== Interface ===
Class: Printer
SubClass: 1
Number: 0
Protocol: 2
Type: 4

– Endpoint –
Attributes: 2
Address: 1
Type: 5
Interval: 0

– Endpoint –
Attributes: 2
Address: 130
Type: 5
Interval: 0

help please :’(


These are the standard argument for USB setup transfers. If you read the USB specifications then these argument will make more sense.

If your device is a printer then GHI already provide a drivers for it so why writing your own?


:smiley: thanx