Example of full full stack implementation with xbee

I want to create an zigbee device using xbee that implements the full stack APS, ZDO etc so that it can interface with other non digi zigbee devices in the standard way that the zigbee protocol was designed.

Does anyone know of an example of this?

Ideally I would like to make 1 xbee device masquerade as multiple different zigbee devices, which I’m not sure is even possible. For example connect multiple temperature sensors to one xbee and have each one appear as a completely separate zigbee end device to the zigbee network.

The ZigBee XBee modules are built on top of the Silicon Labs chips/stacks. The S2B modules use the EM250 and the S2C modules use the EM357. The XBee magic is hiding much of the underlying complication of the the stack through a simplified serial interface. For most purposes this is fine but the current XBee firmware doesn’t allow you to masquerade as multiple different devices.

All that said I doubt this is something you really need. The ZigBee architecture allows you to define multiple Endpoints (sort of like logical devices) on a single ZigBee device. You can have one endpoint per temperature sensor. When you set ATAO=3 the XBee will begin passing certain ZDO requests through the serial interface for you to generate responses to and let remote devices know which endpoints you have implemented and are available.

The samples directory in the Github repository (https://github.com/digidotcom/xbee_ansic_library) has an example on-off switch implementation. Sadly the documentation for that library is ‘less than useful’. You will need to dig through the Makefile to see which modules you need for this sample and then go from there.

The code also will not compile under Visual Studio as is. I have most of that sorted out but not published yet

You also need to set AP to 1 and set the ZS parameter to either Zigbee or Zigbee PRO (1 or 2) for the ability to talk to non Digi XBee modules.

Any chance you got any of that to work? I’ve been looking at that code, but it isn’t really helping me.

Have you done what I’m looking to do before? I realize I’ll have to set the parameters you describe to be able to communicate to non Digi devices, but my primary goal is to fully define an end point device.

Yes I have used other zigbee devices with the xbee zigbee devices. The API explicit frame function is designed for just that.

Yes, I have a dll project using VS2015Community Edition. See https://github.com/gerritv/Xbee-ZigBeeLib

Please note that network_scan and ZigBee_walker are not yet converted, . HAConsoleTest is my example/test application. It is somewhat more understandable than the examples provided before.

I started with Tom Collins’ version of xbee-ansic-library.