Commit Graph

92 Commits (c8747aad0fecc522201f6c053f0761d92f9ca6cf)

Author SHA1 Message Date
Vincent Coubard c8747aad0f Cordio: Use GenericGap instead of CordioGap. 2017-10-31 17:40:01 +00:00
Vincent Coubard e9170e6507 BLE: Cordio fix default connection handle for GattServer write and areUpdatesEnabled 2017-10-31 17:40:00 +00:00
Vincent Coubard c30eee0f03 BLE: Cordio implementation of ble::pal::Gap. 2017-10-31 17:40:00 +00:00
Vincent Coubard 0d0cdb6f8e BLE: Cordio implementation of pal::GenericAccessService. 2017-10-31 17:40:00 +00:00
Vincent Coubard 1b7a3ffa02 BLE: Add generic GAP implementation.
Generic implementation of the GAP class. It allows porters to have a working Gap
implementation by implementing the following abstraction layer primitives:
- pal::Gap: Adaptation for GAP related primitives.
- pal::EventQueue: simple interface to the inner event queue of the stack.
  pal::SimpleEventQueue can also be used as an implementation.
- pal::GenericAccessService: Accessors to the Generic Access Service present in
  the GATT server.
2017-10-31 17:39:14 +00:00
Vincent Coubard 953739c026 BLE: Event Queue interface at the pal level.
To help generic code, an interface of an event queue at the PAL level has been
added. Implementation can either rely on the event mechanism internal to the
stack or use the SimpleEventQueue implementation provided by this patch.
2017-10-31 17:38:04 +00:00
Vincent Coubard 63668cb7d2 BLE: Add generic event filter.
This filter prevent events to be signaled multiple times to the upper layer. It
also signal events to a newly set event processor hook.
2017-10-31 17:37:05 +00:00
Vincent Coubard 0025b685ea BLE: Generic Access Service Adaptation layer
Add an abstraction which manage the state of the GAP service exposed by the GATT server.
2017-10-31 17:35:37 +00:00
Vincent Coubard 744abca8ff BLE: Adaptation interface of the GAP layer.
This interface expose the primitives needed to realize operations defined in
the GAP layer. Data types, event and function definitions follow closely HCI
commands and events defined in the Bluetooth specification.
2017-10-31 17:32:01 +00:00
Vincent Coubard a917b90e0b BLE: Add safe Enum abstraction. 2017-10-15 16:37:38 +01:00
Jimmy Brisson f0a10750d7 Merge pull request #4990 from akosthekiss/ble-uart-flush
Add flush to the BLE UART Service
2017-09-28 14:01:15 -05:00
Vincent Coubard 75c9dfce68 BLE: Add Cordio port.
It allows mbed users to enable BLE on targets with an external BLE module.
2017-09-26 15:20:17 +01:00
Vincent Coubard aa0b5d5a22 BLE: Fix space 2017-09-26 15:20:16 +01:00
Vincent Coubard 512dd8c387 BLE: Add collection of basic BLE types shared accross all layers. 2017-09-26 15:20:15 +01:00
Vincent Coubard daaa5b1977 BLE: Introduce GenericGattClient and platform abstraction over ATT/GATT.
This changes introduce a platform adaptation over ATT/GATT that can be implemented by porter.
Unlike the GattClient interface, the ATT/GATT adaptation is simple, follow closely the Bluetooth specification and won't change over time.
Implementation of the GattClient interface is realized by the class GenericGattClient which accept in input a pal::GattClient.

