# could not determine operating mode

**URL:** <https://forums.digi.com/t/could-not-determine-operating-mode/21488>\
**Category:** XBee - DigiMesh\
**Tags:** mode, operating\
**Created:** [June 22, 2020, 1:20pm UTC](https://forums.digi.com/t/could-not-determine-operating-mode/21488 "2020-06-22T13:20:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wrwygal](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@wrwygal](https://forums.digi.com/u/wrwygal)\
**Post date:** [June 22, 2020, 1:20pm UTC](https://forums.digi.com/t/could-not-determine-operating-mode/21488/1 "2020-06-22T13:20:20Z")

</div>

I cannot find a solution to this problem. My XBee 900HP digimesh was working perfectly in AP (1) mode (as coordinator). Now it no longer works, my python3 code has not changed. If I connect to XCTU it appears to be working and receives data from the routers as expected.

I pulled a snip of the code that used to work. I have it running on a Raspberry PI 3. Again everything was working.

import serial  
from digi.xbee.devices import XbeeDevice  
device = XBeeDevice(“/dev/ttyS0”, 9600)  
device.open()

Once the open line is executed I get the following error:

Traceback (most recent call last):  
File “”, line 1, in  
File “/home/pi/.local/lib/python3.7/site-packages/digi/x  
bee/devices.py”, line 2043, in open  
self.\_do\_open()  
File “/home/pi/.local/lib/python3.7/site-packages/digi/x  
bee/devices.py”, line 2059, in \_do\_open  
Raise InvalidOperatingModeException(message=“Could not  
determine operating mode”)  
digi.xbee.exception.InvalidOeratingModeException: Could n  
ot determine operating mode

…Again, this used to work and I am completely baffled.

Any help would be greatly appreciated. If I need to supply more detail please let me know and I  
can send screen shots and pictures.

Thank you,  
Bill

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [June 22, 2020, 2:12pm UTC](https://forums.digi.com/t/could-not-determine-operating-mode/21488/2 "2020-06-22T14:12:06Z")

</div>

Wrwygal,

That is not something that would be answered on this forum but on a forum for the processor and its related code.

---

<div class="post-metadata">

**Author:** ![Bears](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@Bears](https://forums.digi.com/u/Bears)\
**Post date:** [June 24, 2020, 8:43am UTC](https://forums.digi.com/t/could-not-determine-operating-mode/21488/3 "2020-06-24T08:43:02Z")

</div>

my python3 code has now not changed. If I join to XCTU it seems to be working and receives facts from the routers as expected.

---

<div class="post-metadata">

**Author:** ![drmad51](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@drmad51](https://forums.digi.com/u/drmad51)\
**Post date:** [July 14, 2021, 11:11am UTC](https://forums.digi.com/t/could-not-determine-operating-mode/21488/4 "2021-07-14T11:11:59Z")

</div>

Hello wrwygal,  
I 've got the same problem. The same error with an unchanged code that worked before. I tried to change the raspberry without success. Did you finally found a solution ?  
Thank you
