niolabs / python-xbee

Python tools for working with XBee radios
MIT License
101 stars 45 forks source link

python-xbee and pyserial does not give the same answer for XBee S1 #57

Closed epimetheusfr closed 6 years ago

epimetheusfr commented 6 years ago

Hi everybody, for the following frame type 0x83 (RX (Receive) Packet 16-bit Address IO), the following fields returned by python-bee are not correct :: 16-bit source address and RSSI. The other fields are correct. Does anyone know how to fix this ? Thank you

Below are my python scripts :: ################################################## import serial from xbee import XBee

serial_port = serial.Serial('/dev/tty.usbserial-A104IBHK', 9600) xbee = XBee(serial_port)

while True: try: print xbee.wait_read_frame() except KeyboardInterrupt: break

serial_port.close() ################################################## import serial

serial_port = serial.Serial('/dev/tty.usbserial-A104IBHK', 9600)

while 1: a = serial_port.read() print hex(int(a.encode('hex'), 16)) ##################################################

jamesleesaunders commented 6 years ago

Hi, Please try asking this same question on stack exchange with the keywords xbee and python.