Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved Unable to fetch complete data using [ int serialDataAvail (int fd)]

    India
    2
    5
    1523
    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.
    • S
      SHUBHAM SINGH RAO last edited by SHUBHAM SINGH RAO

      I am using wiring-pi library for interfacing MODEM with raspberry pi using Qt Creator tool via serial interface I have mentioned the code for kind reference :

       QString a=0;
       QString Received_response=0;    
      while(1)
       {
      if(serialDataAvail(fd))
        {
         a=serialGetchar(fd);
         Received_response.append(a);
        }
      else
      break;
       }
      

      I am only able to fetch a maximum of 75 bytes only from modem whereas I need to fetch more bytes

      Is there any limitation of data fetching using int serialGetchar (int fd) ?

      Is there any other method/ function to fetch data byte by byte ?

      aha_1980 1 Reply Last reply Reply Quote 0
      • aha_1980
        aha_1980 Lifetime Qt Champion @SHUBHAM SINGH RAO last edited by

        Hi @SHUBHAM-SINGH-RAO, welcome.

        Please rephrase your topic title, so it gives a short summary of your problem. Right now it's impossible to understand your problem.

        And PS: avoid writing in UPPPERCASE letters, it is considered screaming.

        Qt has to stay free or it will die.

        S 1 Reply Last reply Reply Quote 1
        • S
          SHUBHAM SINGH RAO @aha_1980 last edited by SHUBHAM SINGH RAO

          @aha_1980 topic title edited as above
          Short summary of my problem-
          Task : I am interfacing Modem with Qt Creator via serial communication.
          I am using wiring pi library for serial communication
          Problem Encountered - When I am downloading bulk data from modem I am only able to download a maximum of 84 bytes data.
          The method adopted has already been mentioned above.
          Question-
          Is there any other method of serial communication?

          aha_1980 1 Reply Last reply Reply Quote 0
          • S
            SHUBHAM SINGH RAO last edited by SHUBHAM SINGH RAO

            Modem Specifications : Serial modem

            Specified modem Command in which problem Encountered :
            "AT+QFREAD= filehandle, file size \r"

            Problem encountered- I am able to download only 84 bytes from modem, although data available on modem RAM is much more!

            1 Reply Last reply Reply Quote 0
            • aha_1980
              aha_1980 Lifetime Qt Champion @SHUBHAM SINGH RAO last edited by

              @SHUBHAM-SINGH-RAO said in Unable to fetch complete data using [ int serialDataAvail (int fd)]:

              I am using wiring pi library for serial communication

              Well, this is a Qt forum, only few people will know about wiring pi here. You should get better answers in a Raspberry/Wiring Pi forum.

              That said, why don't you use QtSerialPort?

              Qt has to stay free or it will die.

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