Iam doing a project in which i need to read datas send from a ZIGBee through the serial port of raspberry pi. I have done removing that ttyAMA0 stuffs from /dev/cmdline.txt and commented that line in /etc/inittab . Then i reboot the pi. After that i connected the ZIGBee to the raspberry pi and the other ZIGBee to the pc from where I tried to check the UART communication through hyperterminal(in PC). I hav set the baudrate to 9600.
Now in the rpi side, the program I used to read the characters from the zigbee is given below:
import serial
ser=serial.Serial("/dev/ttyAMA0", 9600, timeout=3)
while True:
read_byte=ser.read()
print str(read_byte)
ser.close
But by running this program in rpi and typing something in the hyperterminal of PC, Iam getting some junk values in rpi. So, do i need to set the baud rate in some other ways?