Re: [RFC BlueZ 1/1] src/shared/gatt: Introduce bt_gatt skeleton.

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

 



Hi Marcel,

>> +bool bt_gatt_discover_primary_services(struct bt_gatt *gatt, bt_uuid_t *uuid,
>> +                                     bt_gatt_discovery_callback_t callback,
>> +                                     void *user_data);
>> +
>> +bool bt_gatt_discover_included_services(struct bt_gatt *gatt,
>> +                                     struct bt_gatt_handle_range range,
>> +                                     bt_uuid_t *uuid,
>> +                                     bt_gatt_discovery_callback_t callback,
>> +                                     void *user_data);
>> +
>> +bool bt_gatt_discover_characteristics(struct bt_gatt *gatt,
>> +                                     struct bt_gatt_handle_range range,
>> +                                     bt_uuid_t *uuid,
>> +                                     bt_gatt_discovery_callback_t callback,
>> +                                     void *user_data);
>> +
>> +bool bt_gatt_discover_descriptors(struct bt_gatt *gatt,
>> +                                     struct bt_gatt_handle_range range,
>> +                                     bt_gatt_discovery_callback_t callback,
>> +                                     void *user_data);
>
> Should we really expose these low-level operations? Why not just have one bt_gatt_discover() that does all the magic for us. At the end of the day, that is what most devices do when they connect to a remote device. They will update the services they either know or have to discover new ones.

I think we should have them. I pretty much see bt_gatt as an interface
that translates GATT feature procedures to the underlying ATT protocol
operations. I leave the magic to be the responsibility of the of the
upper-layer, where we will have a client implementation that brings
together src/shared/gatt and src/shared/gatt-db. I'm thinking
something along the lines of a btd_gatt_client for bluetoothd, that
discovers everything, caches all attributes, and makes them accessible
to all the profiles/plugins (this is actually what I'm doing initially
on Chrome OS using GAttrib, since we're against a deadline for
Chrome). Eventually we could use this to remove the attio callbacks.

So, to answer your question, I think having these functions at this
level will be useful, especially for testing when we start writing PTS
style tests for GATT.

As for your other comments, I will make names shorter. I'm used to
writing long and very explicit function names, but I figured I would
upload them and see if someone yells at me :P

Cheers,
Arman
--
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