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

Timing between app and Calliope mini with Just Works pairing #22

Closed
joernalraun opened this issue Oct 6, 2023 · 3 comments
Closed

Timing between app and Calliope mini with Just Works pairing #22

joernalraun opened this issue Oct 6, 2023 · 3 comments

Comments

@joernalraun
Copy link
Collaborator

When pairing mode is on "Easy" e.g. Just Works pairing in Beta-MakeCode the app hangs when trying to flash a hex. It works, when Calliope mini is then clicked on reset – or if the transfer within the app is stopped a restarted. So it seems that there is just a timing issue within the connection between both devices (the app tries to send data before the Calliope mini is restarted/in dfu mode).

@TAKeanice
Copy link
Collaborator

If I remember correctly there is indeed a fixed delay because the Calliope connects in flash mode before it is able to receive data. We can make this longer and see if it helps.

@Amerlander
Copy link

In my tests the pairing itself worked, it is only a small tweak required to make it work:

  1. User starts flashing for the first time.
  2. App aks for a pairing
  3. User presses accept button
  4. Mini shows Check on the display.
  5. Pairing was now sucessfull, but the mini need another restart to start flashing.
  6. The App does not send a "restart to dfu" command to the mini and starts sending the hex data instead
  7. Some bytes arive, but the flashing process stops (when the mini decides to stop showing the checkmark)
  8. The app hangs while showind some % of progress.
  9. To fix, the user has to Cancel the process and initiate the flashing process again - it will work now (unless Program already transferred #23 is not kicking in and the user has to change the program first)

To fix this it would be enough to just change step 6 and make sure the mini is restarted into dfu mode again before the actuall flashing process starts. If it cant be done programatically a popup could ask the user to restart the mini when he sees a checkmark on the screen and confirm to continue the flashing process.

@joernalraun
Copy link
Collaborator Author

Postponed, because of reverted state of Makecode Bluetooth settings.

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

No branches or pull requests

5 participants