I've had quite a few people getting in contact asking for support with the initial setup and configuration of libxbee. As a result, I felt that it would be worthwhile writing this guide. libxbee is very straight forward, once you understand the principals involved.
libxbee has not been developed for use on bare metal systems. Arduino and PIC are bare metal systems.
libxbee supports the most popular operating systems - Linux, Windows, FreeBSD and now OS X too! My operating system of choice is Linux, meaning that it will likely be the most stable and best supported. At the opposite end of the spectrum is OS X, which without the generosity of the community, I have no access to.
First of all you should ensure that you have the required tools to build the library. The following list contains the bare minimum.
Next, you'll need to get a copy of the source code. Please see this page for more information on how to get the source code.
Now that you have the source code, you can proceed with compiling libxbee. This happens in a few steps, but should generally be a painless operation.
gmake configure. If this completes successfully, then you should see that a file (
config.mk) has appeared in the base directory.
config.mk. If you are cross-compiling, would like to strip the library down to the mode(s) that you want to use, or would like to enable more debugging information, then this is where you should do it.
MODELISTvariable will determine which modes are built into the library. If you leave it commented, then the default list containing all of the modes will be used.
CROSS_COMPILEvariable should be set to your toolchain's prefix (see
make/default/arm920t.mkfor an example cross-compile configuration).
gmaketo build the library. This should complete without any issues.