Commit Graph

42 Commits

Author SHA1 Message Date
Chen Ganir
1e064929b3 GATT: Replace start/end with att_range
Use att_range struct instead of individual start/end handles in
gatt_primary structure
2012-03-26 12:18:00 +03:00
Chen Ganir
48c82115a2 GATT: Rename service and char structs
Rename the att_primary to gatt_primary and att_char to gatt_char.
Characteristic and Service do not exist in the ATT spec, only in
GATT.
2012-03-26 12:16:44 +03:00
Chen Ganir
afb04979ee GATT: Profile support for EnableGatt
Add support for the EnableGatt for all GATT profiles.
2012-03-26 12:12:24 +03:00
Anderson Lizardo
2898d58bfc thermometer: Fix re-enabling notification/indication on reconnection
If a result callback is not specified for gatt_write_char() it is
assumed that Write Command will be used. This is not valid for
Characteristic Descriptors, which only support Write Request.
2012-02-16 15:11:56 +02:00
Anderson Lizardo
dfa888e54f thermometer: Fix handling of missing Temperature Type
According to HTS 1.0 (Table 3.1, and Sections 3.1.1.4 and 3.2), the
Temperature Type Characteristic is optional. The only restriction is
that it shall not be present if the Temperature Type is non-static, for
which case the "Temperature Type" field shall be present on the
Temperature Measurement Characteristic value.

Given there is no default value specified when the Temperature Type is
static and unknown, the "Type" entry for MeasurementReceived() on the
Thermometer API was made optional.
2012-02-16 15:11:50 +02:00
Bruna Moreira
63dcb5cdff thermometer: Fix device driver probe
The probe() function for GATT profiles should be transport agnostic.
There is a btd_device_get_primaries() method which can be used to return
a list of discovered GATT Primary Services, and it works for BR/EDR and
LE. It is already used for Proximity, for instance.

device_services_from_record() is BR/EDR specific and should not be used
by GATT profile code.

It also fixes a memory leak, given device_services_from_record() returns
a heap allocated GSList.
2012-02-16 15:11:29 +02:00
Santiago Carot-Nemesio
a7990d8ff6 thermometer: Use system types instead of glib ones 2011-12-15 13:24:26 +02:00
Santiago Carot-Nemesio
3cda922eea thermometer: Fix bad read operation when time stamp is not provided
Time stamp value is an optional field provided in the measure, so next
value in the array will start in a different index depending if the time
stamp was provided or not. This patch check this case and update the
index to a proper value in the byte array before reading the temperature
type value.
2011-12-15 13:24:23 +02:00
Santiago Carot-Nemesio
726dc13a33 thermometer: Fix possible NULL pointer deference
This patch checks the GATT server is connected before doing any GATT
transaction. If it isn't, we abort the operation to avoid the NULL
pointer deference problem.
2011-12-15 13:24:21 +02:00
Santiago Carot-Nemesio
3ff4427f39 thermometer: Process measurement interval indications
This patch emits PropertyChange signal whenever a new value is set in
the measurement interval characteristic.
2011-12-15 13:24:18 +02:00
Santiago Carot-Nemesio
c275bde366 thermometer: Configure C.C.C descriptor during thermometer configuration
This patch enables notification/indication in GATT server if there are
any watcher regitered for measurements when the thermometer is
configured.
2011-12-15 13:23:37 +02:00
Santiago Carot-Nemesio
563ef8324c thermometer: Implement SetProperty D-Bus method 2011-12-15 13:23:29 +02:00
Santiago Carot-Nemesio
c569aca90c thermometer: Fix bad epoch time stamp generation
The number of months is in the range 0 to 11, we have to decrease
month number by 1 before getting the epoch.
2011-12-08 14:36:55 +02:00
Santiago Carot-Nemesio
5735830b25 Notify intermediate measurements 2011-11-18 13:14:29 +02:00
Santiago Carot-Nemesio
a6c34b2c3a Implement DisableIntermediateMeasurement D-Bus method 2011-11-18 13:14:27 +02:00
Santiago Carot-Nemesio
02308bf820 Implement EnableIntermediateMeasurement D-Bus method 2011-11-18 13:14:24 +02:00
Santiago Carot-Nemesio
e414184082 Parse final measurement indication 2011-11-18 13:14:19 +02:00
Santiago Carot-Nemesio
1b34ecad4f Manage GATT attribute indications in handle callback 2011-11-18 13:14:12 +02:00
Santiago Carot-Nemesio
8bfd6b663e Implement D-Bus get properties function 2011-11-02 11:55:43 +02:00
Santiago Carot-Nemesio
5c8be87889 Manage watcher's disconnections from the bus 2011-11-02 11:55:35 +02:00
Santiago Carot-Nemesio
29db85bf38 Disable final measurements indication when last watcher is removed 2011-11-02 11:55:26 +02:00
Santiago Carot-Nemesio
e09be5e270 Enable final measurement indications when first watcher is enabled 2011-11-02 11:55:15 +02:00
Santiago Carot-Nemesio
5fa4b3d10f Implement D-Bus unregister watcher function 2011-11-02 11:55:05 +02:00
Santiago Carot-Nemesio
e4d4359c59 Implement D-Bus register watcher function 2011-11-02 11:54:56 +02:00
Santiago Carot-Nemesio
5ab1c52a14 Get valid range descriptor if it is supported 2011-11-02 11:54:46 +02:00
Santiago Carot-Nemesio
d7fecaa17f Process characteristic descriptors in the thermometer service 2011-11-02 11:54:36 +02:00
Santiago Carot-Nemesio
b3cf3d6d1b Remove unnecessary casting in thermometer plugin 2011-11-01 10:12:35 +02:00
Frédéric Danis
4a4b56556f Fix implicit declaration of 'g_slist_free_full'
audio/avrcp.c: In function 'avrcp_unregister':
audio/avrcp.c:1253: error: implicit declaration of function 'g_slist_free_full'

