bluetooth with "no pairing' requires extra line in pxt.json to work correctly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
Now that Web Bluetooth is more prevalent, it's easy to create web apps that can connect to the micro:bit over Bluetooth without the pairing dialog. However, this does not work properly without hand editing the pxt.json.
For a good explanation, see https://cardboard.lofirobot.com/lofi-control-app-info/
To make the board discoverable over bluetooth you have to properly set PROJECT SETTINGS in MakeCode (individual for each project!)
go to (GEAR ICON) -> PROJECT SETTINGS
Set project settings sliders to NO PAIRING
Next click EDIT SETTINGS AS TEXT
scroll down to section about BLUETOOTH and add this line: “pairing_mode”: 0,
The fix here is for MakeCode to add the pairing_mode line when "No Pairing is selected".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MakeCode project settings flow and the pxt.json representation, focusing on the Bluetooth setting for “No Pairing.” Done means selecting “No Pairing” produces a project configuration containing “pairing_mode”: 0 without manual text editing; check the existing Bluetooth behavior to verify the board is discoverable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100