As we discussed earlier, PTP and MTP sit on top of some transport protocol like the USB. Mobile devices provide the USB interface to connect and sync data with the PC. The first thing we need on our Linux system is a driver for the device. The open source community provides us with a generic USB driver called libusb-a USB library that exports APIs to the user space, enabling applications to be developed above it. You can download and install libusb from libusb. wiki. source jorge. net. A successful installation of libusb can be confirmed by running the testlibusb command as follows:
The above output list all 'USB devices connected to my PC. Therefore, with the successful installation of libusb it now provides us the transport layer support.
To enable picture transfers, PTP is required to be installed. PTP also comes as a library that can be downloaded from libptp. source jorge. net. A successful compilation and installation can be verified by running the ptpcam command. The following snippet shows a successful PTP installation:
The next step in the process is to add MTP support to the kernel. Again, the advantage of the open source community can be used here. MTP comes as the libmtp library, which could be downloaded from libmtp source jorge. net. libmtp is a user-space application that uses APIs of the generic libusb driver. The list of devices supported can be found from the same site. The following snippet shows a successful installation of MTP:
As an end user, if you look for user-friendly tools with the user interface, there are plenty available on the Internet that use libptp and libmtp and act as a frontend to the libraries. So, when you plan to buy a mobile next time, don't just look for a mobile -- look for more thanjust a mobile; look for those with PTP and MTP extensions.




Reply With Quote
Copyright Techfuels
Bookmarks