Re: Linux USB file storage gadget with new UDC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 27 Jun 2013, victor yeo wrote:

> I find some clue. From USB 2.0 Compliance Test Spec, quoted:
> 
> "Address State:
> 1.  Put the device in the configured state following the procedure below.
> 2.  Issue a valid Set Configuration command to the device with
> configuration value zero.
> 3.  Issue a valid Get Configuration command to the device and verify
> that device responds with zero."
> 
> I think the address state test in USB2CV fails because
> Set-Configuration actually set config #1 and Get-Configuration returns
> config #1. See the usb requests log below. It seems that the Set
> Configuration command from USB2CV is issued with config value of one.
> Isn't it?
> 
> g_file_storage gadget: ep0-setup, length 8:
> 00000000: 00 09 01 00 00 00 00 00
> g_file_storage gadget: set configuration

Yes, that is a Set-Config request with configuraiton value 1.  You
probably got hold of the wrong part of the log.  Elsewhere there should
be a Set-Config request with a config value of 0.

> g_file_storage gadget: ep0-setup, length 8:
> 00000000: 80 08 00 00 00 00 01 00
> g_file_storage gadget: get configuration
> g_file_storage gadget: ep0-in, length 1:
> 00000000: 01

This is the correct response following the request above.

You can test the gadget's behavior with a Linux host.  To send a 
Set-Config request with value N, do

	echo N >/sys/bus/usb/devices/.../bConfigurationValue

where the "..." part is replaced with the gadget's device path.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux