S2C problem with (python-xbee library) and (asynchronous mode)

I don’t know if https://code.google.com/p/python-xbee/ is the best library to use S2C Pro. I’m trying to use asynchronous mode, without success, the following code is the same than in PDF:

import serial
import time
from xbee import ZigBee
serial_port = serial.Serial('/dev/tty.usbserial-DA01MBXV', 9600)

def print_data(data):
    print data

zigbee  = ZigBee (serial_port, callback=print_data)
while True:
    print '.'
    except KeyboardInterrupt:


All data sent to coordinator can be seen by XCTU, but nothing on python terminal.
Do you have any idea ?
Best regards,

I had the same issue. In my case, I had the S2C modules configured to use AP mode 2(API enabled with escaping [2]). I did not configure the python library to also use escaped data. Double check the AP mode of your modules. If you want to use the “escaped” data mode, just change the instantiation of the ZigBee object to the following:

zigbee = ZigBee (serial_port, callback=print_data, escaped=True)