
68
RabbitCore RCM5400W
The data passed to the callback function are ephemeral since another scan may occur.
Thus, the data need to be used (or copied) during the callback function.
While waiting for user input, it is important to keep the network alive by calling
tcp_tick(NULL)
regularly.
6.2.5 RCM5400W Sample Programs
The following sample programs are in the Dynamic C
SAMPLES\RCM5400W\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 RCM5400W. 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.
Summary of Contents for RabbitCore RCM5400W
Page 1: ...RabbitCore RCM5400W C Programmable Wi Fi Core Module OEM User s Manual 019 0169 080630 A...
Page 6: ...RabbitCore RCM5400W...
Page 24: ...18 RabbitCore RCM5400W...
Page 32: ...26 RabbitCore RCM5400W...
Page 52: ...46 RabbitCore RCM5400W...
Page 60: ...54 RabbitCore RCM4400W...
Page 96: ...90 RabbitCore RCM5400W...
Page 114: ...108 RabbitCore RCM4400W...
Page 118: ...112 RabbitCore RCM4400W...
Page 120: ......