Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project with Bluetooth extension - security options are not taking effect #4378

Open
martinwork opened this issue Sep 22, 2021 · 1 comment

Comments

@martinwork
Copy link
Contributor

Describe the bug
It looks like the Bluetooth settings are not being set correctly for the hex compilation. For example, choosing passkey pairing does not result in a passkey being required.

Failure to require a passkey was not the original reported issue, but was one I could repeat. The original report was that a passkey was required even though just works was selected, and that micro:bit appeared not to be using a secure connection. Further details: lancaster-university/microbit-dal#481

Everything seems to behave as expected using https://makecode.microbit.org/v2.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://makecode.microbit.org/'
  2. Click on 'New project' and give it a name
  3. Add the Bluetooth extension
  4. Enter code below
  5. Go to Settings and choose "passkey pairing"
  6. Download using a full flash by saving to the MICROBIT drive
  7. Enter pairing mode and bond with nRF Connect (for example)
  8. See error - no passkey required
bluetooth.onBluetoothConnected(function () {
    basic.showString("C")
})
bluetooth.onBluetoothDisconnected(function () {
    basic.showString("D")
    basic.pause(5000)
    basic.clearScreen()
})
bluetooth.startAccelerometerService()

Expected behavior
The Settings should affect the compiled hex.

Screenshots
Add screenshots to help explain your problem. You can copy paste the screenshot in the github report. The .gif screen recording is very useful as well.

micro:bit version (please complete the following information):

micro:bit V1.5. Repeated some aspects with a micro:bit V2.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows, iOS, Android
  • Browser [e.g. chrome, safari] Windows Chrome
  • Version [e.g. 22] NA

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] iPad Air 2, Samsung SMT-580
  • OS: [e.g. iOS8.1] iOS 14.8, Android 8.1
  • Browser [e.g. stock browser, safari] NA
  • Version [e.g. 22] NA

Additional context
Add any other context about the problem here.

@martinwork
Copy link
Contributor Author

The change to settings takes effect after switching to the home page and reloading the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants