Skip to content

Conversation

@microbit-matt-hillsdon
Copy link

@microbit-matt-hillsdon microbit-matt-hillsdon commented Dec 17, 2025

TODO:

Before it's good enough to merget to the apps branch as a demo:

  • Fix playwright tests

  • Initial pair and download works either for data collection hex or MakeCode hex but other scenarios fail, including typical end to end use. I've seen multiple pairing dialogs that make no sense as we should already be paired. What's going on? Is it a service discovery thing? Better logging is needed.

  • Flashing progress

    • There's a really poor experience when you click "next" on the BT pattern and we don't give progress for ages because we're
      doing pre-flashing bits of the flow. We need an integrated notion of progress, worth bottoming out before we move the code.
  • The current shared error handling is mistitled and errors when you uses it. Fix it to at least let you try again.

  • Test the web flows, including on V1

  • Test on Android and note but defer any Android specific issues

In follow up changes / new issues

  • Can we get PF and DFU in application mode in the data collection hex and still stick with MakeCode? Some CODAL config fu or C++? For discussion as it's confusing that the end state in Bluetooth and data collection modes is identical.

  • Error scenarios (largely new from flashing):

    • So many! We need to have structured error handling mapping to UI/text. There are useful messages/scenario breakdowns in the proof-of-concept app to pull into this TODO.
  • Figure out relationship to microbit-connection. Seems increasingly like the code should move there, maybe as a temporary branch until the dust settles. Could we use Capacitor's web implementation for Bluetooth? We have a few hairy workarounds though. What about non-Foundation clients? Is it an acceptable dependency? Maybe an optional dependency/separate package?

  • Improve the reset dialog

    • Decide on wording
    • Translation
    • Better GIF
    • A+B reset case or punt that to when we focus on V1
  • Introduce a step about pairing like the current mobile app

  • Improve the factoring of the download/connection flows... it's very hard to follow the different cases. Maybe we need a separate set of states for each of radio/web BT/native BT?

Known limitations

  • Until we reconcile with the microbit-connection:
    • Button B to record doesn't work
    • Reconnection doesn't work (e.g. after reset or disconnect from the button on the graph)

This version is a bit messy but will DFU flash the data collection hex.  Needs
more dialog steps, progress, feeedback on success/fail.  Having said that, I'm
going to go straight for reconnecting for the accelerometer data.
@github-actions
Copy link

Preview build will be at
https://review-createai.microbit.org/capacitor-ble/

It needs to become richer to deal with the multi-stage process and
indeterminate parts but we'll revisit that later.

NPM script for hot reload
This will significantly improve the apps experience as it will allow full
flashes to be avoided completely if you already have a MakeCode hex on the
micro:bit and in any case for the data collection - MakeCode transition.

This change also means that we now support Bluetooth mode for the data
collection hex. There's some risk of confusion and we might discuss this
further but on balance it's probably better if flashing always works the same
way.

This should significantly help development speed on the app as we can flash
over this hex.

I've added just-works variants for mobile as the UI flows really expect pairing
to happen so it's better for us not to contribute toward it unexpectedly not
happening... though we can't control this completely as it's about the hex
already on the device.

This one might be worth splitting out and applying to main but applying here
for now.

To revisit: I'd also like to merge Carlos's uhex tool and automate the
splitting of the MakeCode hex here.
It's useful to have enums for the possible BLE values - these are not opaque identifiers which is what the rule assumes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants