User`s guide
RN-WIFLYCR-UG
www.rovingnetworks.com Version 1.2r 4/30/13 page 90
track of the other active devices on the network by sending and receiving beacon and
probe packets. In most cases, IP addresses are assigned through automatic IP,
although one of the Wi-Fi devices can be configured as a DHCP server.
4.8.1 Configuring Ad Hoc Mode
You can configure the module to setup an ad hoc network. This mode is useful for point-
to-point communications. When in ad hoc mode the device appears like an access
point with which other Wi-Fi devices can associate.
You can enable ad hoc mode via hardware or software commands.
4.8.1.1 ENABLE AD HOC MODE IN HARDWARE
To enable ad hoc mode using hardware, set GPIO9 high (3.3 V) at power up. For the
RN134 board, GPIO9 is on pin 1 on the jumper block (J2). For the RN174 board,
GPIO9 is on the J6 connector. Upon power up with GPIO9 high, the WiFly module cre-
ates an ad hoc network with the following settings:
SSID: WiFly-GSX-XX, where XX is the final two bytes of the device’s MAC
address
Channel: 1
DHCP: OFF
IP address: 169.254.1.1
Netmask: 255.255.0.0
With the ad hoc jumper in place, these settings override any current saved configura-
tion settings.
4.8.1.2 ENABLE AD HOC MODE IN SOFTWARE
To enable ad hoc mode in software, you use the set wlan command with the join, ssid,
and chan parameters. For example, type the following commands in command mode:
set wlan join 4
set wlan ssid my_adhoc_network
set wlan chan 1
Turn off DHCP so that the module does not attempt to obtain an IP address from
another device, and set the module’s IP address and netmask. Because automatic IP
assignment fixes the first two bytes of the IP address, use 255.255.0.0 as the netmask
Note: Roving Networks supports ad hoc networking, however, going forward, ad
hoc mode will be replaced with soft AP mode. Ad hoc mode and soft AP
mode are mutually exclusive and cannot operate at the same time. The
support for these modes resides in separate firmware images loaded on the
module. By default, Roving Networks modules are shipped with the ad hoc
mode image to maintain backwards compatibility with existing applications.
Refer to “Access Point (AP) Mode” on page 45 for more information on AP
mode.
Note: Currently the module only supports the OPEN mode for creating ad hoc
networks.