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. [solved]I cant receive all data through serial interface
Qt 6.11 is out! See what's new in the release blog

[solved]I cant receive all data through serial interface

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 916 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.
  • R Offline
    R Offline
    reem9611
    wrote on last edited by
    #1

    I am writing list of commands [around 7 request command ] to the sensor through serial interface using qexserialport library .Once I send these commands I should receive respond from the sensor for each command that I send.

    I put all commands in Qlist to send at once .. But when I run the application and send the button for sending all commands I received only for first three commands !

    @QList<QByteArray> list;
    list << "*cmd1" << "cmd2" << "cmd3"<< "cmd4"<<" cmd5"<<"cmd6"<<"cmd7";

    QByteArray s;
    
    foreach( s, list ){
    port->write(s);
    qDebug() << s;}
    

    @

    1 Reply Last reply
    0
    • mrdebugM Offline
      mrdebugM Offline
      mrdebug
      wrote on last edited by
      #2

      Mm... I'm not sure you are using the right approach.
      Maybe you have to use the official Qt serial library.
      Normally the device responds at all request. I think you have to wait the response at each request and after that send the new one.

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      1 Reply Last reply
      0
      • R Offline
        R Offline
        reem9611
        wrote on last edited by
        #3

        Thanks after I add delay function ,I received all data requested.
        [quote author="mrdebug" date="1409046424"]Mm... I'm not sure you are using the right approach.
        Maybe you have to use the official Qt serial library.
        Normally the device responds at all request. I think you have to wait the response at each request and after that send the new one.[/quote]

        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