Getting Error while connecting nRF9160DK module to nRF7002DK module with spi and use it for wifi locationing

Dear Nordic Team,

I want to connect my nRF9160DK board to my nRF7002DK board and get a wi-fi location. I've followed samples/cellular/nrf_cloud_multi_service as sample and I made wiring as follows

Board nRF9160-DK(P3 & P4) nRF7002-DK (P24)
SPI CLK P0.13 P0.17
SPI CS P0.10 P0.18
SPI MOSI P0.11 P0.13
SPI MISO P0.12 P0.14
HOST-IRQ  P0.07 P0.23
IOVDD-CTR  P0.00 P0.31
BUCKEN P0.01 P0.12

I soldered SB25 and SB20 on the nRF7002 board.



The problem is, whenever I'm trying to build samples/cellular/nrf_cloud_multi_service sample with using overlay-nrf7002ek-wifi-scan-only.conf as Extra Kconfig fragments and -DSHIELD="nrf7002ek" as Extra Cmake arguments.

After flashing the sample to the nrf9160DK board, I'm getting the error below:

*** Booting nRF Connect SDK 4040aa0bf581 ***
[00:00:00.257,720] <inf> main: nRF Cloud multi-service sample has started, version: 1.0.0, protocol: MQTT
[00:00:00.257,751] <inf> cloud_connection: Enabling connectivity...
[00:00:00.260,284] <inf> wifi_nrf_bus: SPIM spi@b000: freq = 8 MHz
[00:00:00.260,314] <inf> wifi_nrf_bus: SPIM spi@b000: latency = 0
[00:00:00.260,864] <err> wifi_nrf_bus: Error: RPU comms test: sig failed: expected 0x42000020, got 0xffffffff

[00:00:00.260,925] <err> wifi_nrf: zep_shim_bus_qspi_dev_add: RPU enable failed with error -1
[00:00:00.260,986] <err> wifi_nrf: nrf_wifi_bus_qspi_dev_add: nrf_wifi_osal_bus_qspi_dev_add failed
[00:00:00.261,077] <err> wifi_nrf: nrf_wifi_bal_dev_add: Bus dev_add failed
[00:00:00.261,169] <err> wifi_nrf: nrf_wifi_hal_dev_add: nrf_wifi_bal_dev_add failed
[00:00:00.261,322] <err> wifi_nrf: nrf_wifi_fmac_dev_add: nrf_wifi_hal_dev_add failed
[00:00:00.261,383] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_add failed
[00:00:00.261,413] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed
[00:00:00.537,200] <inf> cloud_connection: Setting up nRF Cloud library...
[00:00:00.539,093] <inf> cloud_connection: Waiting for network ready...
+CEREG: 2,"1644","00DB1564",9
+CSCON: 1
+CGEV: ME PDN ACT 0,0
+CNEC_ESM: 50,0
+CEREG: 5,"1644","00DB1564",9,,,"00010000","11100000"
%XTIME: "21","42118151436521","00"
+CSCON: 0

Then progress stops completely. The error changes when I disconnect any of the cables, so I thought the problem might be the configuration on the devicetree. and here how it looks like:


I tried to assign SPI WAKE to P0.07, the HOST-IRQ pin, but this time it started to give this error serially: ASSERTION FAIL @ WEST_TOPDIR/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c:486

I would be very grateful if you can help me solve this error, if there is any extra information that you think may be useful, I will be happy to share it.

Actually what I want to do is to get the wifi location in a simple way and monitor it on nrf cloud with REST protocol. Then I want to add A-GNSS and experience an effective indoor and outdoor location tracking example. I would be glad to hear your extra advice for that too.

