Skip to content

Fix android connection fail after flashing#699

Merged
microbit-grace merged 5 commits into
appsfrom
post-flash-connect
Jan 22, 2026
Merged

Fix android connection fail after flashing#699
microbit-grace merged 5 commits into
appsfrom
post-flash-connect

Conversation

@microbit-grace

@microbit-grace microbit-grace commented Jan 21, 2026

Copy link
Copy Markdown
  • Shorten delay post-flash to 1 sec for reboot
  • Upgrade microbit-connection library to retry connection multiple times and to ensure services are discovered

Hopefully this is enough to not seem like a hang.
@github-actions

Copy link
Copy Markdown

Preview build will be at
https://review-createai.microbit.org/post-flash-connect/

@microbit-grace microbit-grace marked this pull request as draft January 21, 2026 14:03
Comment thread src/data-connection-flow/data-connection-actions.ts Outdated
Works for both iOS and Android. 750ms or less does not work on Android.
@microbit-grace microbit-grace marked this pull request as ready for review January 21, 2026 15:32
@microbit-grace microbit-grace marked this pull request as draft January 21, 2026 16:54
@microbit-grace

microbit-grace commented Jan 21, 2026

Copy link
Copy Markdown
Author

Waiting to upgrade connection library once this fix is in: microbit-foundation/microbit-connection#78

Update: Done

@microbit-grace microbit-grace changed the title Fix android connection fail after partial flashing Fix android connection fail after flashing Jan 21, 2026
@microbit-grace microbit-grace marked this pull request as ready for review January 22, 2026 09:22
Comment on lines +342 to +343
// If we try to reconnect too soon then we'll time out as it'll still be booting.
await new Promise((resolve) => setTimeout(resolve, 1000));

@microbit-grace microbit-grace Jan 22, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android needs more than 750ms otherwise it would disconnect after connecting (assuming due to reboot). Seems to work for 1000ms.

On iOS, 1000 ms works as well.

@microbit-matt-hillsdon microbit-matt-hillsdon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working well, thanks!

@microbit-grace microbit-grace merged commit d8a2fd7 into apps Jan 22, 2026
3 checks passed
@microbit-grace microbit-grace deleted the post-flash-connect branch January 22, 2026 09:45
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