Commit Graph

994 Commits

Author SHA1 Message Date
Joe Finney 06467deeed Merge branch 'master' of https://www.github.com/lancaster-university/BLE_API 2016-01-17 00:34:45 +00:00
Joe Finney 3306737028 microbit: Added support for explicit notification
Introduce abality to explicitly perform a notify/indicate opertion on a characteristic.
This brings benefits of a reduce RAM footprint for storing GattCharacterisitics.

n.b. temporary measure until ARM mbed integrate more generic optimisations.
2016-01-12 22:09:41 +00:00
Joe Finney a5f6d4b877 microbit: Disabled default instantiation of DFUService.
micro:bit operates its own custom service for this purpose.
2016-01-12 22:09:39 +00:00
Vincent Coubard e0f693adde version v2.5.0 2016-01-12 11:15:36 +00:00
Vincent Coubard 63a0a1364d Merge pull request #160 from andresag01/bond-table-query
Add API to get addresses of peers in bond table
2016-01-11 09:25:21 +00:00
Andres Amaya Garcia 81b8f0a240 Add doxygen experimental tag to getAddressFromBondTable API 2016-01-11 09:19:08 +00:00
Andres Amaya Garcia e67bcf35c8 Make getAddressFromBondTable API const 2016-01-08 15:51:30 +00:00
Andres Amaya Garcia 513ec79c5a Add API to get addresses of peers in bond table
The new API is added to the Security Manager. Its declaration is as follows:

virtual ble_error_t getAddressesFromBondTable(Gap::Whitelist_t &addresses)

The resulting Whitelist_t structure can then be used as the actual whitelist
passes to Gap::setWhitelist().

Note that for peers that have private resolvable addresses, then an address of
the same type will be returned.
2016-01-08 15:37:14 +00:00
Vincent Coubard 53fe8b4fac version v2.4.0 2016-01-07 17:42:36 +00:00
Vincent Coubard 0f26e18e43 Merge pull request #159 from andresag01/whitelisting
Whitelisting experimental API
2016-01-06 17:04:02 +00:00
Andres Amaya Garcia 0dd7f29518 Change return value of set.*PolicyMode() functions in Gap 2016-01-06 13:58:38 +00:00
Andres Amaya Garcia 706a97bca2 Add @experimental doxygen tag to new APIs 2016-01-06 11:17:14 +00:00
Andres Amaya Garcia 0b2ca7aafd Add capacity to whitelist structure 2016-01-06 10:40:23 +00:00
Andres Amaya Garcia a488074d7a Change Whitelisting API according to comments 2016-01-06 10:02:04 +00:00
Andres Amaya Garcia c56bc43058 Remove unnecessary include in BLEProtocol 2016-01-05 17:00:14 +00:00
Andres Amaya Garcia 819a0ca799 Fix comments and add Address_t empty constructor
Add an empty constructor to BLEProtocol::Address_t and fixed comments with
regards to BLEProtocol::Address_t.
2016-01-05 16:56:33 +00:00
Andres Amaya Garcia 42a202e047 Finilise Whitelisting experimental API
This is the finilised experimental API that introduces support for
whitelisting. The changes are focused in Gap and introduces the following
functions, that are expected to be implemented by each of the vendor specific
glue code (e.g. ble-nrf51822 module):

- getMaxWhitelistSize(): Get the maximum whitelist size, this can be set by
  using a yotta config definition.
- getWhitelist(): Gets a copy of the internal whitelist containing BLE
  addresses.
- setWhitelist(): Replace the whitelist with new addresses.
- setAdvertisingPolicyMode(), setScanningPolicyMode() and
  setInitiatorPolicyMode(): Functions used to set the relevan policy filter
  mode as described in the BLE Specification v4.2 Vol 6, Part B, Section 4.2.1.
- getAdvertisingPolicyMode(), getScanningPolicyMode() and
  getInitiatorPolicyMode(): Functions used to get the relevan policy filter
  mode as described in the BLE Specification v4.2 Vol 6, Part B, Section 4.2.1.

The following enumerators were added to Gap to describe the desired policy
filter mode:

- AdvertisingPolicyMode_t
- ScanningPolicyMode_t
- InitiatorPolicyMode_t

Finally, the following typedef was added to provide a view of the
underlying implementation's internal whitelist:

- Whitelist_t

