I am trying to understand how computers work and I was thinking about peripherals. Here is what I understand so far but some parts are missing.
Using an Arduino, I send some text every second (a then b then c, ...) via UART to a Pandaboard. I guess that there is a special chip on the Pandaboard or its microprocessor that is always listening to the rx pin. When it sees some voltage change, it starts recording the byte and sends an interrupt to the Linux system. The system stops everything, asks the chip for the new byte, then writes it to /dev/ttyUSB3 for instance.
First thing that I don't understand: if I do cat /dev/ttyUSB3 I see the characters showing up every second (a..b..c). If I stop cat, wait 5 seconds, and do cat again, I see (i..j..k...) but I expect to see the missing characters (d..e..f..g..h) that were sent but not catted but I don't see them. How does cat work? What's in this /dev/ttyUSB3 file?
Conversely, if I do echo "hello" > /dev/ttyUSB3, the system will somehow tell the chip to send electrical signals on the tx pin. Does it send it byte by byte to the chip? Or all together?