Home/Support/Support Forum/How can I change my xbee setup for AP = 0 from API mode (AP = 1 or AP =2) by using digi module in python ?
New and improved user forum site coming soon
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How can I change my xbee setup for AP = 0 from API mode (AP = 1 or AP =2) by using digi module in python ?

0 votes
I am using XBee PRO S3B for wireless radio communication.

Currently I am configuring it by XCTU, however, sometimes I need to reset or re configure with non graphical interface.

Using digi module with python seemed good alternative to me. So here is my source code.

```
import digi
from digi.xbee.devices import XBeeDevice
xbee0=XBeeDevice("/dev/ttyUSB0",9600)
xbee0.open(force_settings=True)
xbee0.reset()
```

In this way I can reset my destination mac address. However, there is one critical drawback using this method. xbee0.open() is only supported by API mode, however, I am always using AT mode. So the command force_settings=True enables my AT mode to change into API mode, however, I am not sure how can I get back to AT mode. My device only works with AT mode so I need to go back to AT mode to do something. Is there any good solution for this?
asked Jul 25 in Python by Kyle_case New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

0 votes
Why don't you just issue the local AT commands to enter command mode, change the address and exit command mode via Python?
answered Jul 26 by mvut Veteran of the Digi Community (15,515 points)
I am not familiar with that method. Where can I find it?
Thank you very much.
...