**NOTE:** Clearly, these API additions require changes to the underlying
implementation!
2016-01-05 16:26:45 +00:00
Andres Amaya Garcia 6021b70625 Fix Address_t and AddressBytes_t problem in Gap 2015-12-31 14:36:51 +00:00
Andres Amaya Garcia 54977ed9f0 Merge branch 'develop' of github.com:ARMmbed/ble into whitelisting 2015-12-31 14:24:12 +00:00
Andres Amaya Garcia f7570e8bd5 Early whitelisting API 2015-12-31 13:54:21 +00:00
Vincent Coubard 4af295aba6 version v2.3.0 2015-12-23 12:26:27 +00:00
Vincent Coubard 0e70683f81 Merge pull request #105 from pan-/descriptorDiscovery
Characteristic descriptor discovery
2015-12-23 12:24:57 +00:00
Vincent Coubard ca85939442 version v2.2.3 2015-12-23 11:12:35 +00:00
Vincent Coubard a7d97ae5c4 Merge pull request #158 from LiyouZhou/hotfix_Gap_AddressType
Hotfix for backward compatibility
2015-12-23 10:39:40 +00:00
Vincent Coubard 5caca671f3 Merge branch 'develop' of https://github.com/ARMmbed/ble into descriptorDiscovery 2015-12-22 17:12:25 +00:00
Liyou Zhou b2dd219ff4 Fix issues 2015-12-22 13:56:14 +00:00
Liyou Zhou ec7df38a77 Add deprecated message to Gap::connect overload function 2015-12-22 12:59:45 +00:00
Liyou Zhou 7398a396d7 Hotfix for backward compatibility
for change from Gap:AddressType_t to BLEProtocol::AddressType_t
2015-12-21 17:38:17 +00:00
Vincent Coubard 3036b058fe Merge pull request #153 from andresag01/update_adv_payload
Modify functions that manipulate adv payload
2015-12-21 15:04:59 +00:00
Andres Amaya Garcia 484382e2aa Fix comment in GapAdvertisingData 2015-12-21 10:44:55 +00:00
Andres Amaya Garcia 02ca65bc9f Make update adv payload replace previous data
Accumulate and update advertising payload now differ in their implementations.
Accumulate updates the previous value, if it is UUID then the previously added
values are kept and the new one is simple appended. In contrast, update
replaces the previous value in all cases.
2015-12-21 10:38:51 +00:00
Vincent Coubard fa8068478e Merge pull request #154 from andresag01/clean_warnings
Clean up code in DiscoveredCharacteristic.cpp
2015-12-21 08:23:51 +00:00
Rohit Grover bd2b3cd05b version v2.2.2 2015-12-21 08:10:30 +00:00
Rohit Grover 6d1dc39a44 Merge pull request #155 from andresag01/add_err_code
Add BLE_ERROR_INTERNAL_STACK_FAILURE error code
2015-12-21 08:06:30 +00:00
Andres Amaya Garcia c64decef73 Add BLE_ERROR_INTERNAL_STACK_FAILURE error code
Add an additional error code to the ble_error_t enum to describe a failure
state caused by the internal platform-specific stack. This state was not
described by any of the existing error codes.
2015-12-18 17:22:35 +00:00
Andres Amaya Garcia fec4e5ec53 Add documentation missing for updateData() 2015-12-18 16:27:18 +00:00
Andres Amaya Garcia ae516d1aba Clean up code in DiscoveredCharacteristic.cpp
Clean up the code by removing white spaces and adding statements to supress
unused-parameter compiler warnings.
2015-12-18 16:17:28 +00:00
Andres Amaya Garcia 4fb7c06886 Rename updateFieldPayload to updateField 2015-12-18 14:02:44 +00:00
Andres Amaya Garcia 39e3e8d151 Modify functions that manipulate adv payload
Modify the functions addData() and updateData() to correctly update the payload
information for a specified AD type if that type was already present in the
payload. For addData() if the AD type is not found, it is added to the payload.
In contrast, in updateData() if the AD type is not found an error is returned.

Documentation was updated accordingly.
2015-12-18 13:53:51 +00:00
Rohit Grover 002c761381 version v2.2.1 2015-12-18 13:23:52 +00:00
Rohit Grover 1381ba46e7 Merge pull request #150 from andresag01/rm_appearance
Remove deprecated appearance enum from blecommon.h
2015-12-18 08:14:03 +00:00
Andres Amaya Garcia e40dc0642c Fix comment in GapAdvertisingParams.h 2015-12-17 15:45:04 +00:00
Andres Amaya Garcia 7ce1b80b8c Removed deprecated appearance enum from blecommon.h 2015-12-17 15:42:29 +00:00
Rohit Grover 7ded8ae784 version v2.2.0 2015-12-17 08:52:14 +00:00
Vincent Coubard 31be7790b0 Merge pull request #146 from andresag01/develop
Add onShutdown to register callbacks
2015-12-17 08:43:12 +00:00
Andres Amaya Garcia 0024b78a39 Clear shutdown callchain after exec callbacks 2015-12-16 16:43:04 +00:00
Vincent Coubard 65ed5c13a8 Merge pull request #145 from rgrover/develop
transparenly support existing applications which may have used Gap::ADDR_TYPE_*
2015-12-16 09:46:17 +00:00
Andres Amaya Garcia 0781293bda Add onShutdown to register callbacks
Add an onShutdown() function to Gap, GattClient, GattServer and
SecurityManager. The callbacks are added to a private callback chain in each of
the instances. The callbacks will be executed inside each object's reset()
function BEFORE the state of the instance is cleared. The developers of the
platform-specific implementation must call the parent class' reset() function
for the callbacks to be executed.

Finally, an onShutdown() function that returns the shutdown callchain is added
to allow detaching callbacks.
2015-12-16 09:44:52 +00:00
Rohit Grover 3c15a7dfcc minor re-organization 2015-12-16 09:09:38 +00:00
Rohit Grover f30fe6bcda use an anonymous enum instead 2015-12-16 09:07:57 +00:00