I have chosen the following setup to read sensor data by Arduino and an XBee-connection:
- TMP36-sensor is connected to an Arduino Uno
- Sparkfun XBee-shield with an XBee S2C is mounted on the Arduino (Router, API-mode). The Arduino is connected to COM3.
- COM4 is connected with a Sparkfun XBee-Explorer (USB-connection). Another XBee S2C is connected on the explorer. This XBee is the coordinator (API-mode).
I have written the code for reading data from Xbee-Explorer at COM4:
# Import and init an XBee device
from xbee import XBee, ZigBee
ser = serial.Serial('COM4', 9600)
xbee = XBee(ser)
enter response = xbee.wait_read_frame()
At the moment it is not possible to get any data received by the Xbee with the Python code, although it is possible to read the data by XCTU.
In Detail: If I send sensor data (sensor reading and sending to Xbee is done by Arduino Software) from the router to the coordinator, I'm able to read the data frames by XCTU and the results make sense. If I use the Python-code above, I did not get any data frames, although the RSSI-diodes of router and coordinator are blinking independently from the software (XCTU or Python) I use. For me it is not clear what is going wrong and I would be happy to get some help to solve the problem. Thank you very much for your support.