microsoft / microsoft/pxt

bluetooth with "no pairing' requires extra line in pxt.json to work correctly

Open
#11,331 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.