|
From: Marcus M. <ma...@je...> - 2016-03-19 11:15:57
|
On Thu, Mar 17, 2016 at 08:04:44PM +0100, Dominik Haumann wrote: > Hi, > > in Linux/ KDE we have an kio-mtp slave that is used to access mtp capable > devices e.g. through the file manager dolphin (or all other apps supporting > KIO). > > As you can see in https://git.reviewboard.kde.org/r/127386/diff/2#index_header > in the left pane, we call > > int isMtpDevice = LIBMTP_Check_Specific_Device(); > > first with the bus and device number to check a priori, whether the respective > device is an mtp device. If isMtpDevice != 1, we just return. > > This call seems to return 0 for many Windows Phones (Lumia ones), even > though these devices support the mtp protocol. Removing this line > (essentially the right pane of the patch), it seems that devices are > recognized correctly. > > Now, checking the gvfs [1] and simple-mtp [2]implementations, both do NOT > call LIBMTP_Check_Specific_Device() at all. > > So it may very well be that KDE misdetects these devices due to calling > this LIBMTP_Check_Specific_Device(). > > Question is now: Is this a known issue? Can we safely remove this call, or > do we get false positives then? > > Any hint is very much appreciated! This function probes an USB device for MTP specific properties, in some form of MTP property auto detection. This auto-detection does not necessarily work for all MTP devices, as it is was never well defined or documemted. It also does not check against our existing USB ID database. If you have a device that is in our USB ID database already, LIBMTP_Detect_Raw_Devices will do the by-id detection (and you do that later in the code). Only as fallback you should try LIBMTP_Check_Specific_Device(). Ciao, Marcus |