XBEE Ready.

December 9, 2013 at 10:26 (Uncategorized)

Now, in my last Posts i showed you that i use the Xbee Series to play a little bit around.

First of all i tried to design a system that allows me to realize my House Automation.

I wanted to include the Xbee System as this not just helps me to save cables, but enable me doing freaky wireless stuff like remote-open my door or alarming all Xbee Chips at the same time that some burgular trying to do his work.

I had the following things in mind:

  • Xbee Devices are all over the house, encryption on, connected to a Micro like the ATMega32 or standalone (for my letterbox)
  • Communicator is hooked up to a linux system so i can take control from there
  • Xbee’s should communicate with each other, the Computer is just passive

So the following thing is what i need:

1. XBee’s in API Mode
This is a must as only in this mode fast addressing is possible

2. Linux system connected to the Coordinator via FTDI

I had the standard ftdi_sio module loaded with the connected FTDI 232BL, it got’s recognized and i can communicate with the XBee.
After a while i can write to the XBee but my subsequent read’s doesn’t return anything.

While i debugged and changed my Code over two Month’s i found the Problem: The FTDI Chip or the ftdi_sio driver.
I use perl, threads and a lot of other stuff i never used before and searched the Problem there. But i didn’t find anything.
A quick test with an standard RS232 Converter + XBee resulted that my Code is completly OK. >:[ D-A-M-N

3. Preferbly a Perl Script that run’s a a Server
So more than one “Client” can Connect to it and Control everything, for ex. a recurring linux Cron Job checking Temperature and a “GUI” User Interface on Windows should not disturb each other and both should work at the same time.

4. Xbee’s connected to ATMega32
No problems here, ATMega32 have a Serial Interface

5. ATMega32 API
This was not too hard to write, but the Memory Management is tricky..
I learned that i even can overwrite my Memory with BASCOM, so this is no more excuse to not use C ^^


This was written about two years ago, in the meantime i created a system exact like this one, written a perl server and has the XBee’s connected.

Everything is fine until a day where all XBee’s lost it’s connection to the coordinator without an obvoius reason.

I’m still investigating why the Radiochips loose it’s connection, sometimes it takes 3-4 Weeks, sometimes every hour they loose it.

I’m really disappointed about the relaiability of those XBee’s, i thought they will reconnect to other routers but it seems that one XBee is sticked to it’s parent forever.

I’ve written an perl server with jabber and network integration for the System but i discarded it.
At the moment i’m concentrating on an FHEM implementation as I started to head over to HomeMatic :)

More to come..





  1. titanus said,

    and so … what about xbee and fhem?

    • devbios said,

      I’ve got it running within FHEM, working (on the FHEM side) like a charm, but the XBee’s occasionally disconnect, break down the whole “mesh” net and everytime I have to restart every single xbee – about once a month…

      My implementation is more than ugly as I had to write an FHEM link-layer and module-type module for that (as my first try for FHEM modules).

      Nevertheless if you are interested I can share my pre-alpha code, but it is miles away from being FHEM productive ready.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: