5

I installed lineage os 14 on raspberry pi 3 I connected a gps module with UART port, however, the baud rate of GPS is 9600 but baud rate of /dev/ttyS0 is 115200 I want to change the baud rate of ttyS0 in order to read GPS data I tried stty command

stty -F /dev/ttyS0 9600

However, this won't change the baud rate when I check again with this command
stty -F /dev/ttyS0 the speed value is 115200. How can I change the baud rate of /dev/ttyS0 I also find some solution with serial command serial /dev/ttyS0 9600 however it doesn't exist on adb shell.Any help would be grateful

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Daniel.V
  • 2,322
  • 7
  • 28
  • 58

1 Answers1

2

You will need to modify the /boot/config.txt file and add the following entry which enables serial line and specifies baud rate:

console=ttyAMA0,9600

That works for me.

Sky
  • 4,244
  • 7
  • 54
  • 83