I am trying to implement GPS code in the nrf9160 but I cant find the function nrf_modem_gnss_init(); to initialize GNSS inside the modem in , is it being initialised within nrf_modem_gnss_start() function internally ? please help on this.


I am trying to implement GPS code in the nrf9160 but I cant find the function nrf_modem_gnss_init(); to initialize GNSS inside the modem in , is it being initialised within nrf_modem_gnss_start() function internally ? please help on this.


You should check if the LNA gets properly enabled. Since you are using a regular GPIO pin instead of COEX0, there can potentially be issues.
GNSS gets started and is receiving PVT notifications once a second, so it does not look like a GNSS API issue.
This is an internal GPS setup and has external on-board antenna attached to it.
I can see voltages around D1(2.489 at cathode ) , D2 (2.673 at cathode ) which further goes to c1(2.48), c2(2.49) and c3(2.67), c4(2.67) which are sufficient to power up LNA.
Is there anything else I am missing in the code ?
Also coex is used for coexistence of LTE along with GNSS. Here I am using GNSS mode only in the code.

Hi,
I checked the modem log, but in that log the COEX0 pin is not configured correctly, so the LNA is not enabled.
Please make sure that the pin configuration is correct (you can use the AT command AT%XCOEX0=1,1,1565,1586 mentioned earlier) and that it's configured before the RF is enabled (latest before GNSS start). Can you capture a new modem log with the correct configuration, so I can have a look from modem point of view?
Best regards,
Tommi

Hi,
If you see the above picture, we are configuring COEX0 pin before the RF is enabled. Please go through the code gps.c in the attachment.
You referred terminal_logsOpen1.log for modem logs ?
Regards,
Karthik.
Hi,
I'm referring to Modem_logsOpen1.bin. It was taken before COEX0 configuration was fixed. Please take a new modem log with the current implementation which configures COEX0 correctly.
BR,
Tommi
Hi Karthik,
For some reason, the modem log stops almost immediately (1 second) after GNSS start. Please try to capture a longer log. Let GNSS run at least for a couple of minutes.
BR,
Tommi
Hello Tommi Kangas
Could you please share the correct procedure for capturing enhanced GNSS modem traces over RTT on the nRF9160?
I have enabled the RTT modem trace backend and am monitoring RTT channel 1. After entering GNSS functional mode, I enable tracing using:
However, I only see AT command transaction logs and no GNSS‑specific modem traces.
Please let me know if there are any additional steps or ordering requirements to get the enhanced GNSS traces over RTT.
Regards,
Gunjan
Hello team Tommi Kangas
Does nrf9160 support only GPS or we can do all satellite system like use GLONASS GPS galileo etc ?Also in order to enable QZSS do we explicitly need to write some command or is it handled by
api internally ?
FYI Karthik
Hi Gunjan Yadav ,
nRF9160 supports only GPS and QZSS. QZSS is enabled by default and it does not need to be enabled separately.
Enabled signals can be configured using nrf_modem_gnss_signal_mask_set() if needed.
BR,
Tommi