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

nRF91 Multicell sample not working (errno 111)

Hi,

I am struggling to get multicell location sample working (nRF connect 1.6.1, modem FW 1.3.0).

In menuconfing I selected "nRF Cloud location service", "nRF Cloud API key" pasted from  "Device API Management" account and "Server hostname" set to 18.204.124.14 (the IP of api.nrfcloud.com since I am having some troubles with DNS in general).

Still, I get:

multicell_location_sample: Sending location request...
<err> multicell_location: connect() failed, errno: 111



Please note that the device is registered fine to nRF cloud; for example asset_tracker_v2 aplication is working flawlessly.

Am I using the correct hostname/key?

Same question for HERE and SKYHOOK (same proble with HERE, not yet tried SKYHOOK).

Thank you

  • Hi!

    Could you enable CONFIG_MULTICELL_LOCATION_LOG_LEVEL_DBG and provide the full log output?

    From what you describe, you are doing it correctly but I wonder if the hostname could be wrong. Are you able to connect to nRF Cloud with the Asset Tracker application using that hostname?

    Best regards,

    Heidi

  • Hi,

    In AssetTrackerV2 I am using a different IP (54.164.210.59), which also does not work for the Multicell sample.

    So, below you can find the log:

    *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    Flash regions		Domain		Permissions
    00 01 0x00000 0x10000 	Secure		rwxl
    02 31 0x10000 0x100000 	Non-Secure	rwxl
    
    Non-secure callable region 0 placed in flash region 1 with size 32.
    
    SRAM region		Domain		Permissions
    00 07 0x00000 0x10000 	Secure		rwxl
    08 31 0x10000 0x40000 	Non-Secure	rwxl
    
    Peripheral		Domain		Status
    00 NRF_P0               Non-Secure	OK
    01 NRF_CLOCK            Non-Secure	OK
    02 NRF_RTC0             Non-Secure	OK
    03 NRF_RTC1             Non-Secure	OK
    04 NRF_NVMC             Non-Secure	OK
    05 NRF_UARTE1           Non-Secure	OK
    06 NRF_UARTE2           Secure		SKIP
    07 NRF_TWIM2            Non-Secure	OK
    08 NRF_SPIM3            Non-Secure	OK
    09 NRF_TIMER0           Non-Secure	OK
    10 NRF_TIMER1           Non-Secure	OK
    11 NRF_TIMER2           Non-Secure	OK
    12 NRF_SAADC            Non-Secure	OK
    13 NRF_PWM0             Non-Secure	OK
    14 NRF_PWM1             Non-Secure	OK
    15 NRF_PWM2             Non-Secure	OK
    16 NRF_PWM3             Non-Secure	OK
    17 NRF_WDT              Non-Secure	OK
    18 NRF_IPC              Non-Secure	OK
    19 NRF_VMC              Non-Secure	OK
    20 NRF_FPU              Non-Secure	OK
    21 NRF_EGU1             Non-Secure	OK
    22 NRF_EGU2             Non-Secure	OK
    23 NRF_DPPIC            Non-Secure	OK
    24 NRF_REGULATORS       Non-Secure	OK
    25 NRF_PDM              Non-Secure	OK
    26 NRF_I2S              Non-Secure	OK
    27 NRF_GPIOTE1          Non-Secure	OK
    
    SPM: NS image at 0x10000
    SPM: NS MSP at 0x2001b028
    SPM: NS reset vector at 0x1544d
    SPM: prepare to jump to Non-Secure image.
    *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    [00:00:00.212,127] <inf> multicell_location_sample: Multicell location sample has started
    [00:00:00.230,163] <inf> multicell_location: A certificate is already provisioned to sec tag -1
    [00:00:00.287,994] <inf> multicell_location_sample: Connecting to LTE network, this may take several minutes...
    +CEREG: 2,"1F40","03151049",9
    [00:00:04.623,229] <inf> multicell_location_sample: LTE cell changed: Cell ID: 51712073, Tracking area: 8000
    [00:00:04.634,582] <inf> multicell_location_sample: Cell change triggered start of cell measurements
    [00:00:04.645,263] <inf> multicell_location_sample: Active LTE mode changed: NB-IoT
    +CSCON: 1
    [00:00:05.148,468] <inf> multicell_location_sample: RRC mode: Connected
    %NCELLMEAS: 0,"03151049","20201","1F40",176,6390,136,65,28,5999
    [00:00:06.224,670] <inf> multicell_location_sample: Neighbor cell measurements received
    +CEREG: 1,"1F40","03151049",9,,,"11100000","11100000"
    [00:00:06.239,746] <inf> multicell_location_sample: Network registration status: Connected - home network
    [00:00:06.250,793] <inf> multicell_location_sample: Connected to LTE network
    [00:00:06.259,094] <inf> multicell_location_sample: Requesting neighbor cell information every 120 seconds
    [00:00:06.270,416] <inf> multicell_location_sample: Periodical start of cell measurements
    [00:00:06.270,324] <inf> multicell_location_sample: Current cell:
    [00:00:06.287,261] <inf> multicell_location_sample: 	MCC: 202
    [00:00:06.294,128] <inf> multicell_location_sample: 	MNC: 001
    [00:00:06.300,964] <inf> multicell_location_sample: 	Cell ID: 51712073
    [00:00:06.308,715] <inf> multicell_location_sample: 	TAC: 8000
    [00:00:06.315,673] <inf> multicell_location_sample: 	EARFCN: 6390
    [00:00:06.322,906] <inf> multicell_location_sample: 	Timing advance: 176
    [00:00:06.330,841] <inf> multicell_location_sample: 	Measurement time: 5999
    [00:00:06.339,050] <inf> multicell_location_sample: 	Physical cell ID: 136
    [00:00:06.347,167] <inf> multicell_location_sample: 	RSRP: 65
    [00:00:06.354,034] <inf> multicell_location_sample: 	RSRQ: 28
    [00:00:06.360,900] <inf> multicell_location_sample: *** No neighbor cells found ***
    [00:00:06.369,873] <inf> multicell_location_sample: Sending location request...
    [00:00:06.378,509] <inf> multicell_location_sample: PSM parameter update: TAU: -1, Active time: -1
    %NCELLMEAS: 0,"03151049","20201","1F40",176,6390,136,65,28,5999
    [00:00:06.396,087] <inf> multicell_location_sample: Neighbor cell measurements received
    [00:00:06.405,853] <dbg> multicell_location.multicell_location_get: Generated request:
    GET /v1/location/single-cell?deviceIdentifier=352656100385247&mcc=202&mnc=1&tac=8000&eci=51712073&format=json HTTP/1.1
    Host: 18.204.124.14
    Authorization: Bearer 905b4dc680f74b079b7707bf353c49afe9ad54ff
    Connection: close
    Content-Type: application/json
    
    
    [00:00:06.440,582] <dbg> multicell_location.execute_http_request: IP address: 18.204.124.14
    [00:00:10.290,008] <err> multicell_location: connect() failed, errno: 111
    [00:00:10.299,804] <err> multicell_location: HTTP request failed, error: -111
    [00:00:10.308,471] <err> multicell_location_sample: Failed to acquire location, error: -111
    [00:00:10.318,542] <inf> multicell_location_sample: Current cell:
    [00:00:10.325,805] <inf> multicell_location_sample: 	MCC: 202
    [00:00:10.332,672] <inf> multicell_location_sample: 	MNC: 001
    [00:00:10.339,569] <inf> multicell_location_sample: 	Cell ID: 51712073
    [00:00:10.347,320] <inf> multicell_location_sample: 	TAC: 8000
    [00:00:10.354,278] <inf> multicell_location_sample: 	EARFCN: 6390
    [00:00:10.361,541] <inf> multicell_location_sample: 	Timing advance: 176
    [00:00:10.369,476] <inf> multicell_location_sample: 	Measurement time: 5999
    [00:00:10.377,716] <inf> multicell_location_sample: 	Physical cell ID: 136
    [00:00:10.385,833] <inf> multicell_location_sample: 	RSRP: 65
    [00:00:10.392,730] <inf> multicell_location_sample: 	RSRQ: 28
    [00:00:10.399,597] <inf> multicell_location_sample: *** No neighbor cells found ***
    [00:00:10.408,599] <inf> multicell_location_sample: Sending location request...
    [00:00:10.418,060] <dbg> multicell_location.multicell_location_get: Generated request:
    GET /v1/location/single-cell?deviceIdentifier=352656100385247&mcc=202&mnc=1&tac=8000&eci=51712073&format=json HTTP/1.1
    Host: 18.204.124.14
    Authorization: Bearer 905b4dc680f74b079b7707bf353c49afe9ad54ff
    Connection: close
    Content-Type: application/json
    
    
    [00:00:10.452,972] <dbg> multicell_location.execute_http_request: IP address: 18.204.124.14
    [00:00:17.031,494] <err> multicell_location: connect() failed, errno: 111
    [00:00:17.041,351] <err> multicell_location: HTTP request failed, error: -111
    [00:00:17.050,018] <err> multicell_location_sample: Failed to acquire location, error: -111
    +CSCON: 0
    [00:00:22.348,419] <inf> multicell_location_sample: RRC mode: Idle
    [00:02:06.389,068] <inf> multicell_location_sample: Periodical start of cell measurements
    %NCELLMEAS: 0,"03151049","20201","1F40",65535,6390,136,65,19,129334
    [00:02:09.554,168] <inf> multicell_location_sample: Neighbor cell measurements received
    [00:02:09.563,507] <inf> multicell_location_sample: Current cell:
    [00:02:09.570,739] <inf> multicell_location_sample: 	MCC: 202
    [00:02:09.577,636] <inf> multicell_location_sample: 	MNC: 001
    [00:02:09.584,503] <inf> multicell_location_sample: 	Cell ID: 51712073
    [00:02:09.592,254] <inf> multicell_location_sample: 	TAC: 8000
    [00:02:09.599,212] <inf> multicell_location_sample: 	EARFCN: 6390
    [00:02:09.606,475] <inf> multicell_location_sample: 	Timing advance: 65535
    [00:02:09.614,624] <inf> multicell_location_sample: 	Measurement time: 129334
    [00:02:09.623,046] <inf> multicell_location_sample: 	Physical cell ID: 136
    [00:02:09.631,195] <inf> multicell_location_sample: 	RSRP: 65
    [00:02:09.638,061] <inf> multicell_location_sample: 	RSRQ: 19
    [00:02:09.644,927] <inf> multicell_location_sample: *** No neighbor cells found ***
    [00:02:09.653,930] <inf> multicell_location_sample: Sending location request...
    [00:02:09.669,342] <dbg> multicell_location.multicell_location_get: Generated request:
    GET /v1/location/single-cell?deviceIdentifier=352656100385247&mcc=202&mnc=1&tac=8000&eci=51712073&format=json HTTP/1.1
    Host: 18.204.124.14
    Authorization: Bearer 905b4dc680f74b079b7707bf353c49afe9ad54ff
    Connection: close
    Content-Type: application/json
    
    
    [00:02:09.710,235] <dbg> multicell_location.execute_http_request: IP address: 18.204.124.14
    +CSCON: 1
    [00:02:09.952,911] <inf> multicell_location_sample: RRC mode: Connected
    [00:02:13.784,393] <err> multicell_location: connect() failed, errno: 111
    [00:02:13.794,403] <err> multicell_location: HTTP request failed, error: -111
    [00:02:13.803,009] <err> multicell_location_sample: Failed to acquire location, error: -111
    +CSCON: 0
    [00:02:21.384,582] <inf> multicell_location_sample: RRC mode: Idle
    

    What is the hostname you are using to connect?

    Thank you,

    Thanos

  • Hi!

    I am using "api.nrfcloud.com" to connect. 

     

    Thanos said:
    In AssetTrackerV2 I am using a different IP (54.164.210.59), which also does not work for the Multicell sample.

     Do you get the same error with this IP?

    Somewhat related, nRF Cloud changed the authentication for Location Services to JWT, and the 1.6.1 sample is still using API key-based authentication, which no longer works. This isn't the issue you are seeing, but once you are able to connect, you will get a new error with the 1.6.1 sample, as it no longer works.

  • API keys are no longer used to authenticate Location Service endpoints. You must use JSON Web Tokens (JWTs). See docs.nrfcloud.com/.../RESTThe master branch has been updated to use JWTs. (Unfortunately, nRF Cloud and the Nordic Connect SDK can get out of sync at times. When in doubt, use the master branch.)

    Also v1.6 does not support multi-cell, but only single-cell.

  • It turned out I had to use the hostname (api.nrfcloud.com) instead of th IP address. After I fixed the DNS error by setting a custom DNS server, I can connect  succesfully without error 111.

    As you expected, now I am getting http bad response error because of not using JWT, that I have to work on.

    Thank you for your support

Related