Pesky PIDS for mtp connection music player devices. The NWZ-S639 is a lovely player, 16Gb, 40 hours battery life, amazing sound, but it has a couple of problems, one in hardware (annoying proprietary Sony USB connector), one in software (it doesn’t show up as an MTP device in current versions of Debian (Lenny) and Ubuntu (Intrepid) even though it is.) This means you can’t do cool MTP stuff like update cover art on the device, etc. The fix allows allows it to be visible and thus show up in MTP-capable players like amarok or banshee.
You need to rebuild mtp from source and manually add the device ID in the MTP config. Here’s how I did it – and a couple of packages if you just want to grab them. The instructions are shamelessly pinched from the ubuntu forums, but I’ve tweaked them (don’t need to upgrade HAL) and added the actual packages. YMMV!
To skip the instructions and just get your player working, grab the Debian packages
If you want to do it yourself (I wouldn’t randomly insert random debs into my system either!), or just want to follow along at home, here’s how:
- lsusb | grep Sony #(look for the ID bit – mine’s ID 054c [vendor bit]: 038e[PID bit])
- mkdir tmp && cd tmp
- sudo apt-get build-dep libmtp7
- sudo apt-get source libmtp7
Edit the src:
- vim libmtp-0.2.6.1/src/music-players.h
Add a line like this for vendor and PID retrieved from lsusb as above
- { “Sony”, 0x054c, “Walkman NWZ-S639F”, 0x038e, DEVICE_FLAG_UNLOAD_DRIVER },
- Build it!
- apt-get –build source libmtp7
When it’s finished, install the newly created packages
- sudo dpkg -i *deb
Check your udev rules are updated
- grep 038e /etc/udev/rules.d/libmtp7.rules
Result – ATTR{idVendor}==”054c”, ATTR{idProduct}==”038e”, SYMLINK+=”libmtp-%k”, MODE=”660″, GROUP=”audio”
- Reboot.
You’ll also need to pin these to keep these version. Create or edit /etc/apt/preferences and add this
Package: libmtp7
Pin: version 0.2.6.1-3
Pin-Priority: 1001
Package: libmtp-doc
Pin: version 0.2.6.1-3
Pin-Priority: 1001
Package: libmtp-dev
Pin: version 0.2.6.1-3
Pin-Priority: 1001
Package: mtp-tools
Pin: version 0.2.6.1-3
Pin-Priority: 1001
To verify it has worked, use mtp-detect. Here’s the result on my box (I sometimes have to issue this command twice, once to clear the bus)
Continued…