Page 1 of 1

QT plugin

Posted: Thu 21. Oct 2021, 14:38
by JGarza
Hi,

I manage to install the latest version of your driver to my ubuntu 20 machine, I can run candump on the command line and I can see the
CAN messages that are sent from a sensor. I want to read CAN data using the peakcan qt plugin but on the QT basic example I always get:

"The value of a PCAN-Client handle is invalid"

I made the driver installation using:
make netdev
make install

Is there any step missing on the driver installation so that QT can find your driver?
Thanks

Re: QT plugin

Posted: Thu 21. Oct 2021, 15:20
by PEAK-Support
We do not officially support the QTCAN Bus Lib - please contact the QT community! --> LINK
As far as we know, you could use both driver types CharDev (PEAK-System Driver) and also NetDev (also supported by PEAK-System Devices) .
Best is to decide which one you like to use and install this driver of your choice. Then use the tools to test if the driver itself work. (simple CAN communication)
After that try the QT Lib

Re: QT plugin

Posted: Mon 25. Oct 2021, 12:33
by JGarza
Hello,

I removed the driver installation I had and did the build and installed the netdev version of your driver with:

Code: Select all

$ sudo make netdev
and

Code: Select all

$ sudo make install
on the folder where I have the files. I wanted to test now that the driver was correctly working but when I do candump I get:
Command 'candump' not found, but can be installed with:

sudo apt install can-utils
Did I miss a step from your readme file? or why is candump not found?
Thanks for the support.

Re: QT plugin

Posted: Mon 25. Oct 2021, 12:45
by PEAK-Support
the tool is not part of the driver - it is part of the NetDev/Socket CAN Tools --> link
So you need to download the Tool seperatly

Code: Select all

sudo apt install can-utils

Re: QT plugin

Posted: Mon 25. Oct 2021, 13:00
by JGarza
ok, done. Following the manual I set up can0 to 500kbaud and then did candump. Is this received data being processed by your driver or by
canutils.
I ask, because the reason Im using you driver is that on QT when using socketcan its not possible to set timestamps to hardware timestamps.
But on your driver its by default the hardware timestamps as I understood.

Thanks

Re: QT plugin

Posted: Mon 25. Oct 2021, 13:49
by JGarza
I tried the netdev on qt but was not using the hardware timestamps, I went back to the original driver and now it works. I dont know why QT did not recognized the can messages before.
In any case its solved. Thanks

Re: QT plugin

Posted: Fri 12. Nov 2021, 11:36
by JGarza
I tried to make a new post but somehow I did not find the option, so I post here.

My question is:

I am using your driver with the QT plugin and I get following time stamp on a can message: 1636713378.7591
This time should be aproximatly: nov. 12 11:34 of 2021

When I convert in python I get: 2021-11-12 11:36:18.759100

which is not correct. Im using this python code:


"""import datetime
s=1636713378.7591
print(datetime.datetime.fromtimestamp(s).strftime('%Y-%m-%d %H:%M:%S.%f'))

Re: QT plugin

Posted: Fri 12. Nov 2021, 11:44
by JGarza
sorry somehow I copy past the wrong values.

I get this timestamp: 1636714205.0324
it should be actually around: 11:43 of nov. 21
when I convert I get : 2021-11-12 11:50:05.032400

which is not correct.

Re: QT plugin

Posted: Fri 12. Nov 2021, 12:31
by M.Heidemann
Hello,

We do not officially support the QTCAN Bus Lib -
please contact the QT community! --> https://doc.qt.io/qt-5/qtcanbus-backends.html

Please check with PCANBasic API itself, if the same behavior can be reproduced.

Best Regards

Marvin