You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am building a bluetooth project that needs to be 'open security' (no pairing required)
There's a very strange inconsistency with when this setting actually gets applied. For example, if I build after changing the setting, initially the micro:bit behaviour doesn't change. After I do some set of things I can't identify the significance of, I get the new pairing settings
For example, in one case I had an extension that used bluetooth:
In this configuration, the 'open' pairing was not taking effect
By adding the 'accelerometer service' (which had already been initialised in 'setup as input micro:bit', so this was a duplicate) and then downloading the code to my micro:bit the behaviour changed
To Reproduce
Here's a reproducer that works for me without my custom extension:
create a new MakeCode project
Add bluetooth extension (but leave all settings as normal)
micro:bit is NOT visible when not in pairing mode, but the open setting means it should be
Add any block from the Bluetooth library, redownload
Still not visible. (this is weird because in my previous case with my extension, this change DID make the micro:bit visible)
Add data logging extension, redownload:
Test in the same page, but the micro:bit is now visible even when not in pairing mode.
My expectation is that as soon as I toggle that setting, the next time I flash the micro:bit the setting will be applied
I also don't understand what is causing/triggering the rebuild for it to work
As Martin has mentioned in #5416 (comment), I've also experienced this when changing extension versions or yotta config flags inside the pxt.json file, changes that should trigger a cloud rebuild often take several attempts to trigger.
Sometimes it helps if I add a C++ extension to the project (or remove it), or adding more yotta flags with random names (so that it doesn't affect anything important), and sometimes it helps if I exit the project by going to the Makecode home page and then reopen it.
@abchatra Just to clarify, that while this does affect Bluetooth, it is not an issue with Bluetooth itself. The main issue is that changes to the pxt.json file are not applied until an "additional trigger" (like adding extensions, closing and reopening the project, or sometimes making multiple changes to the pxt.json file) somehow forces MakeCode to recompile with the right settings.
Describe the bug
I am building a bluetooth project that needs to be 'open security' (no pairing required)
There's a very strange inconsistency with when this setting actually gets applied. For example, if I build after changing the setting, initially the micro:bit behaviour doesn't change. After I do some set of things I can't identify the significance of, I get the new pairing settings
For example, in one case I had an extension that used bluetooth:
In this configuration, the 'open' pairing was not taking effect
By adding the 'accelerometer service' (which had already been initialised in 'setup as input micro:bit', so this was a duplicate) and then downloading the code to my micro:bit the behaviour changed
To Reproduce
Here's a reproducer that works for me without my custom extension:
My expectation is that as soon as I toggle that setting, the next time I flash the micro:bit the setting will be applied
I also don't understand what is causing/triggering the rebuild for it to work
CC @martinwork perhaps you've seen this @microbit-carlos has some theories!
The text was updated successfully, but these errors were encountered: