jefffhaynes/XBee

How to Get into API Mode programmatically?

Closed this issue · 11 comments

Seems like a bootstrapping problem. Is there a way to talk to a local XBee device via serial port to do what XCTU does to set API Mode?

Is this the right answer? I won't be looking into it for several days.

https://www.digi.com/support/forum/66685/digimesh-how-to-enter-api-mode?show=66685#q66685

Can you just read the AP value to see if it is 0, or are you talking about something else? In the serial console in XCTU, I get the following:

+++OK

ATAP
1

I was able to issue the following commands from the serial console inside XCTU.

+++OK
ATAP
0
ATAP1
OK
ATWR
OK
ATAP
1
ATAP0
OK
ATWR
OK

Are you ok if I just set API mode on controller open? It's probably the easiest since after that the handlers take over and I can't easily inject textual AT commands

seems fine. I plan to use them all in API Mode anyway.

Or you could have a different device type to talk to module not in serial mode. Once it's in API mode, one could dispose that object and begin using the API as always.

Done. Core 1.6 will automatically switch controllers into API mode when opened. However, note that it will not persist the settings. Once in API mode you can use the normal Set/GetApiModeAsync methods to manage it along with WriteAsync().

Thanks!