Great linux command for testing loopback

Questions and discussions about the Xillybus IP core and drivers

Great linux command for testing loopback

Postby Guest » Fri Jun 15, 2018 3:41 pm

To all:

I have a new xilinx FPGA project using Xillybus. In my FPGA, I have a UART that connects external physical RX/TX to a bidirectional Xillybus stream, corresponding to a linux file /dev/xillybus_serial. For testing, I find a great linux command:

cat /dev/xillybus_serial | tee /dev/xillybus_serial

From my dumb terminal, when I type into the RX of the FPGA, the "cat /dev/xillybus_serial" portion of this commands reads out what I typed. That's piped (|) to the "tee" command. The "tee" command sends stuff to both the stdout (linux terminal) and the file. Therefore, when I type "Mr. Watson -- Come here -- I want to see yo." on my dump terminal, that goes to the RX of the FPGA and through Xillybus and out the cat | tee. I see "Mr. Watson -- Come here -- I want to see you" on my linux host terminal. The tee sends it right back to /dev/xillybus_serial, which goes through my FPGA and out the TX line to my dumb terminal. Therefore, with no local echo enabled, as I type I can see the echo coming back. I can see what I type, the echo (loopback) occurring through my FPGA fabric, through Xillybus, through the cat|tee, through Xillybus, through my FPGA fabric.

Eli, you might explain this better and add the command to your getting started doc.

Re: Great linux command for testing loopback

Postby support » Sat Jun 16, 2018 6:07 am


Thanks for that tip. Using "tee" for looping back and dumping to console is indeed a clever idea.

Posts: 622
Joined: Tue Apr 24, 2012 3:46 pm

Return to Xillybus