Re: g_mass_storage emulation of flash drive - difficulties with passing vendor/product ID

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

 



On Tue, Jun 6, 2017 at 3:03 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 5 Jun 2017, Alan Robertson wrote:
>
>> >> >> USBSTOR\DISK&VEN_LINUX&PROD_FILE-STOR_GADGET&REV_0404\123456789012&0
>> >
>> > It looks like Windows is remembering an earlier version of your gadget
>> > and matching it with the current version based on the serial number
>> > string.
>>
>> I've changed the SN and still getting it showing as 'File-Stor Gadget'
>> on Linux, Windows, router
>
> When you say "on Linux", you mean in some userspace program (some sort
> of device manager), not in the kernel, right?  Everything the kernel
> knows about the gadget will show up in the "lsusb -v" output and in
> /sys/kernel/debug/usb/devices (assuming you have mounted a debugfs
> filesystem on /sys/kernel/debug).

Sorry, yes - I mean in KDE - when I go to eject it I can see File-Stor mentioned

>> > This all seems to be valid, except for the bcdDevice value.
>>
>> Does the 3/4/5 (vs 1/2/3) number of iManufac/Prod/Serial matter at all?
>
> No, it does not.

OK

>> > Try changing bcdDevice to a valid number, and change the serial number
>> > string to something different from what you were using before.
>>
>> Have changed both and also cleared Windows USB cache with DriveCleanup
>> from www.uwe-sieber.de (which forces redetection).  Eject removable
>> media is showing as Cruzer Switch, but it is still showing as "Linux
>> File-Stor Gadget USB Device" in device manager (and as File-Stor on
>> other non-Windows devices I tried).
>>
>> I'm guessing we've now changed all that's changeable with
>> g_mass_storage but happy to take any further suggestions! - something
>> is still making it appear subtly different to systems cf a native USB
>> flash drive :(
>
> It's hard to say what that could be.  From your description, the gadget
> does not send any information to the host that could identify it as a
> Linux-based gadget.

Agree in lsusb -v there's nothing obvious, but the way File-Stor is
coming up on router & KDE and Windows is also identifying as that
(even after clearing devices and changing SN) make me think there must
be something that is still 'giving the game away'!  Sadly I've got no
control of the devices I'm trying to use this in, I just know that
they're not recognising this as a valid memory stick when they will
happily recognise any other actual sticks that I try to use in them.

> There's one more thing you can try: Use usbmon on a Linux host to
> capture the packet data when the gadget is initialized and configured.

OK will do.

Cheers

Alan
--
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