uael
29bd693bab
device: fix advertising data UUID list parse loop
2023-05-04 04:32:38 +00:00
uael
30934969b8
ssp: simplify pairing and fix just-works
...
Even through the previous implementation was correct:
- Always call `delegate.confirm()` for `just-works` pairing, but with
`auto` parameter set to `True`.
- Trust the controller and do not double check the devices IO
capabilities.
2023-05-04 04:32:38 +00:00
uael
4a333b6c0f
keys: add an in-memory key-store fallback
...
Instead of defaulting the key-store to `None`, use an in-memory one.
This way a keystore is always available. A future improvement could be
to rework the device keystore initialization to remove checks like
`if self.keystore:` along the codebase.
2023-05-04 04:32:38 +00:00
uael
b5cc167e31
pairing: apply strict typing
2023-05-01 06:19:11 +00:00
Gilles Boccon-Gibod
dd930e3bde
fix implementation for Windows
2023-04-30 11:42:28 -07:00
Gilles Boccon-Gibod
4286b2ab59
address PR comments
2023-04-18 15:05:18 -07:00
Gilles Boccon-Gibod
3442358dea
refactor PairingDelegate
2023-04-18 15:04:53 -07:00
Gilles Boccon-Gibod
bf3e05ef91
Merge pull request #174 from google/gbg/pairing-fix
...
fix role state for classic connections
2023-04-11 20:32:29 -07:00
Gilles Boccon-Gibod
49b2c13e69
only use 1M parameters by default
2023-04-09 17:57:11 -07:00
Gilles Boccon-Gibod
2c2f512180
add comment to explain the initial role choice
2023-04-07 12:19:28 -07:00
Gilles Boccon-Gibod
859aea5a99
fix role state for classic connections
2023-04-07 10:24:26 -07:00
Josh Wu
85496aaff5
SMP: Determine initiator by direction instead of role
...
Though in the spec this is not allowed, but in some ambiguous cases such
as SMP over BR/EDR or we want to test how remote devices handle invalid
pairing requests, we still need to allow this behavior, with some logs
to let users know it's invalid.
2023-04-08 00:02:48 +08:00
Alan Rosenthal
0f737244b5
Merge pull request #169 from AlanRosenthal/alan/remote-values
...
Add `show remote-values`
2023-04-05 09:00:48 -04:00
Alan Rosenthal
a258ba383a
Add show remote-values
...
`gatt_client` caches values read/notifications/indications and displays the most recent value to the user
2023-04-04 18:15:42 +00:00
Gilles Boccon-Gibod
620c135ac4
only instantiate keystore if not already set
2023-04-03 17:52:51 -07:00
Gilles Boccon-Gibod
fca73a49a3
use device public or static address for keystore namespace
2023-04-03 12:39:22 -07:00
Alan Rosenthal
7731c41f80
Fix CharacteristicProxy __str__
...
property was really an int, and needed to be transformed into a `Characteristic.Properties`
2023-03-31 17:06:33 -04:00
Alan Rosenthal
fb49a87494
Create Characteristic.Property
...
Move all Characteristic properties into its own `enum.IntFlag` class
2023-03-31 16:09:24 -04:00
Alan Rosenthal
eba82b9d9a
Merge pull request #164 from AlanRosenthal/alan/local-write
...
Add `local-write` to bumble-console
2023-03-31 16:07:09 -04:00
Alan Rosenthal
677fc77d3c
Merge pull request #163 from AlanRosenthal/alan/local-values
...
Add `show local-values`
2023-03-31 16:03:52 -04:00
Alan Rosenthal
e026de295f
Add show local-values
...
This PR adds a way to display the local gatt characteristics/descriptors values
If no connections, it shows the value of every characteristic/descriptor.
When there's a connection, it shows the value for each specific connection - CCCDs are connection specific
This screen auto-updates every second
2023-03-31 00:20:07 +00:00
Alan Rosenthal
52c15705e9
Add local-write to bumble-console
...
Add a command to update the local gatt server, and notify/indicate subscribes (if any)
2023-03-30 12:33:32 -04:00
uael
e0af954baa
att: fixed use of unknown attribute
2023-03-30 14:05:43 +00:00
Lucas Abel
044597de66
Merge pull request #161 from google/uael/smp-get-number-type-hint
...
smp: fix `PairingDelegate.get_number` return type
2023-03-28 11:48:09 -07:00
Lucas Abel
5c59b6ca6d
Merge pull request #158 from benquike/main
...
Fix HCI_PIN_Code_Reply_Command
2023-03-27 17:37:54 -07:00
Hui Peng
dcd66743f6
Use delegate.get_string to get pin code
2023-03-27 17:08:26 -07:00
Hui Peng
423a5a95d8
add get_string API in PairingDelegate
2023-03-27 17:02:12 -07:00
Lucas Abel
8e881fdb18
smp: fix PairingDelegate.get_number return type
...
This function can return `None` to indicate a negative reply,
update the type hint accordingly.
2023-03-27 22:51:23 +00:00
Lucas Abel
4907022398
Merge pull request #157 from yuyangh/main
...
Add connection into event emit
2023-03-27 14:38:41 -07:00
Lucas Abel
e93f71c035
Add missing Connection import
2023-03-27 14:27:48 -07:00
Alan Rosenthal
94ff80563b
Merge pull request #160 from AlanRosenthal/alan/types
...
Add some missing types to apps/console.py, bumble/gatt_client.py
2023-03-27 15:00:03 -04:00
Lucas Abel
552deab8a7
Add Connection type
...
Co-authored-by: Alan Rosenthal <1288897+AlanRosenthal@users.noreply.github.com >
2023-03-27 11:53:34 -07:00
Lucas Abel
a72beb1b06
Merge pull request #144 from zxzxwu/classic_link
...
Add Classic Bluetooth link support
2023-03-27 11:41:42 -07:00
Lucas Abel
7e62d4a81a
Merge pull request #150 from zxzxwu/roleswitch
...
Support BR/EDR role switch & change events
2023-03-27 11:41:29 -07:00
Alan Rosenthal
a50181e6b8
Add some missing types to apps/console.py, bumble/gatt_client.py
...
Added via code inspection (not via a tool like pytype)
2023-03-25 16:12:38 +00:00
Josh Wu
9e1358536b
Add switch_role
2023-03-25 15:17:50 +08:00
Josh Wu
21d8a0d577
Add Classic Local Link support
...
Currently supported features:
* Connect
* Accept
* Switch Role
* Disconnect
* ACL data transmittion
2023-03-25 15:11:59 +08:00
Hui Peng
a8e61673d0
Fix HCI_PIN_Code_Reply_Command in Device.on_pin_code_request
2023-03-25 03:48:56 +00:00
Hui Peng
bd25cf27df
Fix a misconfig of HCI_PIN_Code_Reply_Command
...
The pin_code field is of fixed length of 16 bytes
2023-03-25 03:47:07 +00:00
Alan Rosenthal
dfb6734324
Fix typo when parsing device-config's gatt server
...
* 'permission' instead of 'permissions'
* Also added a more user friendly error message when Attribute.string_to_permissions fails
```
TypeError: Attribute::permissions error:
Expected a string containing any of the keys, seperated by commas: READABLE,WRITEABLE,READ_REQUIRES_ENCRYPTION,WRITE_REQUIRES_ENCRYPTION,READ_REQUIRES_AUTHENTICATION,WRITE_REQUIRES_AUTHENTICATION,READ_REQUIRES_AUTHORIZATION,WRITE_REQUIRES_AUTHORIZATION
Got: 1
```
```
Exception: Error parsing Device Config's GATT Services. The key 'permission' must be renamed to 'permissions'
```
2023-03-24 16:11:18 -04:00
Yuyang Huang
51ae6a5969
Add connection into event emit
2023-03-24 11:16:10 -07:00
Josh Wu
4fc13585cc
Handle BR/EDR connection roles
2023-03-24 15:13:48 +08:00
Lucas Abel
4c6320f98a
Merge pull request #142 from AlanRosenthal/main
...
Fix small bug with services set via --device-config
2023-03-23 12:47:14 -07:00
Lucas Abel
cc0d56ad14
Merge pull request #152 from duohoo/g722_decoder
...
Add G722 decoder with pure python implementation
2023-03-23 12:45:07 -07:00
Lucas Abel
0019fa8e79
Merge pull request #149 from yuyangh/yuyangh/add_ASHA_event_emit
...
Add ASHA event emitter
2023-03-23 12:44:42 -07:00
Yuyang Huang
9541cb6db0
Add ASHA audio status point
2023-03-23 12:15:10 -07:00
Lucas Abel
1cd13dfc19
Merge pull request #153 from benquike/main
...
Add 1 bug fix and a few features in bumble
2023-03-23 10:31:02 -07:00
Hui Peng
d4346c3c9b
delegate the HCI_PIN_Code_Request event on host
2023-03-23 10:14:56 -07:00
Hui Peng
afe8765508
Add on_pin_code_request to support legacy BT classic pairing
2023-03-23 10:14:56 -07:00
Hui Peng
6e9078d60e
Add implemenetation of HCI_PIN_Code_Request_Reply_Command
2023-03-23 09:50:50 -07:00