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

Support for HubOS 3 #55

Open
Strohgelaender opened this issue Feb 7, 2023 · 14 comments
Open

Support for HubOS 3 #55

Strohgelaender opened this issue Feb 7, 2023 · 14 comments
Labels
enhancement New feature or request

Comments

@Strohgelaender
Copy link

In December 2022, Lego released a new HubOS and Spike Prime Version v3.

After upgrading to HubOS 3, we were no longer able to connect the brick with VS Code using this extension. Reverting back to HubOS 2 resolved the issue.

Will there be support for HubOS 3+? Or do I need to stay on version 2 in order to continue using VSCode for programming python?

@PeterStaev
Copy link
Owner

Hey @Strohgelaender , I haven't updated personally my hub, since it is the Mindstorms one, and don't want to brake it :) But from what I read on the LEGO's site Python is currently not support on v3 and is expected to land in early 2023. I suspect this might be part of the problem. Also I suspect that they changed their API. Since I've used the reverse engineering done by other on the v2 API, I'm not sure if/when the extension will support v3.

In short - for now your best bet is to stick with v2.

@ffernn-dev
Copy link

Anyone know if there's a way to downgrade a Spike Prime to V2?

@MrGibbage
Copy link

The newest v3.2.4 Spike App (hub OS 1.2.107) has python (you have to go into the settings to enable python). It's my understanding the 3.2.4 uses bluetooth low energy, so I don't know how to get the windows COM port number since they aren't displayed the same way regular bluetooth devices are. I think if we can crack that nut, then we will be in business again.

@MrGibbage
Copy link

Anyone know if there's a way to downgrade a Spike Prime to V2?

@ffernn-dev
If using windows, it seems the only way is to use pybricks:
https://www.youtube.com/watch?v=3pm6iOUBn8E

@ffernn-dev
Copy link

ffernn-dev commented May 13, 2023

The newest v3.2.4 Spike App (hub OS 1.2.107) has python (you have to go into the settings to enable python).

Yeah I saw this, but a lot of the functions seem to have been removed or renamed. Any unofficial documentation I found for version 2 doesn't work anymore haha

@MrGibbage
Copy link

True. I have also seen this. There are some interesting new functions too. And the documentation has not caught up yet. I wonder if it is still a work in progress???

@MrGibbage
Copy link

If this is going is going to take a revision to the plugin (pretty likely, I think), I would like to toss in a feature request. This is all based on the user experience with regular BT, so this could all change given the new BTLE usage. For my situation, I coach an FLL team and we have seven laptops and robots for practice. Most of the time a single team member will use the laptop and robot assigned to them. But from time to time a laptop will be used to control a different robot than the one assigned. What that means is the list of BT COM ports gets longer and longer. And with an incoming and outgoing port for each hub, the list is twice as long as it needs to be. It would be great if the list could first of all, only show the outgoing ports because that is the port needed to upload the code. Also, it would be great if the list would show at least the MAC address (prehaps last four) or even better, perhaps show the robot name. Just think about it.
In any case, count me in if you need any help with testing or have questions about how teams are using your code.

@PeterStaev
Copy link
Owner

@MrGibbage please post new feature request as new issues. This issue is specifically for HubOS3 support. Added your comments to a separate task, so we will keep any conversation there.

@dsplaisted
Copy link

As of the recently released version 3.3.0 of the Lego Spike App, Python programming support is available again. Any update on supporting HubOS 3 from the VS Code extension? It looks like the extension is based on https://github.com/sanjayseshan/spikeprime-tools for connecting to the hub, do you know if anyone has even figured out how to connect to HubOS 3 programmatically?

@PeterStaev
Copy link
Owner

For anyone willing to downgrade, seems LEGO provide an online tool to do this: https://spikelegacy.legoeducation.com/hubdowngrade/#step-1

Haven't tried this personally.

@PeterStaev
Copy link
Owner

For the record - I've sent a message on X to the LEGO group asking if they are willing to provide API docs for HubOS3 communication so the extension can be updated. So far no response form them yet :(

@b3rgman
Copy link

b3rgman commented Jan 31, 2024

They don't seem to make any of it public.

@Strohgelaender
Copy link
Author

Lego released an official HubOS 3 communication protocol documentation under https://lego.github.io/spike-prime-docs/index.html

See https://github.com/LEGO/spike-prime-docs for the repository and https://github.com/LEGO/spike-prime-docs/tree/main/examples/python for a python example program.

@PeterStaev
Copy link
Owner

Nice find! I will review and when time permits see to update the extension.

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

No branches or pull requests

6 participants