https://twitter.com/ooba/status/1142967014761254912
According to this tweet, a recent firmware update changed Boost port IDs:
A 0, B 1, C 2, D 3
Therefore old IDs (defined at https://github.com/LLK/scratch-vm/blob/develop/src/extensions/scratch3_boost/index.js#L96 ) won't work. However, if the firmware is not updated, old IDs must be used - so it's hard to define it as constant.
@apple502j Thank you for alerting us to this tweet! Do you have a LEGO Boost with the latest firmware?
Nope sorry @evhan55
@apple502j Okay, thank you for letting us know!
@ericrosenbaum
I have tested the latest LEGO Boost Firmware 2.0.00.0017 and it seems that the motor ports did indeed change from:
A: 55,
B: 56,
C: 1,
D: 2
to:
A: 0,
B: 1,
C: 2,
D: 3
It looks like the Boost connect behavior has changed as well and is not incompatible with the Scratch 3 / Scratch Link connection flow as currently designed for Boost, and other miscellaneous sensor values seem to give errors in the console. It might be best to open a new issue to track all of these changes together (or as separate issues?)...
@apple502j Thank you! It seems you are correct about this being a critical bug in the Scratch 3 LEGO Boost extension! Thanks for bringing this issue to our attention.
Some issues I noticed so far in preliminary testing:
Blocks now work
Motor blocks are not working since internal port IDs got remapped:
motor A option affects nothingmotor B option affects nothingmotor C option affects port Bmotor D option affects port C
Setting LED light with set color block works, but it gives a warning in the console about a sensor value not being correct
@cwillisf @ericrosenbaum To update to the latest Boost firmware:
Thanks for reporting this @apple502j and for doing some great initial investigation @evhan55!
BlueSee). I noticed that with the new firmware, the hub now advertises with two UUIDs rather than just one - let's call them UUID-A and UUID-B.UUID-A:
UUID-B:
I'm pretty sure what's happening is that Scratch discovers UUID-A before UUID-B and attempts to connect to it, but it won't succeed. This leaves Scratch Link hanging (I tried waiting for a few minutes and it doesn't time out).
I see two different strategies to solve this:
Implement https://github.com/LLK/scratch-link/pull/120: Since only the functioning UUID-B has advertisement data, this would be a way of filtering. Additionally if the data is available to scratch-vm, this will enable us to detect firmware version since it's exposed in the advertisement data.
Exclude the faulty UUID: UUID-A seems to always be C573261D-EBC8-4A0E-B3C5-1748074583DF, so we could find a way to exclude that.
This seems to be correct. The constant could simply be changed to reflect the new mapping.
It seems that the LED now gives feedback when commands have been issued to it. We're missing a case for that, so adding a simple case BoostIO.LED in _onMessage() -> BoostMessage.PORT_VALUE should solve that.
Motor/port-issues fixed in #2215. Closing this issue since the remaining connection-issues are addressed in a separate issue #2230.
Most helpful comment
Some issues I noticed so far in preliminary testing:
Blocks now work
Motor blocks are not working since internal port IDs got remapped:
motor Aoption affects nothingmotor Boption affects nothingmotor Coption affects port Bmotor Doption affects port CSetting LED light with
set colorblock works, but it gives a warning in the console about a sensor value not being correct