Skip to content

Commit c86e87e

Browse files
committed
cli.lwp3.repl: use write with response
The City hub has buggy Bluetooth that sends a response even when we use write without response. This causes BlueZ to disconnect due to the unexpected response. Since throughput isn't an issue here, we can just use write with response for all hubs.
1 parent 1cc0177 commit c86e87e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
## Fixed
2020
- Fixed device not rebooting after `dfu restore`.
21+
- Fixed BlueZ disconnecting when sending a command with `pybricksdev lwp3 repl`
22+
to a City hub.
2123

2224
## [1.0.0-alpha.13] - 2021-08-06
2325

pybricksdev/cli/lwp3/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ async def welcome():
186186
else:
187187
logger.info("sending: %s", msg)
188188
await client.write_gatt_char(
189-
LWP3_HUB_CHARACTERISTIC_UUID, bytes(msg)
189+
LWP3_HUB_CHARACTERISTIC_UUID, bytes(msg), response=True
190190
)
191191

192192
logger.info("disconnecting...")

0 commit comments

Comments
 (0)