Commit Graph

18 Commits

Author SHA1 Message Date
Dan Halbert
f5e913101c
Merge pull request #2301 from tannewt/support_extended_advertising
Add support for extended (>31 byte) BLE advertisements.
2019-12-06 23:51:05 -05:00
Scott Shawcroft
da0ea979ff
Check connection validity after service discovery.
Fixes #2347
2019-12-06 16:03:14 -08:00
Dan Halbert
559ce6a949
Merge pull request #2356 from tannewt/central_pairing
Add connection interval and debugging
2019-12-06 15:19:40 -05:00
Dan Halbert
e30dde0afc Make _bleio.Connection.disconnect() idempotent 2019-12-05 08:40:53 -05:00
Scott Shawcroft
17c8356b8c
Add connection interval and debugging
This also sets TinyUSB to master and to not include its submodules.

It also fixes an old displayio example comment and retries gattc
reads.
2019-12-04 14:39:02 -08:00
Scott Shawcroft
3fc58cee38
Merge remote-tracking branch 'adafruit/master' into support_extended_advertising 2019-11-26 13:12:43 -08:00
Scott Shawcroft
743bc829ab
Clean up debug changes 2019-11-21 16:39:57 -08:00
Scott Shawcroft
39f4046f70
Fix pairing when peripheral. Central untested. 2019-11-21 16:32:42 -08:00
Scott Shawcroft
98e55eb577
Only add module when printing exception. 2019-11-21 12:26:25 -08:00
Scott Shawcroft
521c7531bc
Improve printing to include _bleio. prefix for type. 2019-11-21 11:04:17 -08:00
Scott Shawcroft
5e857fdb67
Use BluetoothError in _bleio
This better differentiates errors than using OSError everywhere.
2019-11-20 14:02:15 -08:00
Scott Shawcroft
11c2c3443f
Add support for extended (>31 byte) BLE advertisements. 2019-11-19 13:55:58 -08:00
Dan Halbert
8584c1e824 Fix start_scan timeout default value 2019-11-13 21:34:20 -05:00
Scott Shawcroft
47e50e5659
Merge remote-tracking branch 'adafruit/master' into bleio_tweaks 2019-11-01 13:20:58 -07:00
Jeff Epler
978cec0316 pixelbuf: correct trivial typos 2019-10-27 16:41:56 -05:00
Scott Shawcroft
91c9d519ae
Refine comments and switch prefix_len to size_t 2019-10-22 23:09:56 -07:00
Scott Shawcroft
ae30a1e5aa
Refine _bleio
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-10-21 18:57:03 -07:00
Dan Halbert
7a64af9280 rename bleio module to _bleio 2019-08-29 18:44:27 -04:00