
Page | 10
Roving Networks, 809 University Ave. Los Gatos Ca. 95032
www.rovingnetoworks.com support@rovingnetworks.com
set onn idle 30 // dis onne t after 30 se onds of no data
save // save all the settings to the onfig file
reboot // use the new settings
his setup can be tested using CP server application that opens a socket on
port 3000. Port Peeker is a free application that you can download off the web.
It is available at http://www.linklogger.com/portpeeker.htm
Waiting for the remote host to connect to the serial adapter (listen mode)
In this example we are using a static IP so that the remote host knows where the
WiFly Serial adapter is on the network. Alternatively you can write your application
software to listen for the broadcast UDP packet (automatically sent by WiFly by
default) to identify the WiFly Serial adapter and get the IP address and TCP port
number that the WiFly is listening on.
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 1 // only look on channel 1
set wlan ssid my_network // Network name
set wlan phrase my_secret_code // Pass phrase
Step 2: Configure the WiFly static IP address so the remote application can
connect, turn off DHCP and set the IP address and netmask.
set ip address 10.20.20.63 // Set the IP address
set ip port 5030 // Set the local port to listen on
set ip netmask 255.255.255.0 // Set the IP netmask
set ip gateway 10.20.20.1 // Sets the network gateway
set ip dhcp 0 // Turn off DHCP
Step 3: Set the wake up and sleep conditions. In this mode the sleep and wake
timers are used to conserver battery. Since we don’t know when the remote
host will connect, the module should to occasionally wake up and listen for the
remote host. he trade of with these timers is the longer you sleep the better
battery performance but the longer the latency the remote host sees when
Page | 19
Roving Networks, 809 University Ave. Los Gatos Ca. 95032
www.rovingnetoworks.com support@rovingnetworks.com
he Wifly GSX only supports “open” key
mode, 128 bit keys for WEP. WEP-128,
shared mode is not supported as it is known
to be easily compromised and has been
deprecated from the WiFi standards.
set wlan mask <value> sets the wlan channel mask used for
scanning channels with the auto-join policy
1 or 2, used when the channel is set to 0.
Value is a bit-map where bit 0 = channel 1.
Input for this command can be entered in
decimal or hex if prefixed with 0x. Default
value is 0x1FFF (all channels)
set wlan num <value> sets the default WEP key to use. 1-4 is the
valid range.
Example : “set w n 2” sets the default key
to 2.
set wlan phrase <string> sets the passphrase for WPA and WPA2
security modes. 1-64 chars. he
passphrase can be alpha and numeric, and
is used along with the SSID to generate a
unique 32 byte Pre-shared key (PSK), which
is then hashed into a 256 bit number.
Changing either the SSID or this value re-
calculates and stores the PSK.
If exactly 64 chars are entered, it is
assumed that this entry is already an ASCII
HEX representation of the 32 byte PSK and
the value is simply stored.
Example : “set w p password” sets the
phrase.
set wlan ssid <string> sets the wlan ssid to associate with. 1-32
chars.
NO E: If the passphrase or ssid contain the
SPACE ( ‘ ‘)
characters, these can be entered using
substitution via the “$” character.