WIFLY GSX WIFLY EZX
WiFly GSX/EZX
WiFly GSX/EZX
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
WiFly <strong>GSX</strong>/<strong>EZX</strong><br />
www.rovingnetworks.com WiFly-RN-UM 4/8/2011<br />
11. Sending data using UDP<br />
11.1. Overview<br />
UDP is a connectionless protocol. There is no initial handshaking between the hosts to set up the UDP<br />
connection. There are no acknowledgements sent by the receiver for UDP packets that it receives. This<br />
makes UDP an unreliable protocol, as there is no guarantee that the data will be correctly delivered.<br />
However, due to its connectionless nature, UDP is suited for applications that cannot tolerate too much<br />
latency but can tolerate some errors in data. Transmission of video would be a good example of UDP<br />
application.<br />
To use UDP on the WiFly-<strong>GSX</strong> module, you will need to enable the UDP protocol using the command “set<br />
ip proto 1”. You will also need to specify the remote host IP address and the local and remote port number<br />
that you will use for UDP communications.<br />
The commands to enable UDP data transfer are:<br />
Associate to a network:<br />
set wlan ssid <br />
set wlan phrase <br />
// set the network name<br />
// set the passphrase for WPA and WPA2 modes<br />
Set up the protocol and port number<br />
set ip proto 1<br />
set ip host <br />
set ip remote <br />
set ip local <br />
save<br />
reboot<br />
// enable UDP as the protocol<br />
// set the IP address of remote host<br />
// set the remote port number on which the host is listening<br />
// set the port number on which the WiFly module will listen<br />
// saves the settings in config file<br />
// reboots the module so that the above settings take effect<br />
NOTE: If you attempt to send data by physically typing characters on the keyboard or if your<br />
microcontroller is not sending data fast enough, the WiFly module will send out packets with less data<br />
bytes. To avoid this, set the flush timer to a higher value. By default, it is set to 10 milliseconds. You can<br />
choose to either disable forwarding based on flush timer (use “set comm. time 0”) or set it to a higher value<br />
(e.g. set comm. time 2000)<br />
Since UDP is a connectionless protocol, data will start flowing as soon as the module is rebooted. Unlike<br />
TCP, it is not required to do an “OPEN” for the connection to be established. The WiFly-<strong>GSX</strong> module acts<br />
like a data-pipe, so the UART data will be sent over the Wi-Fi link via the UDP protocol (in this case) and<br />
the data coming over the Wi-Fi link (via UDP protocol in this case) will be sent to the UART.<br />
809 University Avenue • Los Gatos, CA 95032 • Tel (408) 395-6539 • info@RovingNetworks.com<br />
~ 46 ~