bla2447 / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

Can`t read/write to port under linux #160

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of QextSerialPort are you using?
Version 1.2rc

What steps will reproduce the problem?
After opening port any read or write operation ends with error under linux.

Code example:
    // port opening
    p_devPort->setPortName(portName);

    if (!p_devPort->open(QIODevice::ReadWrite)) {
        qDebug() << p_devPort->errorString();
    }

    // writing
    char command[2];
    command[0] = 3;
    if (m_useEcgChannel)
        command[1] = 17;
    else
        command[1] = 16;
    if (p_devPort->write(&command[0], 2) == -1) {
        qDebug() << p_devPort->errorString();
    }

    // reading
    char readBytes[245];

    if (p_devPort->read(&readBytes[0], 245) == -1) {
        qDebug() << p_devPort->errorString();
    }

It works well under Windows 7 but in linux
reading operaton ends with "General read operation failure" 
and writing with "General write operation failure".

What version of the product are you using? On what operating system?
Qt 4.8.2, Linux Mint 14, QextSerialPort 1.2rc

Original issue reported on code.google.com by ivWar...@gmail.com on 12 Mar 2013 at 8:38

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Fixed it by  setting right user permissions.

Original comment by ivWar...@gmail.com on 14 Mar 2013 at 6:23