Re: LE discovery procedure

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

 



Hi Chen,

On Wed, Oct 19, 2011 at 4:17 AM, Ganir, Chen <chen.ganir@xxxxxx> wrote:
> According to the spec, there are 3 discoverable modes available : None, Limited and general. Here's how the spec defines General discovery procedure :
> "The Host shall check for the Flags AD type in the advertising data. If the Flags
> AD type is present and either the LE General Discoverable Mode flag is set to
> one or the LE Limited Discoverable Mode flag is set to one then the Host shall
> consider the device as a discovered device, otherwise the advertising data
> shall be ignored."
>
> We do not do that right now. Moreover - we simply ignore the flags, and just treat every advertising event as device found.

Actually we check it, but on the BlueZ side (as you know, our host
stack is composed of kernel+userspace). From
adapter_emit_device_found() in src/adapter.c:

        if (dev->le) {
                gboolean broadcaster;

                if (dev->flags & (EIR_LIM_DISC | EIR_GEN_DISC))
                        broadcaster = FALSE;
                else
                        broadcaster = TRUE;

                emit_device_found(adapter->path, paddr,
                [...]

But note that we still send the "DeviceFound" D-Bus signal, but with a
"Broadcaster" property which UI can use to ignore the device.

Filtering on the kernel requires parsing Adv. data, and may not allow
us to implement Broadcaster role on BlueZ (and on external
applications as well) in future.

IMHO the kernel should still notify userspace of the device, then
BlueZ can filter out the Broadcaster devices as necessary, *unless* we
plan to parse all AD information on kernel, which is not a good idea
IMHO.

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux