Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Allow choosing specific device

#24
  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.

Reported by Martin S. · April 12th, 2009 @ 07:54 PM

State: resolved
Milestone: 1.0 Release
Assigned to: nobody

Activity

  1. Jonathan Beck
    Jonathan Beck
    • Milestone set to 1.0 Release

    April 13th, 2009 @ 07:59 AM

  2. Matt Colyer
    Matt Colyer
    • State changed from new to resolved

    (from [bd31783d7fde0b5bd101f4a3f97ca1aca2aa6fab]) Expose iphone_get_specific_device() in API [#24 Allow choosing specific device state:resolved]

    Signed-off-by: Matt Colyer matt@colyer.name http://github.com/MattColyer/lib...

    April 13th, 2009 @ 03:40 PM

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.