From: Alistair B. <a.j...@gm...> - 2017-12-12 00:43:18
|
This looks like it could be https://sourceforge.net/p/libmtp/bugs/1474/ It appears to work after I copied mtp-probe from git master in to /lib/udev On 12 December 2017 at 00:32, Alistair Buxton <a.j...@gm...> wrote: > From what I can see the udev rules have a rule which catches unknown > devices. This rule works correctly when the device is "plugged" into > the virtual dummy_hcd driver, but for some reason it does not match > when my code is running on a real USB board plugged in to a physical > port. > > The rule is like this, after a couple thousand definitions for specific devices: > > # Autoprobe vendor-specific, communication and PTP devices > ENV{ID_MTP_DEVICE}!="1", ENV{MTP_NO_PROBE}!="1", > ENV{COLOR_MEASUREMENT_DEVICE}!="1", ENV{libsane_matched}!="yes", > ATTR{bDeviceClass}=="00|02|06|ef|ff", PROGRAM="mtp-probe > /sys$env{DEVPATH} $attr{busnum} $attr{devnum}", RESULT=="1", > SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", > ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" > > Here is the diff between the two lsusb -v: > > < Bus 001 Device 075: ID 0430:a4a2 Sun Microsystems, Inc. Ethernet > (RNDIS and CDC ethernet) > --- >> Bus 007 Device 048: ID 0430:a4a2 Sun Microsystems, Inc. Ethernet (RNDIS and CDC ethernet) > 18,23d17 > < OTG Descriptor: > < bLength 3 > < bDescriptorType 9 > < bmAttributes 0x03 > < SRP (Session Request Protocol) > < HNP (Host Negotiation Protocol) > 27c21 > < wTotalLength 42 > --- >> wTotalLength 39 > 57c51 > < bEndpointAddress 0x01 EP 1 OUT > --- >> bEndpointAddress 0x02 EP 2 OUT > 67c61 > < bEndpointAddress 0x82 EP 2 IN > --- >> bEndpointAddress 0x85 EP 5 IN > > Bus 001 is real hardware and 007 is dummy_hcd. This is the same code, > connected to the same host system. > > The only real difference is that the real hardware has this extra OTG > descriptor. > > This seems to be down to mtp-probe somehow: > > Dec 11 22:20:24 al-desktop mtp-probe[2753]: checking bus 1, device 89: > "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.4" > Dec 11 22:20:24 al-desktop mtp-probe[2753]: bus: 1, device: 89 was not > an MTP device > > Dec 12 00:07:57 al-desktop mtp-probe[5814]: checking bus 7, device 50: > "/sys/devices/platform/dummy_hcd.0/usb7/7-1" > Dec 12 00:07:57 al-desktop mtp-probe[5814]: bus: 7, device: 50 was an MTP device > > -- > Alistair Buxton > a.j...@gm... -- Alistair Buxton a.j...@gm... |