AnsweredAssumed Answered

running uMTP responder hangs iMX6ULL

Question asked by Pritesh Patel on Jun 22, 2018
Latest reply on Jun 30, 2018 by Jean-François DEL NERO

Hi,

 

I have been trying to add MTP support in iMX6ULL. Linux kernel version is 4.1.15.

 

I found open source uMTP responder online.

GitHub - viveris/uMTP-Responder: Ligthweight Media Transfer Protocol (MTP) responder daemon for GNU/Linux 

It is a user space MTP daemon written in "C".  It runs through gadgetfs. You can find more information and source code  in above link.

 

I have followed below steps to run it on iMX6ULL EVK.

modprobe gadgetfs

mkdir -p /dev/gadget

mount -t gadgetfs none /dev/gadget

When I run the mtp daemon, EVK got hanged. I could no longer operate EVK on serial console. The host PC which is connected to EVK through OTG can not read USB descriptor information. USB device could not be enumerated in host PC.

Below are the debug logs.

root@imx6ull14x14evk:~/uMTP-Responder# ./umtprd
[Info] uMTP Responder
[Info] Version: v0.8.1 compiled the Jun 19 2018@15:21:51
[Info] (c) 2018 Viveris Technologies

[ 23.891322] gadgetfs: bound to 2184000.usb driver

[Debug] init_mtp_responder

[Debug] init_mtp_responder : Ok !

[Info] Add storage home folder - Root Path: /home
[Debug] mtp_add_storage : /home

[Debug] mtp_add_storage : Storage 00000001 mapped to /home (home folder)

[Info] USB Device path : /dev/gadget/2184000.usb
[Info] USB In End point path : /dev/gadget/ep1in
[Info] USB Out End point path : /dev/gadget/ep2out
[Info] USB Event End point path : /dev/gadget/ep3in
[Info] USB Max packet size : 0x200 bytes
[Info] Manufacturer string : Viveris Technologies
[Info] Product string : The Viveris Product !
[Info] Serial string : 01234567
[Info] Interface string : MTP
[Info] USB Vendor ID : 0x1D6B
[Info] USB Product ID : 0x0100
[Info] USB class ID : 0x06
[Info] USB subclass ID : 0x01
[Info] USB Protocol ID : 0x01
[Info] USB Device version : 0x3008
[Debug] fill_config_descriptor: (Total Len : 9 + 30 = 39)
[Debug]
09 02 27 00 01 01 05 80 01
[Debug] fill_if_descriptor:

[Debug]
09 04 00 00 03 06 01 01 06
[Debug] fill_ep_descriptor:

[Debug]
07 05 81 02 00 02 00
[Debug] fill_ep_descriptor:

[Debug]
07 05 02 02 00 02 00
[Debug] fill_ep_descriptor:

[Debug]
07 05 83 03 1C 00 06
[Debug] fill_config_descriptor: (Total Len : 9 + 30 = 39)
[Debug]
09 02 27 00 01 01 04 80 01
[Debug] fill_if_descriptor:

[Debug]
09 04 00 00 03 06 01 01 06
[Debug] fill_ep_descriptor:

[Debug]
07 05 81 02 00 02 00
[Debug] fill_ep_descriptor:

[Debug]
07 05 02 02 00 02 00
[Debug] fill_ep_descriptor:

[Debug]
07 05 83 03 1C 00 06
[Debug] fill_dev_descriptor:

[Debug]
12 01 00 00 06 01 01 00 6B 1D 00 01 08 30 01 02
03 01
[Debug] init_usb_mtp_gadget :

[Debug]
00 00 00 00 09 02 27 00 01 01 05 80 01 09 04 00
00 03 06 01 01 06 07 05 81 02 00 02 00 07 05 02
02 00 02 00 07 05 83 03 1C 00 06 09 02 27 00 01
01 04 80 01 09 04 00 00 03 06 01 01 06 07 05 81
02 00 02 00 07 05 02 02 00 02 00 07 05 83 03 1C
00 06 12 01 00 00 06 01 01 00 6B 1D 00 01 08 30
01 02 03 01
[Info] init_usb_mtp_gadget : USB config done
[Debug] handle_ep0 : Entering...
[Debug] 1 event(s)
[Debug] EP0 DISCONNECT
[Debug] 2 event(s)

 

I tried debugging chipidea UDC and gadgetfs drivers but could not find the root cause.

I have successfully run uMTP on Beagle bone black. Which uses musb-hdrc.

 

If anyone have any idea about what could be wrong here, please answer asap.

Outcomes