Using usbtool

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
fcapozzi
Posts: 6
Joined: Thu Apr 21, 2016 1:25 pm

Using usbtool

Post by fcapozzi » Sat Apr 30, 2016 1:07 pm

Hi all, in the vUSB firmware examples is included a tool (usbtool) to make USB queries to device.
This tool should be usefull in troubleshooting.

So i compiled this tool and start using it in with the Hid-Data example.
The device i assembled using an attiny24 presents itself as 'DataStore' device and is working.
I can write to and retrieve eeprom data from device with the provided example command line program.

So i using the usbtool i attemped to make some query the usb device.

1) The first query is a standard control in request to query the status (bRequestType = 0x00 (GET_STATUS))
Syntax is

usbtool -P 'DataStore' control in standard device 0 0 0'

I was expecting two byte in response and actually device answered properly with
0x00, 0x00

2) Second query is GET_CONFIGURATION (bRequest=0x08) and i was expecting one response byte that is the configuration in effect.
Syntax is

usbtool -P 'DataStore' control in standard device 8 0 0'

Device answered properly with 0x01

3) The 3rd query was to retrieve the device descriptor (18 Bytes) but it does not returned any byte.
GET_DESCRIPTOR bRequest is 0x06 and descriptor type (device descriptor) is 1 so the syntax was

usbtool -P 'DataStore' control in standard device 6 1 0

Device does not answered anything. According the documentation the standard queries are answered by driver itself so i was expecting 18 response bytes. However since the device is well enumerated and working, surely the device descriptor is returned by the driver at some point in the enumeration phase.

I'm wrong in something ? Why the device does not returned the Device Descriptor using usbtool ???

Tnx for any help or suggestion.

Post Reply