This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPS/LTE_M/NB-IoT nRF91

Dear, 

I am using :

ncs: v0.4.0 

SES 4.16 

firmware: mfwnrf916007029alpha

Hardware: nRF9160 DK v: 0.8.5

I want to do: 

1. Enable and get GPS position ("AT\%XSYSTEMMODE=0,0,1,0") and data from BMP280 sensor  --> store it in data_pack

2. Turnoff GPS and Enable LTE_M: ("AT\%XSYSTEMMODE=1,0,0,0") & use HTTP POST to post data_pack to my webserver 

3. Switch to NB-IoT: ("AT\%XSYSTEMMODE=0,1,0,0") & use HTTP POST to post data_pack to my webserver

Is it posiblie to do like that now?

I know: "The current modem firmware, v0.7.0-29-alpha, allows you to choose the system mode via command %XSYSTEMMODE, but it does not support them concurrently, meaning that you cannot have GPS + NB-IoT, or GPS + CAT M1, enabled simultaneously at this time."  https://devzone.nordicsemi.com/f/nordic-q-a/48077/gps-http-post

I can switch: AT\%XSYSTEMMODE=0,0,1,0/AT\%XSYSTEMMODE=1,0,0,0/AT\%XSYSTEMMODE=0,1,0,0 but I couldn't POST data to my webserver.

Do you have any suggestions?

Thanks,

Regards, 

hng

  • You should see the note in the top of the documentation here:

    https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/mob_termination_ctrl_status/xsystemmode_set.html?cp=2_1_3_30_0

     

    The CFUN=4 command corresponds to function lte_lc.c::lte_lc_offline()

    Then switch the xsystemmode to your wanted mode, and you can call lte_lc.c::lte_lc_normal() to start up again.

     

    Kind regards,

    Håkon

  • OK, I will try it

    thanks

  • Dear 

    Im NOT good enough to understand you all. 

    1. "You need to manually start the modem unless you have the LTE Link control library present. It's best just to leave that one enabled."

            GPS COULDNT get position when I kept : 

    # LTE link control
    CONFIG_LTE_LINK_CONTROL=y

    in prj.conf. 

    From me: the option CONFIG_LTE_LINK_CONTROL=y will connect LTE when the nrf9160 starts. 

    I used : AT+CFUN=4 (or lte_lc_offline()), then enable GPS, and run gps

    but then, the GPS keeps scanning ...................... without fix

    (when I ran without option: CONFIG_LTE_LINK_CONTROL=y, just about less then 50s, it got fixed location:

    )

    (my nrf9160 dk stayed outside and the same position)

    Something is wrong on my setup?

    Thanks, 

    Ragards, 

    hng

  • Dear

    This is my code

    GPS_LTE_June20.7z

    I hope you can help me to review and give me the solution for this problem

    thanks

    Regards

    hng

  • Hi,

     

    Including sources without headers isn't recommended.

    What you should do is create header files for each of your C-files (except main.c) and rather include them in the CMakeLists.txt. Add these lines to your Cmakelists.txt:

    And create the appropriate header files lte_post_get.h and gps.h in the src/ dir, which should hold the function declarations.

     

    To take the modem off line you can call this function:

    https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/lte_lc.c#L140

     

    Then you can change the system mode.

    Then take the modem online again:

    https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/lte_lc.c#L158

     

    However; there's no function to "wait for connection" that does not overwrite the xsystemmode.

    This function will set the default xsystemmode (LTE M1 unless explicitly stated otherwise), but will also wait for the connection to be made.

    https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/lte_lc.c#L131

     

    What you can do for quick testing is to comment out these three lines (111 to 113), and just use the above mentioned functions:

    https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/lte_lc.c#L111

     

    Kind regards,

    Håkon

1 2 3 4