Sending ZigBee frames to Waspmote from Meshlium

Meshlium can also send ZigBee frames to the Waspmote nodes. In order to use this feature you have to stop the "capturing and storing" daemon which is running in the system.

To do so access by SSH to Meshlium and stop the default ZigBee daemon:

    #/etc/init.d/ZigbeeScanD.sh stop

Now you can execute the ZigBeeSend command. There are several ways to send information to a node:

  • Using its 802.15.4 MAC address (64b)
  • Using its Network address (MY) (16b)
  • Performing a broadcast transmission

Sending to Waspmote using its MAC address (64b):

    #./ZigBeeSend -mac 0013a2004069165d "Hello Waspmote\!"

Sending to Waspmote using its NET (MY) address (16b):

    #./ZigBeeSend -net 1234 "hello Waspmote\!"

Send to all the Waspmote devices at the same time - Broadcast mode:

    #./ZigBeeSend -b "hello everybody\!"

The source code "ZigbeeSend.c" and the corresponging .pde file for Waspmote can be downloaded here.

You can download this file and change them in order to get new features and sending options.

Compilation:

The compilation can be done in the same Meshlium. Just copy these files in a folder accessing by SSH and execute:

    #gcc -o ZigBeeSend ZigBeeSend.c -lpthread

If you want to create a "ZigBee sending daemon" that is executed each time Meshlium starts you have to deactivate the "ZigBee Capturer" daemon (/etc/init.d/ZigbeeScanD.sh) as the ZigBee radio has to be used by one process at a time.

You will find support in the Libelium Forum at: http://www.libelium.com/forum

Download code

You can download the code of this tutorial.


© Libelium Comunicaciones Distribuidas S.L.

| Terms of use