Rabbit RabbitCore RCM4400W Product Manual - page 73
User’s Manual
65
6.3 Dynamic C Wi-Fi Configurations
Rabbit Semiconductor has implemented a packet driver for the RCM4400W that functions
much like an Ethernet driver for the Dynamic C implementation of the TCP/IP protocol
stack. In addition to functioning like an Ethernet packet driver, this driver implements a
function call to access the functions implemented on the 802.11b interface, and to mask
channels that are not available in the region where the RCM4400W will be used.
The Wi-Fi interface may be used either at compile time using macro statements or at run
time with the
wifi_ioctl()
function call from the Dynamic C
LIB\TCPIP\WIFI\
WIFI_WLN_API.LIB
library.
6.3.1 Configuring Dynamic C at Compile Time
Rabbit Semiconductor has made it easy for you to set up the parameter configuration
using already-defined
TCPCONFIG
macros from the Dynamic C
LIB\TCPIP\TCP_CON-
FIG.LIB
library at the beginning of your program as in the example below.
#define TCPCONFIG 1
There are two
TCPCONFIG
macros specifically set up for Wi-Fi applications with the
RCM4400W module. (
TCPCONFIG 0
is not supported for Wi-Fi applications.)
These default IP address, netmask, nameserver, and gateway network parameters are set
up for the
TCPCONFIG
macros.
#define _PRIMARY_STATIC_IP "10.10.6.100"
#define _PRIMARY_NETMASK "255.255.255.0"
#define MY_NAMESERVER "10.10.6.1"
#define MY_GATEWAY "10.10.6.1"
The use of quotation marks in the examples described in this chapter is important since the
absence of quotation marks will be flagged with warning messages when encrypted librar-
ies such as the
WIFI_WLN_API.LIB
library are used.
Wi-Fi Parameters
•
Access Point SSID—
_WIFI_SSID
. This is the only mandatory parameter. Define the
_WIFI_SSID
macro to a string for the SSID of the access point in the infrastructure
(BSS) mode, or the SSID of the ad-hoc network in the ad-hoc (IBSS) mode.
The default is shown below.
#define _WIFI_SSID "rabbitTest"
•
Mode—
_WIFI_MODE
determines the mode:
WIFICONF_INFRASTRUCT
for the infrastructure mode, or
WIFICONF_ADHOC
for the
ad-hoc mode.
The default is shown below.
#define _WIFI_MODE WIFICONF_INFRASTRUCT
TCPCONFIG 1
No DHCP
TCPCONFIG 5
DHCP enabled