In the image above you see a basic readout of a CoAP resource. For this example the resource represents the temperature of a fictional room with number 23 and we are interested in the average value for some measurement period. To achieve this the Lobaro universal box comes awake in a predefiened time interval and performs the actual measurement of the room temperature. For this a temperature sensor has to be attached to the box. For example, it could be of type analog PT100 RTD or digital DS1820.
Very similar to a webpage on a standard http webserver the temperature values are stored on the Lobaro universal box which implements a CoAP server. For a wireless temperature readout the CoAP client has to send a „GET“ request containing the uri of the resource. Optionally the client can attach some uri-query in this case „?type=avg“, to indicate that the average temperature rather than the actual one is requested. In the above example case the full client CoAP request looks like:
The CoAP server will answer most likely with an so called „piggybacked ACK“ which contains both the acknowledge of the request and the payload of the response. In this example the average temperature of room 23. You can learn more about the request / response model of CoAP by diving into chapter 2 of the CoAP RFC7252.
CoAP has been implemented in various programming languages. These libraries can be used to build easily a CoAP client to interact with our CoAP hardware implementing the server side of the data exchange. All you need to know are the basics of UDP sockets & IPv6 networks, but you don’t have to take a soldering iron into your hand or do low-level embedded firmware programming in „C“.
A very nice CoAP client has been build as mozilla firefox browser plugin („Copper(Cu)„), which enables you to access resources on our embedded CoAP servers directly over the browser address bar! We recommend this tool for your first steps accessing Lobaro embedded CoAP servers.