Home/Support/Support Forum/DiscoveryOptions not defined

DiscoveryOptions not defined

0 votes
I am currently writing a program to interact with my XBee3. I am following the XBee Python library documentation and have a good application up and running so far. I have however come across one problem. I get the following error:

xnet.set_discovery_options({DiscoveryOptions.APPEND_DD, DiscoveryOptions.APPEND_RSSI})
NameError: name 'DiscoveryOptions' is not defined

I can scan the network successfully without this line but for some reason I can't add the discovery option information. Any ideas?

Here is my code block:
def scanner(d):
xnet = d.get_network()
#xnet.set_discovery_options({DiscoveryOptions.APPEND_DD, DiscoveryOptions.APPEND_RSSI})
xnet.set_discovery_timeout(25.5)
xnet.start_discovery_process()
while xnet.is_discovery_running():
time.sleep(30)
# Get a list of the devices added to the network.
device_list = xnet.get_devices()
print(device_list)
asked Oct 21 in XBee3 DigiMesh by johnSmit776 New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
The DD and RSSI are for the Zigbee mesh products.
answered Oct 21 by mvut Veteran of the Digi Community (13,489 points)
...