OS : Ubuntu
xbee = s2c
I have set up my 2 xbee modules in API escape mode, and connected one XBee module at sender side and another module at receiver side. I'm sending JSON data continuously to receiver. I could able to view the incoming data in serial monitor without any packet loss. but when i receive the incoming data using python code I'm facing issues.
from xbee import XBee, ZigBee
ser = serial.Serial('/dev/ttymxc0', 9600, timeout = 5)
xbee = ZigBee(ser , escaped = True)
data = xbee.wait_read_frame()
in this code the program is continuously going to wait state.
so when i use data = ser.readline().strip() and print data then i could able to receive data but with garbage values. can anyone help me over this issue please.
thanks in advance!!!