Best wishes!

  • Hi Semih,

    Can you show logs from both boards when you build multi service sample on nrf9160-dk without overlay-nrf7002ek-wifi-scan-only.conf and -DSHIELD=nrf7002ek? Do you get the same error?

    Best regards,
    Dejan

  • I builded without overlay-nrf7002ek-wifi-scan-only.conf and -DSHIELD=nrf7002ek


    Here are the results,

    nrf9160dk (LED1-LED2-LED4-LED3 blinking in sequence like square)


    nrf7002dk


  • Hi,

    Are you able to connect to the nRF Cloud when using only nrf9160-dk?
    Have you checked provisioning and onboarding guide which provides information how to onboard device to be able to successfully connect to nRF Cloud?

    Best regards,
    Dejan

  • Hi Dejan,

    Actually I have question about that too. Because, I already used my device with REST cellular locationing sample, Asset Tracker v2 sample etc. So the device is already defined in nrf-cloud. But in the multi services sample as I understood from the documents its not updating itself with JITP.

    And since, I have to create an self-signed CA certificate. I did it with utils-master with following that way,

    I used the server as TR(Turkey) python3 create_ca_cert.py -c TR -f self_


    After that I got 3 "ca.pem" , "prv.pem" and "pub.pem" files and I replace their folder names in the code below(without pub.pem),

    python3 device_credentials_installer.py --ca self_self_cert_serial_ca.pem --ca_key self_self_cert_serial_prv.pem --id_str nrf- --id_imei -s -d --verify

    Then the code created onboarding.csv file.

    then I uploaded onboarding.csv file with bulk onboard option.

    After all, there is no changes on nrf cloud. As you can see below, I already uploaded onboarding.csv file succesfully.



    Accordingly, if the operation was successful, shouldn't the firmware here also have changed? (I also changed the SDK versiton to the v2.8.0 and it was working without problems with asset tracker v2)
     

    in the serial terminal of nrf9160dk without any other connection. I'm getting this output all the time

    *** Booting My Application v2.1.0-dev-4594a8693738 ***
    *** Using nRF Connect SDK v2.8.0-a2386bfc8401 ***
    *** Using Zephyr OS v3.7.99-0bc3393fb112 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0x10000
    *** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
    *** Using Zephyr OS v3.7.99-0bc3393fb112 ***
    [00:00:00.255,645] <inf> main: nRF Cloud multi-service sample has started, version: 1.0.0, protocol: MQTT
    [00:00:00.255,676] <inf> application: Reset reason: 0x50003
    [00:00:00.255,920] <inf> cloud_connection: Enabling connectivity...
    [00:00:00.530,731] <inf> cloud_connection: Setting up nRF Cloud library...
    [00:00:00.532,470] <inf> nrf_cloud_info: Device ID: nrf-351358811475422
    [00:00:00.532,867] <inf> nrf_cloud_info: IMEI: 351358811475422
    [00:00:00.533,264] <inf> nrf_cloud_info: Modem FW: mfw_nrf9160_1.3.7
    [00:00:00.533,294] <inf> nrf_cloud_info: Protocol: MQTT
    [00:00:00.533,355] <inf> nrf_cloud_info: Download protocol: HTTPS
    [00:00:00.533,355] <inf> nrf_cloud_info: Sec tag: 16842753
    [00:00:00.533,386] <inf> nrf_cloud_info: Host name: mqtt.nrfcloud.com
    [00:00:00.630,554] <inf> nrf_cloud_credentials: Sec Tag: 16842753; CA: Yes, Client Cert: Yes, Private Key: Yes
    [00:00:00.630,645] <inf> nrf_cloud_credentials: CA Size: 1188, AWS: Likely, CoAP: Unlikely
    [00:00:00.630,645] <inf> cloud_connection: Waiting for network ready...
    %MDMEV: SEARCH STATUS 1
    +CEREG: 2,"1644","0052CF65",9
    +CSCON: 1
    +CGEV: ME PDN ACT 0,0
    +CNEC_ESM: 50,0
    %MDMEV: SEARCH STATUS 2
    +CEREG: 5,"1644","0052CF65",9,,,"00010000","11100000"
    %XTIME: "21","42119232852021","00"
    [00:01:16.055,694] <inf> cloud_connection: Network connectivity gained!
    [00:01:17.055,877] <inf> cloud_connection: Network is ready
    [00:01:17.055,908] <inf> cloud_connection: Connecting to nRF Cloud
    [00:01:17.056,671] <err> nrf_cloud_transport: Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111
    [00:01:17.056,701] <inf> cloud_connection: Disconnecting from nRF Cloud
    [00:01:17.056,732] <err> cloud_connection: Could not connect to nRF Cloud
    [00:01:17.056,762] <inf> cloud_connection: Retrying in 30 seconds...
    +CSCON: 0
    [00:01:47.056,915] <inf> cloud_connection: Waiting for network ready...
    [00:01:47.056,945] <inf> cloud_connection: Network is ready
    [00:01:47.056,976] <inf> cloud_connection: Connecting to nRF Cloud
    [00:01:47.072,143] <err> nrf_cloud_transport: Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111
    [00:01:47.072,174] <inf> cloud_connection: Disconnecting from nRF Cloud
    [00:01:47.072,235] <err> cloud_connection: Could not connect to nRF Cloud
    [00:01:47.072,235] <inf> cloud_connection: Retrying in 30 seconds...
    [00:02:17.072,357] <inf> cloud_connection: Waiting for network ready...
    [00:02:17.072,387] <inf> cloud_connection: Network is ready
    [00:02:17.072,387] <inf> cloud_connection: Connecting to nRF Cloud
    [00:02:17.081,481] <err> nrf_cloud_transport: Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111
    [00:02:17.081,542] <inf> cloud_connection: Disconnecting from nRF Cloud
    [00:02:17.081,573] <err> cloud_connection: Could not connect to nRF Cloud
    [00:02:17.081,573] <inf> cloud_connection: Retrying in 30 seconds...

  • Hi,

    Based on your python commands, I assume you followed onboarding device without nRF Cloud provisioning service. Is this correct?

    SemihAydin said:
    if the operation was successful, shouldn't the firmware here also have changed?

    Onboarding operation does not update application firmware. You are expected to have the same firmware as before the onboarding process.

    Best regards,
    Dejan

Related