Hello guys,
I am testing the sending and receiving programs and got the issue:
In order to test with serial port, I used the socat (https://help.ubuntu.com/community/VirtualSerialPort ) to create a pair serial ports on Linux and test my program with these port.
The first time the program sends the data and the program receives data is ok. However, if I read again or even re-write the new data into the serial...
User Profile
Collapse
-
Thanks all,
I am trying you guys suggestion and let's you know the outcome as soon as possibleLeave a comment:
-
Thanks a lot for you answer,
"What do you mean by octet? Is that 8-bits or 8 bytes?" -> one octet means 1 byte -> 8bits
"If you can populate your array you have your data" -> could you please elaborate on this please. I could not figure out how to get data in such a way because I either could not know how to send data in such a way.
Regarding CRC: I got the CRC algorithm of that...Leave a comment:
-
Parse a data frame in C?
I am writing a program that reads the data from the serial port on Linux.
The data are sent by another device in the following frame format:
---------------------------------------------------------------------
|start | Command | Data | CRC | End |
|0x02| 0x41 | (0-127 octets) | | 0x03|
--------------------------------------------------------------------
The Data...
No activity results to display
Show More
Leave a comment: