Re: [Bluez-devel] DBus interface - determining whether a device exists

Marcel Holtmann
2006-08-17T18:44:06Z

Hi Matthew,

> > For this specific case we should only page the device if the audio
> > device has been opened and there is actually an audio stream. I is not
> > important if the device is in range or not. If it is not in range then
> > you won't hear anything or we need to choose a fallback. I think that
> > these stuff doesn't belong in the core Bluetooth daemon. You want to
> > have an btaudiod that handles all these stuff in the back for you. The
> > user only configures once the possible connections to headphones and
> > headsets and then the daemon will take care of everything.
>
> The problem isn't just in actually setting up the connections, it's in
> providing the information about available devices to other applications.
> Nowadays, the right layer for device enumeration is HAL. If I tell my
> system about a mobile phone, then the correct behaviour is for it to
> appear as a HAL object. In order for Network Manager to offer me the
> choice of connecting via my phone, the phone needs to be in HAL. So,
> somehow, at login time the phone needs to be added.
>
> There's two ways of dealing with this. The one that I prefer is that we
> make some effort to determine that the phone actually exists, and then
> add it to HAL in the same way that we would if we'd just done device
> discovery and the phone was discoverable. This needs us to have some
> mechanism for determining whether the phone actually exists. The second
> is that we store the HAL data and repopulate HAL at login time. This is
> more hacky, since we're adding information without even having made a
> token effort to determine whether the device exists or not.

is the HAL data user specific and do we always need to populate it on
login time. I think doing it once at boot and then update it on regular
basis once hcid has more information about devices and/or new devices.

Regards

Marcel