Re: [Bluez-devel] bluetoothd D-Bus interface proposals(draft 00.05)

Marcel Holtmann
2005-08-22T14:27:58Z

Hi Claudio,

> It's possible register multiple D-Bus object paths. My suggestion
> for handle multiple adapters is register a default path and paths
> based on the device address.
> eg: suppose two adapters(11:22:33:44:55:66, 77:88:99:00:11:22)
>
> The possible paths are:
>
> /org/bluez/bluetoothd/hci (default path - first adapter)
> /org/bluez/bluetoothd/112233445566/hci (first adapter)
> /org/bluez/bluetoothd/778899001122/hci (second adapter)
>
> /org/bluez/bluetoothd/pan (default path - first adapter)
> /org/bluez/bluetoothd/112233445566/pan (first adapter)
> /org/bluez/bluetoothd/778899001122/pan (second adapter)
> ...
>
> The service to list the adapter must be moved to the main path
> (/org/bluez/bluetoothd) or to a new one /org/bluez/bluetoothd/devices.
>
> The message handle function will become more complex, but I don't
> see other solution.

the main problem is that I would like to do identification of the host
adapter by id (hci0), by address (11:22:33:44:55:66) and maybe by an
alias (bluecore-dongle) or by its name ("BlueZ dongle"). The only fully
unique identification across reboots/enumerations is the address. For
the kernel it is only the current id and this means bluetoothd has to
translate between them. If you look at the default adapter by the
address identification it is 00:00:00:00:00:00 (BDADDR_ANY) and I will
leave it this way.

When choosing a default adapter without any further configuration we
must do this unique and for this means this decision can only be done by
the kernel. This means that the kernel need to know about a change and
must also tell bluetoothd what it thinks is the default adapter.

Regards

Marcel