You are not logged in.

#1 2011-07-31 17:12:15

wilsonsamm
Member
Registered: 2011-05-06
Posts: 18

Problems connecting to an MP3 player over MTP

I'll try mtp-detect

$ mtp-detect
libmtp version: 1.1.0

Listing raw device(s)
libusb couldn't open USB device /dev/bus/usb/001/003: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/003/002: Permission denied.
libusb requires write access to USB device nodes.
Device 0 (VID=0781 and PID=7432) is a SanDisk Sansa Clip.
   Found 1 device(s):
   SanDisk: Sansa Clip (0781:7432) @ bus 1, dev 6
Attempting to connect device(s)

PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

It looked like a permission problem to me, so I try as root:

$ sudo mtp-detect
Password: 
libmtp version: 1.1.0

Listing raw device(s)
Device 0 (VID=0781 and PID=7432) is a SanDisk Sansa Clip.
   Found 1 device(s):
   SanDisk: Sansa Clip (0781:7432) @ bus 1, dev 6
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

By the way, it's a: ID 0781:7432 SanDisk Corp. Sansa Clip (mtp)

The player connects fine on Ubuntu and on my girlfriend's computer which has windows vista, but I can't work out why it's not connecting on my computer. Any ideas?

Offline

#2 2011-07-31 18:21:09

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: Problems connecting to an MP3 player over MTP

Remove the mp3 device. Open a terminal and type "sudo tail -f /var/log/messages.log", connect the device and then post the output you see in the terminal to this thread.

Probably the system is not assigning a device name to the partition. That happens to me with my Sony mp3 player also. I do:

sudo mkdir /mnt/tmp
sudo mount /dev/sdb /mnt/tmp  (change sdb to whatever the device is, this "kicks" the system somehow and it then assigns a node)
sudo mount /dev/sdb1 /mnt/tmp

My device is then mounted on /mnt/tmp. This is not clean but it works for me.


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#3 2011-07-31 19:38:13

wilsonsamm
Member
Registered: 2011-05-06
Posts: 18

Re: Problems connecting to an MP3 player over MTP

lagagnon wrote:

Remove the mp3 device. Open a terminal and type "sudo tail -f /var/log/messages.log", connect the device and then post the output you see in the terminal to this thread.

Jul 31 20:36:43 localhost kernel: [ 9723.715732] usb 1-8: new high speed USB device number 9 using ehci_hcd
Jul 31 20:36:45 localhost kernel: [ 9725.025758] usb 1-8: new high speed USB device number 10 using ehci_hcd
Jul 31 20:36:45 localhost kernel: [ 9725.168690] scsi9 : usb-storage 1-8:1.0
Jul 31 20:36:46 localhost kernel: [ 9726.171511] scsi 9:0:0:0: Direct-Access     SanDisk  Sansa Clip 2GB   v01. PQ: 0 ANSI: 0
Jul 31 20:36:46 localhost kernel: [ 9726.172195] sd 9:0:0:0: Attached scsi generic sg1 type 0
Jul 31 20:36:46 localhost kernel: [ 9726.173368] sd 9:0:0:0: [sdb] 3992576 512-byte logical blocks: (2.04 GB/1.90 GiB)
Jul 31 20:36:46 localhost kernel: [ 9726.174103] sd 9:0:0:0: [sdb] Write Protect is off
Jul 31 20:36:46 localhost kernel: [ 9726.181545]  sdb:
Jul 31 20:36:46 localhost kernel: [ 9726.184645] sd 9:0:0:0: [sdb] Attached SCSI removable disk

Is that as expected?

Offline

#4 2011-07-31 19:40:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems connecting to an MP3 player over MTP

wilsonsamm wrote:
lagagnon wrote:

Remove the mp3 device. Open a terminal and type "sudo tail -f /var/log/messages.log", connect the device and then post the output you see in the terminal to this thread.

Jul 31 20:36:43 localhost kernel: [ 9723.715732] usb 1-8: new high speed USB device number 9 using ehci_hcd
Jul 31 20:36:45 localhost kernel: [ 9725.025758] usb 1-8: new high speed USB device number 10 using ehci_hcd
Jul 31 20:36:45 localhost kernel: [ 9725.168690] scsi9 : usb-storage 1-8:1.0
Jul 31 20:36:46 localhost kernel: [ 9726.171511] scsi 9:0:0:0: Direct-Access     SanDisk  Sansa Clip 2GB   v01. PQ: 0 ANSI: 0
Jul 31 20:36:46 localhost kernel: [ 9726.172195] sd 9:0:0:0: Attached scsi generic sg1 type 0
Jul 31 20:36:46 localhost kernel: [ 9726.173368] sd 9:0:0:0: [sdb] 3992576 512-byte logical blocks: (2.04 GB/1.90 GiB)
Jul 31 20:36:46 localhost kernel: [ 9726.174103] sd 9:0:0:0: [sdb] Write Protect is off
Jul 31 20:36:46 localhost kernel: [ 9726.181545]  sdb:
Jul 31 20:36:46 localhost kernel: [ 9726.184645] sd 9:0:0:0: [sdb] Attached SCSI removable disk

Is that as expected?

Yes, it looks OK. Have you did what lagagnon posted?

Offline

#5 2011-07-31 23:26:09

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: Problems connecting to an MP3 player over MTP

wilsonsamm: It is as expected from a device that doesn't quite get poked correctly - the device is seen as sdb but the kernel is not seeing the partition, which would be sdb1. That is why you might have to manually poke it like I suggested above. You could also write a script to do it quickly. I have yet to find a better way with some of these mp3 devices...


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#6 2011-08-01 20:01:04

