Getting Started

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.

Contents

  1. Is there anything I should know before I dive in?
  2. How do I get the source code?
  3. Can I download compiled binaries?
  4. How do I get it running on my OS?
  5. Which modules should I use?
  6. How should my modules be configured?
  7. Creating connections
  8. Using connections
  9. Advanced connections
  10. Running some samples

Other Resources

How do I get it running on my OS?

Linux Windows FreeBSD OS X

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.

Setting up on Windows Windows

libxbee's network sharing is not currently supported under Windows - this includes the 'net' mode and the xbee_netStart() and xbee_netStop() functions.

System Setup

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.

Getting the source code

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.

Common Problems

  • "The program can't start because mspdb100.dll is missing from your computer" - You need to run vcvars32.bat (see above), or a component of MSVS or the Windows SDK is missing.
  • I can't open the serial port - Windows is stupid... If you're using a COM port that is numbered above 8, you'll need to use the following notation: \\\\.\\COM10

Compiling libxbee

I have written some detailed notes that outline how to build libxbee on the following platforms: