User`s manual

UC-7400-LX Plus User’s Manual Getting Started
2-16
RS-232 LAN
PC 2PC 1
Write data to PC1
Receive LAN data
Read serial data
Send data to PC2
tcps2.c
Serial Rx
Buffer
LAN Rx
Buffer
Compiling tcps2.c
The source code for the tcps2 example is located on the CD-ROM at
CD-ROM://example/TCPServer2/tcps2.c. Use the following commands to copy the file to a
specific directory on your PC. We use the direrctory /home/1st_application/. Note that you need
to copy 3 files—Makefile, tcps2.c, tcpsp.c—from the CD-ROM to the target directory.
#mount –t iso9660 /dev/cdrom /mnt/cdrom
#cp /mnt/cdrom/example/TCPServer2/tcps2.c /home/1st_application/tcps2.c
#cp /mnt/cdrom/example/TCPServer2/tcpsp.c /home/1st_application/tcpsp.c
#cp /mnt/cdrom/example/TCPServer2/Makefile.c /home/1st_application/Makefile.c
Type #make to compile the example code:
You will see the following response, indicating that the example program was compiled
successfully.