Media Transfer Protocol MTP (SOLVED)

Using applications, configuring, problems
Post Reply
Message
Author
can8v
Posts: 586
Joined: Sat 15 Jul 2006, 08:20
Location: Yuba City, CA
Contact:

Media Transfer Protocol MTP (SOLVED)

#1 Post by can8v »

***EDIT***
There are a few solutions using go-mtpfs. They are at the following links:
go-mtpfs (required for both options)
http://murga-linux.com/puppy/viewtopic. ... 845#752416
Automatic mount/unmount solution
http://murga-linux.com/puppy/viewtopic.php?t=91833
Semiautomatic solution.
http://murga-linux.com/puppy/viewtopic. ... 105#754223
Somewhere in this thread Geoffrey provides another solution, but it is not packaged as a pet package at the time of this writing. It is included in the Carolina 1.2 release.
***Edit***
For those not familiar with MTP it is becoming very prevalent. Now that Google no longer supports connecting Android devices via USB Mass Storage Device, MTP is spreading at an alarming rate. Puppy is a little late to the game in supporting this type of connection. It is a subset of PTP which is used by Pup Camera.
I have been trying to get this working in Carolina for over a week. My results are in the Carolina 1.1 thread pg.79. I have mostly been trying to get this working using libmtp, gvfs, gvfs-mtp backend, and FUSE, which should work splendidly with Thunar (default file manager in Carolina). So far I have manage to get everything working and can finally launch Thunar from the terminal and no errors come up, but Thunar still does not display my Nexus 7 (Android 4.4) as a storage device.
A little more on MTP, I have used the libmtp, gvfs,gvfs-mtp backend and FUSE with both Thunar and PCmanFM in other distros and both options work great. That said there is some differences between mounting a MTP device and mounting block devices. First MTP is NOT a block device. Files are mounted indepently. Second Because MTP devices are not block devices they can be mounted by both the host device (in my case Android 4.4 on the Nexus 7) and other devices (in my case my laptop using the above mentioned tools) at the same time. I use the term host device rather loosely, as the Nexus 7 is not serving the files or facilitating the connection, it merely provides the physical case and hardware needed for the connection (ie. USB port).
I would be more than a little thrilled to see MTP supported in any version of Puppy or Puplet. If anybody has any clues how to make this happen, or can get it working and provide a .pet or sfs package for any version of Puppy it would be greatly appreciated.
Last edited by can8v on Thu 06 Feb 2014, 23:36, edited 7 times in total.

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#2 Post by Ted Dog »

same issues here. pm me if you unconcover a working pet or sfs

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#3 Post by Semme »

The advice offered by Tempestuous may be your best hope.

can8v
Posts: 586
Joined: Sat 15 Jul 2006, 08:20
Location: Yuba City, CA
Contact:

#4 Post by can8v »

Semme wrote:The advice offered by Tempestuous may be your best hope.
At least in Carolina I could not get this to work.
I am really hoping for support from a file manager rather than a stand alone app designed to manage an MP3 player. I understand why this class of applications were developed, but now that MTP has gone mainstream, it makes sense for file management on MTP devices to happen in the file manager with all the other devices and drives. Although if I could get this working that would at least temporarily satisfy me. One of the many advantages of using the file manager would be easily mounting the device, which could then be treated like any other drive on the computer. For example I installed Lubuntu a couple days ago and was able to connect my Nexus 7 and instantly start charging my device, while transferring some videos I had taken on my sons Boy Scout hike. The previous time I had shared the directories containing the media on the Nexus 7, so my wife was also able to connect to that share after I connected via USB and transfer the files to her Mac as well. I suppose I could install a Samba server on the Nexus 7 and share the files directly from there and the more powerful mobile devices become the more commonplace arrangements like that may become. On the other hand a great many of the MTP devices to not have the ability to install Samba servers or any software for that matter. Many of the MTP devices are just media players and don't even have WiFi. So I think even in the long run proper MTP support is going to be fairly important.
I will be away for a few days, but will check back on this thread when I return.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#5 Post by tempestuous »

