Re: setting indication on GattCharacteristic1 interface

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

 



Hi Mark,

On Wed, Mar 16, 2016 at 12:59 AM, Mark Rages <markrages@xxxxxxxxx> wrote:
> Hi,
>
> The GattCharacteristic1 d-bus interface has methods for StartNotify
> and StopNotify.
>
> But I don't see corresponding methods for requesting Indications
>
> Is there a way to do this?  Should I write to the CCCD directly?  How
> do the indications arrive on the d-bus?

Indicate would probably need to be a method since it does require a
reply, but for now you can just treat it as a notification whereas
BlueZ will be responsible for confirming so nothing else need to be
done by the application. The code can actually distinguished between
the 2:

/* Try to enable notifications and/or indications based on
* whatever the characteristic supports.
*/
if (notify_data->chrc->properties & BT_GATT_CHRC_PROP_NOTIFY)
pdu[2] = 0x01;

if (notify_data->chrc->properties & BT_GATT_CHRC_PROP_INDICATE)
pdu[2] |= 0x02;


-- 
Luiz Augusto von Dentz
--
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