Sunday, January 14, 2007

Creative Zen Vision on Mac (Darwin)

Unfortunately for us, inspite of Zen Vision M being a great device, it doesn't appears as a USB Mass Storage Device. If it would have, we could have simply accessed it as a USB hard-disk in just about any OS without any pain. But then, Creative choose to use MTP instead, maybe because of their special relationship with Microsoft (and then got stabbed in the back when MS released Zune).

Here is some interesting news on MTP from wikipedia, though

Media Transfer Protocol is a set of custom extensions to the Picture Transfer Protocol (PTP) devised by Microsoft, to allow the protocol to be used for devices other than digital cameras, for example digital audio players such as MP3 players, and other portable media devices, for example portable video players.

The USB Implementers Forum device working group is presently working on standardizing MTP as a fully fledged Universal Serial Bus (USB) device class. When that process is complete, MTP will be a USB device class peer to USB mass storage device class, USB Video Class, and so on.

Since that standardisation would take some time, and I suddenly had some free time on hand on fine sunday morning, I decided to try and see what we can still get to work on darwin.

To begin with, I downloaded the libmtp library from sourceforge, which fortunately enough supports mac already and didn't needed any porting, except for an iconv issue. The problem with libiconv is (which is , btw, a library for converting from one charecter set encoding to the other) that there are simply too many versions floating around. So while libmtp compiles and installs fine, any of the example programs won't run, failing with missing symbols.

That was easily fixed though, by adding -liconv to the Makefile in the examples directory in the libmtp sources. (Search for LIBS = -lusb and append -liconv). With this change, running mtp-detect (which installs in /usr/local/bin) gives this output

Autodetected device "Creative Zen Vision:M" (VID=041e,PID=413e) is known.
Connected to MTP device.
USB low-level info:
bcdUSB: 512
bDeviceClass: 255
bDeviceSubClass: 0
bDeviceProtocol: 0
idVendor: 041e
idProduct: 413e
IN endpoint maxpacket: 512 bytes
OUT endpoint maxpacket: 512 bytes
Device flags: 0x00000000
Device info:
Manufacturer: Creative Technology Ltd
Model: Creative Zen Vision:M
Device version: 1.30.02_0.00.16
Serial number: 00023C02FB1FE532E960B05763D234C3
Vendor extension ID: 0x00000006
Vendor extension description: 1.0; 10.0;mi 10.1;
Supported operations:
1001: get device info
1002: Open session
1003: Close session

Quite a lot of it actually, but here is the more relevant part

3009: MP3
de99: AudioWAVECodec
de9a: AudioBitRate
dc46: Artist
dc89: Duration
dc8b: Track
dc8c: Genre
dc99: OriginalReleaseDate
dc9a: AlbumName
de93: SampleRate
de94: NumberOfChannels
de95: AudioBitDepth
dc91: UseCount
dc8a: Rating
d901: BuyFlag
dc01: StorageID
dc0b: ParentObject
dc02: ObjectFormat
dc04: ObjectSize
dc07: ObjectFileName
dc41: PersistantUniqueObjectIdentifier
dc4f: NonConsumable
dc44: Name
b901: WMA
3008: MS Wave
ba05: Abstract Audio Video Playlist
ba01: Abstract Multimedia Album
ba03: Abstract Audio Album
3801: JPEG
300a: MS AVI
300c: ASF
b982: MP4
300b: MPEG
b981: WMV
bb83: vCard3
be03: vCalendar2
3000: Undefined Type
3001: Association/Directory
b802: Firmware

Quite a few formats there.

1 comment:

bayxsonic said...

This is quite interesting to me, I've got a Creative ZEN V, that works smoothly on Windows with WMP or Winamp or just through explorer, but I really don't wanna use XNJB, it's pretty ugly (sorry if I look for style on a Mac =P). I'd rather use WMP through VMWare Unity.

Do you know if any progress is done for MTP support on Mac?