Repository navigation
Conversation
bench.serve kind=ble serves the node over TCP and runs the embedded BlueZ peripheral against the port; it exits when the port closes. The peripheral now deframes the node's '>' + length output into one notification per frame and frames each write with '<' + length, as MeshCore's BLE transport and its clients do. It also cleared the connect timeout, which had ended the read pump after five quiet seconds. For #256.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #256.
bench.servewithkindble(or serve BLE in the companion bench) serves the node over TCP, then runs the BlueZ peripheral against that port. The script is embedded in the binary. The peripheral exits when the port closes, sobench.dropalso stops advertising. The endpoint shows asble, with the advertised name as its address. Linux with BlueZ only, and it needs python3 with dbus and gi.Two bugs in
tools/ble/nus_peripheral.pywould have stopped any real app working:>+ LE16 length) straight through, split into 20-byte notifications. Over BLE, MeshCore and its clients carry exactly one frame per notification and one per write, with no prefix (SerialBLEInterface; MeshCIM'sble_mesh_transport.dart). It now deframes the node's output and frames each write with<+ length. Covered by--selftest.Tested on this machine's adapter:
--checkregisters, and a live test serves a native companion over BLE, sees the endpoint, drops it, and sees the peripheral go.Not done: a phone actually connecting. That needs a second device. Pointing MeshCIM at
MSIM-<node>is the check. Option A (MeshCore's own BLE transport in the emulator) and the WiFi transport stay open on the issue.