WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
Phone 408-395-6539
-
26 -
10.8
Using the UDP Broadcast function
The WiFly module can be setup to automatically generate UDP broadcast packets. This is useful for a
number of reasons:
-
Some Access Points will disconnect devices that sit idle and don’t send any packets after a
time. Using the UDP broadcast informs the AP that WiFly is alive and wants to stay
associated.
-
This feature can be used by application programs to auto-discover and auto configure the
WiFly module. If an application is listening for the UDP broadcast, a number of useful
parameters are present in the package that can be used for auto-discovery. For example,
the IP address and port number of the WiFly are both part of the packet, and thus the Wifly
can be connected to and configured remotely with this information.
-
The MAC address of the associated AP, channel, and RSSI value are available in this packet,
thus enabling a simple location and tracking based function.
By default
the Wifly module now sends out a UDP broadcast to 255.255.255.255 on port 55555 at a
programmable interval. The broadcast address, port and interval are set using the
“set broadcast
”
commands.
The format of the packet is: 94 bytes of data:
AP MAC
address
Chan
RSSI
Local
TCP port
Real Time
Clock
Battery
Voltage
Temp
Humidity
ASCII
time of
day
Version
and
datecode
User
Settable
DEVICEID
Sensor
7
bytes: size
0-5
6
MAC adddress of AP that we are Associated with (for location )
6
1
Channel we are on.
7
1
RSSI
8
2
local TCP port# (for connecting into the Wifly device )
10
4
RTC value (MSB first to LSB last)
14
2
Battery Voltage on Pin 20 in millivolts (2755 for example )
16
2
Digital sensor option (Temperature and humidity )
18
13
ASCII time
32
26
Version string with date code
60
32
Device ID string
92 2 Resistance reading of Sensor7 (RTD temperature option )