Jeff Epler
b3bdd4686b
PacketBuffer: add missing 'break's, remove unneeded {}
2020-09-13 15:10:38 -05:00
Dan Halbert
6dbd369272
merge from upstream
2020-08-30 14:39:03 -04:00
Scott Shawcroft
644d2ba7a2
Add more "extern" declarations for gcc10 compat
...
gcc has tightened the restrictions on forward declarations that lack
"extern". Fix them up.
2020-08-21 14:39:37 -05: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
Dan Halbert
94ecf33a5c
Merge pull request #3281 from dhalbert/fix-spim3-buffer-location
...
SPIM3 buffer must be in first 64kB of RAM
2020-08-17 19:28:03 -04:00
Scott Shawcroft
377503e61c
Merge pull request #3284 from dhalbert/fix-3171-evt-handler
...
Remove event handler before setting it to NULL
2020-08-17 15:02:29 -07:00
Dan Halbert
ef40f83f99
Remove event handler before setting it to NULL
2020-08-15 14:39:53 -04:00
Dan Halbert
cf0f3d70b5
SPIM3 buffer must be in first 64kB of RAM
2020-08-15 10:31:56 -04:00
Yihui Xiong
52990a332d
fix
2020-08-14 17:48:15 +08:00
Yihui Xiong
e7da652711
able to change ble mac address
2020-08-13 16:54:29 +08:00
Dan Halbert
44c9c43cd1
ble_uart_echo_test works
2020-08-13 00:03:39 -04:00
Dan Halbert
06f3b4048a
fix #3228 for nrf; still needs to be fixed for HCI; tested
2020-08-11 16:21:16 -04:00
Dan Halbert
0f4b969d62
discovery of Nordic UART service working
2020-08-08 00:29:37 -04:00
Dan Halbert
0a60aee3e4
wip: compiles
2020-08-02 11:36:38 -04:00
Dan Halbert
6494bbdc64
snapshot
2020-07-16 23:14:49 -04:00
Dan Halbert
f6869c69c5
wip: advertising; not tested
2020-07-12 19:45:23 -04:00
Sean Cross
c1bcc25b88
nrf: _bleio: clean up timeout calculation
...
The timeout value is calculated by the common-hal layer now, so we don't
need to be quite so clever about calculating it here.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 21:56:39 +08:00
Sean Cross
34f91f01c6
bleio: adapter: add advertising timeout and status
...
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 15:01:19 +08:00
Sean Cross
cfe65742a3
_bleio: support anonymous advertising
...
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-05-19 15:01:18 +08:00
Dan Halbert
b7836aeac6
address review comments
2020-05-04 19:51:08 -04:00
Dan Halbert
bae7a5e433
make translate again
2020-05-04 17:26:59 -04:00
Dan Halbert
d6c6f9f4f0
add PacketBuffer .incoming_ and .outgoing_packet_length
2020-05-04 15:59:45 -04:00
Dan Halbert
f3078511a6
further cleanup and bug fixing
2020-04-29 23:18:08 -04:00
Dan Halbert
3d62f87e29
back to '.packet_size' for compatiblity
2020-04-29 22:10:56 -04:00
Dan Halbert
84cee1ab8d
rename and improve PacketBuffer packet length property
2020-04-29 17:49:31 -04:00
Scott Shawcroft
755d404edf
Merge remote-tracking branch 'adafruit/master' into lower_power
2020-04-27 16:45:10 -07:00
Dan Halbert
fbc8719fad
ringbuf tested
2020-04-21 22:40:12 -04:00
Dan Halbert
77cd93ac2d
merge from adafruit
2020-04-21 17:47:51 -04:00
Dan Halbert
38ec3bc574
further ringbuf cleanup
2020-04-21 17:38:20 -04:00
Sean Cross
c04e6d6f52
nrf: bleio: parameterize softradio configuration
...
Allow for setting various softradio memory settings as part of a
board in order to support lower-memory configurations. If a
parameter is unspecified then the previously-defined value is used.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 12:29:59 +08:00
Scott Shawcroft
8fe512c7e9
Merge remote-tracking branch 'adafruit/master' into lower_power
2020-03-31 15:13:58 -07:00
Scott Shawcroft
8a5d3cd6c4
Add exception on small buffer and fix Connecion WRITE handling
2020-03-25 17:41:47 -07:00
Scott Shawcroft
3551b769a2
Fix connection handle tracking in PacketBuffer when a server.
2020-03-25 13:31:18 -07:00
Scott Shawcroft
6f60afe8c5
First try at lowering the power consumption
2020-03-13 11:12:30 -07:00
Scott Shawcroft
28c7a1e9c3
Fix crash after empty REPL session
...
We were trying to reset bluetooth when it was off and then trying
to raise an exception without the heap.
2020-02-24 16:11:17 -08:00
Scott Shawcroft
72a1bdab30
Add another error message for extended advertisements at the same
...
time as scan response. The SD can't do it.
2020-02-05 15:56:17 -08:00
Dan Halbert
4abd5f1f7b
increase max connections from 2 to 5
2020-01-31 14:58:23 -05:00
Dan Halbert
87f73e2729
track vm_used_ble better
2020-01-30 09:52:06 -05:00
Dan Halbert
85dc4089b9
address review comments
2020-01-14 17:23:16 -05:00
Dan Halbert
0367ba7495
fix some typos and leftovers
2020-01-13 18:29:34 -05:00
Dan Halbert
2a75196aa3
merge from adafruit/circuitpython
2020-01-13 18:15:32 -05:00
Dan Halbert
4ad004f24e
put bonding to-do flags into Connection objects instead of using a heap-allocated queue
2020-01-13 17:52:32 -05:00
Dan Halbert
9e7f8743c2
fix CCCD bonding store; avoid excessive bonding writes
2020-01-12 23:32:51 -05:00
Dan Halbert
346ce3b73b
wip: HID bonding works!
2020-01-10 23:55:45 -05:00
Dan Halbert
9c167af17a
wip; redid flash writing to be compatible with SD
2020-01-09 17:40:02 -05:00
Scott Shawcroft
7a94940c89
Replace magic number and add comment.
2020-01-08 11:01:43 -08:00
Dan Halbert
390337b9a5
wip; compiles
2020-01-05 23:33:42 -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
Dan Halbert
242d572470
wip
2020-01-03 10:24:07 -05:00
Dan Halbert
ae64a669dd
address review comments
2019-12-11 15:43:06 -05:00