![]() ![]() You may obtain a copy of the GNU General Public License * Version 2 or later at the following locations: * * * * * This is inpired by sample codes at: * * and * * * Description: This is an example of how to do asynchronous serial * programming under Linux. * * The code contained herein is licensed under the GNU General Public * License. ** async_port_keyb.c * An asynchronous serial chat program. You can remove the noise for me as a DSP assignment :) ). See the video of the demo of the program here ( Excuse the laptop fan noise :) dev/ttyUSBS0 FTDI-USB-to-RS232_cable/dev/ttyS0 Adolph Seema Otherwise whatever you type on the client shows up at the server and vice versa.Īsync_port_keyb.c /tmp/ttyS0 socat_fake_cable/tmp/ttyS1 async_port_keyb.cThe real world setup would be: "AT port?" - Response: Sends: I am at port: "AT hello" - Response: Sends: AT Thank you! and Hello to you too! "exit" - Response: Prints: Exiting as ordered! Goodbye!. So, this is basically a serial asynchronous chat program.įor demonstration purposes, the program accepts and responds to 3 command: The program can be executed as a client or server. The program receives user input and outputs it to the the other program on the other side, which outputs what it receives and prints it to its own screen. ![]() The program can be launched as both a server and client on either side of the serial cable. ![]() This was tested on MacBookPro1,1 running Ubuntu 11.10. This is an example of how to do asynchronous serial programming under Linux.
0 Comments
Leave a Reply. |