ManiacBug created a package, ZMAC, that allows Zigduino users to use Atmel's IEEE 802.15.4 MAC library under the Arduino environment. We tested it together Saturday evening on a star network with seven leaf nodes and one coordinator. The only limitation was the number of boards we could power with the power supplies and cabling on hand. I forgot to take any pictures, but ManiacBug wrote up the ZMAC package in a blog post:
ZMAC is my solution to this problem, available at github.com/maniacbug/ZMAC. First, you download the Atmel MAC distribution yourself, sign up with Atmel, agree to the license, etc. Then you get ZMAC, and run the fileprep script. This will copy and modify the files as needed to organize them so the Arduino library can pick them up. It will even translate some of the examples into a form that will load and compile and run using the Arduino IDE.
The ZMAC README covers all the details on how to set it up, and test it. Once the examples are running, it’s time to learn more. The MAC by itself is not particularly easy to use for beginners. It expects a crisp understanding of the principles of the IEEE 802.15.4 MAC design. There are three things to study to help understanding this:
- 802.15.4 guides and documentation. Try This Whitepaper, and anything else you can find searching the web.
- The user guide in the Atmel MAC. Read through the Doc/User_Guide/AVR2025_User_Guide.pdf. This is a dense guide chock full of stuff you need to know. Start with Chapter 9, which explains the sample applications in great detail.
- The Star_Nobeacon example code. I recommend putting in “printf” debugging statements everywhere so you can keep track of what’s going on.
A better solution would be a library that’s easier to use for mainstream Arduino users (i.e. beginners) that presents a higher-level layer to the user. Currently the app is expected to handle much of the details of scanning and association. This could all be pulled into the higher-level library.
This hypothetical library should enable all the functionality covered in Robert Faludi’s excellent Wireless Sensor Networks book.