Now the serial port of Raspberry Pi is disengaged from the boot sequence and can be used to communicate with XBee module. The default baud rate of the ttyAMA0 is 115200, but a baud rate of 9600 is required for XBee. You can change the baud rate in minicom software as given below:
[stextbox id=”grey”]
pi@raspberrrypi ~ $ sudo minicom –b 9600
–o –D /dev/ttyAMA0
[/stextbox]// This will set the baud rate of the port ttyAMA0 to 9600
A window, as shown in Fig. 9, will come up. Press Ctrl+A keys followed by Q on the keyboard to exit without resetting.
Python code
Start your Raspberry Pi and create a new ‘XBeeTest’ folder. For this tutorial, the libraries used are ‘serial’ and ‘time.’ Create a new file using nano editor as given below:
[stextbox id=”grey”]
$ pi@raspberrrypi ~ $ cd /XBeeTest
pi@raspberrrypi ~ /XBeeTest$ sudo nano
serial_XBee.py
Here serial_XBee.py is the name of the project. Type the following code:
import serial
// For serial communication
import time
[stextbox id=”grey”]
[/stextbox]
// For delay function
[stextbox id=”grey”]ser = serial.Serial(‘/dev/ttyAMA0’)[/stextbox]
// Set ser as object
[stextbox id=”grey”]ser.baudrate = 9600[/stextbox]
// Set baud rate to 9600
[stextbox id=”grey”]
ser.write(“A”)
[/stextbox]
// Send character ‘A’
[stextbox id=”grey”]time.sleep(1)[/stextbox]
// Give 1 second delay
[stextbox id=”grey”]ser.write(“B”)[/stextbox]
// Send character ‘B’
[stextbox id=”grey”]time.sleep(1)[/stextbox]
// Give 1 second delay
[stextbox id=”grey”]ser.close()[/stextbox]
// Close communication
To save this code, press Ctrl+O keys followed by Ctrl+X.

This code sends character ‘A’ to the console (refer Fig. 10) of the receiver end, pauses for a second and then sends character ‘B.’
Je suis très flatté pour tout ce que vous faites
I followed the exact steps you’ve mentioned. But I didn’t get the result. I’m not able to see anything in XCTU software.
Mail your exact problem on my id: [email protected] and I will try to help you!
No Display on XCTU
Mail your exact problem on my id: [email protected] and I will try to help you!
Hi,
Thanks for sharing your knowledge. While I update the radio module firmware, I only have “ZIGBEE TH Reg”, “805.15.4 TH” and “DIGIMESH 2.4 TH” function set. Is it compulsory to have “XBEE COORDINATOR AT”. Could you please tell me how can I go forward with the available function sets.
hi,
not able to find inittab in /etc folder did the remaining procedure as mentioned but not receiving the data on xctu