5 run the pingme.c sample program – Digi RCM4000 User Manual

Page 80

Advertising
background image

74

RabbitCore RCM4000

6.5 Run the PINGME.C Sample Program

Connect the crossover cable from your computer’s Ethernet port to the RCM4000 mod-
ule’s RJ-45 Ethernet connector. Open this sample program from the

SAMPLES\TCPIP\

ICMP

folder, compile the program, and start it running under Dynamic C. The crossover

cable is connected from your computer’s Ethernet adapter to the RCM4000 module’s RJ-
45 Ethernet connector. When the program starts running, the green

LINK

light on the

RCM4000 module should be on to indicate an Ethernet connection is made. (Note: If the

LNK

light does not light, you may not be using a crossover cable, or if you are using a hub

with straight-through cables perhaps the power is off on the hub.)

The next step is to ping the module from your PC. This can be done by bringing up the
MS-DOS window and running the pingme program:

ping 10.10.6.101

or by

Start > Run

and typing the entry

ping 10.10.6.101

Notice that the yellow

ACT

light flashes on the RCM4000 module while the ping is taking

place, and indicates the transfer of data. The ping routine will ping the module four times
and write a summary message on the screen describing the operation.

6.6 Running Additional Sample Programs With Direct Connect

The following sample programs are in the Dynamic C

SAMPLES\RCM4000\TCPIP\

folder.

BROWSELED.C

—This program demonstrates a basic controller running a Web page.

Two “device LEDs” are created along with two buttons to toggle them. Users can use
their Web browser to change the status of the lights. The DS2 and DS3 LEDs on the
Prototyping Board will match those on the Web page. As long as you have not modified
the

TCPCONFIG 1

macro in the sample program, enter the following server address in

your Web browser to bring up the Web page served by the sample program.

http://10.10.6.100.

Otherwise use the TCP/IP settings you entered in the

TCP_CONFIG.LIB

library.

PINGLED.C

—This program demonstrates ICMP by pinging a remote host. It will flash

LEDs DS2 and DS3 on the Prototyping Board when a ping is sent and received.

SMTP.C

—This program demonstrates using the SMTP library to send an e-mail when

the S2 and S3 switches on the Prototyping Board are pressed. LEDs DS2 and DS3 on
the Prototyping Board will light up when e-mail is being sent.

Advertising