none
WEC7 MTP responder do not show existing files RRS feed

  • Question

  • Hi,

    I'm trying to make MTP responder functioning on my WEC7 device (IMX6DL, with GuruCE BSP). I got it working in part, but i'm not abel to see esisting files on my PC. What i have done:

    1) Included the folowing SYSGEN's:  SYSGEN_MTP_RESPONDER, SYSGEN_MTP_RESPONDER_USB, SYSGEN_MEDIAAPPS_MEDIALIBRARY

    2) Added the following to my *.reg file:

     [HKEY_LOCAL_MACHINE\Software\Microsoft\Thumbnail]
       "ThumbnailRoot"         ="\\NANDFlash\\Thumbnail"
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Thumbnail\Size]
      ; PLEASE MODIFY THESE TEMPORARY VALUES FOR CONFIGURING THUMBNAIL SIZE
      "MinimumSize"=dword:0
      "MaximumSize"=dword:1200000
      "StepSize"=dword:1
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Thumbnail\Height]
      ; PLEASE MODIFY THESE TEMPORARY VALUES FOR CONFIGURING THUMBNAIL HEIGHT
      "MinimumHeight"=dword:32
      "MaximumHeight"=dword:192 
      "StepSize"=dword:16   
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Thumbnail\Width]
     ; PLEASE MODIFY THESE TEMPORARY VALUES FOR CONFIGURING THUMBNAIL WIDTH
      "MinimumWidth"=dword:32
      "MaximumWidth"=dword:192 
      "StepSize"=dword:16    
    ; ------------------------------------------------------------------------------
    ;   Media Transfer Protocol Configuration
    ; ------------------------------------------------------------------------------


    ; ==============================================================================
    ; # MTP IP Transport Configuration

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\MTPUSBFn]
        "bcdDevice"=dword:0
        "Dll"="usbfnproxy.dll"
        "Prefix"="UFP"
    ; idVendor must be changed. 045E belongs to Microsoft and is only to be used for
    ; prototype devices in your labs. Visit http://www.usb.org to obtain a vendor id.
        "idVendor"=dword:045e
        "idProduct"=dword:0622
        "ServiceName"="MTPUSBSvc"
        "ServiceDll"="mtpusbfn.dll"
        "ServicePrefix"="MUF"

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
       "DefaultClientDriver"=- ; erase previous default
    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
       "DefaultClientDriver"="MTPUSBFn"



    ; ==============================================================================
    ; # MTP Configuration
    ; ==============================================================================


    [HKEY_LOCAL_MACHINE\Software\Microsoft\MTP\Responder]
    ;
    ; PLEASE MODIFY THESE TEMPORARY VALUES
    ;
        "DeviceModelName"                   ="DCU_C"
        "DeviceVersion"                     ="V2"
        "DeviceFriendlyName"                ="DCU_C_V2"
        "ManufacturerURL"                   ="innoval.biz"
        "ProductDescription"                ="To define"
    ;    "FunctionalID"                      ="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
    ;    "ContainerID"                       ="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
        "ModelID"                           ="{4E794ABF-01F1-42c8-92C5-97C8CCB4AE41}"
        "AcceptAllIPConnections"            =dword:0
        "IPConnectionNotificationTimeout"   =dword:7000


    [HKEY_LOCAL_MACHINE\Software\Microsoft\MTP\Responder\Storage]
    ;
    ; PLEASE MODIFY THE DEFAULT STORAGE VALUE TO INDICATE WHICH STORAGE IS PRIMARY
    ;
        "DefaultStorage"       ="Removable"
    ;


    [HKEY_LOCAL_MACHINE\Software\Microsoft\MTP\Responder\Storage\Internal]
    ;
    ; PLEASE MODIFY THE STORAGE CONFIGURATION TO INDICATE ONE OR MORE MTP STORAGES
    ;
        "StorageRoot"          ="\\NANDFlash"
        "StorageDescription"   ="Internal Flash"
        "VolumeIdentifier"     ="NANDFlashVolume1"
    ;
    [HKEY_LOCAL_MACHINE\Software\Microsoft\MTP\Responder\Storage\Removable]
    ;
    ; PLEASE MODIFY THE STORAGE CONFIGURATION TO INDICATE ONE OR MORE MTP STORAGES
    ;
        "StorageRoot"          ="\\MicroSD3"
        "StorageDescription"   ="SD-Card3"
        "VolumeIdentifier"     ="SDCardVolume1"
    ;


    ;[HKEY_LOCAL_MACHINE\Software\Microsoft\MTP\Responder\Metadata\<LOCALE>]
    ;
    ; PLEASE MODIFY THESE TEMPORARY VALUES FOR DEPLOYING METADATA PACKAGES
    ;
    ;    "Path"         =">>>>>>>>>>>>>>>CHANGE<<<<<<<<<<<<<<<"
    ;    "ContentID"    =">>>>>>>>>>>>>>>CHANGE<<<<<<<<<<<<<<<"
    ;    "Flags"        =dword:0    ; 1 == Default Metadata Package
    ;


    [HKEY_LOCAL_MACHINE\Software\Microsoft\MTP\MediaMDB]
    ;
    ; PLEASE MODIFY THESE TEMPORARY VALUES FOR CONFIGURING THE MEDIA MDB
    ;
        "MaxNumSessionItems"=dword:100000   ; 10000 == Default Maximum Number of Session Items

    ;
    ; Tell EXFAT/FAT to support writes on directory handles
    ;
    [HKEY_LOCAL_MACHINE\SYSTEM\StorageManager\FATFS]
        "DirHandleWrite"=dword:1
        "DisableAutoScan"=dword:1
    [HKEY_LOCAL_MACHINE\SYSTEM\StorageManager\EXFAT]
        "DirHandleWrite"=dword:1
        "DisableAutoScan"=dword:1

    3) Included in my NK.bin the file mlconfig.xml containing:

    <MLConfig dbpath="\MLib.sdf">
        <WatchLocations>
    <WatchLocation DataSourceId="1" Root="\MicroSD3" Profile="local" Auto="1"/>
    <WatchLocation DataSourceId="1" Root="\NANDFlash" Profile="local" Auto="1"/>
        </WatchLocations>
    </MLConfig>

    I think that the main problem is that for some reason the MTP responder is putting the found files in a wrong table, i have analysed the generate Mlib.sdf file an found that the present directories are in tbl_generic (seems OK) but the present files are in tbl_parseQueue (?). I can copy a new file to the MicroSD3 or NANDFlash, and thy get added to tbl_generic, but immediately deleted from there and added in tbl_parseQueue. (If i do not specify the directory in mlconfig.xml, they stay in tbl_generic!)

    Is this the expected behavior for Mlib.sdf? And if yes why is the MTB responder not transmitting the files present in tbl_parseQueue to the MTP initiator?

    best regards

    Martin

    Tuesday, June 26, 2018 7:17 AM