Commit 42752c1
committed
fix(ble): enumerate undiscovered peripherals and refuse unbonded before any BLE link
list_fido_devices filtered on Peripheral::services(), which per btleplug
docs is empty until discover_services() is called, so unconnected
peripherals were dropped even when their advertised UUIDs included the
FIDO service. Filter on PeripheralProperties::services (advertised
UUIDs) instead, and run a brief scan first so adapter.peripherals()
returns currently-advertising authenticators.
supported_fido_revisions performed a GATT read without first calling
Peripheral::connect() / discover_services(), so the characteristic
lookup found nothing on a peripheral whose services had not been
discovered in the current process. Enforce bonding here too (it's only
a bluez D-Bus lookup) so unbonded peripherals are refused before any
BLE link is opened.
Both bugs predate PR #202 and only surface when the peripheral is not
already an actively-connected, services-discovered device in the
current btleplug session.1 parent d8142f1 commit 42752c1
1 file changed
Lines changed: 24 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
157 | 169 | | |
158 | 170 | | |
159 | 171 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 172 | + | |
| 173 | + | |
165 | 174 | | |
166 | 175 | | |
| 176 | + | |
167 | 177 | | |
168 | 178 | | |
169 | 179 | | |
| |||
191 | 201 | | |
192 | 202 | | |
193 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
194 | 213 | | |
195 | 214 | | |
196 | 215 | | |
| |||
0 commit comments