nRF9160 get device position using AT command

I am playing around with nRF9160 on the Thingy 91. I am testing various AT command and just familiarizing myself with the LTE and AT commands.

For me, the most important modem funcionality is to be able to detect device position. I have been going through the AT command document trying to figure out how can this be done:

https://infocenter.nordicsemi.com/pdf/nrf9160_at_commands_v2.2.pdf

but I could not find a way to do this.

I have flashed the device with asset tracker v2 application and opened cellular monitor:

I was hoping to see the device position here but I do not think that is the case since I cannot see position parameter anywhere

I have also tried this:

https://electronics.stackexchange.com/questions/73427/trying-to-find-location-in-gsm-network

but it did not seem to work.

Apologies in advance if my questions are silly, I am quite new to this.

My main question

1. Is there a way to get the device location (latitude, longitude) using AT command? 

2. Can you monitor device position in Cellular Monitor?

Parents
  • Hello,

    Apologies in advance if my questions are silly, I am quite new to this.

    Not at all. 

    1. Is there a way to get the device location (latitude, longitude) using AT command? 

    No, the AT commands does not communicate with the GNSS module. It uses the GNSS interface from the modem library which is shown in our GNSS sample.

    Can you monitor device position in Cellular Monitor?

    The output from this sample is shown in the Serial Terminal which can be opened from the Cellular Monitor. 

    I have flashed the device with asset tracker v2 application and opened cellular monitor:

    The position of the device running Asset Tracker v2 is uploaded to nRF Cloud. More information on this is described in the nRF Cloud documentation.

    If you need more details, please provide more information on what you are trying to achieve Slight smile

    Kind regards,
    Øyvind

  • Thanks for response.

    If you need more details, please provide more information on what you are trying to achieve

    I was simply hoping that I would be able to fully control the modem using AT commands if the modem is running at_client or asset_tracker_v2 firmware while the other MCU (nrf52840) is running connectivity_bridge application to allow communication with the modem.

    I have read somewhere that when you are working with the modems, you have 2 options:

    1. Write your own application if manufacturer provides SDK and tools for it (same as in asset_tracker_v2).

    2. Use AT commands and simply control the modem by using standartised AT commands that all modems should support according to 3GPP standard. In fact, if I am not mistaken, some modems (such as Quectel) do not even allow writing your own application on the modem side like you allow on the nRF9160. You can only control some modems via AT commands. Is that correct? 

    Anyways, since I cannot read the device position using AT command, I do not have any other option but to write my own application since for my project I need to get the position. Is there any particular reason why on the nRF9160 is not possible to extract device position using AT command? If that was possible, I could just use AT commands for my project and that would probably simplify the development.

  • You were right regarding the nRF9161. I was looking a the wrong document, thanks for clarifying.

    Regarding the serial monitor, I have tried Serial Terminal found at NRF Connect and I can say that it works!

    However, I still have some questions.

    Question 1

    It does not work on Termite. Perhaps the serial port settings are not correct? I am pretty sure I have configured as suggested on your website:

    developer.nordicsemi.com/.../slm_description.html

    but it still does not work:

    If you have termite, could you please try this on your side just to confirm there is an issue on my side?

    Question 2

    As you can see from the image above, I have tried to use AT#XGPS command but the ERROR has been returned. Perhaps you got any ideas why would that be the case?

    I use the following example:

    Can you run it on your side just to confirm it works on your side?

  • zazas321 said:
    If you have termite, could you please try this on your side just to confirm there is an issue on my side?

    I'm afraid I don't have Termite on my machine. If you do get results with the Serial Terminal then the application is working as intended

    zazas321 said:
    As you can see from the image above, I have tried to use AT#XGPS command but the ERROR has been returned. Perhaps you got any ideas why would that be the case?

    I get the same result and will investigate. 

    Kind regards,
    Øyvind

  • Hello again, 

    Øyvind said:
    I get the same result and will investigate. 

    This is a bug which will be fixed in the next tagged version. Should be availble on the main branch for testing now. 

    Kind regards,
    Øyvind

  • Thank you very much for investigating this further! Are you suggesting that there is an issue with the AT#XGPS command on the ncs v2.5.0 or this issue is specific to the serial_LTE application? 

    Being able to get the device location using AT#XGPS at command I would consider to be one of the most important GNSS funcionalities. It is quite strange how no one have noticed it earlier.

    Anyways, regarding the termite, I have been further experimenting with it and discovered that you have to set Flow Control in order to get the response:

    However, on your website this is not shown:

    which is quite misleading.

  • zazas321 said:
    Anyways, regarding the termite, I have been further experimenting with it and discovered that you have to set Flow Control in order to get the response:

    Thanks for pointing out! I will inform our documentation team about this.

    zazas321 said:
    Thank you very much for investigating this further! Are you suggesting that there is an issue with the AT#XGPS command on the ncs v2.5.0 or this issue is specific to the serial_LTE application? 

    No, sorry, the issue seems to be with the example itself which will be fixed in latest version. The #XGPS command does not have 5 arguments but 4. 



    Can you try issuing  AT#XGPS=1,0,0,0 instead?

    Kind regards,
    Øyvind

Reply
  • zazas321 said:
    Anyways, regarding the termite, I have been further experimenting with it and discovered that you have to set Flow Control in order to get the response:

    Thanks for pointing out! I will inform our documentation team about this.

    zazas321 said:
    Thank you very much for investigating this further! Are you suggesting that there is an issue with the AT#XGPS command on the ncs v2.5.0 or this issue is specific to the serial_LTE application? 

    No, sorry, the issue seems to be with the example itself which will be fixed in latest version. The #XGPS command does not have 5 arguments but 4. 



    Can you try issuing  AT#XGPS=1,0,0,0 instead?

    Kind regards,
    Øyvind

Children
No Data
Related