# InvalidOperatingModeException: Could not determine operating mode.

**URL:** <https://forums.digi.com/t/invalidoperatingmodeexception-could-not-determine-operating-mode/16458>\
**Category:** XBee - 802.15.4\
**Tags:** s1, edison, xbee\
**Created:** [March 18, 2016, 4:17pm UTC](https://forums.digi.com/t/invalidoperatingmodeexception-could-not-determine-operating-mode/16458 "2016-03-18T16:17:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TonyM](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@TonyM](https://forums.digi.com/u/TonyM)\
**Post date:** [March 18, 2016, 4:17pm UTC](https://forums.digi.com/t/invalidoperatingmodeexception-could-not-determine-operating-mode/16458/1 "2016-03-18T16:17:20Z")

</div>

Hi,  
Im trying to run the SendBroadcast example code on a S1 mounted on an Intel Edison board.

When executing myDevice.open(); I get the InvalidOperatingModeException: Could not determine operating mode. Exception.

The Operating mode is “UNKOWN”

Any ideas, please? This is the stack trace I get:

Mar 18, 2016 9:02:03 PM com.digi.xbee.api.XBeeDevice open  
INFO: [/dev/ttyS81 - 9600/8/N/1/N] Opening the connection interface…  
Mar 18, 2016 9:02:03 PM com.digi.xbee.api.XBeeDevice open  
INFO: [/dev/ttyS81 - 9600/8/N/1/N] Connection interface open.  
Mar 18, 2016 9:02:08 PM com.digi.xbee.api.XBeeDevice determineOperatingMode  
SEVERE: There was a timeout while executing the requested operation.  
com.digi.xbee.api.exceptions.TimeoutException: There was a timeout while executing the requested operation.  
at com.digi.xbee.api.XBeeDevice.enterATCommandMode(XBeeDevice.java:426)  
at com.digi.xbee.api.XBeeDevice.determineOperatingMode(XBeeDevice.java:376)  
at com.digi.xbee.api.XBeeDevice.open(XBeeDevice.java:213)  
at SendBroadcast.main(SendBroadcast.java:94)

Mar 18, 2016 9:02:08 PM com.digi.xbee.api.XBeeDevice close  
INFO: [/dev/ttyS81 - 9600/8/N/1/N] Connection interface closed.  
Error  
com.digi.xbee.api.exceptions.InvalidOperatingModeException: Could not determine operating mode.  
at com.digi.xbee.api.XBeeDevice.open(XBeeDevice.java:218)  
at SendBroadcast.main(SendBroadcast.java:94)  
logout

---

<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:** [March 29, 2016, 11:00am UTC](https://forums.digi.com/t/invalidoperatingmodeexception-could-not-determine-operating-mode/16458/2 "2016-03-29T11:00:00Z")

</div>

Try using the XBee modules in API mode (ATAP=1).

---

<div class="post-metadata">

**Author:** ![Molas89](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Molas89](https://forums.digi.com/u/Molas89)\
**Post date:** [June 12, 2017, 10:02am UTC](https://forums.digi.com/t/invalidoperatingmodeexception-could-not-determine-operating-mode/16458/3 "2017-06-12T10:02:11Z")

</div>

I’m working with S2C Programable XBEE and receiving the same exception. Already put “API MODE = ATP1”
