User’s Manual
35
DYNAMIC_WIFI.C
This sample program initializes the Wi-Fi CompactFlash card and scans for other Wi-Fi
devices that are operating in either the ad-hoc mode or through access points in the infra-
structure mode. You will then be able to select which Wi-Fi device/network to connect to.
The
TCPCONFIG 0
macro used in the sample program
allows specific IP address, netmask,
gateway, and other network parameters to be set at runtime.
#define TCPCONFIG 0 // do not use tcp_config.lib, setting up at runtime
/*
* The MY_IP_ADDR and MY_GATEWAY_ADDR macros define the IP address and default
* Gateway address to fallback to, in case DHCP doesn't assign us these values.
*/
#define MY_IP_ADDR "10.10.6.100"
#define MY_GATEWAY_ADDR "10.10.6.1"
#define USE_DHCP // bring in DHCP
When you compile and run this sample program, the Dynamic C
STDIO
window will
open to display the available access points and ad-hoc hosts much like the
WIFI_SCAN.C
sample program.
Press the spacebar to get a prompt to select one of the available networks.
To connect to
rabbit
, enter
0
, then press
<Enter>
. The following might then appear in the
Dynamic C
STDIO
window.
In this case, the request to use DHCP was not successful, and no connection to the wire-
less network resulted. This particular failure resulted because the encryption key in the
sample program was not valid for the
rabbit
network, and this is a secure network.
Select an available network from above 0 thru 1 then press <ENTER>:
Attaching to "rabbit" in Infrastructure mode (Secured)
This is a WEP network so we will apply our 128 bit key.
Requesting an IP Address. (will use fallbacks if necessary)
DHCP request failed. Using fallback IP address defined in MY_IP_ADDR.
Ping me at: 10.10.6.100
Press <spacebar> to bring down interface and reselect a wifi network.
Содержание RCM3000
Страница 1: ...802 11b Wi Fi Add On Kits for RabbitCore and PowerCore Modules User s Manual 019 0092 051130 D ...
Страница 8: ...4 802 11b Wi Fi Add On Kits ...
Страница 28: ...24 802 11b Wi Fi Add On Kits ...
Страница 56: ...52 802 11b Wi Fi Add On Kits ...
Страница 60: ...56 802 11b Wi Fi Add On Kits ...
Страница 68: ...64 802 11b Wi Fi Add On Kits ...
Страница 78: ...74 802 11b Wi Fi Add On Kits ...
Страница 80: ...76 802 11b Wi Fi Add On Kits ...
Страница 82: ...78 RabbitCore RCM3800 ...
Страница 86: ......