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.
libxbee's network sharing is not currently supported under Windows - this includes the 'net' mode and the
To build libxbee, you will need to have the following software installed on your computer:
To complete the installation of the GNU tools, you'll have to add
C:\Program Files (x86)\GnuWin32\bin (or the equivelant for your system) to your system's PATH environment variable.
You will currently need to use the 'win32' branch when working with Windows.
You'll need to get a copy of the source code. If you aren't comfortable with Git, or would like the easier path, then you can download a ZIP archive of the win32 branch from here. If you'd like to use Git, or want to share the source repository, then 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. You'll need to extract or checkout the source to a directory, that we'll refer to as the 'working directory'. The build happens in a few steps, detailed below.
vcvars32.bat(see above), or a component of MSVS or the Windows SDK is missing.
I have written some detailed notes that outline how to build libxbee on the following platforms:
In addition to the software mentioned above, you'll require the following (these are listed as a known working reference point):
cdinto the working directory.
make configure. If this completes successfully, then you should see that a file (
config.mk) has appeared in the working directory.
config.mk. You will need to setup the following variables (shown with examples):
VCPATH- This should point to the Visual Studio installation directory -
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC(for Visual Studio 2015rc)
SDKPATH- This should point to the Microsoft SDK installation directory -
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A
CFLAGS- You'll need to add an include path so that the build will complete successfully... Add the following line:
CFLAGS+="/IC:\Program Files (x86)\Windows Kits\10\Include\10.0.10056.0\ucrt"
CLINKS- You'll also need to add a library path... as below:
CLINKS+="/LIBPATH:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10056.0\ucrt\x64"
SDKLIBDIR- You'll need to uncomment these lines, and possibly configure them appropriately:
struct timespec, you'll need to uncomment the following
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 (excluding net as previously mentioned).
maketo build the library. This should complete without any issues.