0

Iam getting junk values that is being read by rpi's serial port. Rpi is reading data through its serial port from a zigbee which is connected to the ttyAMA0 of rpi. In the python program, i've specified the baudrate as 9600. In the sender end also, its specified as 9600. Can anyone plz help me out cyting what can be the possible solution for this?

Rahul Ramesh
  • 11
  • 1
  • 4

2 Answers2

2

Your problem may not just be the baudrate.

By default the Pi outputs console messages on the serial port, which is used by few. It's possible that these are interfering with your attempt to use the serial port.

Try to modify /boot/cmdline.txt deleting console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1

Bex
  • 2,929
  • 3
  • 25
  • 34
Milliways
  • 59,890
  • 31
  • 101
  • 209
1

this is set in /etc/inittab and can be modified by changing the getty settings to whatever you desire.

1:2345:respawn:/sbin/getty 115200 tty1

becomes

1:2345:respawn:/sbin/getty 9600 tty1

Have a look at the getty and inittab documentation if you have any more questions.

Bex
  • 2,929
  • 3
  • 25
  • 34
jeremyforan
  • 131
  • 4