Getting "XL_ERR_QUEUE_IS_EMPTY" when connecting to Vector VN1630A
-
It does not matter , because the queue is empty.
And I notice that CAN bus status is Unknown, so can you receive CAN-FD message ?
I try to receive CAN-FD message but fail, did you encounter this problem ?Best Regards
-
Hi @Shadow_3102,
your problem with receiving CAN FD frames seems related to https://forum.qt.io/topic/132636/opensurce-qt6-2-vectorcan-can-not-receive-and-send-can-fd-message
Regarding the "XL_ERR_QUEUE_IS_EMPTY", well that should not appear as error in the status line, agreed.
I also wonder why the CAN bus status is Unknown. Unfortunately I don't have Vector hardware to check.
Regards
-
@aha_1980 hi, aha_1980, the topic you metioned is posted by me , hahaha .
And you can see my latest comment in the topic to know why the queue is empty.
In conclude, when receiving can fd message, Qt use wrong way to parse it .
You can see following code in startRead() in vectorcanbackend.cpp in Qt source file.
Wrong usages:
QCanBusFrame frame(**msg.id** & ~XL_CAN_EXT_MSG_ID, frame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(event.timeStamp / 1000)); frame.setExtendedFrameFormat(**msg.id** & XL_CAN_RXMSG_FLAG_EDL); frame.setFrameType((**msg.flags** & XL_CAN_RXMSG_FLAG_RTR) ? QCanBusFrame::RemoteRequestFrame : (**msg.flags** & XL_CAN_RXMSG_FLAG_EF) ? QCanBusFrame::ErrorFrame : QCanBusFrame::DataFrame);
Correct usages:
QCanBusFrame frame(**msg.canId** & ~XL_CAN_EXT_MSG_ID, frame.setTimeStamp(QCanBusFrame::TimeStamp::fromMicroSeconds(event.timeStampSync / 1000)); frame.setExtendedFrameFormat(**msg.canId** & XL_CAN_RXMSG_FLAG_EDL); frame.setFrameType((**msg.msgFlags** & XL_CAN_RXMSG_FLAG_RTR) ? QCanBusFrame::RemoteRequestFrame : (**msg.msgFlags** & XL_CAN_RXMSG_FLAG_EF) ? QCanBusFrame::ErrorFrame : QCanBusFrame::DataFrame);
BRs//Hengtai