Important: Please read the Qt Code of Conduct -

Receiving data packets from the serial port

  • This post is deleted!

  • @Basti46 So what's your question?

  • @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.

  • 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.

  • @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!