path: root/attrib/client.c
Commit message (Collapse)AuthorAgeFilesLines
* Move connect_cb() upper in attrib/client.cAnderson Lizardo2010-09-211-29/+29
| | | | | This callback will also be used for the watcher implementation, so moving it avoids a forward declaration.
* Fix UUID 128-bit support on attribute clientAnderson Lizardo2010-09-141-4/+8
| | | | | | For descriptors, a comment is added explaining why UUID 128-bit support is not necessary yet. For characteristic discovery, characteristics with 128-bit UUID types are now loaded.
* Fix not registering all characteristics for a serviceVinicius Costa Gomes2010-09-131-8/+13
| | | | | | Besides registering the characteristics when we receive the Attribute Not Found Error, we should also register the characteristics when we get to the end of the handle range contained in that service.
* Fix a file descriptor leak on GATT clientVinicius Costa Gomes2010-09-131-0/+2
| | | | | | In some cases, there could be a file descriptor leak, when the connection is not succesful. As the connection callback keeps a reference, there's no problem unref'ing it at this point.
* Remove castings on attribute serverClaudio Takahasi2010-09-011-2/+5
* Remove unused GIOChannel reference from gatt service structureClaudio Takahasi2010-08-271-4/+0
* Support for loading attribute dataAnderson Lizardo2010-08-261-0/+98
* Support for storing attribute dataBruna Moreira2010-08-261-6/+51
| | | | | | | | | | | | | Create a new storage called "attributes" to save attribute data. Format description: <bt_addr>#<attr_handle> <attr_type>#<attr_value> - the key is composed of the device address and the attribute handle; - the value is composed of the attribute type UUID (converted to printable 128-bit format) and the attribute value (hex encoded). - the key/value components are joined with "#", and separated from each other by a space.
* Fix alignment issues on the GATT ClientVinicius Costa Gomes2010-08-191-22/+13
| | | | Makes use of the alignment safe functions in the GATT Client.
* Fix reading the Characteristic value multiple timesVinicius Costa Gomes2010-08-111-5/+3
| | | | | We only need to read each characteristic value one time, for example, at the time that try to discover if that characteristic has any descriptor.
* Fix using the wrong start handle for Desc. DiscoveryVinicius Costa Gomes2010-08-111-1/+1
| | | | | | | | | | | When doing the Descriptor Discovery procedure, the wrong starting handle was being used (the characteristic value handle). This is what the spec mandates: "The Attribute Protocol Find Information Request shall be used with the Starting Handle set to the handle of the specified characteristic value + 1 and the Ending Handle set to the ending handle of the specified characteristic."
* Update copyright information of GATT library/toolsVinicius Costa Gomes2010-08-091-1/+2
* Add support for reading Char values and descriptorsVinicius Costa Gomes2010-08-091-6/+98
| | | | | When the characteristic is read for the first time, we read and update its value and its descriptors.
* Add support for discovering all the descriptorsVinicius Costa Gomes2010-08-091-0/+63
| | | | | | All descriptors associated to every characteristic are discovered, which means, that we know its handle and type. With this information we can later read the values of the descriptors that we find interesting.
* Add the GetCharacteristics() DBus methodVinicius Costa Gomes2010-08-091-20/+65
| | | | | This method allows the retrieval of every known information about the characteristics beloging to a Service.
* Fix wrong paths for the Services objectsVinicius Costa Gomes2010-08-091-3/+7
| | | | | When restoring the Service information from storage, the path was created before reading the information from storage.
* Change client to use dec_read_by_grp_resp()Bruna Moreira2010-08-091-7/+14
* Remove unused parameter for register_characteristics functionClaudio Takahasi2010-08-091-4/+3
* Initial implementation of characteristics GetProperties()Claudio Takahasi2010-08-091-2/+33
| | | | | Returns a dictionary of characteristic properties. Format, Value and Representation are not supported yet.
* Fix coding style issuesVinicius Costa Gomes2010-08-091-3/+3
| | | | Some lines were passing the 79 columns limit.
* Add support for the GAttrib queue to the client pluginVinicius Costa Gomes2010-08-091-43/+42
| | | | | Now, that we have a proper queue for command serialization, we can remove the previous hacks to implement a partial serialization in the client.
* Fix the last group of characteristic not being storedVinicius Costa Gomes2010-08-091-31/+32
| | | | | The characteristic group beloging to the last service was not being stored, because the condition to trigger the storage was missing that last group.
* Remove dynamic memory allocation for uuid_t of the primary serviceClaudio Takahasi2010-08-091-13/+11
* Fix wrong value for each characteristic end handleVinicius Costa Gomes2010-08-091-1/+1
* Register stored primary services and characteristic objectsClaudio Takahasi2010-08-091-1/+2
| | | | | Primary services and characteristic declarations of trusted devices are stored. When the device is probed, object paths shall be registered.
* Fix characteristics and primary service methodsClaudio Takahasi2010-08-091-1/+26
| | | | | | Characteristic objects shall provide GetProperties() method. Primary service objects: GetCharacteristics(), RegisterCharacteristicsWatcher() and UnregisterCharacteristicsWatcher().
* Add support from restoring characteristics from storageVinicius Costa Gomes2010-08-091-1/+72
| | | | | | Now every known characteristic object is restored from storage with essential information. Each characteristic DBus object path is registered from that information.
* Add support for storing essential characteristic infoVinicius Costa Gomes2010-08-091-0/+44
| | | | | This would allow for each characteristic DBus object path to be registered.
* Fix make use of fixed length string for storageVinicius Costa Gomes2010-08-091-2/+2
| | | | This way the storage is more stable and more under control.
* Simplify the characteristic structureVinicius Costa Gomes2010-08-091-27/+35
| | | | | Fow now we only need to store a few pieces of information about each characteristic. This will allow easier storage of that information.
* Add support for loading previously stored servicesVinicius Costa Gomes2010-08-091-0/+71
| | | | | | This adds support for loading the GATT primary services information that may exist. This will allow registering the DBus interface of a service without connecting to the remote device.
* Add support to storing the discoved GATT ServicesVinicius Costa Gomes2010-08-091-0/+44
| | | | | This adds support to storing the discovered primary services so they can be loaded from storage later.
* Discover all characteristics of the primary servicesClaudio Takahasi2010-08-091-33/+60
| | | | | Adds characteristics discovery in the attrib client plugin. Fetches all characteristics declaraction for each primary service found.
* Move gatt_discover_char to gatt.cClaudio Takahasi2010-08-091-17/+0
* Move gatt_discover_primary to gatt.cClaudio Takahasi2010-08-091-17/+1
* Add support for discovering all characteristics of a serverVinicius Costa Gomes2010-08-091-4/+78
| | | | | | | Until we don't have a proper command queue all the requests are manually serialized. No DBus object path is registered yet
* Fix ATT utility functions namingVinicius Costa Gomes2010-08-091-2/+1
| | | | | If we want to support both client and server roles, we must be clear that we are encoding/decoding requests or responses.
* Store discovered primary services informationVinicius Costa Gomes2010-08-091-3/+26
| | | | | Information (start handle, end handle and uuid) about the discovered primary services are stored (in memory) in the gatt_service struct.
* Add utility function to convert ATT error code to stringClaudio Takahasi2010-08-091-1/+2
* Request primary service until the server replies Attribute Not FoundClaudio Takahasi2010-08-091-0/+50
| | | | | | Read by Group Type Request shall be sent until the server replies Attribute Not Found Error. The current implementation does not address UUID128 endianess, only UUID16 is supported.
* Initial Discover primary service implementationClaudio Takahasi2010-08-091-3/+81
| | | | | Add read by group type encode function and initial skeleton for discover all primary services on attribute client plugin.
* Add BR/EDR connection establishment for GATTClaudio Takahasi2010-08-091-1/+38
| | | | Parses the psm for GATT and triggers the L2CAP connection for GATT.
* Register fake characteristic objectClaudio Takahasi2010-08-091-7/+82
| | | | | Testing purpose only. This patch registers paths and interfaces for fake BLE service.
* Add stubs for the attribute clientClaudio Takahasi2010-08-091-0/+100
Contains device driver declaration for attribute protocol. Registers D-Bus path/interface to represent the remote device client: BR/EDR or LE. For the most common LE scenarios, devices running BlueZ will be client role.