Home/Support/Support Forum/Could not determine operating mode.

Could not determine operating mode.

+1 vote
i'm using the XBee-PRO 900HP boards with the Java library.
The xbeeDevice.open() issues the following exception: "com.digi.xbee.api.exceptions.InvalidOperatingModeException: Could not determine operating mode".

I'm sure that the COM port is right and that the Java code is correct ( i tested it also on XBee 868 boards), and i tested it on both Windows and Linux, but i'm not able to use these boards.
I tried to change the API mode with or without escapes but I obtain the same error.
The only way is to open the XCTU tool, let him to discover these XBee-PRO 900HP boards, and then i can run my java code on the boards without any error; but if i power off the modules and then i power on them, they don't work.
I also tried to load default firmware on the board, but nothing change.
How can i solve this problem?
asked May 20, 2016 in IEEE 802.15.4 by lauryb84 New to the Community (1 point)
edited May 20, 2016 by lauryb84
Having the exact same issue with the same family of devices; were you able to solve this?

Please log in or register to answer this question.

4 Answers

0 votes
My solution was inspired by the following two links:

https://github.com/digidotcom/XBeeJavaLibrary/issues/57

https://blog.chendry.org/2014/12/25/programmable-xbee-pro-900hp-osx-quickstart.html

Essentially the unit needs to be in bypass mode for the code to talk to the unit... The way I solved it (error handling removed):
For java:
SerialPortRxTx serPort = new SerialPortRxTx("COM32", 9600);
serPort.open(); serPort.writeData("\n\n".getBytes()); //wake boot menu up
Thread.sleep(1000);
serPort.writeData("B".getBytes()); //initiate bypass mode
Thread.sleep(1000);
serPort.close();
....
Run actual code

For python:
....
self.ser = serial.Serial(port, baud)
self.ser.write("\n\n")
time.sleep(0.1)
self.ser.write("B")
time.sleep(0.1)
self.xbee = ZigBee(self.ser,escaped=True)
....

I hope this helps someone...
answered Sep 9, 2016 by dtusr New to the Community (1 point)
0 votes
Hi,
I have the same problem. I run:
python c:/Users/a/Desktop/DiscoverDevicesSample/DiscoverDevicesSample.py
But it give me the error:
File "c:\Users\a\Desktop\DiscoverDevicesSample\digi\xbee\devices.py", line 2491, in _do_open
raise InvalidOperatingModeException(message="Could not determine operating mode")
digi.xbee.exception.InvalidOperatingModeException: Could not determine operating mode
answered Aug 3 by Nelizalde New to the Community (1 point)
0 votes
The only way is to open the XCTU tool, let him to discover these XBee-PRO 900HP boards, and then i can run my java code on the boards without any error; but if i power off the modules and then i power on them, they don't work.
I also tried to load default firmware on the board, but nothing change.
How can i solve this problem?
https://www.cetpainfotech.com/technology/python-training
answered Aug 6 by riya8835 New to the Community (2 points)
0 votes
have you installed the latest firmware on your XBee pro, what's its current version and the model no of your XBee module. I got a similar issue during PCB Panelization but got it working by upgrading the design.
answered Aug 9 by oliviasmithh900 New to the Community (2 points)
edited Aug 18 by oliviasmithh900
...