34
802.11b (Wi-Fi) Add-On Kits
WPINGME.C
This sample program initializes the TCP/IP protocol stack and prints out Wi-Fi status
information to allow you to determine if your configuration can join an access point or
ad-hoc network. The sample program allows pinging from a remote host on the network.
To run this sample program, you will need an access point and PC/notebook (infrastructure
mode) or a notebook with 802.11b wireless compatibility working in the ad-hoc mode. By
default, encryption is turned off by the
_WIFI_WEP_FLAG
flag in the
TCPCONFIG 9
macro used in the sample program and defined in the Dynamic C
TCP_CONFIG.LIB
library, and the
_WIFI_MODE
macro is set to the infrastructure mode. If you are using the
ad-hoc mode, you will need to change
WIFICONF_INFRASTRUCT
to
WIFICONF_ADHOC
in the following line in the Dynamic C
TCP_CONFIG.LIB
library.
#define _WIFI_MODE WIFICONF_ADHOC
If encryption is turned on, you will have to set the
WIFICONF_WEP_DISABLE
flag to
WIFICONF_
WEP_ENABLE
in the following line in the Dynamic C
TCP_CONFIG.LIB
library to enable
encryption.
#define _WIFI_WEP_FLAG WIFICONF_WEP_ENABLE
You may also need to change the encryption keys and select one of the four keys with
#define _WIFI_USEKEY " "
. Contact the administrator of the access point/ad-hoc host or
review the documentation for the access point/ad-hoc host to determine the encryption
keys.
Once you’re ready, just compile and run the sample program. The Dynamic C
STDIO
window will display the Wi-Fi status.
Next, open a command window on a remote host connected to the access point/ad-hoc
host, and type the command
ping <PRIMARY_STATIC_IP>
where
<PRIMARY_STATIC_IP>
is the IP address (10.10.6.100 or whatever IP address
you changed it to) set by
_PRIMARY_STATIC_IP
in the
TCPCONFIG 9
macro from the
TCP_CONFIG.LIB
library. One or more reply lines will then appear to display the results
of the ping.
Summary of Contents for RCM3000
Page 8: ...4 802 11b Wi Fi Add On Kits ...
Page 28: ...24 802 11b Wi Fi Add On Kits ...
Page 56: ...52 802 11b Wi Fi Add On Kits ...
Page 60: ...56 802 11b Wi Fi Add On Kits ...
Page 68: ...64 802 11b Wi Fi Add On Kits ...
Page 78: ...74 802 11b Wi Fi Add On Kits ...
Page 80: ...76 802 11b Wi Fi Add On Kits ...
Page 82: ...78 RabbitCore RCM3800 ...
Page 86: ......