#24 ✓resolved
Martin S.

Allow choosing specific device

Reported by Martin S. | April 12th, 2009 @ 07:54 PM | in 1.0 Release

  1. We have a iphone_get_specific_device() function to connect by usb bus/device however it is not exposed in the public API. Attached patch changes it.

This function is mainly useful for libiphone consumers (such as iFuse or gvfs-backend-afc) to be able to pick out one device since iphone_get_device only returns the first one found.

This also makes the gvfs-backend-afc thing work with an uri like "afc://[usb:003,015]/".

  1. My attempts to update Patrick Walton started for the AFC backend for GVFS have also shown that iphone_get_specific_device() actually fails.

As it happens, libusb seems not to be able to provide the devnum and location members consistently over calls (or I do something wrong). Also digging into the lsusb sources and other simple "loop-over-bus-devices" reveals that the bus->dirname and dev->filename members are used instead (and are consistant).

I'll attach a patch to address this issue aswell as it is required to make iphone_get_specific_device() work at all for me.

This might also be the reason why libiphone might fail for some people, since even iphone_get_device() passes bus->location + dev->devnum members to iphone_get_specific_device() which can turn up not being matched.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A project around supporting the iPhone in Linux.

See http://libimobiledevice.org

People watching this ticket

Attachments

Referenced by

Pages