www.rovingnetworks.com
Version 1.32r 10/9/2012
11
RN -W IFLY -E VAL-U M
Enable Ad Hoc Mode via Hardware
To enable ad hoc mode using hardware, set GPIO9
high (3.3 V) at power up. For the RN-134 board, GPIO9 is on pin 1 on
the jumper block (J2). For the RN-174 board, GPIO9 is on the J6 connector. Upon power up with GPIO9 high, the WiFly
module creates 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
IP address:
169.254.1.1
Enable Ad Hoc Mode via 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
Set the WiFly 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 so that other devices connecting to the module can be reached. You can also
set the netmask to a smaller subnet if the other device’s IP addresses begin statically at the same subnet as the ad hoc
device.
set ip address 169.254.1.1
set ip netmask 255.255.0.0
Turn off DHCP so that the module does not attempt to obtain an IP address from another device.
set ip dhcp 0
Save your configuration and reboot. The module will be in ad hoc mode. See Figure 9.
Figure 9. Enable Ad Hoc Network Mode
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from