WiSnap User Manual 2.21 04112011-JF
Page
53
of
66
15
Ad-hoc Networking Mode
15.1
Infrastructure and ad-hoc comparison
There are two types of networks. The most common network is infrastructure in which an access
point (AP) is the common point linking all Wi-Fi devices. The access point keeps track of who’s on
the local network and directs IP packets. In many cases the AP is also a router and will forward
packets from the local network to other networks and the internet. It is also very common for the
AP to be running a DHCP server which tracks and assigns IP addresses.
Ad-hoc is considered a point to point network in that each Wi-Fi device is linked directly to every
other Wi-Fi device on the Ad-hoc network. There is no access point. All Wi-Fi devices on the ad-hoc
network participate in keeping the network alive and each keeps 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 Auto IP, although one of the Wi-Fi devices can be configured as a DHCP server.
15.2
Configuring ad-hoc mode
The WiSnap GSX module can be configured to setup an ad-hoc network. This mode is useful for
point to point communications. The WiSnap device is in Ad-hoc mode the device looks like access
point for other Wi-Fi devices to join.
NOTE:
Currently the WiSnap only supports OPEN mode for creating ad-hoc networks.
Ad-hoc mode can be set via hardware or software commands.
To enable ad-hoc mode via hardware:
Set
PIO9
high (3.3V) at power up. On the RN-134 PIO9 is on J1 of the jumper block. When the
module powers up in ad-hoc mode the WiSnap module creates an ad-hoc network with the following
SSID:
WiSnap-GSX-XX where XX is the final two bytes of the devices MAC address
Channel:
1
DHCP:
OFF
IP address: 169.254.1.1
Netmask:
255.255.0.0
With the ad-hoc jumper in place the above settings override the current saved configuration settings.
To enable ad-hoc mode from software:
From command mode, the module is configured for ad-hoc mode using the join command. You will
also need to set the ssid and channel.
set wlan join 4
set wlan ssid my_ad-hoc_network
set wlan chan 1
Turn off DHCP and set the IP address and netmask so other devices know where to connect to the
ad-hoc WiSnap GSX. Since auto IP fixes the first two bytes of the IP address you want to use the
netmask of 255.255.0.0 so that other device connecting to the module can be reached. Alternatively
you can set the netmask to a smaller subnet if the other device’s IP addresses are begin statically to
the same subnet as the ad-hoc device
set ip address
169.254.1.1