summaryrefslogtreecommitdiff
path: root/attrib
Commit message (Collapse)AuthorAgeFilesLines
* attrib: Fix local libbluetooth includes orderMarcel Holtmann2015-02-281-1/+4
|
* attrib: Use local libbluetooth includesMarcel Holtmann2015-02-287-21/+27
|
* attrib/gatt: Improve robustness when searching for included servicesLukasz Rymanowski2015-02-271-1/+14
| | | | | | | | Without this patch it is possible to enter infinite loop when searching included services on remote device. This patch fixes that. Issue happens when remote device replies with ending handle which is lower than start handle we use for search
* attrib/gatt: Improve robustness when searching for descriptorsLukasz Rymanowski2015-02-271-1/+14
| | | | | | | | Without this patch it is possible to enter infinite loop when searching descriptors on remote device. This patch fixes that. Issue happens when remote device replies with ending handle which is lower than start handle we use for search.
* attrib/gatt: Minor refactor in desc_discovered_cbLukasz Rymanowski2015-02-271-2/+6
| | | | This is needed for next patch
* attrib/gatt: Improve robustness when searching for characteristicsLukasz Rymanowski2015-02-271-2/+15
| | | | | | | | | | | Without this patch it is possible to enter infinite loop when searching characteristics on remote device. This patch fixes that. Issue happens when remote device replies with ending handle which is lower than start handle we use for search. Found on robustness session on UPF50
* attrib/gatt: Minor refactor in char_discovered_cbLukasz Rymanowski2015-02-271-2/+7
| | | | This will be needed by next patch
* attrib/gatt: Improve robustness on search primary servicesLukasz Rymanowski2015-02-271-2/+27
| | | | | | | | | | | | Without this it is possible to put BlueZ into infinite loop when doing primary service search on remote device. Issue happens when remote device replies with ending handle which is lower than start handle we use for search. This patch fixes that Found on robustness session on UPF50
* attrib: Add explicit include for lib/bluetooth.hMarcel Holtmann2015-02-181-0/+1
|
* attrib: Fix condition check for attr deleteBharat Panda2015-02-131-1/+7
| | | | | Checks handle value for non-zero as well as >= 0xffff, to avoid infinite loop and deletion of unspecified attrib handles.
* attrib: Fix not disconnectingLuiz Augusto von Dentz2015-01-121-1/+3
| | | | | | | The default behavior of GAttrib is to disconnect on unref but patch 0ea75ab4bb3ff96a50785cf2b9860011c49fd7b7 had changed that in order to fix a warning, this return the old behavior but leaves to bt_att to do the actual closing.
* attrib: Fix warning when closing connectionLuiz Augusto von Dentz2014-12-291-0/+1
| | | | | | | | | | Since bt_att is used internally GAttrib should no longer close the connection otherwise it cause the following warning: bluetoothd[31756]: attrib/gattrib.c:g_attrib_unref() 0x610c130: g_attrib_unref=1 bluetoothd[31756]: attrib/gattrib.c:g_attrib_unref() 0x610c130: g_attrib_unref=0 (bluetoothd:31756): GLib-WARNING **: Invalid file descriptor.
* attrib/gattrib: Add tracking all the internal request idLukasz Rymanowski2014-12-181-53/+43
| | | | | | With this patch gattrib track all the pending request id's to bt_att. When doing g_attrib_cancel_all, only those own by gattrib will be canceled.
* attrib/gatt: Fix for search servicesLukasz Rymanowski2014-12-181-11/+32
| | | | | | | | | | | | | | | | This patch adds means to reuse ATT request id for GATT operations which might need more then one ATT request for complete GATT operation. E.g discover primary\included services and discover characteristics/descriptors This is needed for the user of gattib, to make sure that ATT request id he holds is valid during whole GATT operation. So far, it could happen that gattrib did additional ATT request without user knowledge which leads to situation that user had outdated ATT request id. Note that request id is used by the user for canceling request.
* attrib/gattrib: Add track for request idsLukasz Rymanowski2014-12-181-2/+104
| | | | | | | | | | | | If user provides req_id to the g_attrib_send, he assume that req_id should be used for transaction. With this patch, gattrib keeps track on user requested req_id and actual pending req_id which allow to e.g. cancel correct transaction when user request it. Note that for now specific request id is used in attrib/gatt.c for long write. Next patch will make bigger usage of this but also only in this helper. We do not expect other attrib clients to use that feature.
* attrib/gattrib: Add g_attrib_get_attArman Uguray2014-12-152-0/+11
| | | | | Added the g_attrib_get_att function which returns the underlying bt_att structure associated with a GAttrib.
* attrib/gatt: Fix minor coding styleLukasz Rymanowski2014-12-151-1/+0
|
* attrib/gatt: Minor coding style fixLukasz Rymanowski2014-12-101-1/+0
|
* attrib/gatt: Fix for attrib refLukasz Rymanowski2014-12-101-3/+6
| | | | | This patch makes sure that attrib instance will not disappear while reading characteristic
* attrib: Check if attrib is NULL in functionsArman Uguray2014-12-091-1/+22
| | | | | This patch adds an early return to attrib/gattrib functions if the attrib argument is NULL.
* attrib: List all enum values in switchSzymon Janc2014-12-081-0/+4
| | | | As described in coding style M10
* gattrib: Fix not changing the buffer size when mtu is reducedJakub Tyszkowski2014-12-031-4/+10
| | | | | | Using larger buffer than mtu resulted in not sending the message at all as encode_pdu() in shared/att.c fails when provided data buffer is larger than current mtu.
* gattrib: Fix not setting att's mtu size in g_attrib_new()Jakub Tyszkowski2014-12-011-0/+3
| | | | | | | | | | We were setting only the buffer in gattrib but att was left with the default value of 23 (LE transport layer defaults). For BREDR transport layer this may result in using smaller MTU than the minimum allowed (48). This was affecting cases when MTU Exchange was not supported by the remote device and defaults were used.
* GATT shim to src/shared bt_attMichael Janssen2014-11-171-581/+164
| | | | | | | | This patch implements a version of GAttrib which is backed by bt_att, which enables the simultaneous use of GAttrib and bt_att. This should enable smooth transition of profiles from the GAttrib API to the src/shared bt_att API.
* gattrib: Remove unused GATTRIB_ALL_EVENTSMichael Janssen2014-11-062-4/+0
| | | | | In prep to use shared stack, this is unused and not functionally supported by bt_att.
* attrib: fix GATTRIB_ALL_REQS behaviorMichael Janssen2014-11-031-1/+22
| | | | | | g_attrib_register(..., GATTRIB_ALL_REQS, ...) behavior would previously include indications, this fixes it to only include requests and commands.
* attrib: remove g_attrib_is_encryptedMichael Janssen2014-11-032-14/+0
| | | | | This function is only used in one place and encryption is the responsibility of the channel, not the attribute.
* attrib: Add mtu argument to g_attrib_newMichael Janssen2014-11-034-9/+37
| | | | | | Instead of using the default MTU, use one passed in by the user, and detect it from the channel when it is created.
* attrib: Remove MTU-probing codeMichael Janssen2014-10-311-13/+1
| | | | | | Probing for the MTU using bt_io is problematic for testing because you cannot impersonate AF_BLUETOOTH sockets with a socketpair.
* Remove unused g_attrib_set_debug functionMichael Janssen2014-10-312-8/+0
| | | | This function is not used, and also not implemented.
* attrib: Fix memory leakAndrei Emeltchenko2014-08-011-0/+2
|
* attrib: Fix discovering descriptorsMarcin Kraglak2014-07-181-1/+1
| | | | | Discover all attributes in given range. In same cases we ommited last attribute in range.
* android/gatt: Fix signed write command encodingLukasz Rymanowski2014-05-304-9/+23
| | | | | | | As per spec (BT spec 4.1 Vol[3], Part F, chapter 3.4.5.4) we need to take opcode, handle and parameters to generate signature. In order to support it signing is moved to att.c, place where pdu is encoded
* attrib: Fix minor whitespace issueJakub Tyszkowski2014-05-271-2/+2
| | | | Replace spaces with tabs.
* attrib: Add wrapper to send signed write commandLukasz Rymanowski2014-05-262-0/+21
|
* attrib: Add helpers to enc and dec signed write commandLukasz Rymanowski2014-05-262-0/+66
|
* gatt: Remove gatt_discover_char_descAndrzej Kaczmarek2014-05-052-18/+0
| | | | | This function is no longer used since all code is changed to use gatt_discover_desc instead.
* attrib: Discover descriptors using gatt_discover_descAndrzej Kaczmarek2014-05-052-76/+22
|
* attrib: Add simpler call for descriptors discoveryAndrzej Kaczmarek2014-05-052-0/+156
| | | | | | | | | | | | | This patch adds gatt_discover_desc() function which performs descriptor discovery in a manner similar to gatt_discover_char(), i.e. it does complete discovery procedure and returns list of descriptors found when finished. For 16-bit UUIDs in addition to string UUID, short UUID is provided. It's also possible to specify single descriptor UUID to look for and discovery procedure is interrupted as soon as UUID is found. This way no more than one descriptor is returned which is useful when searching for common descriptors like CCC.
* attrib: Expose write executeLukasz Rymanowski2014-04-232-0/+9
| | | | This is needed to cover Android API
* attrib: Add API for reliable writeLukasz Rymanowski2014-04-232-0/+23
| | | | | Android expose to application api for reliable write. Therefore we need to add this support to gattrib
* attrib: Improve Attribute Data length checkingClaudio Takahasi2014-04-031-23/+17
| | | | | According to Core SPEC, attribute data list must be grouped in elements of the same size.
* attrib/gatttool: Use define for UUID format checkJakub Tyszkowski2014-03-281-1/+1
|
* attrib: Use const source data pointer for writeJakub Tyszkowski2014-03-282-6/+6
| | | | Source buffer for write operations should be immutable.
* attrib: Remove att_get_* and att_put_* helpersClaudio Takahasi2014-03-251-89/+0
|
* gatt: Move Characteristic properties to attrib/gatt.hClaudio Takahasi2014-03-253-16/+24
| | | | | | Properties are defined by GATT specification. This patch moves and renames the defines related to Characteristic properties bits from attrib/att.h to attrib/gatt.h
* attrib: Minor code optimizationClaudio Takahasi2014-03-241-3/+1
|
* Replace att_put_u16() by put_le16()Claudio Takahasi2014-03-242-25/+25
|
* Replace att_put_uuid() by util.h helpersClaudio Takahasi2014-03-242-11/+24
|
* Replace att_get_uuid128() by bswap_128()Claudio Takahasi2014-03-244-36/+89
| | | | | | GATT/ATT use little-endian byte order format for 128-bit UUID. No matter the system byte order representation, internally the core will handle 128-bit UUID on big-endian format.