Even i have had my share of problems with xbee.wait_read_frame(). In my case, it doesnt work the same each time, it seems to work sometimes as a burst of proper responses and some other time wait_read_frame() gets blocked. Im sending a payload 'yolo' through transmit request frames through XCTU frame generator and console. My code is as below... (the print statements are for troubleshooting)
#!/usr/bin/python
from serial import Serial
import time
from xbee import ZigBee
#Starting serial connection
serialPort = Serial('/dev/ttyAMA0',9600,timeout=0.5)
xbee = ZigBee(serialPort)
while 1:
print "loop"
try:
print "try"
data= xbee.wait_read_frame()
print "data"
id= data
print(id)
print "exit loop"
except KeyboardInterrupt:
break
serialPort.close()
the output is attached as a screenshot to showcase that it really works at times, at other times it gets blocked. please do help me out...