wilsonsamm
Member
Registered: 2011-05-06
Posts: 18

Re: Problems connecting to an MP3 player over MTP

lagagnon wrote:

Remove the mp3 device. Open a terminal and type "sudo tail -f /var/log/messages.log", connect the device and then post the output you see in the terminal to this thread.

Probably the system is not assigning a device name to the partition. That happens to me with my Sony mp3 player also. I do:

sudo mkdir /mnt/tmp
sudo mount /dev/sdb /mnt/tmp  (change sdb to whatever the device is, this "kicks" the system somehow and it then assigns a node)
sudo mount /dev/sdb1 /mnt/tmp

My device is then mounted on /mnt/tmp. This is not clean but it works for me.

What you suggest is not working for me, I get the following result:

$ sudo mkdir /mnt/tmp
$ sudo mount /dev/sdb /mnt/tmp/
$ sudo mount /dev/sdb1 /mnt/tmp/
mount: special device /dev/sdb1 does not exist

Did you expect /dev/sdb1 to appear after /dev/sdb had been mounted? (and is it safe to mount both over a directory?)

Offline

#7 2011-08-01 20:03:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems connecting to an MP3 player over MTP

'sudo mount /dev/sdb /mnt/tmp' seemed to work - no error message, right?
Did you check if it's mounted now?

ls /mnt/tmp

Offline

#8 2011-08-02 06:42:24

wilsonsamm
Member
Registered: 2011-05-06
Posts: 18

Re: Problems connecting to an MP3 player over MTP

karol wrote:

'sudo mount /dev/sdb /mnt/tmp' seemed to work - no error message, right?
Did you check if it's mounted now?

ls /mnt/tmp

Yes, /dev/sdb (sometimes) mounts just fine. I can browse the content of some partition there, play back the music that on there, etc. etc. But AFAICT uploading music to the player is not possible through this method.
I said sometimes because it seems that it will not mount for a second time without rebooting...

Offline

#9 2011-08-02 06:50:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems connecting to an MP3 player over MTP

You need to check the name with 'sudo tail -f /var/log/messages.log' because the second time you plug it in, ti may be /dev/sdc or /dev/sdh.
You should be able to copy your music to the device just fine if you mount it with the right privileges.
Try

mount -o gid=users,uid=1000,dmask=0002,fmask=0113 /dev/sdb /mnt/tmp

You can find your uid (your user id) in /etc/passwd and your gid (group - i.e. 'users' -  id) - in /etc/group.

Offline

#10 2011-08-02 07:23:22

wilsonsamm
Member
Registered: 2011-05-06
Posts: 18

Re: Problems connecting to an MP3 player over MTP

karol wrote:

You need to check the name with 'sudo tail -f /var/log/messages.log' because the second time you plug it in, ti may be /dev/sdc or /dev/sdh.

Ah I was mistaken. It will mount, but not when rhythmbox is open. That's the program I use to play music. rhythmbox complains about not being able to open the device, and then it won't mount. If I keep rhythmbox closed then it'll mount fine. Very strange...

karol wrote:

You should be able to copy your music to the device just fine if you mount it with the right privileges.

You're right. Doing it this way leads to some encoding problems with the ID3 tags, but it's works OK.

Offline

#11 2011-08-02 07:31:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems connecting to an MP3 player over MTP

With regard to the encoding issues, maybe you need to add 'iocharset=utf8' to the mount options.

Offline

#12 2011-08-04 17:12:04

pfnorris
Member
Registered: 2011-03-09
Posts: 26

Re: Problems connecting to an MP3 player over MTP

I am having a very similar problem with a Creative Zen. I.E. not recognised by the system when plugged in. I have followed the tutorial on mtp without success. My /var/log/messages.log looks like this:

 
Aug  4 18:54:19 localhost kernel: [  148.113366] usb 2-5: new high speed USB device number 4 using ehci_hcd
Aug  4 18:56:04 localhost kernel: [  252.860029] usb 2-5: reset high speed USB device number 4 using ehci_hcd
Aug  4 18:56:04 localhost kernel: [  253.143626] usb 2-5: USB disconnect, device number 4
Aug  4 18:56:04 localhost kernel: [  253.250030] usb 2-5: new high speed USB device number 5 using ehci_hcd

The first line is before I run mtp-detect. The next three are after. The output from mtp-detect is below:

libmtp version: 1.1.0

Listing raw device(s)
libusb couldn't open USB device /dev/bus/usb/002/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/006/002: Permission denied.
libusb requires write access to USB device nodes.
Device 0 (VID=041e and PID=4157) is a Creative ZEN.
   Found 1 device(s):
   Creative: ZEN (041e:4157) @ bus 2, dev 4
Attempting to connect device(s)
ignoring usb_claim_interface = -34PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): No such device or address
outep: usb_get_endpoint_status(): No such device or address
usb_clear_halt() on IN endpoint: No such device or address
usb_clear_halt() on OUT endpoint: No such device or address
usb_clear_halt() on INTERRUPT endpoint: No such device or address
usb_open(): No such device or address
LIBMTP PANIC: Could not init USB on second attempt
Unable to open raw device 0
OK.

I assume that the LIBMTP PANIC line is of some significance here. But unfortunately I don't know where to go from here. Any kind souls out there who might have a clue?

Offline

#13 2011-08-26 09:23:33

wilsonsamm
Member
Registered: 2011-05-06
Posts: 18

Re: Problems connecting to an MP3 player over MTP

Nobody knows anything about this yet?
Precisely the same set-up works with no problems whenever I boot into Gentoo Linux. Perhaps it's time to file a bug.

Offline

Board footer

Powered by FluxBB