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. Receiving data packets from the serial port
QtWS25 Last Chance

Receiving data packets from the serial port

Scheduled Pinned Locked Moved Unsolved General and Desktop
serialserial portframe
5 Posts 2 Posters 2.3k 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.
  • B Offline
    B Offline
    Basti46
    wrote on 3 Jul 2016, 15:40 last edited by Basti46 7 Sept 2016, 18:00
    #1
    This post is deleted!
    ? 1 Reply Last reply 3 Jul 2016, 17:26
    0
    • B Basti46
      3 Jul 2016, 15:40

      This post is deleted!

      ? Offline
      ? Offline
      A Former User
      wrote on 3 Jul 2016, 17:26 last edited by
      #2

      @Basti46 So what's your question?

      B 1 Reply Last reply 3 Jul 2016, 17:55
      0
      • ? A Former User
        3 Jul 2016, 17:26

        @Basti46 So what's your question?

        B Offline
        B Offline
        Basti46
        wrote on 3 Jul 2016, 17:55 last edited by
        #3

        @Wieland Sooo my question is, how can i interpret the data from my device. I know that i will receive a data paket with low and high bytes. But as you can see the charArray doen't contain any usefull values. (\x00\xFF\x13g\xDE\xF8\x13\b8@\xC0\xB8\xF9\x03\b\t\xFF\x03\xC8\tB\xFF) I know that withing this data paket there are some ASCII chars. but how can i get those. I don't even know where my problem is that's why i am not able to explain my question better. Sorry for that.

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on 3 Jul 2016, 18:03 last edited by
          #4

          Okay. Wikipedia says:

          A zero byte appears at the end of every packet to indicate end-of-packet to the data receiver. This packet delimiter byte does not correspond to a data byte; it is an additional byte that is appended to the encoded output.

          So you need to scan the received data for zero bytes and break the input stream into single frames there.

          Also the wikipedia article you provided features an example implementation of a COBS decoder in C, which you can copy and paste as a starting point.

          B 1 Reply Last reply 4 Jul 2016, 10:55
          0
          • ? A Former User
            3 Jul 2016, 18:03

            Okay. Wikipedia says:

            A zero byte appears at the end of every packet to indicate end-of-packet to the data receiver. This packet delimiter byte does not correspond to a data byte; it is an additional byte that is appended to the encoded output.

            So you need to scan the received data for zero bytes and break the input stream into single frames there.

            Also the wikipedia article you provided features an example implementation of a COBS decoder in C, which you can copy and paste as a starting point.

            B Offline
            B Offline
            Basti46
            wrote on 4 Jul 2016, 10:55 last edited by
            #5

            @Wieland Well i found my problem, I chose the wrong baudrate. Now i have to adjust my code, but i think it will work sooner or later. Thanks again!

            1 Reply Last reply
            0

            1/5

            3 Jul 2016, 15:40

            • Login

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