WiFly GSX
www.rovingnetworks.com
WiFlyGSX-um 9/16/2010
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
•
~ 38 ~
before calculating TCP checksum so it will pass thru the TCP stack correctly. This register counts at 32,768
Hz. If the timeserver function is enabled, the RTC should accurately reflect the real time. This register is
also counting while in sleep mode.
11.
Sending data using UDP
11.1.
Overview
UDP is a connectionless protocol. There is no initial handshaking between the hosts to set up the UDP
connection. There are no acknowledgements sent by the receiver for UDP packets that it receives. This
makes UDP an unreliable protocol, as there is no guarantee that the data will be correctly delivered.
However, due to its connectionless nature, UDP is suited for applications that cannot tolerate too much
latency but can tolerate some errors in data. Transmission of video would be a good example of UDP
application.
To use UDP on the WiFly-GSX module, you will need to enable the UDP protocol using the command “set
ip proto 1”. You will also need to specify the remote host IP address and the local and remote port number
that you will use for UDP communications.
The commands to enable UDP data transfer are:
Associate to a network:
set wlan ssid <string>
// set the network name
set wlan phrase <string>
// set the passphrase for WPA and WPA2 modes
Set up the protocol and port number
set ip proto 1
// enable UDP as the protocol
set ip host <ip address>
// set the IP address of remote host
set ip remote <port>
// set the remote port number on which the host is listening
set ip local <port>
// set the port number on which the WiFly module will listen
save
// saves the settings in config file
reboot
// reboots the module so that the above settings take effect
NOTE:
If you attempt to send data by physically typing characters on the keyboard or if your
microcontroller is not sending data fast enough, the WiFly module will send out packets with less data
bytes. To avoid this, set the flush timer to a higher value. By default, it is set to 10 milliseconds. You can
choose to either disable forwarding based on flush timer (use “set comm. time 0”) or set it to a higher value
(e.g. set comm. time 2000)
Since UDP is a connectionless protocol, data will start flowing as soon as the module is rebooted. Unlike
TCP, it is not required to do an “OPEN” for the connection to be established. The WiFly-GSX module acts