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

AGPS startup via NB-IoT on nrf9160-DK

I took the APGS example and switched in to NB-IoT as I can't easily test with LTE/M at the moment

2021-03-15T16:25:39.226Z DEBUG modem << I: A-GPS sample has started
2021-03-15T16:25:39.246Z DEBUG modem << I: Connecting to LTE network. This may take minutes.
2021-03-15T16:25:39.249Z DEBUG modem << I: PSM mode requested
2021-03-15T16:25:42.194Z DEBUG modem << +CEREG: 2,"1BE8","00334D15",9,0,0,"11100000","11100000"
2021-03-15T16:25:42.900Z DEBUG modem << +CSCON: 1
2021-03-15T16:25:45.571Z DEBUG modem << +CEREG: 5,"1BE8","00334D15",9,,,"00000010","00011111"
2021-03-15T16:25:45.605Z DEBUG modem << I: Connected to LTE network
2021-03-15T16:25:45.606Z DEBUG modem << D: MAGPIO set: AT%XMAGPIO=1,0,0,1,1,1565,1586
2021-03-15T16:25:45.607Z DEBUG modem << D: COEX0 set: AT%XCOEX0=1,1,1565,1586
2021-03-15T16:25:45.610Z DEBUG modem << D: GPS socket created, fd: 1232491587
2021-03-15T16:25:45.611Z DEBUG modem << I: CLOUD_EVT_CONNECTING
2021-03-15T16:25:46.400Z DEBUG modem << I: CLOUD_EVT_CONNECTING

I tried this a few times and waiting several minutes in each case. No more output seen.
Are there other things I need to change? apart from:


#CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y

Suggestions welcome. Thx.
Parents
  • Hello, 

    Sorry for the delayed answer. I will have a look at your case and get back to you before end of the day.

    Kind regards,
    Øyvind

  • My sincere apologies. I've had trouble with my setup here as well. I will need some more time.

    Kind regards,
    Øyvind

  • Hello, 

    My apologies for the late reply. I have had some issues with my board. 

    Can you please provide full log output from when you are trying to connect? How long do you let it run? This may be an issue with the NB-IoT connection, but will need to confirm.

    This is what I get when running the AGPS sample:

    2021-03-23T10:58:45.747Z DEBUG modem << *** Booting Zephyr OS build v2.4.99-ncs1  ***
    2021-03-23T10:58:45.750Z DEBUG modem << I: A-GPS sample has started
    2021-03-23T10:58:45.752Z DEBUG modem << I: Connecting to LTE network. This may take minutes.
    2021-03-23T10:58:45.753Z DEBUG modem << I: PSM mode requested
    2021-03-23T10:58:46.715Z DEBUG modem << +CEREG: 2,"7AA9","01172803",7,0,0,"11100000","11100000"
    2021-03-23T10:58:47.198Z DEBUG modem << +CSCON: 1
    2021-03-23T10:58:48.569Z DEBUG modem << +CEREG: 1,"7AA9","01172803",7,,,"00000010","00011111"
    2021-03-23T10:58:49.030Z DEBUG modem << I: Connected to LTE network
    2021-03-23T10:58:49.032Z DEBUG modem << D: MAGPIO set: AT%XMAGPIO=1,0,0,1,1,1565,1586
    2021-03-23T10:58:49.034Z DEBUG modem << D: COEX0 set: AT%XCOEX0=1,1,1565,1586
    2021-03-23T10:58:49.035Z DEBUG modem << D: GPS socket created, fd: 1232491587
    2021-03-23T10:58:49.036Z DEBUG modem << I: CLOUD_EVT_CONNECTING
    2021-03-23T10:58:53.213Z DEBUG modem << I: CLOUD_EVT_CONNECTED
    2021-03-23T10:58:53.888Z DEBUG modem << I: CLOUD_EVT_DATA_RECEIVED
    2021-03-23T10:58:54.438Z DEBUG modem << I: CLOUD_EVT_PAIR_DONE
    2021-03-23T10:58:54.935Z DEBUG modem << E: Failed to save session state: -2
    2021-03-23T10:58:54.937Z DEBUG modem << I: CLOUD_EVT_READY
    2021-03-23T10:58:54.938Z DEBUG modem << I: Service info sent to cloud
    2021-03-23T10:58:54.938Z DEBUG modem << D: GPS mode is enabled
    2021-03-23T10:58:54.939Z DEBUG modem << D: GPS operational
    2021-03-23T10:58:54.940Z DEBUG modem << I: Periodic GPS search started with interval 240 s, timeout 120 s
    2021-03-23T10:58:54.942Z DEBUG modem << I: GPS_EVT_SEARCH_STARTED
    2021-03-23T10:58:54.943Z DEBUG modem << D: A-GPS data update needed
    2021-03-23T10:58:54.943Z DEBUG modem << I: GPS_EVT_AGPS_DATA_NEEDED
    2021-03-23T10:58:54.944Z DEBUG modem << D: Created A-GPS request: {"appId":"AGPS","messageType":"DATA","data":{"mcc":242,"mnc":1,"tac":31401,"eci":18294787,"phycid":0,"types":[1,2,3,4,7,8,9]}}
    2021-03-23T10:58:54.944Z DEBUG modem << D: A-GPS request sent
    2021-03-23T10:58:55.733Z DEBUG modem << D: Waiting for time window to operate
    2021-03-23T10:58:55.736Z DEBUG modem << I: GPS_EVT_OPERATION_BLOCKED
    2021-03-23T10:58:57.135Z DEBUG modem << I: CLOUD_EVT_DATA_RECEIVED
    2021-03-23T10:58:57.580Z DEBUG modem << D: Receievd AGPS data. Schema version: 1, length: 1037
    2021-03-23T10:58:57.582Z DEBUG modem << D: Parsed_len: 35
    2021-03-23T10:58:57.584Z DEBUG modem << D: A-GPS type: NRF_CLOUD_AGPS_ALMANAC
    2021-03-23T10:58:57.585Z DEBUG modem << D: Sent A-GPS data to modem, type: 3
    2021-03-23T10:58:57.586Z DEBUG modem << D: Parsed_len: 66
    2021-03-23T10:58:57.587Z DEBUG modem << D: A-GPS type: NRF_CLOUD_AGPS_ALMANAC
    2021-03-23T10:58:57.587Z DEBUG modem << D: Sent A-GPS data to modem, type: 3

    Kind regards,
    Øyvind

  • Thx Øyvind.

    That was the whole log.  I never got the CLOUD_EVT_CONNECTED event.  I will try again and leave it for a really long time.  That will take a couple of days as I do not have NB-IoT coverage here.

  • paul_tanner said:
    That will take a couple of days as I do not have NB-IoT coverage here.

     Then how are you supposed to connect to cloud if there is no coverage? Do you have LTE-M connection?