I did some more reading about libmtp, and I see that it's generally regarded as unreliable with Android devices.
There's an alternative application based on libmtp: go-mtpfs
which I have just packaged now for you to test. Get it here -
http://www.smokey01.com/tempestuous/go- ... 130628.pet
Instructions:
Download and install the dotpet.
Connect your phone to the USB port of your Puppy computer. Wait a few seconds.
Open a console and run these 2 commands -

Code: Select all

cd /mnt
go-mtpfs MTPdevice
You will see the go-mtpfs application attempt to connect to your phone ...
if this is successful, you should be able to see the contents of your phone at /mnt/MTPdevice with a standard file browser (such as ROX). Go ahead and copy some files from/to Puppy.
When you're finished, it's important to unmount the phone before disconnecting it, with this command -

Code: Select all

fusermount -u MTPdevice
UPDATE: 64bit version now available (for Fatdog64, Slacko64 etc) -
http://www.smokey01.com/tempestuous/go- ... -64bit.pet
Last edited by tempestuous on Sun 26 Jan 2014, 08:49, edited 2 times in total.

can8v
Posts: 586
Joined: Sat 15 Jul 2006, 08:20
Location: Yuba City, CA
Contact:

#6 Post by can8v »

@tempestuous
I am very excited to try this out. If it works I will write a script that will mount the device then launch Thunar. Might be able to set it up to auto unmount when Thunar closes, as well. I should be back to my computer tomorrow and will check it out then.

rokytnji
Posts: 2262
Joined: Tue 20 Jan 2009, 15:54

#7 Post by rokytnji »

Might have to think outside of the box maybe

https://play.google.com/store/apps/deta ... roid&hl=en

I own a Blackberry Storm so I am able to use Mass Storage Device/usb in my Puppy installs. That is why I keep it. Plus I got it super cheap and it does everything I need.

So I can't test this on Puppy.

gcmartin

#8 Post by gcmartin »

Hi @Tempestuous.

Is this aimed at, say, Slacko or Slacko64, or both?

Thanks in advance.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#9 Post by tempestuous »

gcmartin wrote:Is this aimed at, say, Slacko or Slacko64, or both?
All third party applications contributed on this forum, unless expressly stated otherwise, are for the official Puppies or standard Puppy derivatives - thus 32bit. 64bit is a special case.
But since you have mentioned 64bit, it's quite easy for me to provide a 64bit version, since the go-mtpfs developer provides binary releases. See my earlier post, which I just updated.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#10 Post by tempestuous »

EDIT: testing successful.
Last edited by tempestuous on Sun 26 Jan 2014, 08:50, edited 1 time in total.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#11 Post by 01micko »

Works!!!

Where's the rest of the feedback?

Anyway, on Slacko64-5.8.7, followed the simple instructions and am now browsing the files on my Nexus 7. Thanks tempestuous.

Image

EDIT: odd mix eh? :lol:
Puppy Linux Blog - contact me for access

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#12 Post by Ted Dog »

could you please add datatype to your host so the .pet does not become a garbled wall of text in my browster.CANt DO SAVE AS UNDER ANDROID.
thanks. I have same issue with my hosting of pets at puppylinux.net so I do not host much. which is such a waste Ive got storage and bandwidth.

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#13 Post by Ted Dog »

after looking at those music folders I wonder if 01micko has multiple personality.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#14 Post by 01micko »

Ted Dog wrote:after looking at those music folders I wonder if 01micko has multiple personality.
I'll let you wonder about that :lol:

Anyway, confirmed working great with my Samsung Galaxy W (an older one) with CyanogenMod 9 (Andrioid 4.0.4 ICS). I was a bit more adventurous as I only tested connectivity with the Nexus. I converted 2barks.au to an ogg and dropped it in where the ring tones live, now if some one contacts me it will (or has the option to) bark. So writing to the phone seems to work fine.