This change will also free design space once adopted by partners, addition to the GattClient interface won't require partner support.
2017-09-26 15:20:15 +01:00
Vincent Coubard 38bb6b4e52 BLE: Add error code management in Gatt read and write data structures.
Also fix wrong usage of designed initializer in CPP files.
2017-09-26 15:20:15 +01:00
Vincent Coubard 85e88ccb2c BLE NRF: Fix wrong usage of designed initializer in cpp code. 2017-09-26 15:20:15 +01:00
Vincent Coubard 1fd953e33c BLE: Use shared type ble_attribute_handle_t in GattAttribute. 2017-09-26 15:20:15 +01:00
Vincent Coubard 4416ef6233 BLE: Add optionnal error_code CharacteristicDescriptorDiscovery::TerminationCallbackParams_t 2017-09-26 15:20:15 +01:00
Vincent Coubard 97995b8de9 BLE: Fix header inclusion of DiscoveredCharacteristicDescriptor. 2017-09-26 15:20:14 +01:00
Vincent Coubard c022c4a8f0 BLE: use common type ble::connection_handle_t as Handle_t. 2017-09-26 15:20:14 +01:00
Vincent Coubard dd303b7a91 BLE: Add ArrayView in utilities. 2017-09-26 15:20:14 +01:00
Vincent Coubard c58d7de93d BLE: Fix GattClient destructor by adding a virtual specifier. 2017-09-26 15:20:14 +01:00
Jimmy Brisson 75549754bc Compile source code for Maxim targets
They don't link because of differences in the precompiled libraries
2017-09-11 13:20:32 -05:00
Akos Kiss 90b326a664 Fix BLE API docs
Some misguidances, some typos, some stylistics, some doxygen misuses.
2017-08-30 11:15:39 +02:00
Akos Kiss 8035ddc36c Add flush to the BLE UART Service
If only buffer-full events and LF characters trigger the flush of
the send buffer then only line-based communication can be
implemented over the BLE UART Service. This patch extends the
service API by adding an explicit `flush` method to force sending
the buffer contents, thus enabling protocols with short (e.g.,
single character) messages.
2017-08-29 18:53:21 +02:00
Jimmy Brisson 66c3385727 Merge pull request #4398 from maximmbed/max326xx_ble_update
MAX326xx: BLE updates, fixed sleep, open-drain LEDs
2017-07-31 15:23:47 +00:00
Jimmy Brisson 17d5356dbb Merge pull request #4800 from Nodraak/fix/4799_ble_infinite_calling_loop
Fix infinite calling loop
2017-07-27 09:46:57 -05:00
Adrien Chardon 2a39019766 Fix infinite calling loop 2017-07-24 14:18:21 +02:00
Jesse Marroquin 3a4138369d Update BLE, fix sleep and open-drain LEDs in MAX326xx
MAX32630FTHR gets BLE, uses timer peripheral 5 for HCI timing
libexactLE update for 610,620
Fixup hal_sleep and hal_deepsleep for 620
LEDn outputs now forced to open-drain
2017-07-14 17:36:56 -05:00
Adrien Chardon 27901f24b9 BLE/GattCharacteristic: Add explanatory note for a parameter 2017-07-04 15:10:48 +02:00
Adrien Chardon 05c3ddf691 BLE/HRS: Fix #4661 2017-07-04 15:10:20 +02:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Martin Kojtal 3553a4573a Merge pull request #4178 from nvlsianpu/getAddrFromPeerTab_sd_api_5
[NRF52840]: SecurityManager::getAddressesFromBondTable
2017-06-01 14:05:39 +02:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Andrzej Puzdrowski 39c1b3f5f3 Redirect "implemenetation of SecurityManager::getAddressesFromBondTable for SD 5.x.x" to NRF5 BLE port sources. 2017-05-16 13:48:13 +02:00
Andrzej Puzdrowski 64f2a9d467 remove unwanted (and unused anymore) NRF5_SDK13 BLE port. It was omited in https://github.com/ARMmbed/mbed-os/pull/4245. 2017-05-16 11:46:35 +02:00
Andrzej Puzdrowski 1f1168a51e NRF5: changes for code review of merg nrf52840 to NRF5 sources
s140 headers renamed form ble_* to nrf_ble_*,
Removed s130 and s132 headers named form ble_*
(Them had been added by #2ff572682798562e812015dc775b5896e0fda5a4)
Headers inclusinons were changed in order to meet above changes.

Revrted bad change in us_ticker.c:
use __disable_irq lock instead of core_util_critical_section_enter lock
for setting rtc1 tick for systick emulation as was good before.
2017-05-09 15:43:30 +02:00
Andrzej Puzdrowski 53c6f853c0 Apply resloution for the "Read long UUID of service problem" according to
NRFFOETT-1674.
2017-04-27 12:15:58 +02:00
Andrzej Puzdrowski b2080ab6d9 Make NRF5 BLE implementation compatible with SoftDevice API 2.x.x,3.x.x,5.0.0-1.alpha by
Copy of changes from
features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5_SDK13/source
to
features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source
2017-04-27 09:46:38 +02:00
Ron Eldor c78f73ca63 Fix compilation errors on linux machine
Change path of include from '\' to '/', which works on linux as well.
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski b1e55094aa [NRF52480] fix bugs:
- 128 bits service's UUID discovered by a GATT client was shifted.
- not possible to connect while being scanning.
- not possible to scanning while being connected.
    for sd >= 3 whitelisting is now setups into setWhitelist method
- Gap::setAddress could failed
- Gap::getWhitelist wron implemenation
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 9f0d754ab6 [NRF5_SDK13] fix:
- whitelistin setup modifies identitiy flag and omits address' type.
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski f32da7a9ee [nRF5_SDK13] fix:
Gap::setAddress implementation
Gap::getPermittedTxPowerValues implemnetation
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 3a81e23cf2 [nRF5_SDK13] Changes from CR.
- fix typso, renaming, repharse commnets.
- fix alghoritm of white/id lists setup functions in nRF5xGap class.
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 4e188af065 upgrade implementationof gap::connect in case of private address and whitelisting for SD API 3 and further 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 9d8c05bbe8 introduce API update to (v3.x.x and further)in BLE_GAP_EVT_CONNECTED service.
whitelist and identiti list settings provider now takes into account scaner filter po0licy and advertise r filter policy
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 42fcae481a nRF5: whitelisting update fo SD API >-3.x.x 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 689d12df62 NRF5_SDK13: Make BLE sources compilable - this is not redy to use!
- Remove ble_advertising.h/c - it was unused, redundant code
- includes for SD header ble.h were changed to headers\ble.h in order to distingusch form feature-ble BLE.h
- btle_init() introduced PM for disable <B>privacy</B> for API 3 and further.
- temporary removed or mocked real implemantation of whitelist-ing support functionalities:
btle_security.createWhitelistFromBondTable , gap::startAdvertising, gat::startRadioScan, gap::stopAdvertising
Gap::generateStackWhitelist, Gap::getStackWhiteIdentityList-(mock)
- Characteristic Descriptor Discoverer - aligned to the apply SD API
- long uuid service's read spupport
- add BLE features support to sdk configurations file
- publicate sdk's id_manager.ah() function.
- cutted out f. app_error_handler for mbed-os
- removed PACKED definition form app_util_platform (redefined by mbed-os)
- Gap::setAddress  - allign to new SD API using peer manager
- extend Gap::getPermittedTxPowerValues for nRF52840
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski f1c3d75c21 initial creation of nRF52840 BLE target implementation "NRF5_SDK13" as a copy of "NRF5" 2017-03-22 08:38:34 +01:00