PeterStaev / lego-spikeprime-mindstorms-vscode

Helps you connect and work with Lego's SPIKE Prime/MINDSTORMS Robot Inventor hubs
Apache License 2.0
64 stars 22 forks source link

Connection to Spike Prime HUB fails over USB without error message #63

Open UnknownRaisin opened 10 months ago

UnknownRaisin commented 10 months ago

Hi all,

sadly I am not able to connect my hub to VS Code, while connecting to Spike App ( Lego Education) works fine.

Error Message: grafik

Could anyone help me please to connect the hub device to the VSCode? I didn'nt find any helpfull advices for this case online, sry.

Thank you!

PeterStaev commented 10 months ago

Hey @UnknownRaisin , can you please open the Output window of VSCode, change from the top right drop down to Extension Host and see if there are any errors regarding the extension.

Also make sure when connecting you have selected the correct COM port.

UnknownRaisin commented 10 months ago

Hi @PeterStaev, first of all thanks a lot for your help. I did what you told me to do. Here a screenshot: grafik

Also with the COM5, I just doublechecked, and it seems to be the correct COM....

PeterStaev commented 10 months ago

@UnknownRaisin what method of connection are you using - USB or Bluetooth?

UnknownRaisin commented 10 months ago

@PeterStaev I tried both, while trying to connect via Bluetooth there is following issue: It connects perfectly via the SPIKE IDE. but if I try to connect the HUB directly via Bluetooth, it recognize it but there is a Error Message. The case I did show you was while using USB, without Bluetooth.

OFERAC commented 9 months ago

Im having the same issue! Any fixes? @PeterStaev

PeterStaev commented 9 months ago

Sadly I do not know what might be causing the problem. Also I do not have a Win11 setup on which I can test this. On Win10 I never had problems (if I have selected the right COM port :))

UnknownRaisin commented 9 months ago

@PeterStaev If you tested it on Win10, and in your documentation you did write that you tested it on MAC too. Have you also tested it on any Linux version? if yes, could you recomend any? or do you have a list? in that case I would like to try it this way. Since I still couldn't make it work on Win 11 (and yes I had 100% the right com ;-) - I suppose it is a Win 11 issue)

PeterStaev commented 9 months ago

@UnknownRaisin , sadly I'm not a linux guy, so no, can't recommend any. But I've seen on linux people complain about other problems/specifics specifically for bluetooth: https://github.com/PeterStaev/lego-spikeprime-mindstorms-vscode/issues/27#issuecomment-1157813751

PeterStaev commented 9 months ago

I've just connected the HubOS to a Win11 VM, and the plugin works fine. By any chance you are running on the new HubOS 3 instead of the legacy HubOS 2?

b3rgman commented 9 months ago

I'm having issues connecting via USB and Bluetooth as well. I am on MacOS Sonoma 14.2 USB tells me Resource is busy and Bluetooth fails to connect. Spike Prime version is 3.4.0 and HubOS shows 1.3.26 with no updates available.

Edit2: Again I realized thsat my SPIKE app was not updated. It has been updated to version 3.4.3. HubOS shows 1.6.62.

Edit: I just realized that I had spike open in the background and that is why device was busy. I closed spike and vscode. I reopened VSCode and get this error for USB

image

PeterStaev commented 9 months ago

@b3rgman HubOS3 is not supported currently. Follow #55 for when it will be added.

UnknownRaisin commented 9 months ago

I've just connected the HubOS to a Win11 VM, and the plugin works fine. By any chance you are running on the new HubOS 3 instead of the legacy HubOS 2?

Hi @PeterStaev - thats may be possible, I did indeed let the Lego IDE install the newest HUBOS on it So I now first set back the firmware and then downgraded the HUBOS on following spikelegacy HUBOS Downgradeing Tool from Lego I will try to connect it now !

b3rgman commented 9 months ago

@PeterStaev, Thank you for the info. I also heard they were going to stop supporting Python but there was a large uproar and they brought it back. In the current Spike 3.4.3, it is supported.

I am not a fan of downgrading to HubOS 2. We are actively using these hubs for FLL tournaments. I did see pybricks but I am not sure if that is sanctioned. I'll remove the extension for now and wait for HubOS 3 support.

PeterStaev commented 9 months ago

@b3rgman , keep in mind that pybricks is also not supported by this extension. You can follow #26 for support for that :)

It would be a shame if they stopped supporting python IMO. Hopefully they never do it.

b3rgman commented 9 months ago

Understood. I don't think python is going anywhere with Spike. I heard starting this year you can now use Python for FRC instead of Java.

OFERAC commented 9 months ago

@b3rgman HubOS3 is not supported currently. Follow #55 for when it will be added.

That is why, my hub is V3, my bad

b3rgman commented 9 months ago

@itztantr2 Im using functions from HubOS3 in my robot game. I wanted to teach the students Python but want to use VSCode due to not liking the SPIKE interface for such task.

All we can hope for is that this extension is ported to HubOS3.

OFERAC commented 9 months ago

Well I just downgrade all my classrooms hubs since it seems spike OS2 is better for competition due to function such as equilibrium control and motor differentiation that they remove in OS3 for some reason

Chiraphon Tan Suphagrum

On Wed, 31 Jan 2567 BE at 21:32, Josh B @.***> wrote:

@itztantr2 https://github.com/itztantr2 Im using functions from HubOS3 in my robot game. I wanted to teach the students Python but want to use VSCode due to not liking the SPIKE interface for such task.

All we can hope for is that this extension is ported to HubOS3.

— Reply to this email directly, view it on GitHub https://github.com/PeterStaev/lego-spikeprime-mindstorms-vscode/issues/63#issuecomment-1919223401, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCNWPRDKTRDFLUAST6UZYLLYRJIYFAVCNFSM6AAAAABBWAU6NWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJZGIZDGNBQGE . You are receiving this because you were mentioned.Message ID: @.*** com>

b3rgman commented 9 months ago

Interesting @itztantr2. Mine were upgraded automatically when the original SPIKE app was called legacy. When I am done competing I may look into this approach.

UnknownRaisin commented 9 months ago

@PeterStaev could it be possible, to get a list of what schould bi installed/ done so that it works fine? Maybe I'm missing a step. That would be really nice! Thanks a lot in advance

PeterStaev commented 9 months ago

@UnknownRaisin there is nothing to be installed on your computer except this extension. But the hub should be running on HubOS2 as v3 is not supported. If you are already on v3 LEGO provides a tool to downgrade to v2 (haven't used it personally): https://spikelegacy.legoeducation.com/hubdowngrade/#step-1

OFERAC commented 9 months ago

@PeterStaev The downgrade solution you provided can no longer be perform on window PC. I suggest doing this instead https://youtu.be/3pm6iOUBn8E?si=TMsZ6TUOGNdYtUKi