Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Write fails with QSerialPort

    General and Desktop
    1
    2
    540
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wspilot last edited by

      Hi,
      ububtu 12.04
      Qt 5.1.1
      I am trying to write a character to the serial port with QSerialPort, but I get no response from the device.
      @qDebug() << "nr of btes written:" << serialBaro.write("a");
      if (! serialBaro.isWritable() )
      {qDebug() << "baro not writeble!!";}//is OK
      if(! serialBaro.waitForReadyRead(100))//NOT OK, should get response as with boost
      @
      While using boost::asio (older version) writing goes OK, so the device is working correctly:
      @ baro.writeString(string("a"));
      baro.setTimeout(boost::posix_time::millisec(100));@

      1 Reply Last reply Reply Quote 0
      • W
        wspilot last edited by

        Just found out. QtSerialPort does also work on the (boost version) notebook.
        The only difference between current laptop and the notebook is ubuntu version: resp 12.04 and 11.10.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post