Bluetooth with music - error 070
Describe the bug Using Bluetooth and music in the program produces error 070.
To Reproduce Steps to reproduce the behavior:
- Download the program below using the latest MakeCode version (makecode.microbit.org version: 8.0.16, Microsoft MakeCode version: 12.0.16, microbit runtime version: v2.2.0-rc6, codal-microbit-v2 runtime version: v0.3.2)
- Press the A button a few times.
- The error 070 appears.
music.setVolume(20)
bluetooth.startUartService()
let pressedA = false;
while (true) {
basic.pause(20)
if (input.buttonIsPressed(Button.A)) {
if (!pressedA) {
pressedA = true
music.ringTone(Note.C)
}
} else {
if (pressedA) {
pressedA = false
music.stopAllSounds()
}
}
}
Expected behavior No error.
Screenshots
micro:bit version (please complete the following information): V2 and V2.21
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Chrome
- Version: 141.0.7390.67
Smartphone (please complete the following information):
Additional context Works fine on MakeCode v7.1.47.
@aorczyk Do you have to Bluetooth pair to see the error? Download a project without the Bluetooth extension to reset pairing.
This project is built with MakeCode v3 https://makecode.microbit.org/_35gY6y2y0hwU
The error doesn't seem to happen when it's built with MakeCode v3, v6, or v7 - only with v8.
@aorczyk Can you confirm it's OK with MakeCode v7?
This project fails too (forever instead of while) https://makecode.microbit.org/_PADW6xJLebUk
I'll make a C++ test.
v7: makecode.microbit.org version: 7.0.61 Microsoft MakeCode version: 11.1.14 codal-microbit-v2 runtime version: v0.2.68
v8: makecode.microbit.org version: 8.0.17 Microsoft MakeCode version: 12.0.16 codal-microbit-v2 runtime version: v0.3.2
@martinwork
-
No. The error appears even when Bluetooth is not paired (I mean not connected to a computer, only visible from it). When the option “No Pairing Required: Anyone can connect via Bluetooth.” is not enabled in the program settings, the micro:bit is not visible to the computer, and the program works.
-
Yes. It’s fine with v7. I can connect the micro:bit via Bluetooth, music works, and the error does not appear.
I have the same error using V8. Removing the music blocks resolved the 070 error. I tried downgrading the firmware without a benefit.
Thanks @aorczyk "visible to the computer" makes sense. If it is "no pairing required" or paired, then it is advertising. That made it easier to test different versions! https://github.com/lancaster-university/codal-microbit-v2/blob/master/source/bluetooth/MicroBitBLEManager.cpp#L490
I have created a CODAL issue. https://github.com/lancaster-university/codal-microbit-v2/issues/506
Reported in support ticket https://support.microbit.org/helpdesk/tickets/94150 (private)