I have a binary file(obtained from assembly code). I need to transfer this file to an fpga serially via ttyUSB0.
I read in some posts that using cat and echo data can be transferred to ttyS0.

echo -ne '\033[2J' > /dev/ttyS1  
cat  < /dev/ttyS1

Does this apply for ttyUSB0 as well? If not, please suggest me other ways to transfer binary file via ttyUSB0.


Serial connections to programmable devices such as microcontrollers or fpgas are often used with tools from the device vendor (or free ones) which handle the communication protocol. Just sending a file down the wire will very rarely work. The development environment of your device should have information on how a compiled binary is programmed into the device.

| improve this answer | |
  • My development environment expect binary data. It has a UART receiver implemented to receive data serially. – karthik Jan 9 at 12:16
  • So just cat <your binary> > /dev/ttyUSB0 ... if your FPGA serial is correctly detected and setup by Linux as /dev/ttySOMETHING, when it should just behave like a standard serial port. – binarym Jan 9 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.