# Java XBee API

**URL:** <https://community.sparkfun.com/t/java-xbee-api/6655>\
**Category:** Wireless & IoT\
**Created:** [March 5, 2008, 9:01pm UTC](https://community.sparkfun.com/t/java-xbee-api/6655 "2008-03-05T21:01:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rappa](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@rappa](https://community.sparkfun.com/u/rappa)\
**Post date:** [March 5, 2008, 9:01pm UTC](https://community.sparkfun.com/t/java-xbee-api/6655/1 "2008-03-05T21:01:25Z")

</div>

In case anyone is interested, I have been developing a Java API for interacting with XBee radios. So far it can program your XBee, either through API mode or transparent and send and receive packets. It doesn’t yet receive I/O samples from a remote XBee but that is next on my list. The source code may be downloaded at ~~[http://www.tireswing.com/xbee-api-0.1.zip\</del](http://www.tireswing.com/xbee-api-0.1.zip%3C/del)\> [http://code.google.com/p/xbee-api/](http://code.google.com/p/xbee-api/) (it is packaged as an Eclipse project). I have been testing it with XBees connected to unchipped Arduinos by way of the Arduino XBee shield.~~

---

<div class="post-metadata">

**Author:** ![stevech](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@stevech](https://community.sparkfun.com/u/stevech)\
**Post date:** [March 6, 2008, 5:30am UTC](https://community.sparkfun.com/t/java-xbee-api/6655/2 "2008-03-06T05:30:36Z")

</div>

java has no unsigned 8, 16, or 32 bit types?

---

<div class="post-metadata">

**Author:** ![riden](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@riden](https://community.sparkfun.com/u/riden)\
**Post date:** [March 6, 2008, 5:52am UTC](https://community.sparkfun.com/t/java-xbee-api/6655/3 "2008-03-06T05:52:31Z")

</div>

> stevech:  
> java has no unsigned 8, 16, or 32 bit types?

No, I’m afraid not. If you need unsigned values, you need to use a signed type that can hold the unsigned value (e.g., a short to hold an unsigned byte). Why no unsigned types? Best to ask James Gosling.

---

<div class="post-metadata">

**Author:** ![rappa](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@rappa](https://community.sparkfun.com/u/rappa)\
**Post date:** [March 6, 2008, 5:53pm UTC](https://community.sparkfun.com/t/java-xbee-api/6655/4 "2008-03-06T17:53:30Z")

</div>

I think the general consensus is to use short for 1 byte, int for up to 3 bytes, long for up to 7 bytes etc. Wasteful? maybe but still effective.

[http://www.cafeaulait.org/course/week2/02.html](http://www.cafeaulait.org/course/week2/02.html)

---

<div class="post-metadata">

**Author:** ![rappa](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@rappa](https://community.sparkfun.com/u/rappa)\
**Post date:** [April 10, 2008, 4:36pm UTC](https://community.sparkfun.com/t/java-xbee-api/6655/5 "2008-04-10T16:36:50Z")

</div>

FYI, I have moved the Java XBee API to Google Code [http://code.google.com/p/xbee-api/](http://code.google.com/p/xbee-api/)

---

<div class="post-metadata">

**Author:** ![riden](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@riden](https://community.sparkfun.com/u/riden)\
**Post date:** [April 11, 2008, 4:44am UTC](https://community.sparkfun.com/t/java-xbee-api/6655/6 "2008-04-11T04:44:18Z")

</div>

Thanks for the update. I’ll have to give the API a whirl sometime.

---

<div class="post-metadata">

**Author:** ![rappa](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@rappa](https://community.sparkfun.com/u/rappa)\
**Post date:** [May 2, 2008, 2:53am UTC](https://community.sparkfun.com/t/java-xbee-api/6655/7 "2008-05-02T02:53:56Z")

</div>

In case anyone is interested, I have released a new version of my API that supports the XBee ZNet (ZigBee) radios. Aside from the mesh networking, a notable feature of the ZNet radios is Remote AT. With Remote AT you can send most any AT Command to a remote radio (e.g. turn on/off I/O pin, query pin status, configure etc.). This feature is not present in the 802.15.4 XBees.
