CAN device type enumeration fails when connected via UDP
Zob314 opened this issue · comments
Steps to reproduce
- Open VESC tool and connect to device with other devices on the CAN network
- Go to the Connections->UDP tab and start the UDP server
- Open a new VESC tool, go to Connections->UDP and connect to the running UDP server
- 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.