Digi GW CP4 with DigiMesh xbee.py API's

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:

xbee.MESH_TRACEBACK = True
xbee.debug_callback = True

also used sending options = 0x02

 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:

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

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

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:


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.

1 Like