PDA

View Full Version : QSerialPort issue, cant find the PCI device



gcai
3rd July 2018, 10:33
Hi everybody, I'm new to the forum so if I didn't respect some rules, please forgive me. Now here we go.

I'm trying to communicate with a PCI card on my PC, I used the QSerialPort and QSerialPortInfo to do it. FYI, I'm working with Linux Ubuntu 18.04 kernel 4.15.0-23.

I use this code to show all available ports on my PC:



foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()){
ui->comboBox->addItem(info.portName());
qDebug() << "Name : " << info.portName();
qDebug() << "Description : " << info.description();
qDebug() << "Manufacturer: " << info.manufacturer();
}


And I find two port: ttyS0 and ttyS4, but none of them linked to my PCI card, because I tried to unplug the PCI card and these two port were also there.
So I guess that my program didn't find the card, I've done a little research on the internet, I got this: https://bugreports.qt.io/browse/QTBUG-35064
In this post, the guy had the same issue like me but I'm not a expert so I cant fully understand the reason and also don't know how to resolve it, it seems like qt under linux don't support PCI port? I'm not sure about it, if this is the case, how can I communicate with the PCI port?

Hope somebody can help, many thanks in advance!

Ginsengelf
3rd July 2018, 10:37
Hi, does your card work with other programs?
Does it help to run your program with root privileges?

Ginsengelf

gcai
3rd July 2018, 11:37
Hi Ginsengelf,
Thanks for your fast reply.
My card is a cameralink frame grabber, I can receive images from the camera via this card so I think it can work properly. A stupid question, how can I run my program as root in qtcreator debug mode?

Edit:
I've tried to run as root but there are no difference..

Edit:
I can find the PCI device with command 'dmesg' and 'lspci':

dmesg:


[ 4.617179] pci 0000:04:00.0: [1805:030a] type 00 class 0x118000


lspci:


04:00.0 Signal processing controller: Euresys S.A. Device 030a (rev 8a)