Commit Graph

23 Commits

Author SHA1 Message Date
Scott Shawcroft 3fda0c0a1b
Fix board builds and use MP_ERROR_TEXT in py and extmod 2021-05-05 17:51:52 -07:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Scott Shawcroft 9fcf96cb64
Replace _bleio.ConnectionError with the native version
Replace uses of _bleio.ConnectionError with regular ConnectionError

Fixes #3008
2020-10-07 17:11:32 -07:00
Dan Halbert 4e3cb55ce7 share more of _bleio dict; fix one doc error 2020-09-01 12:41:58 -04:00
Dan Halbert b27d511251 address review; use constructor for HCI Adapter 2020-08-30 14:06:48 -04:00
Dan Halbert 0e30dd8bcc merge from upstream; working; includes debug_out code for debugging via Saleae for posterity 2020-08-20 20:29:57 -04:00
Taku Fukada 56c898da80 Modify some Python stubs 2020-08-07 01:01:28 +09:00
Dan Halbert 0a60aee3e4 wip: compiles 2020-08-02 11:36:38 -04:00
Scott Shawcroft 049921fec8
Merge branch 'main' into memmonitor 2020-07-22 14:00:28 -07:00
Scott Shawcroft eb24653d3f
Fix BluetoothError doc typo we copied 2020-07-21 18:30:29 -07:00
dherrada 3df03a5650 Made most of the requested changes 2020-07-03 13:49:00 -04:00
dherrada 26f1fd0071 Added type hints to _bleio 2020-07-02 14:11:25 -04:00
Dan Halbert 11cb3e3b4b hci skeleton done; not working yet 2020-06-30 23:19:40 -04:00
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
dherrada 0e465e63b9
Did audiopwmio, bitbangio, and _bleio 2020-05-01 18:23:27 -04:00
Dan Halbert e31ac710be Enable _bleio adapter when _bleio is imported 2020-02-20 21:55:04 -05:00
Scott Shawcroft 82fb761c0f
Add PacketBuffer and MTU negotiation support.
PacketBuffer facilitates packet oriented BLE protocols such as BLE
MIDI and the Apple Media Service.

This also adds PHY, MTU and connection event extension negotiation
to speed up data transfer when possible.
2020-01-03 17:29:54 -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 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