By the way, the go-mtpfs process seems to keep running in the terminal, not like a usual mount (I am aware that it is not a usual mount) and it seems the only way to stop it is with CTRL+C. Then I run fusermount -u MTP,
Puppy Linux Blog - contact me for access

can8v
Posts: 586
Joined: Sat 15 Jul 2006, 08:20
Location: Yuba City, CA
Contact:

#15 Post by can8v »

01micko wrote:Works!!!

Where's the rest of the feedback?

Anyway, on Slacko64-5.8.7, followed the simple instructions and am now browsing the files on my Nexus 7. Thanks tempestuous.

Image

EDIT: odd mix eh? :lol:
That is awesome, now I really can't wait to get home and test this out..

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#16 Post by Ted Dog »

well at least you dont play Pantera.. oh wait never mind... I almost got my car stolen and distroyed by a die hard fan. Friends son was very upset that someone made fun of the T shirt he had on. I stupidly asked why and after hearing the band ended up agreeing with the other party that they do not seem to have actual musical skill. My keys where taken and I heard my truck being over revved in the drive. He was glaring at me from drivers seat while resetting all my music stations on the radio to metal rock stations. :twisted:

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#17 Post by tempestuous »

01micko wrote:the go-mtpfs process seems to keep running in the terminal, not like a usual mount (I am aware that it is not a usual mount) and it seems the only way to stop it is with CTRL+C.
OK, go-mtpfs is apparently a daemon process, so we need to let it run while freeing up the console with "&" ...
so the instructions should be -

Code: Select all

cd /mnt
go-mtpfs MTPdevice &
Last edited by tempestuous on Sun 26 Jan 2014, 08:51, edited 1 time in total.

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#18 Post by Ted Dog »

and if you are angry my dad was a music producer and broadcaster, the Stories about him an wolfman Jack mostly are mostly untold, The kid safe versions where very out there, man.
My first musical instrument was given to me by Dolly Parton after she heard about my physical limitations figured out a type of flat steel stringed keyboard that I could use. And it sounded so cool when I played it. Until my mom force my dad to give it back when she found out how much the real model I got costs.
My mom did know how generous Dolly Parton is to everyone until later. :shock:
My dad was a backup DJ and he never sounded like his radio voice in person. What was cool is that our house was listed as a radio station and we got record demos almost daily. :wink:

can8v
Posts: 586
Joined: Sat 15 Jul 2006, 08:20
Location: Yuba City, CA
Contact:

#19 Post by can8v »

I couldn't wait until I got home, so I got a VNC connection to my laptop and tested this. This works great! Thank you so much Tempestuous. I am going to start work on a script to automate the mounting and unmounting process when I get back.

can8v
Posts: 586
Joined: Sat 15 Jul 2006, 08:20
Location: Yuba City, CA
Contact:

#20 Post by can8v »

OK, so my initial idea is that I could use udev rules to detect my Nexus 7 connection via USB, when it is detected then run a script that will mount the Nexus 7 via go-mtpfs. You will see in the code example that I changed the mount point and directory name to suit my own needs. The script works when called from the command line or double clicked in Thunar (ie. the Nexus 7 is mounted). The udev rule doesn't seem to detect the connection and/or run the script. I pulled the vendor id and product id from lsusb in the terminal and verified they are correct. I added the rule to the 88-puppy-autodetect.rules

udev rule:

Code: Select all

ACTION=="add", SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", SYSFS{idProduct}=="4ee1", RUN+="/root/my-applications/bin/Nexus7-mount.sh"
mount script for Nexus 7:

Code: Select all

#!/bin/bash
# Mount my Nexus 7
cd /mnt
go-mtpfs "Nexus 7" &
Even if I figure out this udev rule, this is not very universal and would require anybody doing this to customize the script to mount at an appropriate mount point and directory name for their device and change the udev rule to detect their device instead of a Nexus 7. That is assuming they have a device other than a Nexus 7. I will be back at my computer tomorrow, so I can work at this directly. Maybe I will make some progress. Thanks again Tempestuous.

Post Reply