Home/Support/Support Forum/Digi GW CP4 with DigiMesh xbee.py API's
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Digi GW CP4 with DigiMesh xbee.py API's

0 votes
Hi All,
I'm using Digi GW CP4 with DigiMesh ZB Module to control some nodes and get some readings.

First, i want to add some api's in the xbee.py file but i cant access it in anywhere --ESP or over the internet (what i found is a debug or simulation form of it).
if any one could help me getting it and how to edit it on the CP4?

Second, I uses some remote commands to see my connectivity but there are many problems faced me:

I want trace the route but i tried every thing but couldn't get to any thing useful
Here are some options i used:
Code:
xbee.MESH_TRACEBACK = True xbee.debug_callback = True
also used sending options = 0x02
Code:
Router_Mac = ('[00:13:a2:00:xx:xx:xx:xx]!', 0xe8, 0, 0, 0x02, 0x42)

Last thing i want to make neighbor discovery by remote commands form the CP4 as:
Code:
neigh_list = xbee.ddo_command(Router_Mac[0], 'FN', "", 25, order=False, apply=True)
but it only recover the first neighbor address and the it ends and continue the main loop, it drops the remaining address not as
Code:
xbee.getnodelist(refresh=True)
, i even could not monitor the serial socket RX to get the nodes and read its data (as receive it as a serial raw data and then decode it).

So if anyone help me get solutions for these issues i will be very thankful.

Thanks In Advance,
I.G
asked Sep 2, 2013 in 3rd Party Python and API development in other Languages by sosovirus New to the Community (7 points)
edited Sep 2, 2013 by sosovirus

Please log in or register to answer this question.

1 Answer

+1 vote
the xbee module is actually a module built into the firmware, so you won't be able to modify it yourself. You can wrap your own class around it if you want like:
Code:
class my_xbee(xbee): def __init__(self): ...

As for your commands, I'm not entirely sure what you're trying to do, but the firmware takes control and handles all the routing/parsing of API frames and things of that nature. You can open a socket to read/write certain frames, and use the xbee.set_ddo_param to set settings, or the get version to get those settings.
answered Sep 18, 2013 by charliek Veteran of the Digi Community (408 points)
...