Home/Support/Support Forum/Python XBee Library ERROR when attempting to set the AP parameter in XBee device
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Python XBee Library ERROR when attempting to set the AP parameter in XBee device

0 votes
I have an XBee3 ZigBee network setup. I have both firmware flashed (MicroPython) and a main Python project. So, my goal is to send a message on auto-start (PS = 1) with one of my router devices to the coordinator device.

First question is, in order for MicroPython to run at all do you have to have the device in REPL mode (AP=4)? or can you have it in API (AP=1) mode the whole time and thats fine? The MicroPython will run in API mode?


Separate more specific question:

So when I go to reset the AP parameter of the router device after the flashed firmware runs at auto-start I get an error.. I want the router to initially be in REPL mode to run the firmware at auto-start correct?? so that's AP = 4.

Then after that runs I want the device to be set as AP=1 (API mode)

So when I do:

remote_device.set_parameter("AP", bytearray('\x01'))

I get "TypeError: string argument without an encoding"

I tried this instead:

tower_1.set_parameter("AP", 'utf8', bytearray('\x01'))

same error..
what is the proper syntax to do this?

thanks much! :D
asked Aug 3 in Python by edunn106 New to the Community (22 points)

Please log in or register to answer this question.

1 Answer

0 votes
In order to use Micro Python on the module with an app running on it, you do have to have the radio in Micro Python mode.
answered Aug 3 by mvut Veteran of the Digi Community (13,087 points)
...