www.rovingnetworks.com
Version 1.0r 9/21/2012
15
RN -W IFLYCR -U M
set ip address <
address
>
This command sets the WiFly module’s IP address, where <
address
> is an IP address in the form
<
value
>.<
value
>.<
value
>.<
value
> with <
value
> being a number between 0 and 255. If DHCP is turned on, the IP
address is assigned and overwritten when the module associates with an access point. IP addresses are “.” delimited.
Default:
0.0.0.0
Example:
set ip a 10.20.20.1
// Sets the WiFly module’s IP address to 10.20.20.1
set ip backup <
address
>
This command sets a secondary host IP address, where <
address
> is an IP address in the form
<
value
>.<
value
>.<
value
>.<
value
> with <
value
> being a number between 0 and 255. If the primary host IP is
unreachable, the module attempts to reach the secondary IP address (if set).
Default:
0.0.0.0
Example:
set ip a 10.20.20.2
// Sets the WiFly module’s secondary IP address to
// 10.20.20.2
set ip dhcp <
value
>
This command enables/disables DHCP mode, where <
value
> is a decimal number shown in Table 4. If you set this
parameter, the module requests and sets the IP address, gateway, netmask, and DNS server upon association with an
access point. Any previously set IP information is overwritten.
Table 4. DHCP Modes
Mode
Protocol
0
Turns DHCP off. The module uses its stored static IP address.
1
Turns DHCP on. The module attempts to obtain an IP address and gateway from the access
point.
2
Enables automatic IP, which is generally used with ad hoc networks.
3
Turns on DHCP cache mode. The module uses a previously set IP address if the lease is not
expired (or the lease survives reboot).
4
Enables DHCP server in soft AP mode.
Using DHCP cache mode can reduce the time the module requires to wake from deep sleep, which saves power. The
module checks the lease time; if it is not expired, the module uses the previous IP settings. If the lease has expired,
the module attempts to associate and uses DHCP to obtain the IP settings. The DHCP cached IP address does not
survive a power cycle or reset.
Default:
1
Example:
set ip dhcp 0
// Turns DHCP off