I am using Raspberry Pi 4 (OS:bullseye, version 11) and Neo 6 GPS. I have tried to follow the tutorial https://www.instructables.com/Interfacing-GPS-Module-With-Raspberry-Pi/ but I am stuck at step 8. The command 'sudo cat /dev/ttyAMA0' hangs no matter what I do. I strongly suspect that it has something to do with Raspberry Pi 4. Few things I noticed/followed -
- The blue light on the antenna is blinking.
- Followed other similar threads such as How can Rpi connect a GPS module? but it did not help. Has anybody figured out how to make Neo 6 GPS work with Raspberry Pi4?
[Moved content from comments to the main body of the question] #1: Connected Vcc of GPS module to Power Supply (5V) of Raspberry Pi Connected Tx (Transmitter Pin) of GPS module to Pin No.10 of Raspberry Pi. Connected GND (Ground Pin) of GPS module to GND of Raspberry Pi
#2: Modified /boot/config.txt as following. Added the code at the end dtparam=spi=on dtoverlay=disable-bt (#note for Pi 4, only 'disable-bt' works, 'pi3-disable-bt' gives warning at the bootup time) core_freq=250 enable_uart=1 force_turbo=1
#3: Edited /boot/cmdline.txt and replaced its content with the following dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
#4: Disable the Raspberry Pi Serial Getty Service a. If in your output, Serial0 is linked with ttyAMA0, then to disable it use the below command, sudo systemctl stop [email protected] sudo systemctl disable [email protected] b. If in your output Serial0 is linked with ttys0, then to disable it use the below command, sudo systemctl stop [email protected] sudo systemctl disable [email protected] I followed a) here.
#5: Activate ttys0 To enable the ttys0 use following command, sudo systemctl enable [email protected] #6: sudo apt-get install minicom sudo pip install pynmea2
#6: sudo apt-get install minicom sudo pip install pynmea2
Now, when I issue the command - sudo cat /dev/ttyAMA0, the command just hangs. I see the blue light blinking on the antenna. Also, note that I had used old version of Raspberry pi (2011-12) and it gave correct output when I typed 'sudo cat /dev/ttyAMA0'. The reason I am using raspberry pi 4 is I want it to be powered by batteries and the case of the batteries is compatible with pi 4. That way, I can use it in outdoor settings. Second, version 2011-12 is so old that I thought it is better to move on to latest robust version.
Raspberry Pi 4 has OS bullseye. I am aware that with newer versions, there is a GUI to configure the settings instead of manipulating config or boot files but I don't think it should matter. I do not know what I am missing or how to diagnose the problem. Is there a difference between Pi4 and earlier versions as far as ttyAMA0 goes?