I have connected coordinator xbee to serial port of beaglebone i.e . tx and rx of beaglebone. My router's D0 pin is connected to relay. I want to remotely disable or enable the D0 pin. For that i am using python-xbee library. What I did is (my python code snippet)

#For Off
#For switch ON

code is working fine without error but I am not getting the output. I tried it using without beaglebone i.e. using usb explorer it works. Here is the link of example @ digi.

I am using python-xbee library. What would be the error?


1 Answer 1


I had the same problem as you with my beaglebone. I got success only after I specify the frame_id.


This is my whole code that works. Note that I broadcast (address FFFF) the command.

#! /usr/bin/python
import serial
from xbee import ZigBee
import time

ser = serial.Serial('/dev/ttyO2', 9600)

myRouter = '\x00\x00\x00\x00\x00\x00\xFF\xFF'

response = xbee.wait_read_frame()
print response

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.