sixfab / Sixfab_RPi_XBee_Shield

It is repository of python library for Raspberry Pi XBee Shield.
https://sixfab.com/product/xbee-shield/
MIT License
1 stars 0 forks source link

Xbee shiled not working on RPi3 #1

Open LorenzoBottaccioli opened 5 years ago

LorenzoBottaccioli commented 5 years ago

Hi,

I'm trying to make the Digi Shield work on a raspberry 3. I have tryed to connect the the shield equiped with Xbee PRO S2C Zigbee antenna with both GPIO and USB but I'm not able to read recived data. The strange thing is that if I connect to a desktop pc the Shield with USB everthing work. I have tried with digi-xbee python libary (https://xbplib.readthedocs.io/en/latest/) and with xbee-python library (https://python-xbee.readthedocs.io/en/latest/). On my desktop works fine on the RPi3 is not working.

If I do:

from digi.xbee.devices import ZigBeeDevice

PORT = "/dev/ttyUSB0" #or "/dev/ttyS0"
BAUD_RATE = 9600
device = ZigBeeDevice(PORT, BAUD_RATE)
device.open()

On the RPi3 I get "invalid operation mode exception"

On desktop works fine

If I do:

import serial
from xbee import ZigBee

serial_port = serial.Serial('/dev/ttyUSB0', 9600) # or serial_port = serial.Serial('/dev/ttyS0', 9600)
zb = ZigBee(serial_port)
data=zb.wait_read_frame()

On the RPi3 I get no msg while on the PC desktop I revice msg.

I have also tried to use a Digi X-stick on the RPi3 and everithing works fine with the Digi Xstick.

How can I solve this?

Best,

Lorenzo

saeedjohar commented 5 years ago

Hello, Do you have tried with our library? Could you please try it?

Best regards

LorenzoBottaccioli commented 5 years ago

Yes and it does not work either. It does not enter in if(node.serialAvailable()):