summaryrefslogtreecommitdiff
path: root/shared-bindings/_bleio/Adapter.h
AgeCommit message (Collapse)Author
2020-05-19bleio: adapter: add advertising timeout and statusSean Cross
Add a field to allow specifying a timeout when initiating advertising. As part of this, add a new property to determine if the device is still advertising. Additionally, have the `anonymous` property require a timeout, and set the timeout to the maximum possible value if no timeout is specified. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19_bleio: support anonymous advertisingSean Cross
Add a new parameter to the `start_advertising()` function to enable anonymous advertising. This forces a call to `sd_ble_gap_privacy_set()` with `privacy_mode` set to `BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY` and `private_addr_type` set to `BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE`. With this, addresses will cycle at a predefined rate (currently once every 15 minutes). Signed-off-by: Sean Cross <sean@xobs.io>
2020-01-10wip: HID bonding works!Dan Halbert
2019-11-21Fix pairing when peripheral. Central untested.Scott Shawcroft
2019-10-22Refine comments and switch prefix_len to size_tScott Shawcroft
2019-10-21Refine _bleioScott Shawcroft
This PR refines the _bleio API. It was originally motivated by the addition of a new CircuitPython service that enables reading and modifying files on the device. Moving the BLE lifecycle outside of the VM motivated a number of changes to remove heap allocations in some APIs. It also motivated unifying connection initiation to the Adapter class rather than the Central and Peripheral classes which have been removed. Adapter now handles the GAP portion of BLE including advertising, which has moved but is largely unchanged, and scanning, which has been enhanced to return an iterator of filtered results. Once a connection is created (either by us (aka Central) or a remote device (aka Peripheral)) it is represented by a new Connection class. This class knows the current connection state and can discover and instantiate remote Services along with their Characteristics and Descriptors. Relates to #586
2019-08-29rename bleio module to _bleioDan Halbert