vesc_tool icon indicating copy to clipboard operation
vesc_tool copied to clipboard

CAN device type enumeration fails when connected via UDP

Open Zob314 opened this issue 2 years ago • 0 comments

Steps to reproduce

  1. Open VESC tool and connect to device with other devices on the CAN network
  2. Go to the Connections->UDP tab and start the UDP server
  3. Open a new VESC tool, go to Connections->UDP and connect to the running UDP server
  4. All devices in the CAN-Devices table show as Unknown: devices (not VESCs)

More information

I tried the same steps to reproduce but using TCP instead of UDP and the CAN-Devices table was populated as expected.

I dug into what was happening a little and it seems like VescInterface::udpInputDataAvailable() isn't getting called when MainWindow::pingCanRx() is trying to get firmware versions. Looking at Wireshark the UDP packets with version info are being sent soon after the version info is requested. VescInterface::udpInputDataAvailable() does get called after MainWindow::pingCanRx() returns due to timeout, and version info packets are correctly processed, but MainWindow::pingCanRx() is no longer waiting for them. I believe this is an issue with threading / signal handling, but wasn't able to find a fix myself.

Zob314 avatar Jan 17 '23 17:01 Zob314