05 December 2008

Xbee Chat

OohRah! I now have two Xbees chatting. I hadn't messed with the Xbees for a few weeks because work was crazy and the Holidays, etc. After a few days of vacation, I dusted off the junk and tried to remember where I was.

One Xbee is in an AdaFruit Adapter connected to an Arduino Duemilanove and the other Xbee is in an Xbee Explorer USB.

The Arduino is wired to the Xbee Adapter Kit with only 4 wires. I used wire and connectors from the Wide Screen Salvage project.
  • Arduino Gnd -> Adapter Ground
  • Arduino +5V -> Adapter +5V
  • Arduino Tx -> Adapter Rx
  • Arduino Rx -> Adapter Tx
Note that the Tx->Rx and Rx->Tx. Since the Arduino and Adapter are talking to each other serially, this makes sense. But for the first few attempts, I had Rx-> Rx, Tx->Tx and of course it didn't work.

Digi's X-CTU was used to upgrade firmware. I originally had Coordinator firmware on the Explorer board but communications seemed spotty. Once I put ZNET 2.5 Router/End Device AT firmware on both and configured them like I wrote last month, things started coming together.

The Arduino is running a real simple sketch - it simply writes "Testing" to the Xbee which gets transmitted and then received by the Xbee connected to my PC. I used the X-CTU terminal tab to see the incoming message's. Kinda basic but I needed something to save my sanity.

Here's the next plan. Upgrade firmware on the PC Xbee to API (ZNET 2.5 Router/End Device API) and then use xbee-api - A Java API for Digi XBee/XBee-Pro OEM RF Modules and see if I can start programmatically working with these things.

No comments: