This is an old revision of the document!
TODO
The system consists of 2 interconnected networks: the first network, formed by the Sparrow nodes, is connected to an external network through a border router. Once data reaches the external network, it can be stored in a database and/or sent to user devices.
One of the Sparrow nodes is chosen to be the border router that communicates with a host using a tool called tunslip6. Tunslip6 creates a virtual network interface(tun0) and uses SLIP (Serial Line Internet Protocol) to encapsulate the traffic on the serial line. The border router will receive the address aaaa::1 and it will form a network with the other Sparrow nodes, by passing the prefix received from the host to all nodes.
The other Sparrow nodes will run Contiki with a CoAP server as the main application. Those nodes will acquire data using different sensors and will pass the data to the CoAP client in the external network.
—–TODO: Move to different section—– The general syntax for making such a request looks like this:
coapclient -o REQUEST -p PATH
where “REQUEST” can be one of the following: GET|PUT|POST|DELETE|DISCOVER|OBSERVE and PATH is the path where the resource is found on the server. For example, here is a command that requests the temperature value from the server:
coapclient -o GET -p coap://[aaaa::11:22:33:44]:5683/sensors/temperature
Sensor nodes are devices capable of acquiring information from the environment using different types of sensors attached to them. Those sensors perform measurements and return information such as the value of the temperature, the quality of air, the value of the humidity in the air, etc. The microcontroller communicates with the sensors and retrieves the data gathered by them to process/analyze/send it further. The transmission of the data from the sensors to the microcontroller is done using a common language (communication protocol) that enforces a set of communication rules to allow the exchange of information. Similarly, to transmit the data from the sensor node to a different device (a laptop, a phone, a different node, etc.) a protocol must be established between the entities that wish to communicate. Actually, multiple protocols are usually used to allow communication between devices, each one of them governing a different communication level/layer. The scheme of protocols for sensor nodes communication used in this project is depicted in the following diagram.
CoAP is an application layer protocol used for message transfer on devices with very strict memory constraints. Since CoAP is based on the REST model, obtaining data from the nodes using CoAP is similar to performing HTTP requests. For all the sensors attached to the Sparrow nodes a resource object is created, to store information
TODO
TODO