VESC_TOOL 0.87 (and not 0.84) has support for something called "BLUEZ". I suspect it has something to do with bluetooth. I've never used bluetooth,
So when I start vesc_tool, I have to wait 30 seconds for the message: "Cannot find a running Bluez. Please check the Bluez installation.".
So... for the todolist: Either: Speed up the detection of the "running bluez". But I suspect that htis is just a library call. The library assumes that the calling app has no business running if the connection cannot be found, so waiting is reasonable.
The workaround would be to detect: bluez not found last time, require user interaction to retry the connection....
Bluez is the 'official' Linux Bluetooth stack. What OS are you using?
Linux. Ubuntu.
The message indicates that I don't have BLUEZ installed. The reason is: I don't use bluetooth. So that makes sense. But at times I have to restart VESC_TOOL a few times in a row and if it takes 30 seconds to start up, that's a waste-of-time.
This is probably because of the added BLE support, which is build into Qt. I haven't experienced any delay myself when starting on a computer without bluetooth on a default ubuntu installation, but I will have a look.
I have the same problem.
I'm using a VESC Tool built by myself on a Linux Mint 18.1 machine. I don't seem to be able to attach a file to this post, but I've added a patch below that hides the problem for me. It seems to be the call to "new QBluetoothDeviceDiscoveryAgent(this);" that triggers the delay.
(I don't know why the forum decides to format only half of the code-tagged text as monofont - oh well...)
diff --git a/bleuart.cpp b/bleuart.cpp
index 53f4229..277383a 100644
--- a/bleuart.cpp
+++ b/bleuart.cpp
@@ -32,7 +32,7 @@ BleUart::BleUart(QObject *parent) : QObject(parent)
mServiceUuid = "6e400001-b5a3-f393-e0a9-e50e24dcca9e";
mRxUuid = "6e400002-b5a3-f393-e0a9-e50e24dcca9e";
mTxUuid = "6e400003-b5a3-f393-e0a9-e50e24dcca9e";
-
+/*
mDeviceDiscoveryAgent = new QBluetoothDeviceDiscoveryAgent(this);
connect(mDeviceDiscoveryAgent, SIGNAL(deviceDiscovered(const QBluetoothDeviceInfo&)),
@@ -40,12 +40,13 @@ BleUart::BleUart(QObject *parent) : QObject(parent)
connect(mDeviceDiscoveryAgent, SIGNAL(error(QBluetoothDeviceDiscoveryAgent::Error)),
this, SLOT(deviceScanError(QBluetoothDeviceDiscoveryAgent::Error)));
connect(mDeviceDiscoveryAgent, SIGNAL(finished()), this, SLOT(scanFinished()));
+*/
}
void BleUart::startScan()
{
mDevs.clear();
- mDeviceDiscoveryAgent->start();
+ //mDeviceDiscoveryAgent->start();
}
void BleUart::startConnect(QString addr)
@arvidb you are welcome to create a pull request https://github.com/vedderb/vesc_tool/pulls
Thanks, but I don't think you would want this patch in the official code? It "fixes" the problem rather heavy-handedly by commenting out the scan for Bluetooth devices completely. So it's more of a quick fix, and for showing others where the problem lies.