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

LEGO BOOST Move Hub firmware 2.0.00.0017 breaks connection flow #2230

Closed
knandersen opened this issue Jul 11, 2019 · 3 comments
Closed

LEGO BOOST Move Hub firmware 2.0.00.0017 breaks connection flow #2230

knandersen opened this issue Jul 11, 2019 · 3 comments
Assignees
Labels

Comments

@knandersen
Copy link
Contributor

Expected Behavior

LEGO BOOST Move Hubs should appear with advertisement data and be connectable.

Actual Behavior

As mentioned in #2215, with the recently released firmware version 2.0.00.0017, BOOST Move Hubs appear in a seemingly improperly initialised state for a few seconds before properly advertising. If Scratch Link on the host device (e.g. MacBook, PC) detects it before it's properly initialised it will attempt to connect to it and fail since the hub does not have a valid MAC-address.

Steps to Reproduce

  1. Install LEGO BOOST Move Hub firmware version 2.0.00.0017
  2. Attempt to connect to the hub through Scratch 3.0 using latest Scratch Link (version 1.1.46 at time of writing)
  3. Scratch 3.0 will most likely remain in a state of 'Connecting...' forever

It is possible, if the host device has a slow BLE stack that it won't see the Move Hub before it's properly initialised. In that case it will connect.

@knandersen
Copy link
Contributor Author

knandersen commented Jul 11, 2019

We have identified two solutions to this problem:

  1. New firmware that prevents the Move Hub from advertising the non-connectable MAC-address would solve this problem without any changes to scratch-vm or scratch-link
  2. By providing scratch-link a filter to only connect to Move Hubs that have the appropriate BLE advertising data, it will never attempt to connect to the non-connectable MAC-address. This would require Feature/advertisementdata scratch-link#120 to be implemented for all supported platforms, and a filter must be provided by the LEGO BOOST extension, similar to what's currently commented out in the extension: https://github.com/LLK/scratch-vm/blob/cc04fb0994e90b7775582e11982f65de72e8a828/src/extensions/scratch3_boost/index.js#L804-L810

@knandersen
Copy link
Contributor Author

knandersen commented Jul 11, 2019

Blocked by scratchfoundation/scratch-link#120

@knandersen knandersen self-assigned this Jul 12, 2019
@knandersen knandersen added the bug label Jul 12, 2019
ijache pushed a commit to ijache/pylgbst that referenced this issue Aug 11, 2019
- Skipping Device without Mac-Address
(Seems to occur randomly after Firmware-Update,
referring to scratchfoundation/scratch-vm#2230 )
- Fixed racecondition in Hub.send()
(Reply could come before entering _sync_lock)
undera pushed a commit to undera/pylgbst that referenced this issue Aug 12, 2019
* - Updated Port-Numbers (New Firmware 2.0.00.0017)
- Skipping Device without Mac-Address
(Seems to occur randomly after Firmware-Update,
referring to scratchfoundation/scratch-vm#2230 )
- Fixed racecondition in Hub.send()
(Reply could come before entering _sync_lock)

* - fixed Unit-Tests (Changed Port-Numbers)
- moved the write-call in hub.send() outside the lock
@knandersen
Copy link
Contributor Author

For some reason this issue was not closed when the associated PRs were merged.

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

1 participant