Reply Children
  • I mean a couple of days to find time to get near a cell tower that supports it.  Both NB-IoT and LTE/M have patchy coverage in the UK.  Our hope is that when development is complete coverage will be better.

    Then i found I had some time today.  I did 2 successful tests with another app that uses NB-IoT.  In between I did 2 tests with the AGPS sample.  The results were the same and I waited at least 10 minutes in each case

    2021-03-23T15:43:16.323Z DEBUG modem << I: A-GPS sample has started
    2021-03-23T15:43:16.352Z DEBUG modem << I: Connecting to LTE network. This may take minutes.
    2021-03-23T15:43:16.355Z DEBUG modem << I: PSM mode requested
    2021-03-23T15:43:18.491Z DEBUG modem << +CEREG: 2,"1BE8","00334D15",9,0,0,"11100000","11100000"
    2021-03-23T15:43:18.881Z DEBUG modem << +CSCON: 1
    2021-03-23T15:43:20.102Z DEBUG modem << +CEREG: 5,"1BE8","00334D15",9,,,"00000010","00011111"
    2021-03-23T15:43:20.114Z DEBUG modem << I: Connected to LTE network
    2021-03-23T15:43:20.134Z DEBUG modem << D: MAGPIO set: AT%XMAGPIO=1,0,0,1,1,1565,1586
    2021-03-23T15:43:20.137Z DEBUG modem << D: COEX0 set: AT%XCOEX0=1,1,1565,1586
    2021-03-23T15:43:20.138Z DEBUG modem << D: GPS socket created, fd: 1232491587
    2021-03-23T15:43:20.139Z DEBUG modem << I: CLOUD_EVT_CONNECTING
    2021-03-23T15:43:20.386Z DEBUG modem << I: CLOUD_EVT_CONNECTING
    2021-03-23T15:43:25.478Z DEBUG modem << +CSCON: 0

    So the only changes from the supplied sample were:

    #CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
    CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y

    I wonder if there are other things needed when NB-IoT is used.  If there was a connection problem I would expect some kind of timeout message.  Instead it seems to be just hanging.

  • Hello, 

    My apologies for the blunt answer yesterday. I contacted the RSM for the UK to get a better overview of the network situation, and this is her response:

    The UK have LTE-m coverage in the EAST, via O2 (Telefonica). Customers can check the coverage in their area using this website: https://www.o2.co.uk/business/solutions/iot/lte-m

    Please note that the last time I checked the low-power modes (eDRX and PSM) were not available to roaming SIMs (like iBasis) so he would need a SIM from O2 (with a data allowance) to get the GPS demo on the Thingy:91 working.

    Should he wish to try NB-IoT, then this is also possible where he lives, however he will need to get specific SIM cards that are enabled for NB-IoT. I would advise contacting Arkessa for these as they are a preferred partner of Vodfone, however the SIMs that Arkessa supply in their trial pack are NOT whitelisted – which makes development a whole lot easier especially when using AWS!

    If you are interested in getting a trial package from Arkessa, please let me know and I will forward the contact information.

    NB-IoT coverage is ALMOST the whole of the country (with notable exceptions like East Anglia), and the density of coverage should be improving.

    Please let me know if you have any further questions on this.

    Are you using the iBasis SIM for testing or do you use another SIM from one of the network providers? 

    Kind regards,
    Øyvind

  • I'm using NB-IoT SIMs from Vodafone.  I also have an iBasis LTE/M SIM but had similar coverage issues with that.  I know that at this stage of UK rollouts we have to travel a little to get in range.  However, we have plenty of development work yet to do before we'll be ready to deploy.

    So the question remains: why does the AGPS example stall?  Is some further customisation needed to enable the necessary cloud connection?

    I see that nrfCloud can generate a device certificate.  No mention of that in the README but I wondered if that could be required in the build?

  • paul_tanner said:
    why does the AGPS example stall?  Is some further customisation needed to enable the necessary cloud connection?

     No, there shouldn't be any other customisations needed to enable anything. What I am afraid of is the NB-IoT connection. Are you able to try with a new SIM from Arkessa? https://www.arkessa.com/

    If that does not help, can you please try running the Asset Tracker sample to see if that is able to connect nRF Cloud?

    Thank you.
    -Øyvind

  • I was thinking that the SIMs must be OK as they are working with other examples such as UDP.

    It could take a while to get SIMs from another source.  However, I realised that the Vodafone SIMs I have may be restricted in terms to the IPs they can access.  I have asked them to support a connection to supl.google.com in addition to the IP they are already accessing.

Related