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 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).

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

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

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.

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