When you buy a kit containing Meshlium and Waspmote, they already come configured to work together. Meshlium will receive the sensor data sent by Waspmote using the ZigBee radio and it will store in the Local File System and in the Local Data Base.
The initial ZigBee frames sent by Waspmote contains the next sequence:
[HEADER]-mac:0013a20040307f9c -x:27,y:23,z:1023 -temp:28 -bat:97%
It is formed by the MAC address (64b), the acceleration in the three axis (x, y, z) , the temperature and the battery level.
In order to work with new sensor information added to the ZigBee frames go to the "Capturing and Storing new sensor data frames" chapter.
If you change any of the parameters in Waspmote or Meshlium you will have to do it in both platforms so that they still can communicate.
We can perform three different storage options with the ZigBee frames captured.
Local File System
Steps:
1º- Give a name to create a new file where the ZigBee data will be saved
2º- Select this file and press the "Select file" button
3º- Set the check box "Store frames in the selected file" and press the "Save" button
From now Meshlium will automatically will capture the ZigBee frames and it will store the results in this file. This process will also continue after restarting Meshlium.
The file will be created in the folder /mnt/user/zigbee_data and can be downloaded just selecting it and pressing the "Download" button.
At any time you can see the last "x" lines added to the file. Just set how many lines you want to see and press the "Show data" button.
Local Data Base
Meshlium has a MySQL data base up and running which is used to store locally the sensor data captured. In the "Local Data Base" tab you can see the connection parameters.
Database: MeshliumDB
Table: zigbeeData
IP: localhost / 10.10.10.1 *Depending on the parameters set in the
Interfaces section
Port: 3306
User: root
Password: libelium2007 *You can change this password see the Users Manager section
Steps:
1º- Set the check box "Store frames in the local data base" and press the "Save" button
From this time Meshlium will automatically read the ZigBee frames and will store the results in the Local Data Base. This process will also continue after restarting Meshlium.
At any time you can see the last "x" records stored. Just set how many insertions you want to see and press the "Show data" button.
External Data Base
Meshlium can also store the information captured in an External Data Base.
Steps:
1º- Pressing the "Show sql script" you will get the code needed to create the data base along with the table and the right privileges.
2º- Insert this code in your MySQL management application.
3º- Fill the Connection Data fields with the information about where the data base is located (IP, Port) and with the authentication options (Database, Table, User, Password).
4º- Now press the "Check Connection" button to see if the configuration is correct
5º- Set the check box "Store frames in the external data base" and press the "Save" button
From this time Meshlium will automatically read the ZigBee frames and will store the results in the External Data Base. This process will also continue after restarting Meshlium.
At any time you can see the last "x" records stored. Just set how many insertions you want to see and press the "Show data" button.
Show me now!
In the "Show me now!" tab you can see in real time the ZigBee frames captured.
You can specify if you want the information to be updated periodically with the defined interval just use the Scan Interval input. Take into account that in this section you can only see the last frame captured, if you want to see the complete use data base or file system storage options.