Writing a script to have Meshlium send Waspmotes data

All related to the Kernel, packages system and libraries
Post Reply
ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Writing a script to have Meshlium send Waspmotes data

Post by ammarL » Mon Sep 05, 2016 10:37 am

Hi Team,

I have a Meshlium gateway and 4 Plug and Sense Waspmotes that communicate via LoRa. Since the LoRa implementation does not support Over the Air Programming, I want my Meshlium gateway to programmatically broadcast messages to all 4 waspmotes to change their behavior (I will put in code in the waspmotes to receive the message and change accordingly to one of a set of prerecorded behaviors)

Complication: these waspmotes sleep for the majority of the time to save power so sending messages using the Meshlium Manager System web interface is not a viable solution.

My question: Would please share a code example of how to broadcast such messages from Meshlium using, for example, a shell script? Basically, I want to know how the Manager System interface implements sending messages to waspmotes so that I can write custom message sending code.

Thank you kindly.

Cheers

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Writing a script to have Meshlium send Waspmotes data

Post by libelium-dev » Mon Sep 05, 2016 1:51 pm

Hi ammarL,

It exists a file with some LoRa functions that can help you. It is developed in PHP and it is located in /var/www/ManagerSystem/plugins/b_SensorData/a0_zigbee/php/LoRa_tools.php. Take into account that the process is unidirectional and you have to be sure that your Waspmote is not sending data and stop sensorParser process in Meshlium before doing it (sensorParser.sh stop)

Hope this file helps you.

Best regards,

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest