Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

digi.xbee.exception.InvalidOperatingModeException: Unsupported operating mode: AT mode #69

Open
manuaatitya opened this issue May 23, 2019 · 1 comment

Comments

@manuaatitya
Copy link

manuaatitya commented May 23, 2019

I have 3 XBees s1 all configured in API mode with one coordinator and 2 end device and I'm tring to send data explcitly to one of the bees.I'm using XCTU to visualise the data recieved in which both my end devices have the serial connection closed.

My code is as follows :

from digi.xbee.devices import *

Instantiate a XBee object
server = XBeeDevice("COM4",115200)

Open a port for communication
server.open()

Instantiate a remote object
thanos = RemoteXBeeDevice(server,XBee64BitAddress.from_hex_string("0013A2004103D949"))
hulk = RemoteXBeeDevice(server,XBee64BitAddress.from_hex_string("0013A2004103D932"))

Message to be sent to the bot
server._send_expl_data(thanos,0xA0, 0xA1, 0x1554, 0xC105, "Iron Man")
time.sleep(2)

Close the communication port
server.close()

But i get the error :

Traceback (most recent call last):
File "explicit_data_bee.py", line 8, in
server.open()
File "C:\Users\DELL\AppData\Local\Programs\Python\Python37\lib\site-packages\digi\xbee\devices.py", line 1262, in open
raise InvalidOperatingModeException.from_operating_mode(self._operating_mode)
digi.xbee.exception.InvalidOperatingModeException: Unsupported operating mode: AT mode

But both all my Xbees are in API mode only.

Any help is appreciated.

@DavePlater
Copy link

The directly connect XBee is your coordinator?
Is send_expl_data(remote_xbee, data, src_endpoint, dest_endpoint, cluster_id, profile_id, transmit_options=0) what you have to use?

Can you accomplish the task by using send_data(remote_xbee, data, transmit_options=0) ? You might get a different error message to work with at least?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants