Sample tutorials – ProSoft Technology MVI69E-LDM User Manual
Page 46

Contents
MVI69E-LDM ♦ "C" Programmable
Developer's Manual
Linux Application Development Module
Page 46 of 130
ProSoft Technology, Inc.
August 21, 2014
4.2
Sample Tutorials
The following sections describe how to run and understand the sample tutorials provided
with the module. These samples handle the data exchange between the MVI69E-LDM and
end device(s).
4.2.1 Ethernet Sample
The Ethernet sample comes as two programs; a client, and a server.
The server waits for a client to request a connection, replies with the local time, and
closes the connection.
The client runs with the IP4 address of the server.
The client opens a connection to the server, receives the response message, and prints
the message (the time on the server) to the console.
It is recommended that you run the server on one MVI69E-LDM module and the client on
another. Alternately, either of the programs could be ported to another Linux environment.
Attempting to run both programs on the same MVI69E-LDM is not advised due to the
complexity of IP routing.
Server ENet Sample
To run the Server ENet sample:
1 Establish a command window using Telnet or similar terminal software on the PC
through the Serial P1 port.
2 Login as user: root, using password: password.
3 The Ethernet Port E1 is used to communicate with the client device. The server and
client devices must both be connected on the same IPv4 subnet.
4 Set the IPv4 address and mask of the Ethernet port using the
ifconfig
command.