----- Original Message -----
From: Vasilios
Anagnostopoulos
Sent: Thursday, April 22, 2004 12:37 PM
Subject: Fw: A question from a young researcher I have installed the javax.usb package and I
try to write a simple program for printing to the notorious HP1000 Laserjet .
But I have a problem . According to the class specification , a printer class
must have at least a DATA interface with one Bulk OUT or one BULK IN
and one BULK OUT endpoint (plus the standard bi-directional
default control endpoint ) . When I issue a getDescriptor
IRP+getConfiguration descriptor I get the correct answer (according to the
standard) , I am very happy . When I issue a getDescriptor IRP+getInterface
, the device hangs . I use almost the same IRP as in
getDescriptor+getConfiguration with the modifications (according to the
standard)
"getDescriptor+getInterface"
bmRequestType 10000000B
bRequest GET_DESCRIPTOR
wvalue 0x0400 /*Interface*/
windex 0
wvalue 9 bytes
"getDescriptor+getConfiguration"
bmRequestType 10000000B
bRequest GET_DESCRIPTOR
wvalue 0x0200 /*Configuration*/
windex 0
wvalue 9 bytes the first did not work , the second was fine
.
I used for wvalue (for the interface) the possible
value 0x0401 because in the usbspec it says that wValue must have Descriptor
type and descriptor index . No luck :-(
The most curious feature is that when I used the
code from
with the method testIO and called
interf.getClass (which means it reads the inetrface descriptor) and so on
, the answers I got were the same as in the class specification for printer
devices , they were correct . The printer supports protocol 0x02 (a
bidirectional endpoint in the interface) . When I try to interf.claim()
(logged as root) , the try block throws an exception .
What is the problem :
Does this means that the printer has no
other endpoints except the control endpoints ? Is this a violation of the
specification ?
Do I make something wrong ?
I use Fedora Core 1 (at
home).
|
- [javax-usb-devel] Fw: A question from a young res... Vasilios Anagnostopoulos
- Re: [javax-usb-devel] Fw: A question from a ... Dan Streetman