Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.0 Alpha, 6.2.0 Beta1
-
None
-
PCAN-USB Hardware from Peak
-
-
117e99dffd800780e3f29f5d88c1cb171739ad50 (qt/qtserialbus/dev) 9e69d0697420409d671bcaf41efa443688b9b5d6 (qt/qtserialbus/6.2)
Description
I have a CAN bus application that has been working well in Qt 5 (latest Qt 5.15.2). I'm having issues with Qt 6.2.0 Alpha and Beta1.
With an external CAN node connected and periodically transmitting, a QCanBusDevice on the PC Qt App is initialized and connected. CAN frames can be read once using QCanBusDevice::readAllFrames(), but subsequently, no further CAN frames are available.
Minimal example code below (readAllFrames() is not used in this example):
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); QString errorString; // device is a QCanBusDevice* device = QCanBus::instance()->createDevice( QStringLiteral("peakcan"), QStringLiteral("usb0"), &errorString ); device->setConfigurationParameter(QCanBusDevice::BitRateKey, 500000); device->connectDevice(); // timer is a QTimer* timer = new QTimer(); timer->setInterval(100); connect(timer, SIGNAL(timeout()), this, SLOT(timerSlot())); timer->start(); } void MainWindow::timerSlot() { qDebug() << device->busStatus() << device->framesAvailable(); }
- In Qt 5.15.2, the framesAvailable() value will keep increasing
- In Qt 6.2.0, the framesAvailable() is stuck at a small number (approx 100+)
- I am able to readAllFrames() on those available frames, then framesAvailable() will be stuck at 0, and doing more readAllFrames() will produce empty lists.
- Calling resetController() will allow a fresh set of frames to be populated, but this is not a valid workaround since many frame are lost.
- In both cases, the busStatus() is always CanBusStatus::Good
Using PCAN-USB from Peak Systems.
Attachments
Issue Links
- relates to
-
QTBUG-63555 [REG->5.10] PeakCAN plugin (Windows) does not receive any frames
- Closed