vedderb / vesc_tool

The source code for VESC Tool. See vesc-project.com
GNU General Public License v3.0
702 stars 516 forks source link

Windows version Bluetooth connections not possible #197

Open surfdado opened 2 years ago

surfdado commented 2 years ago

Bluetooth connections from a Windows PC don't work. Not for me, not for anybody I know of. From Linux however it is no problem... So Windows users are forced to use the TCP bridge via Android app. Which works just fine, if you own an Android phone...

Maybe this is a known issue and maybe it's by design, but I thought I'd file an "Issue" anyway :)

Teslafly commented 2 years ago

This is due to qt not supporting bluetooth on windows on earlier versions. With qt5.15 it does have native support, but it needs to be enabled and I think that bluetooth works different on Linux vs windows in the backend so you have to handle both cases.

https://doc.qt.io/qt-5/qtbluetooth-index.html

So it is probably possible to enable Bluetooth support in windows now, but it will take a bit of work. I have looked into it but do not understand qt well enough to get that working at this point.

Though an error message saying that Bluetooth doesn't work on windows would definitely be nice until support is added. and even if added, bluetooth LE isn't supported on windows 7 (only win 8+). Which is the bluetooth type the vesc adapter uses. so we will need an error message for that case.

Teslafly commented 2 years ago

looks like some more info here: https://www.vesc-project.com/node/2606

surfdado commented 2 years ago

I agree that a little popup message would be a huge improvement and save many hours of trial and error, frustration, and self doubt :)

Jfriesen222 commented 2 years ago

if you compile the tool with MSVC 2017 the bluetooth works. It's just not possible (or at least easy) to cross compile from linux though which makes more work for Ben. For this release I might make a MSVC binary for Ben to use. I wonder if windows 11 will be less annoying with BLE.

Teslafly commented 2 years ago

Would it be possible to set up a ci pipeline that spins up a windows vm and spits out an exe whenever a merge to dev or master is made? That would probably make it a lot easier. And also easier to test new developments if you don't have qt installed.

Edit: looks like this might be possible in a docker container, which play well with ci pipelines.

Jfriesen222 commented 2 years ago

that's above my paygrade

Teslafly commented 1 year ago

Bluetooth has been enabled for windows and works with windows compiled qt in the current beta. The beta version from vesc-project.com works too. and I assume that's the cross compiled version.

Note, you must connect to the vesc bluetooth module in windows bluetooth manager first. Then scan/connect in vesc-tool.

Current issues with windows bluetooth:

surfdado commented 1 year ago

Wow, that's a lot of issues hahaha - but nonetheless this is amazing news, thanks guys!!!