RM520N-GL, Raspberry fails GNSS but Windows works with everything equal

I have a RN520N-GL (Firmware RM520NGLAAR03A03M4G)

Testing it with the RM520 Monitor software ( RM520 Monitor — Quectel RM520N-GL 5G Modem Monitor & Config Tool (Windows & Linux) ) everything is the same, except the GPS tab:

  • On windows I have immediate detection of many satellites, a fix and accurate positioning
  • On Raspberry PI i have exactly 0 satellites detected, almost like i had no GPS support or antenna

I also called all AT+QGPS and all AT+QCFG commands to see their values both on Windows and the Raspberry and they have all exactly the same values except the AT+QGPSGNMEA=“GGA” or “GSV” or “RMC”

I have it on a Waveshare PCIe to M.2 4G/5G and USB 3.2 Hat with a 5G-4IN1-PCB Antenna (Amazon.es) at first I thought it was the antenna, but on windows it catches more than 30 satellites, so that is not it.

So basically I tested it with:

  • Raspberry connected as a HAT
  • Raspberry through a USB cable (fully detached from the Raspberry HAT)
  • Windows through a USB cable (using the same USB cable)
  • Same exact position of the antenna, a few interleaved times, a few minutes appart with the same clear sky above
  • Same “RM520 Monitor” java software, reports same 4.00V voltage, behaves exactly the same on everything except GPS

Main difference, besides operating system and main system hardware, is that windows had to install drivers and Raspberry access through /dev/ttyUSB2 without any need for drivers.

I tried everything I could think of, threw some AI agents at it to search over the internet and cogitate on all possibilities and always end up in circles.

It makes no sense at all, and I feel this is one of those Gettier problems that Murphy’s Law sometimes throws at us and in the end it is a missing comma somewhere.

Did anyone have this sort of problem already and how did you fix it?

What if you use a dumb terminal instead of the app?

Actually I “called all AT+QGPS and all AT+QCFG commands” using scripts on the dumb terminals, one in bash for the raspberry sending to /dev/ttyUSB# and one in powershell on windows sending to COM#. I confirmed a few on the app “AT Console” and they gave the same values, but scripting is way faster to have them all repeatedly for testing purposes

Then you need to check if you receive anything on your NMEA port.

Hint - it’s another /dev/ttyUSB#

That is why i said: «they have all exactly the same values except the AT+QGPSGNMEA…»

A few hours ago, even indoors under a storm, I caught a few satellites in windows:

>>> AT+QGPSGNMEA="GGA"
+QGPSGNMEA: $GPGGA,135651.30,,,,,0,,,,,,,,*4E
+QGPSGNMEA: $GAGGA,135651.30,,,,,0,,,,,,,,*5F
+QGPSGNMEA: $GBGGA,135651.30,,,,,0,,,,,,,,*5C
OK

>>> AT+QGPSGNMEA="GSV"
+QGPSGNMEA: $GPGSV,1,1,02,15,07,164,,24,42,104,,1*63
+QGPSGNMEA: $GLGSV,1,1,04,76,04,063,,88,06,142,,87,22,089,,67,46,208,,1*7A
+QGPSGNMEA: $GAGSV,1,1,01,16,,,14,7*70
OK

>>> AT+QGPSGNMEA="RMC"
+QGPSGNMEA: $GPRMC,135651.30,V,,,,,,,,,,N,V*01
+QGPSGNMEA: $GARMC,135651.30,V,,,,,,,,,,N,V*10
+QGPSGNMEA: $GBRMC,135651.30,V,,,,,,,,,,N,V*13
OK

Look at GSV, a.k.a. satellites in view, of course indoors there are very few satellites for GGA and RMC and they will mostly show the UTC time with no fix, but when i tested a few days ago under a clear sky i got more than 30 satellites and a quick fix on windows but 0 satellites on the Raspberry, none at all, basically the same i got on it now, silence on GSV:

>>> AT+QGPSGNMEA="GGA"
+QGPSGNMEA: $GPGGA,,,,,,0,,,,,,,,*66
+QGPSGNMEA: $GAGGA,,,,,,0,,,,,,,,*77
+QGPSGNMEA: $GBGGA,,,,,,0,,,,,,,,*74
OK

>>> AT+QGPSGNMEA="GSV"
OK

>>> AT+QGPSGNMEA="RMC"
+QGPSGNMEA: $GPRMC,,V,,,,,,,,,,N,V*29
+QGPSGNMEA: $GARMC,,V,,,,,,,,,,N,V*38
+QGPSGNMEA: $GBRMC,,V,,,,,,,,,,N,V*3B
OK

Of course, GGA and RMC don’t even give a UTC since they see no satellites at all from where to get data.

Both Windows and Raspberry give this because there are no satellites used for a fix yet on windows and none at all on the Raspberry:

>>> AT+QGPSGNMEA="GSA"
+QGPSGNMEA: $GPGSA,A,1,,,,,,,,,,,,,,,,*32
+QGPSGNMEA: $GAGSA,A,1,,,,,,,,,,,,,,,,*23
+QGPSGNMEA: $GNGSA,A,1,,,,,,,,,,,,,,,,*2C
+QGPSGNMEA: $GBGSA,A,1,,,,,,,,,,,,,,,,*20
+QGPSGNMEA: $GQGSA,A,1,,,,,,,,,,,,,,,,*33
OK

This is really weird, it is as if under the Raspberry the GSM capability is just absent while everything else works.

Dear @Nuno_Cardoso
Do you check the antenna of GNSS in Raspberry?
if worked normally with Windows, it is confirmed that module is fine.

Yes that is what is strange, the hardware is exactly the same, exactly on the same place, i don’t even have to touch it,
I just switch the USB cable end from the windows laptop to the raspberry and back (in the detached HAT use case),
or disconnect the USB cable from windows and connect the power to the Raspberry (in the connected HAT case).
Everything works in both cases, except GPS in the raspberry.
So yes, the module is fine but somehow in the raspberry the GPS simply does not reply and I don’t know what else to try, it makes no sense at all, and that is why I’m reaching out for help, because surely there is something I’m missing and can’t see what it is.
Is there some kind of test i can run that can point out what i’m missing?
Maybe to dump out everything in both systems so i can compare?
I tried comparing all AT+QGPS and all AT+QCFG configurations but that didn’t help because they have both values on both systems, only the AT+QGPSGNMEA results differed, but that is exactly the problem.

Dear @Nuno_Cardoso
You can check the power in raspberry, is it enough for GNSS and cellular?