Warm weekend ... So lots of outdoor activity.
However also some hacking...
I polished up my notes on the PTP/IP protocol. Portions of it are implemented in libgphoto2 already (usable for download from my Nikon P2 already).
I bought a Creative Zen Microphoto, a player supporting MTP. Found some bugs in the upload code, notably that mp3s were not mapped to the ptp PTP_OFC_MP3 object code.
Also on USB 2 interfaces there is a problem with uploading files dividable by 512 byte (the maxpacket size). The problem is that PTP / MTP requires a short write or NULL packet to finish sending of data. libgphoto2 currently does not do it.
Some devices seem to be able to cope without, some others don't. The MTP players on USB 2.0 (ehci) apparently do not. :(
An empty write helps on OHCI, but not on EHCI.