I would like to compare GPS antenna sensitivity between DK board and a custom board. What AT command achieves it? Thanks.
I would like to compare GPS antenna sensitivity between DK board and a custom board. What AT command achieves it? Thanks.
Hi!
I believe you can use %XRFTEST to read this information. Take a look and let me know if this is what you were looking for.
Best regards,
Heidi
Hi,
%XRFTEST=2,1,0,0
This command indicates <param0> is set to 0, which means gain is −105 dBm. Is this standard value? If not, what value should be standard?
I got an answer from the IoT department, here's their somewhat modified response;
The GPS SNR test in the AT%XRFTEST command family can be used to measure the signal-to-noise ratio against an externally generated CW/sine signal. Based on the results you got, the external signal is most likely missing.
The "GPS L1 frequency" is 1575.42 MHz, and that is set automatically for nRF9160 (if <param2> is omitted).
The external signal should be offset by +330kHz from the GPS L1 frequency, and be a CW signal at 1575.75 MHz.
The signal strength AND the possible external amplifiers on board determine what is given to the command as <param0>. Indeed the signal level in the command is given so that the SIP sets the gains correctly for the test.
For example, if you set the signal to -90dBm in the external signal generator, and you have enabled (*) the 12dB amplifier on the devkit board, then at SIP GPS input you see about -78dBm signal. Thus the command's <param0> should be set accordingly (it's OK to be wrong even 10 dB, there is of course some headroom).
AT%XRFTEST=2,1,-78,0
The returned value gives back the hopefully positive <snr> and signal strengh as measured in antenna input of the sip <antenna_power>, which should be close to -78 * 256 = -19968 in our example.
SNR should be around 20*16 = 320 if all is good.
It's still probably not right to call SNR as sensitivity because it is just a oneshot measurement from CW signal, but you can still do some basic comparisons between boards using the number you get.
* give the AT%XCOEX0 or XMAGPIO0 at command before the test, depending on your board versions. If unsure, give both:
Then there was question what is <param2>? Our lab noticed that some signal generator have a spur just at the wanted frequency, so we wanted to give an option to move the test frequency, and thus also nRF9160 frequency slightly to avoid that spur. So that is a completely optional parameter and not the cause of this issue. Anyway, if you move the nRF9160 freq with <param2>, move also the CW signal frequency equally much.
Thank you for your reply.
Unfortunately this also gives the same result.
AT+CFUN=0 AT%XSYSTEMMODE=1,0,1,0 AT%XCOEX0=1,1,1570,1580 AT%XMAGPIO=1,0,0,1,1,1570,1580 AT+CFUN=31 AT%XRFTEST=2,1,-78,0
In addition, I added these lines to gps app at several points after init_app(), but the app always stops at this.
if (at_cmd_write("AT\%XRFTEST=2,1,-78,0", buf, sizeof(buf), NULL) != 0) { return -1; } printk("%s\n", buf);
> Based on the results you got, the external signal is most likely missing.
gps app works out under the open sky so I think gps signal reaches my testing place, but something is wrong.
And, I read this ticket related to AT%XPRODDONE
https://devzone.nordicsemi.com/f/nordic-q-a/58767/disable-nrf9160-downgrade-protection
At least, %XRFTEST command returns some value on at_client app so I don't think I enabled this.
If possible, I would like to know the full AT Command list to get GPS signal-to-noise value.
Hi,
The CW signal from a signal generator would not be the same as the GPS signal from the sky.
In order to successfully execute the RX or GPS SNR test, you need a configurable signal generator device, that can provide a simple (sinewave) RF signal at 1575.75 MHz. It doesn't have to be a GPS signal, but just a tone on that frequency.
The cheapest such generators are USB sticks and cost a couple of hundred US dollars, like this.
It is not possible to execute the SNR test with a "live" GPS signal. Instead, it must be a tone on 1575.75MHz.
Also, AT%XRFTESTs should not be added into an application which activates the GPS or LTE in other ways (using AT+CFUN). It simply doesn't work if modem/gps is already active, and the stoppage is actually very likely modem resetting on the background.
Best regards,
Heidi
Thank you for your reply. I see.
Then, I think only way to compare GPS receive sensitivity in live condition is to read C/No value from NMEA format. Is this correct?
So the CN0 value is an indication of signal strength, but it is quite unreliable when comparing receive sensitivity in live conditions.
The measurements should be taken from exactly the same place at exactly the same time (preferably using the same antenna), otherwise the comparison is contaminated by antenna performance, multipath distortions etc.
So the CN0 value is an indication of signal strength, but it is quite unreliable when comparing receive sensitivity in live conditions.
The measurements should be taken from exactly the same place at exactly the same time (preferably using the same antenna), otherwise the comparison is contaminated by antenna performance, multipath distortions etc.