how get the gateway address from a digi connectport in a python program?

I have a program into the Digi device, I need to get the gategay address in this programm but I dont know how?

Do you want to get the gateway MAC address?
You can send RCI request(query_state) from device cloud and you can parse the response for the mac address.
Or
You can telnet to the device and issue the command #>display device to get the device information which includes MAC address.

thanks but I want to get the Xbee`s extended address of the ConnectPort not the MAC address

Same way. You can send RCI request(query_state) from device cloud and you can parse the response for the address of the xbee (search for zigbee_state in the response)

Or

You can telnet to the device and issue the command #>display xbee to get the device information which includes the address of the local xbee.

1 Like

ok thanks, but I want to get the Xbee RF module extended address using a .py program uploaded to the python section of the ConnectPort X2 (industrial), Is it possible?

Yes you can using the rci module. Here is sample code:

import rci

This is the rci request that will return device state

request = ‘’’

‘’’

Response will store the response from the rci request

response = rci.process_request(request)

print response

Instead of just printing you will need to get the information you want from within the response.

OH! I understand now, thank you so much :slight_smile: