I’m using Decawave’s “dwm-simple” example to send formatted (MAVLink v1 protocol with a message size of 101 bytes) position data as unsigned chars to the serial port of the DWM1001 tag module using printf(). The problem is, whenever a new line (\n) command is sent to the port there always is a carriage return ("\r") put in front of \n. Now, sometimes one of the bytes in the message can have the same value as the \n command, which is 0x0A as HEX or 10 as a decimal (E.g. if y-position = 10). In this case, an additional \r byte is sent automatically to the port, which screws up my protocol. How can I get rid of this? Has this been pre-defined in PANS?
As an example, I attached a picture that shows the output of the serial port. It’s just a uint8_t type counter counting from 0 to 254 and then resetting itself. When the counter reaches 10 (which is decimal for \n) it somehow puts a \r (= 13 as decimal, 0x0D in HEX) in front of it.
The DWM1001 has been flashed with PANS 2.0 firmware.