XBee Interfacing with Raspberry Pi

The communication between XBee and Raspberry Pi is done through serial communication. The connections for serial communication between XBee and Raspberry Pi Model 2 are given below and also shown in Fig. 8.


Rx (Pin 3) of XBee ® Pin 08 (GPIO14)
Tx (Pin 2) of XBee ® Pin 10 (GPIO15)
Vcc (Pin 1) of XBee ® Pin 01 (3.3V DC)
GND (Pin 10) of XBee ® Pin 06 (GND)
You need to reboot the Raspberry Pi board after these connections and the configurations as explained below.
In order to use the serial port for communication between Raspberry Pi and XBee, some configurations are required in files cmdline.txt and inittab.txt. Start the ‘Terminal’ on Raspberry Pi board and then follow the given sequence of commands:
[stextbox id=”grey”]pi@raspberrrypi ~ $
sudo apt-get update[/stextbox]
// Checks for updates
[stextbox id=”grey”]pi@raspberrrypi ~ $ sudo apt-get upgrade[/stextbox]
// Installs updates if any
[stextbox id=”grey”]pi@raspberrrypi ~ $ cd /etc[/stextbox]
// This should change directory to etc folder
[stextbox id=”grey”]pi@raspberrypi ~ /etc $ sudo chmod 666
/dev/ttyAMA0[/stextbox]
// To add permission to use serial port
[stextbox id=”grey”]pi@raspberrypi ~ /etc $ sudo apt-get
install python-serial[/stextbox]
// This will install serial Library to Raspberry Pi
[stextbox id=”grey”]pi@raspberrrypi ~ /etc $ cd[/stextbox]
// This should change directory to Root folder
[stextbox id=”grey”]pi@raspberrrypi ~ $ sudo apt-get install
minicom[/stextbox]
// This will install Minicom on your Raspberry Pi
[stextbox id=”grey”]pi@raspberrrypi ~ $ cd /boot[/stextbox]
// This should change directory to Boot folder
[stextbox id=”grey”]pi@raspberrrypi ~ /boot $ sudo cp
cmdline.txt cmdlinebackup.txt[/stextbox]
// This should make a copy of cmdline.txt and rename it to cmdlinebackup.txt
[stextbox id=”grey”]pi@raspberrrypi ~ /boot $ sudo nano
cmdline.txt[/stextbox]
// This should open cmdline.txt in text editor
// Remove: “console=ttyAMA0, 115200 console=ttyl”
// Hit Ctrl+O to Save and Ctrl+X to Exit
[stextbox id=”grey”]pi@raspberrrypi ~ /boot $ cd /etc[/stextbox]
// This should change directory to etc folder
[stextbox id=”grey”]pi@raspberrrypi ~ /etc $ sudo cp inittab
inittab.backup[/stextbox]
// This should make a copy of inittab and rename it to inittab.backup
[stextbox id=”grey”]pi@raspberrrypi ~ /etc $ sudo nano
inittab[/stextbox]
// This should open inittab in text editor
// Comment the line: “T0:23:respawn:/sbin/getty –L ttyAMA0 115200 vt100” // by adding ‘#’ before of it.
// Hit Ctrl+O to Save and Ctrl+X to Exit
[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
[stextbox id=”grey”]pi@raspberrrypi ~ /etc $ cd[/stextbox]
// This should change directory to main Pi folder
[stextbox id=”grey”]pi@raspberrrypi ~ $ sudo reboot[/stextbox]
// This should restart the system
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