Problem with BufferedSerial

Hi all,
I am using a LPC1768 to communicate with a other device. This device expects every millisecond a datagram of 14 bytes on 1MBit.
I am using BufferedSerial and printf to transmit this datagram. All is going correct but with 1 problem. To get the datagram immediatly transmitted I have to end the datagram with a CR LF (0x0d 0x0a). The problem is dat the external device expects only a CR (0x0d) on the end of the datagram. If I remove the LF (0x0a) the transmition of the datagram is rather unpredictable.
How to solve this ??


I also faced this problem and it is probably because Printf is buffered itself and only prints when the buffer is full or when the string contains \n.

Maybe you can try sprintf with a buffer and then just send that buffer via standart BufferedSerial::write.

BR, Jan

Thanks to Jan, that was the trick !