Several years ago, I made a Linux based API for using Digi XBee modems running a Zigbee mesh network. The firmware was developed on a Beagle Bone single board computer. Nothing substantial ever came of the API, but it was a good learning experience for both Linux programming and interfacing with XBee modems.
Zigbee Linux API Repository