0

I bought two XBee S2C and a RPi3. I can send data from my RPi3-Xbee to the computer-Xbee but i cannot receive. I have followed the below steps:

1- change uart from bluetooth to pins:

a- core_freq=250
b- force_turbo=0
c- dtoverlay=pi3-disable-bt
d- enable_uart=1

2- my pytho program is

!usr/bin/python
from xbee import XBee
import serial

ser=serial('/dev/ttyAMA0',9600)
while True:
    ser.write('i')
    response=ser.readline().strip()
    print(serial)

ser.close()

Did I miss somthing ? I am trying to solve it since yesterday :s

PS: when using the XCTu the two xbee communicates without any problem

  • why are you not printing the response?? try adding print(response) at the end of your while loop. – Mohammad Ali May 30 '16 at 14:17
0

I had the same problem.

This works for me.

1.- Add only this line to /boot/config.txt:

dtoverlay=pi3-disable-bt

2.- Stop the service:

sudo systemctl disable hciuart

3.- Important!!!! disable the serial1 to send debug output. Modify the file /boot/cmdline.txt use serial0 instead of seral1.

Now you should receive data correctly form /dev/ttyAMA0

Regards

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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