WiFly Serial Adapter
www.rovingnetworks.com
wifly-serial-um 6/30/2010
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
•
~ 9 ~
for WPA use the command
set wlan phrase <string>
. For WEP set the key using the
set wlan key <num>
command.
To configure the WiFly serial adapter to remember network, use the command set
wlan ssid my_network
.
Next save the SSID and Pass Phrase/Key to the configuration file using the
save
command. Next time the
device powers up it will used the save network information to associate with the network.
set wlan ssid my_network
set wlan phrase my_secret_code
save
reboot
For security reason you may want to hide the Pass Phrase/Key. This is accomplished using the
set wlan hide
command. To un-hide the Pass Phrase, reset the key or passphrase.
2.3.
Connection Modes
Two common modes of operation for the Wifly Serial adapter are A: initiating a connection to a server and
B: listening for a remote host connection. This section will go through the configuration for each of these
setups. The set ups are shown using infrastructure network. i.e. with an access point, however the same
can be done with adhoc networking.
Initiating a connection from the WiFly serial adapter
Step 1: Set up the wlan properties so the device will connect to the network automatically upon power up.
In this example we want to connect to the wireless network my_network.
set wlan join 1
// Auto join upon power up
set wlan chan 0
// Scan all channels
set wlan ssid my_network
// Network name
set wlan phrase my_secret_code
// Pass phrase
The
join 1
setting ensures that when the module wakes up, it tries to join the access point that matches the
stored SSID, passkey and channel. Channel =0 (the default) will force auto-scanning. Setting the channel
will reduce the time it takes the WiFly to find and associate.
Step 2: Set up the
IP address and port number of the remote server, so the WiFly serial adapter can connect
when it wakes up.
set ip host 10.20.20.75
// Set the host IP address
set ip remote 3000
// Set the remote port
set sys autoconn 2
// Try to connect to the host every 2 seconds