Rabbit RabbitCore RCM4400W Product Manual - page 71
User’s Manual
63
6.2.5 RCM4400W Sample Programs
The following sample programs are in the Dynamic C
SAMPLES\RCM4400W\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. Remember
to configure the access point to match the default settings of the
TCPCONFIG 1
macro.
http://10.10.6.100.
Otherwise use the TCP/IP settings you entered in the
in the “Defines” tab in the Dynamic C
Options > Project Options menu
.
•
PASSPHRASE.C
—This program demonstrates how to perform the CPU-intensive process
of converting an ASCII passphrase into a WPA PSK hex key.
For security reasons, the mapping function is deliberately designed to be CPU-intensive
in order to make a dictionary-based attack more difficult. It can take on the order of 40
seconds to perform the 4096 iterations on the RCM4400W. Since this may be an unac-
ceptable amount of time to “block” the application program, a method is provided to
split up the computation.
As you compile and run this sample program, there is no network activity. You will
only notice that some information is printed out in the Dynamic C
STDIO
window.
•
PINGLED.C
—This program demonstrates ICMP by pinging a remote host. It will flash
LED DS2 on the Prototyping Board when a ping is sent and it will flash LED DS3
when a ping is received.
Before you compile and run this sample program, change
PING_WHO
to the host you
want to ping. You may modify
PING_DELAY
define to change the amount of time in
milliseconds between the outgoing pings.
Uncomment the VERBOSE define to see the incoming ping replies.
•
PINGLED_STATS.C
—This program is similar to
PINGLED.C
, but it also displays
receiver/transmitter statistics in the Dynamic C
STDIO
window.
Before you compile and run this sample program, change
PING_WHO
to the host you
want to ping. You may modify
PING_DELAY
define to change the amount of time in
milliseconds between the outgoing pings.
Modify the value in the
MOVING_AVERAGE
macro to change the moving average filter-
ing of the statistics. Also review the
GATHER_INTERVAL
and
GRAPHICAL
macros,
which affect the number of samples to gather and create a bar graph display instead of a
numeric display.
Uncomment the
VERBOSE
define to see the incoming ping replies.