The userspace libmtp library has several limitations inherited from it's
dependency libusb. The most significant of these is that there is no
mechanism for asynchronous device control. (e.g., once an application
grabs a handle to a device, then all others are blocked from accessing
that device, even if the connection is otherwise completely idle)
Moreover, the libmtp port on OpenBSD does not function properly on my
SunBlade 100 (BE & 64bit) workstation. I have not tested it yet on
other platforms
The more time I spend with the current implementation of the driver, the
more I am convinced that a real kernel space driver needs to be written
to support the MTP protocol. Of course, what better platform than OpenBSD.
Since I haven't worked in the OpenBSD kernel before (or any other kernel
for that matter) this will probably be slow going at first.
Nevertheless, I read a number of relevant man pages, and have perused a
number of the other drivers for hints on how similar things have been
done before.
As for the technical end of this thing.
The Media Transfer Protocol is just that, a protocol, and is designed to
run across a variety of transports. This protocol extends the PTP
protocol which currently runs over USB and TCP/IP.
(http://en.wikipedia.org/wiki/Picture_Transfer_Protocol)
Most devices currently use USB as their transport of choice, however,
this is definitely not fixed in stone, Notably, the Zune uses MTP/IP,
with more devices coming along.
A driver should definitely take this into account, and should be fairly
straight forward to extend as devices using new and wonderful transports
arrive.
I think that a new driver "mtp" should provide a collection of system
calls that provide user space control of MTP devices without a client
application needing to worry about the nature of the underlying
transport. A collection of MTP transport drivers ("usbmtp" for usb,
"netmtp" for tcp, etc) could then be written which *register* themselves
with "mtp". Essentially this is just good old fashioned encapsulation.
Any thoughts, documentation or concerns are appreciated.
-Ted
--
Theodore Bullock, <tbul...@canada.com, tedbu...@gmail.com>
B.Sc Software Engineering
GPG Fingerprint = 3B8E 8B0E D296 AACB 7BE2 24F2 1006 B7BE C8AC 5109