Hi,
I’m using feather v4 in a rust based project. The problem is that the GPS is extremely slow.

I’m using this GPS antenna

“Cold”-fix: 8+ minutes.
“Hot”-fix: 30 seconds.

When i ran the same code on a 9160DK, cold fix would typically take 2 min, and hot fix less than 5 seconds.

I get a feeling that the antenna is not getting powered by the LNA. I’m struggling to figure out what exactly is the way to activate the antenna on a v4 board. I’ve dug through your examples, so i’ve added:

nrf_modem::send_at::<0>(“AT%XCOEX0=1,1,1565,1586”).await?;

i also noticed that in your sample you set pin 13 low, so i did that as well. As far as I can tell this has to do with powering 3V3? From the schematic it looks like this also powers the accelerometer, which by the way is working perfectly.

So my question boils down to:
What do I have to do on a v4 board to activate the LNA for the GPS?

    Hi kaffetorsk

    Make sure you have a board overlay with this contents:

    # GPS Antenna configuration
    CONFIG_MODEM_ANTENNA=y
    CONFIG_MODEM_ANTENNA_AT_COEX0="AT\%XCOEX0=1,1,1565,1586"

    This will automatically configure the COEX0 line to enable the power switch for the active GPS antenna.

    Make sure you’re in a clear view to the sky. You may also want to try the SUPL client which speeds up things considerably.

    I’d also recommend to use the GPS sample first to make sure it’s working OK before integrating into a larger project.

    https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers/tree/v2.4.x/samples/gps

    You will need to make sure these are set if you want to use SUPL

    CONFIG_GNSS_SAMPLE_ASSISTANCE_NRF_CLOUD=n
    CONFIG_GNSS_SAMPLE_ASSISTANCE_SUPL=y
    CONFIG_GNSS_SAMPLE_SUPL_HOSTNAME="supl.google.com"

    You can get the SUPL client here: https://www.nordicsemi.com/Products/Wireless/Low-power-cellular-IoT/SUPL-client-library-license-agreement

    (requires you agree to their terms)

    Thanks for the quick reply!

    Since I’m not using zephyr, but Rust (nrf_modem crate) it is hard to debug without complete understanding of your board and pin usage. My reference is your schematic pdf (nrf91-feather-schematic.pdf) for the v4 board (commit 74a0941). I can see on the schematic that 3.3V PS is controlled by pin 13 and 31.

    What level should those pins be?
    If the accelerometer, which also uses 3.3V is working, does it mean the LNA is also powered and that 13 and/or 31 is in the correct state?

    Which exact AT commands are necessary?
    AT\%XCOEX0=1,1,1565,1586 is obvious, but do i also need AT%XANTCFG=1 to set external antenna?

    PS_EN is connected to pin 31. It should set high otherwise the power supply will turn off when removed from USB.

    Pin 13 is connected to A0. I don’t believe it has any other hardware function. (D2/D3)(P0.30/P0.29) on the other hand are connected to the LIS2DH12TR.

    If the accelerometer, which also uses 3.3V is working, does it mean the LNA is also powered and that 13 and/or 31 is in the correct state?

    No the power switch is connected to the COEX0:


    It’s automatically controlled by the modem. The only thing you need to do is issue that command.

    You definitely do not want to issue AT%XANTCFG=1 as that will enable the use of the AUX pin. The nRF9160 Feather does not use this pin. (Future designs will 😉 )

    I’m still getting around to doing some Rust dev with the nRF91. Sorry I can’t me more useful here!

    24 days later

    So, I finally found some time to measure what’s going on.

    When the GPS is trying to get fix I measure +3.3V on Vout on the MIC94092YC6-TR (U4). As far as I can tell this means that the GPS antenna is powered properly?

    Guess that just means it’s slow to get fix…

    For some reason the same antenna was much faster on the NRF9160-DK

    In your comparison, did both devices have the same modem firmware and NCS version?

    Terms and Conditions | Privacy Policy