Rabbit RabbitCore RCM5400W User Manual page 73

C-programmable wi-fi core module
Table of Contents

Advertisement

—initializes the RCM5400W and scans for other Wi-Fi devices that are
WIFISCAN.C
operating in either the ad-hoc mode or through access points in the infrastructure mode.
No network parameter settings are needed since the RCM5400W does not actually join
an 802.11 network. This program outputs the results of the scan to the Dynamic C
window.
STDIO
WIFISCANASSOCIATE.C
ifconfig IFS_WIFI_SCAN
callback function when it is done. The callback function is specified using
IFS_WIFI_SCAN
Before you run this sample program, configure the Dynamic C
library and your
TCPCONFIG
1. Use macro definitions in the "Defines" tab in the Dynamic C Options > Project
Options menu to modify any parameter settings.
If you are not using DHCP, set the IP parameters to values appropriate to your network.
_PRIMARY_STATIC_IP = "10.10.6.100"
_PRIMARY_NETMASK = "255.255.255.0"
MY_NAMESERVER = "10.10.6.1"
MY_GATEWAY = "10.10.6.1"
Set IFS_WIFI_SSID to an appropriate value. To connect to a specific BSS, set IFS_
WIFI_SSID to the SSID of your access point as a C-style string, for example,
IFS_WIFI_SSID = "My Access Point"
or use an empty string, "", to associate with the strongest BSS available.
Alternatively, you may create your own CUSTOM_CONFIG.LIB library modeled on the
Dynamic C TCP_CONFIG.LIB library. Then use a TCPCONFIG macro greater than or
equal to 100, which will invoke your CUSTOM_CONFIG.LIB library to be used.
Remember to add the CUSTOM_CONFIG.LIB library to LIB.DIR.
2. If you are using DHCP, change the definition of the TCPCONFIG macro to 5. The default
value of 1 indicates Wi-Fi with a static IP address.
Now compile and run the sample program. Follow the menu options displayed in the
Dynamic C
STDIO
s - scan for BSS's,
a - scan and associate
m - dump MAC state information
t - dump tx information
Note that
ifconfig IFS_WIFI_SCAN
the scan takes a fair amount of time. Instead, callback functions are used. The callback
function is passed to
ifconfig(IF_WIFI0, IFS_WIFI_SCAN, scan_callback, IFS_END);
User's Manual
— demostrates how to scan Wi-Fi channels for SSIDs using
. This takes a while to complete, so
.
macro.
window.
as the only parameter to
ifconfig()
function calls do not return data directly since
IFS_WIFI_SCAN
calls a
ifconfig()
ifconfig
TCP_CONFIG.LIB
.
67

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RabbitCore RCM5400W and is the answer not in the manual?

Questions and answers

Table of Contents