Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Write fails with QSerialPort

Write fails with QSerialPort

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 739 Views 1 Watching
  • 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 Offline
    W Offline
    wspilot
    wrote on last edited by
    #1

    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
    0
    • W Offline
      W Offline
      wspilot
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved