Atmel AVR2070 User Manual

Page of 93
 
26 
AVR2070 
8240B-AVR-06/09 
The IPSO demo has two parts to it. The first part is an interactive control to allow 
polling of the sensor and configuration tasks. The second part is to have the sensor 
automatically send data to a central server. 
The wireless sensor node listens on three UDP ports, their use is as follows: 
Table 6-4-1. UDP Ports 
Port  
Description 
61616 
The sensor will listen for requests on this port 
61617 
The sensor will listen for data from other nodes on this port 
61618 
The sensor will listen for administrative commands on this port 
 
Tip 
If both the destination and source ports are in the range 0xF0B0 to 
0xF0BF (61616 – 61631), 6LoWPAN can compress the destination and 
source ports, saving four bytes of transmitted data. 
 
The acceptable commands on each port are listed in the next sections. 
6.4.1 Commands on Port 61616 
The node will accept the following commands on port 61616, and all commands must 
end with either a line-feed, or carriage-return line-feed combination (<LF> or 
<CR><LF>).  
Table 6-4-2. UDP Commands on Port 61616 
Command Description 
Get the current temperature. Return value will be 'T22.5' for example for a 
22.5 C temperature. 
Get the current humidity. Return value will be 'H13' for example for 13% 
humidity. 
Get the current light reading, from 0-100. Return value would be 'H50' for 
example. 
Get the status of the LED. Either 'A0' to indicate LED is off, or 'A1' to 
indicate LED is on. 
A1 
Turn the LED on. No return value. 
A0 
Turn the LED off. No return value. 
 
Unknown commands will result in a return value of the byte 0xFF followed by the 
unknown command. 
As an example connect to the node with netcat6 on port 61616. For these examples 
<enter> means to press enter, and anything that is underlined is a response back 
from the node. 
C:\> nc6 -u 2001:db8:1e1:1:baad:ff:fe00:1 61616 <enter> 
T<enter> 
T22.5 
H<enter> 
H50