thermometer/thermometer.c: In function 'destroy_char':
thermometer/thermometer.c:79: error: implicit declaration of function 'g_slist_free_full'
2011-10-18 13:23:47 +03:00
Johan Hedberg
d6ca701986 Simplify process_thermometer_char() logic 2011-10-17 11:25:25 +03:00
Santiago Carot-Nemesio
e3eb563d06 Fix thermometer Intermediate property changes
Set Intermediate property if intermediate temperature characteristic is
supported
2011-10-17 11:21:15 +03:00
Santiago Carot-Nemesio
4cd8ecb074 Read measurement interval characteristic 2011-10-17 11:08:39 +03:00
Santiago Carot-Nemesio
c9fc590787 Read temperature type characteristic 2011-10-17 11:08:37 +03:00
Santiago Carot-Nemesio
2219cc884c Get all characteristics in thermometer service 2011-10-17 11:08:35 +03:00
Santiago Carot-Nemesio
62d4daf26a Add handler function to manage GATT indications 2011-10-17 11:08:33 +03:00
Santiago Carot-Nemesio
2d2e3a412c Add functions to manage attio callbacks 2011-10-17 11:08:30 +03:00
Santiago Carot-Nemesio
3e7ecc4309 Unregister Health Thermometer Interface 2011-10-17 11:08:28 +03:00
Santiago Carot-Nemesio
f324306643 Register Health Thermometer Interface 2011-10-17 11:08:24 +03:00
Santiago Carot-Nemesio
d9ef9b74a9 Get thermometer service range to load the driver. 2011-10-17 11:08:22 +03:00
Johan Hedberg
4c4c4e5917 Remove per-file author information
In the long run this information becomes a pain to maintain and it is
already covered by the AUTHORS file and the git commit history.
2011-07-29 12:52:58 +03:00
Santiago Carot-Nemesio
e8825b76fc Add thermometer driver skeleton 2011-07-29 12:50:35 +03:00
Santiago Carot-Nemesio
3e24f80260 Add manager files for HTP 2011-07-29 12:50:32 +03:00
Santiago Carot-Nemesio
67c15df485 Initial support for Health Thermometer Profile (HTP) 2011-07-29 12:50:30 +03:00