Moxa IA3341-LX [20/72] Summary of the testing procedure

Moxa IA3341-LX [20/72] Summary of the testing procedure
IA3341 Linux User’s Manual Getting Started
2-12
192.168.3.127 – PuTTY
root@Moxa:~# ls –al
drwxr—xr-x 2 root root 0 Jun 12 02:14
drwxr—xr-x 15 root root 0 Jan 1 1970
-rw------- 1 root root 899 Jun 10 08:11 .bash_history
-rw-r--r-- 1 root root 4996 Jun 12 02:15 tcps2-release
root@Moxa:~# chmod +x tcps2-release
root@Moxa:~# ls -al
drwxr—xr-x 2 root root 0 Jun 12 02:14
drwxr—xr-x 15 root root 0 Jan 1 1970
-rw------- 1 root root 899 Jun 10 08:11 .bash_history
-rwxr-xr-x 1 root root 4996 Jun 12 02:15 tcps2-release
root@Moxa:~# ./tcps2-release &
[1] 187
start
root@Moxa:~# ps
[1]+ Running ./tcps2-release &
root@Moxa:~#
NOTE Use the
kill -9
command for PID 187 to terminate this program:
#kill -9 %141
Summary of the Testing Procedure
1. Compile tcps2.c
(#make
).
2. Upload and run tcps2-release in the background (
#./tcps2-release &
).
3. Check that the process is running (
#jobs
or
#ps -ef
).
4. Use a serial cable to connect PC1 to the IA3341’s serial port 1.
5. Use an Ethernet cable to connect PC2 to the IA3341.
6. On PC1: If running Windows, use HyperTerminal (38400, n, 8, 1) to open COMn.
7. On PC2: Type
#telnet 192.168.4.127 4001
.
8. On PC1: Type some text on the keyboard and then press Enter.
9. On PC2: The text you typed on PC1 will appear on PC2’s screen.
The testing environment is illustrated in the following figure. However, note that there are
limitations to the example program tcps2.c.
IA3341
RS-232 LAN
PC1
PC2
NOTE The tcps2.c application is a simple example designed to give users a basic understanding of the
concepts involved in combining Ethernet communication and serial port communication.
However, the example program has some limitations that make it unsuitable for real-life
applications.
1. The serial port is in canonical mode and block mode, making it impossible to send data from
the Ethernet side to the serial side (i.e., from PC 2 to PC 1 in the above example).
2.
The Ethernet side will not accept multiple connections.

Содержание

Похожие устройства

Скачать