Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Unable to fetch complete data using [ int serialDataAvail (int fd)]
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Unsolved India
5 Posts 2 Posters 2.0k Views
  • 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 Offline
    S Offline
    SHUBHAM SINGH RAO
    wrote on last edited by SHUBHAM SINGH RAO
    #1

    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_1980A 1 Reply Last reply
    0
    • S 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_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      1
      • aha_1980A aha_1980

        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.

        S Offline
        S Offline
        SHUBHAM SINGH RAO
        wrote on last edited by SHUBHAM SINGH RAO
        #3

        @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_1980A 1 Reply Last reply
        0
        • S Offline
          S Offline
          SHUBHAM SINGH RAO
          wrote on last edited by SHUBHAM SINGH RAO
          #4

          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
          0
          • S 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_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @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
            2

            • Login

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