zigbee.py

I’ve got a connectportX2 and initially it already has zigbee.py installed on it. This python file was 1147 bytes. I accidentally deleted it. Does anyone know where i can get this original zigbee.py file? I tried to upload another zigbee.py file from the source code but that’s 39000 bytes and wont fit on the gateway, i keep getting insufficient space error.

What’s the difference between those 2 zigbee files anyway? Besides their respective sizes i.e.

Cant help with the x2, but I have an x4 which has a zigbee.py (21 bytes) that contains the following;

from _zigbee import *

I am not sure it is available on line, but reloading the x2 firmware should reinstate the file.

With my limited understanding of DIGI gateways zigbee.py should be the same. On PC hosts their is an alternative zigbee.py which is considerably larger (41K) which emulates the DIGI python classes built into the gateway products

Note that the “filesystem” is not included in a new CPX firmware, so reflashing the EOS or main firmware of a CPX2 or CPX4 will not affect (neither fix nor break) Python files. The Python auto-start setting might be cleared during a factory reset/reflash, but not the files themselves.

ftp://ftp1.digi.com/support/sampleapplications/zigbee.py

This is the one from the CP-X. The reason this one is 1147 bytes instead of 21 is the copyright info at the beginning of the file.

Thanks, i got it. But having a look, the main code is:

from _zigbee import *

where is this _zigbee file located in the files that are uploaded to the gateway? Looking @ all the files that has been uploaded to the gateway (i.e. embedded_kit_gateway.zip, embeddedkitmanager.py, embeddedkitservice.py), i could not find a zigbee file/script. How does it obtain its data then? What does this function/code do?

The “missing” functionality is embedded within the binary operating system image.

This embedded module was initially named _zigbee, but has evolved to be named xbee in more recent firmware releases (with the _zigbee module name remaining as a synonym for backwards compatibility).

The module provides an abstraction for complex operations related to the manipulation of the XBee radios, both local and remote. One such operation, for instance, is “get_node_list()”, which performs a device discovery and reports the result.

More information about the module, including examples, is on the Digi developer Wiki: http://www.digi.com/wiki/developer/index.php/Xbee

This is almost a 2 year old post… I believe the answer to this topic might be found here at this thread.
However, I’m just wondering, how accurate does the zigbee.py-for-PC script closely resemble to the actual binary operating system image? (since it originated from Digi’s archives)
Is that the most recent update too? Last recorded was Aug 2010.

Unfortunately the zigbee-for-PC isn’t a formally supported tool … rather something some Digi engineers created for internal testing purposes.

So it often works for simple things, but it will NOT (for example) allow you to run Dia with the xbee_manager enabled and an XStick. I wish it did - I personally would find that very useful!

ok, good to know. Thanks for the reply Lynn