Repository navigation
Reach a board over Bluetooth: ble:// devices through bledev - #47
Merged
Merged
Conversation
A bledev.repl link dressed as a pyserial port for mpremote's SerialTransport, over bleak in the sidecar's Python. Files go through the board's BLE file-transfer service (bledev.filetransfer, CircuitPython's protocol) when it serves one: 20 KB up in 0.8 s and down in 0.3 s, against 16 s and 11 s over the raw REPL. put/get keep their SHA-256 check, and MPFTP_BLE_PLANT proves it fails on a flipped bit. The password comes the way the WebREPL one does. Soft reset refuses over BLE (it turns Bluetooth off); mount stays serial-only.
This was referenced Sep 24, 2026
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.
Every board command now takes
-d ble://NAME, which reaches a board running pydevices'bledev.replorbledev.filetransferover Bluetooth with no serial port involved. It's modelled on the ws:// transport: a pyserial-shaped link handed to mpremote'sSerialTransport, here over bleak in the sidecar's Python. The board side is PyDevices/pydevices#86 (unmerged).put/getkeep their SHA-256 check.~/.mpftp/webrepl-passwords.jsonunderble:NAME(mpftp wifi password ble://NAME), thenMPFTP_BLE_PASSWORD/blePassword, then the WebREPL password, becausebledev.repldefaults towebrepl_cfg.PASS.soft-resetrefuses over BLE and says why: a soft reset turns Bluetooth off.soft-rebootworks ifmain.pystarts bledev.mountstays serial-only.Gate, run on the T-Embed over BLE with USB serial used only for setup:
ls,put(verified),get(cmpbyte for byte),exec, andinterruptof awhile Trueloop started byrun(61 ms) all passed. The REPL answered afterwards.tools/ble_gate.pyran the same checks inside one sidecar session and passed.MPFTP_BLE_PLANT=putmadeputexit 1 with a hash mismatch, andMPFTP_BLE_PLANT=getmadegetreport one.soft-reseteach gave a clear message.test_ble.py), and ruff is clean.The measurements and design are in
docs/plans/ble.md, and the numbers come fromtools/ble_bench.py.Not done
ble findand no remembered BLE boards.