Newsletter

› Libelium World:

New Sensor Parser for Meshlium gathers data from 3G, GPRS and WiFi interfaces

June 23rd, 2014
- Libelium

Up to day Meshlium was ready to get sensor frames from the 802.15.4 / ZigBee interfaces. However, as each day more and more clients demand in Waspmote and Plug & Sense! radio technologies such as 3G, GPRS and WiFi thatcan handle longer distances; so we have added to Meshlium (starting in the 3.1.5 version) the capability of getting data from any radio which performs an HTTP or HTTPS request.

An example of a complete HTTP request using the new GET method would be:

Data frames received via HTTP are stored in the same Data Base that 802.15.4 / ZigBee frames, and have the same format, so all the data can be processed the same way. In the image below we can see examples of sensor frames coming from different interfaces (ZigBee, 3G, WiFi); all of then are parsed and inserted in the same Data Base after adding a timestamp.

The Waspmote API has been modified to add this new capabilities to the radios that handle HTTP connections: 3G, GPRS, WiFi. So now we can have this new feature running in our programs in just three simple steps:

A new frame must be created calling the proper function.

Then we have to add different sensor values using the appropriate sensor tags provided for each sensor.

Depending on the communication module to be used, different functions should be called in order to perform the HTTP query. In these functions, we must specify the Meshlium’s IP address or URL and finally the pointer and length of the frame’s buffer.