[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [libimobiledevice-devel] ipheth



On Tue, 2010-04-27 at 00:38 +0200, L. Alberto Giménez wrote:
> On Sat, Apr 24, 2010 at 11:55:53AM +0100, Paul McEnery wrote:
> > In order for the udev rule to execute *any* application which performs
> > the pairing, that application must exist in some package. That package
> > will need to be a dependency of usbmuxd (unless usbmuxd provides it).
> > It cannot simply be assumed that if usbmuxd is installed that gvfs,
> > libgpod, etc will also be installed, let alone executed before the
> > user attempts to connect using ipheth. The only way that these
> > assumptions can be met, is with the appropriate dependencies.
> > 
> > The way that this must be tested is as follows:
> > 
> > - Debian base install (bare minimum system).
> > - install <something>
> > - configure interface to test
> > 
> > The <something> above needs to ensure that when an iPhone/device is
> > plugged it, it will pair automatically.
> 
> Hi, If I'm allowed to put my $2c, I propose to put the pairing utility on the
> libimobiledevice package, and make usbmuxd depend on it (which IMO is quite
> natural).
> 
> Does it make sense at all?

It would be a circular dependency and is not right. libimobiledevice
depends on usbmuxd. Also mind checking this overview:
http://libimobiledevice.org/am-stack-fig-4.png

ipheth does not depend on usbmuxd nor does it need it to work as it
talks to a different USB interface.

The only relation is that the USB interface only works properly if the
device has it's internal "TrustedHostAttached" flag set to "True" which
only happens if the device was paired (using libimobiledevice).

Also mind that usbmuxd now sets a flag "USBMUX_SUPPORTED" on the device
using it's udev rule.

Thus user-space and other udev rules can detect devices much easier
without having to maintain any USB id ranges (those belong into
usbmuxd).

What is clear so far is that the pairing is managed by libimobiledevice
and some sort of "idevicepairing" tool should be added (pair/unpair/list
pairs).

Then some event must trigger running the pairing tool regardless if the
pairing was already done (by libgpod callout, GVFS automount or
whatever).

Why not add an udev rule to the ipheth package which checks for the
"USBMUX_SUPPORTED" flag and the ipheth module being "added", then calls
the idevicepairing tool to pair?

Thus the ipheth module would simply depend on
libimobiledevice-tools/-utils and the ipheth-pair package thingy would
be gone.

In order to add some more to the mix, we'd thought about showing some
kind of dialog ("Do you want to pair this computer with the device?")
for the "desktop layer" in the future.

--- Martin S.


Reply to: