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

XBee-PRO ZB (S2C) TH - InvalidOperatingModeException: Could not determine operating mode #62

Open
LorenzoBottaccioli opened this issue Feb 27, 2019 · 4 comments

Comments

@LorenzoBottaccioli
Copy link

Hi all,

I have conncted a Digi XBee-PRO ZB (S2C) TH to my desktop. If try to connect to the device with the following code I get the following error:

from digi.xbee.devices import ZigBeeDevice 
PORT = "/dev/ttyUSB0"  
BAUD_RATE = 9600 
device = ZigBeeDevice(PORT, BAUD_RATE)                                                                                                                                       
device.open()        
                                                                                                                                                        
---------------------------------------------------------------------------
InvalidOperatingModeException             Traceback (most recent call last)
<ipython-input-4-b929a415d2b8> in <module>
----> 1 device.open()

~/py3/lib/python3.6/site-packages/digi/xbee/devices.py in open(self)
   2970            | :meth:`.XBeeDevice.open`
   2971         """
-> 2972         super().open()
   2973         if self.get_protocol() != XBeeProtocol.ZIGBEE:
   2974             raise XBeeException("Invalid protocol.")

~/py3/lib/python3.6/site-packages/digi/xbee/devices.py in open(self)
   1257         if self._operating_mode == OperatingMode.UNKNOWN:
   1258             self.close()
-> 1259             raise InvalidOperatingModeException("Could not determine operating mode")
   1260         if self._operating_mode == OperatingMode.AT_MODE:
   1261             self.close()

InvalidOperatingModeException: Could not determine operating mode

If I open than XCTU and try to connect the device it works from both XCTU and Python.

Any suggestion to solve the issue?

Best,

Lorenzo

@thiagoalbertocabral
Copy link

Hi Lorenzo,

I got something simillar here. Have u have any updates??

@JeffLabonte
Copy link

I have a PR opened for a while that helps take care of this. #126

I would just change the mode the radio to API Escaped mode so I can use it.

@brettv30
Copy link

I've been having the same problems with both API 1 and API 2. Any updates on this?

@CapitaineHadd0ck
Copy link

Same

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

5 participants