Xbee python library error on Raspberry Pi - "digi.xbee.exception.XBeeException: Packet listener is not running"

I have Xbee Pro S1 wired to A-model Pi. Installed Digi python library from github & solved (I think) all dependancies that threw exeptions. Serial, ipaddress & enum et al.

I have 2x end node Xbees sending IO data to coordinator/Pi @1Hz. I can see the packets arriving with:

cat /dev/ttyAMA0 |hexdump

when I work thru the python lib tute, opening the serial port throws:

Traceback (most recent call last):
File “./xbee_py”, line 40, in
File “/usr/local/lib/python3.2/dist-packages/digi_xbee-1.1.0-py3.2.egg/digi/xbee/devices.py”, line 1256, in open
self._operating_mode = self._determine_operating_mode()
File “/usr/local/lib/python3.2/dist-packages/digi_xbee-1.1.0-py3.2.egg/digi/xbee/devices.py”, line 2354, in _determine_operating_mode
response = self.get_parameter(“AP”)
File “/usr/local/lib/python3.2/dist-packages/digi_xbee-1.1.0-py3.2.egg/digi/xbee/devices.py”, line 1028, in dec_function
return func(self, *args, **kwargs)
File “/usr/local/lib/python3.2/dist-packages/digi_xbee-1.1.0-py3.2.egg/digi/xbee/devices.py”, line 1309, in get_parameter
response = self.send_packet_sync_and_get_response(packet_to_send) # raises TimeoutException
File “/usr/local/lib/python3.2/dist-packages/digi_xbee-1.1.0-py3.2.egg/digi/xbee/devices.py”, line 2411, in send_packet_sync_and_get_response
File “/usr/local/lib/python3.2/dist-packages/digi_xbee-1.1.0-py3.2.egg/digi/xbee/devices.py”, line 2463, in send_packet
raise XBeeException(“Packet listener is not running.”)
digi.xbee.exception.XBeeException: Packet listener is not running.

I spent a few hours attempting to follow the logging part of the tute, but I have’t been sucessful at that.

Port settings:
pi@raspberrypi ~ $ stty -F /dev/ttyAMA0
speed 9600 baud; line = 0;
min = 0; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

1 Like