Discussion:
Device detected as Digitalcamera (PTP?) instead of Portable Device (MTP?) - MS_COMP_MTP - WinXP
Karl Krach
2012-11-09 08:50:01 UTC
Permalink
Hello,

I'm using the Meego's MTP code on a TI8148 evaluation board (Inventra
HDRC Peripheral Controller). When connecting to Win7 it's detected as
Protable Device and I'm offered to open the explorer. But on WinXP it's
detected as Digital Camera and thus I am offered to open scan- and
image-editors and the explorer-icon is a camera. What do I have to do,
to get the board detected as 'Portable Device'?

When opening the Windows hardware manager, I can list the Compatible
IDs. My Samsung mobile, which is detected correctly lists
USB\MS_COMP_MTP
USB\Class_06&SubClass_01&Prot_01
USB\Class_06&SubClass_01
USB\Class_06

while my device lacks of the first entry:
USB\Class_06&SubClass_01&Prot_01
USB\Class_06&SubClass_01
USB\Class_06

Also the service of the mobile is WUDRFd and of my device only usbscan.
According wpdmtp.inf MTP is used with USB\MS_COMP_MTP:

[Generic.NTx86]
%GenericMTP.DeviceDesc%=MTP, USB\MS_COMP_MTP

In difference to this, PTP (ptpusb.inf) is used with
"USB\Class_06&SubClass_01&Prot_01"

[Generic]
%GenericPTP.DeviceDesc%=PTP, USB\Class_06&SubClass_01&Prot_01

How to be detected as USB\MS_COMP_MTP?


Thanks a lot in advance,

Charly



My Configuration is:

#define BATTERY_LEVEL_DEFAULT 0
#define COPYRIGHT_INFO_DEFAULT "Do Not Copy"
#define SYNC_PARTNER_DEFAULT "MyCompany MyDevice"
#define DEVICE_FRIENDLY_NAME_DEFAULT "Friendly Device"
#define STANDARD_VERSION_DEFAULT 100
#define VENDOR_EXTENSION_DEFAULT 0x00000006

// Perceived Device Type
// 0x0 Generic --> detect as digital camera + no explorer icon at
all + offer scan-applications
// 0x1 Still Image/Video Camera --> detect as digital camera +
camera icon + offer scan-applications
// 0x2 Media (Audio/Video) Player --> detect as digital camera + no
explorer icon at all + offer scan-applications
// 0x3 Mobile Handset --> detect as digital camera + camera icon +
offer scan-applications
// 0x4 Video Player
// 0x5 Personal Information Manager / PDA --> detect as digital
camera + camera icon + offer scan-applications
// 0x6 Audio Recorder
#define DEVICE_TYPE_DEFAULT 0x00000003

#define MTP_VERSION_DEFAULT 100
#define MTP_EXTENSION_DEFAULT "microsoft.com: 1.0; microsoft.com/WMPPD:
11.0; "
#define FUNCTIONAL_MODE_DEFAULT 0
#define MANUFACTURER_DEFAULT "My Company"
#define MODEL_DEFAULT "My Device"
#define SERIAL_NO_DEFAULT "00000000000000000000000000000001"
// Device Version - software or firmware version
#define DEVICE_VERSION_DEFAULT "Prototype"

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Peter Stuge
2012-11-09 15:40:52 UTC
Permalink
Post by Karl Krach
How to be detected as USB\MS_COMP_MTP?
Microsoft OS Descriptors

http://msdn.microsoft.com/en-us/library/windows/hardware/gg463179.aspx
http://msdn.microsoft.com/en-us/library/windows/hardware/ff537430%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/windows/hardware/gg463179.aspx
http://msdn.microsoft.com/en-us/library/windows/hardware/ff553624%28v=vs.85%29.aspx


//Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Karl Krach
2012-11-09 16:43:13 UTC
Permalink
Post by Peter Stuge
Microsoft OS Descriptors
Thanks a lot. It seams that the Android [1] has the 'Microsoft OS
Descriptors' implemented while Meego has not. Porting from the Android
code don't seems to be straightforward for me - do you know a better
solution?

According Brett [2] the 'Microsoft OS Descriptors' are required to get
MTP running on WinXP. They also say, that they are only requested if
using 'Vendor Class Codes' - otherwise PHP is used. I personally would
prefer using the MTP class codes - especially since they are supported
by all current Windows versions.

Regards,

Charly


[1]
https://bitbucket.org/thekraven/lge-kernel-star/src/8fbcd136a82c/drivers/usb/gadget/f_mtp.c#cl-219
[2] http://www.digipedia.pl/usenet/thread/19505/14786/#post14156
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Peter Stuge
2012-11-14 04:50:33 UTC
Permalink
Post by Karl Krach
Thanks a lot. It seams that the Android [1] has the 'Microsoft OS
Descriptors' implemented while Meego has not. Porting from the Android code
don't seems to be straightforward for me - do you know a better solution?
Reimplement them?

It shouldn't be terribly much work - it's one string descriptor and
one type vendor recipient device control request.
Post by Karl Krach
According Brett [2] the 'Microsoft OS Descriptors' are required to get
MTP running on WinXP. They also say, that they are only requested if
using 'Vendor Class Codes' - otherwise PHP is used.
I don't know about that. Please let me know if you do some tests
though.

Note that you'll need to clean your registry, or bump vidpid, or
change USB port, each time you unplug/replug the device while
testing.


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