Skip to content

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

@thomasjball

Description

@thomasjball

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions