I'm working with a Serial communication interface; a SBC (TS-7200) running Linux Kernel 2.6.36 sends data via RS232 to a PC (running Windows). The data is encapsulated in packets (byte per byte) and sent. The issue occurs when the TS tries to send an integer (uint8_t)(10)
, which, notably, is the ASCII for \n
, the termination char (0xA)
; not random right?!
The strange things is that, if I use an Arduino Uno to do the same exact operations, an integer 10 will be sent and received without a problem! So my conclusion would be that Linux takes 0b00001010
like a \n
, flushes the serial buffer and doesn't send 10
over, while Arduino doesn't. Searching online I found that a file can be opened in binary mode (O_BINARY) or file mode but apparently this ins't available in Linux; is that right? Is there a way to make Linux behave like Arduino?
Thank you, Federico
PS: I forgot to mention I'm working with C