Commit Graph

20 Commits

Author SHA1 Message Date
Anderson Lizardo
952b5ca7d3 Move GATT service to attribute server core
GATT service (like GAP one) should be moved to the core attribute server
because there can be only one instance of it.

There was a "Attribute Opcodes Supported" characteristic inside the GATT
service in attrib/example.c which is not defined by the Core
specification and was removed before moving the code.
2011-01-07 22:28:26 +02:00
Anderson Lizardo
8a07d7e4d1 Move GAP service registration to src/attrib-server.c
GAP service shall be registered only once, so it makes sense to move it
to the core attribute server code.

The GAP "Device Name" characteristic was always "Example Device" on the
example server. This has been changed to use the Name attribute from
main.conf.
2011-01-07 22:28:24 +02:00
Anderson Lizardo
a5797b18a3 Refactor example server to use att_put_u16()
The original code was written before att_put_u16() was implemented.
2011-01-07 22:28:21 +02:00
Claudio Takahasi
85d0be87c9 Remove automatic battery state change on attribute example
Legacy code implemented to test Indication and Notification
2010-12-07 23:53:17 +02:00
Bruna Moreira
dd7a2acf88 Initial attribute permission implementation
Add enums for attribute read/write requirements, which may be "none",
"authentication required" or "authorization required". Additionally, a
"not permitted" requirement means that operation is not permitted,
allowing read-only or write-only attributes.

The attrib_db_add() API was changed to allow setting these requirements,
and the example server was changed to set requirements for its
attributes.
2010-12-07 22:52:25 +02:00
Claudio Takahasi
e91886e6f8 Change Battery Service on attribute sample server
Add an optional Client Characteristic Configuration attribute for
Battery State to control which clients want notification/indication
when this attribute value changes.
2010-10-06 23:39:08 +02:00
Claudio Takahasi
d74b6fd61f Remove the timeout source function when the example server exits 2010-09-22 16:00:04 -04:00
Claudio Takahasi
8204b2e818 Report attribute changes for the Battery Service
Thermometer Humidity Service contains <<Include>> attributes that it is
not supported at the momment. For this service, Characteristics D-Bus
paths are not being registered properly. This patch allows watchers
testing registered for Battery State changes.
2010-09-22 22:34:27 +03:00
Bruna Moreira
d7fde8a9c0 Add a new primary service to the example server
This primary service contains 128-bit UUIDs on the service declaration
and characteristic declaration attributes, useful to test the 128-bit
UUID support.
2010-09-14 09:55:34 -04:00
Vinicius Costa Gomes
5a48a21cbd Move the GATT Service Record registration to the server
The GATT Server SDP record should be in the server, so it is not added
when the server is disabled.
2010-08-24 15:12:22 -03:00
Claudio Takahasi
4648613aba Change attribute example to test notifications
Dummy time-based notification. Thermometer humidity attribute value
is being changed every 10 seconds.
2010-08-19 17:47:25 -03:00
Vinicius Costa Gomes
8307634aa6 Update copyright information of GATT library/tools 2010-08-09 18:06:49 -04:00
Vinicius Costa Gomes
baa95be886 Fix the byte order of some of the examples handles
Some of the handles of the example's attributes were in the wrong order.
2010-08-09 18:06:47 -04:00
Claudio Takahasi
e79eff7995 Add secondary service attributes into the attribute database
Add all secondary services attributes required by includes definition
on primary services declared previously.
2010-08-09 18:06:45 -04:00
Claudio Takahasi
309c4edc38 Add Thermometer Service attributes into the attribute database
Add all attributes of the Thermometer Primary Service according to
example described in the SPEC. See "APPENDIX: Example Attribute
server attributes". Includes of secondary services are not supported yet.
2010-08-09 18:06:45 -04:00
Claudio Takahasi
1ad03a7606 Add Battery Service attributes into the attribute database
Add all attributes of the Battery Primary Service according to example
described in the SPEC. See "APPENDIX: Example Attribute server
attributes". Battery service and state UUID are not defined yet, random
values have been selected: 0xA002 and 0xA003.
2010-08-09 18:06:45 -04:00
Claudio Takahasi
d23a2e302b Add GATT Service attributes into the attribute database
Add all attributes of the GATT Primary Service according to example
described in the SPEC. See "APPENDIX: Example Attribute server
attributes". Attribute Opcodes Supported UUID is not defined yet, a
random value has been selected: 0xA001.
2010-08-09 18:06:45 -04:00
Claudio Takahasi
f6620753d6 Add GAP Service attributes into the attribute database
Add all attributes of the GAP Primary Service according to example
described in the SPEC. See "APPENDIX: Example Attribute server
attributes".
2010-08-09 18:06:45 -04:00
Claudio Takahasi
1c9223abcc Register Generic Attribute Profile service record
Publishes SDP service record for GATT support over BR/EDR. Currently,
the record is registered for all available adapters.
2010-08-09 18:06:44 -04:00
Claudio Takahasi
b4ad35aafe Initial GATT server example integration
Initial changes to start the GATT server example. For the server side,
attrib plugin will only register the GATT service record and add
the attributes into the attribute database.
2010-08-09 18:06:44 -04:00