nrf9160 Custom Board connectivity to nrf cloud

Dear Nordic devzone community,

I am using nrf connect SDK version 1.8.0 for the asset tracker and 2.0.2 for AT client. IDE is Vscode Studio.

I have designed a custom board using nRF9160 and I am able to send and read out certain AT commands which confirms to me that most of the embedded part of the design functions fine.

1)Now in order to use the dashboard of nordic cloud I need to get the IMEI and Pin #, this is normally on the DK indicated with the sticker.

I am able to get the IMEI # by AT+CGSN command, now the issue is how to get 6 digits PIN # ?

2)To connect with the LTE Link monitor with my custom board I am using a Serial to USB converter (FTDI), the LTE Link monitor does not recognize this device. You can see that in the attached images. however, if I open my COMport I can send and receive AT commands..

3)The same is the case with the programmer, I want to load the certificates and modem firmware on a custom board nrf9160 chip .as you can see in the attached image.

4)Custom Board is replying to the AT commands as mentioned in the attached image but not responding to the AT+CPIN command to recognize the SIM. I have attached the schematic of the custom board as well.

A few observations while debugging the HW 

a)1.8V output to SIM card is not provided by NRF9160(using the asset tracker FW, which is provided to the DK)

b)What we left open is DETECT pin from nrf9160. But the 1.8V output pin from NRF9160 is still connected to the SIM card connector.

I followed the following links 

 Programming/Debugging nRF9160 SiP on custom board 

https://devzone.nordicsemi.com/f/nordic-q-a/58055/nrf9160-custom-board---connect-uart-and-send-at-commands/238646#238646

 nrf9160 custom board AT client not working 

 Getting HWID nRF9160 custom HW board and using LTE LINK monitor with custom Hardware 

Thanks in Advance,

Best Regards,

Muhammad Usman

 

If anything is unclear please let me know then I can send more information or support with additional attachments.

Parents Reply Children
  • Hi Charlie!

    Thank you so much for the support! Yes, I have nrf9160DK and sure I will test with that if find any issue i will ask again.

    Thanks & Regards,

    Muhammad Usman

  • Hi Charlie!

    I started testing with the following board meanwhile I get a response from the nordic team regarding my schematic. 

    https://www.mikroe.com/lte-iot-4-click

    The purpose of testing this board was to debug the issue I faced with my custom board.

    My connectivity with the LTE IoT 4 Click board is:

    This time the serial output I got is different from the custom board (unable to detect the SIM) . Now by using this board able to detect the SIM and then connect to the LTE network but in the end, the issue is when connecting to nrf cloud. You can see this from the serial output.

    I got the IMEI number from AT+CGSN

    I pasted in place of DEVICE ID with nrf- and as well as without.In place of HW ID/PIN, i entered 654321 or random numbers.

    But got the same error as discussed before. Can you please help me in this regard?

    Thanks & Regards,

    Muhammad Usman

  • Hi Charlie, 

    Some more progress!  I want to share it with you. Can you please help me onward?

    I am using asset_tracker example V1.8.0, it's working fine with nrf9160DK as discussed before and I am able to see the data on nrf cloud.

    1)In the Previous post I am having a sim connectivity issue so I used the LTE IoT 4 Click board as discussed before and the reasons for using it.

    2)Now sim is detecting 

    3)Last time device was not added in nrf-cloud but now the device added successfully 

     

    4)But no data, for that I attached the log 

    Peripheral<HT>	<HT>	Domain<HT>	<HT>	Status<CR><LF>
    00 NRF_P0               Non-Secure<HT>	OK<CR><LF>
    01 NRF_CLOCK            Non-Secure<HT>	OK<CR><LF>
    02 NRF_RTC0             Non-Secure<HT>	OK<CR><LF>
    03 NRF_RTC1             Non-Secure<HT>	OK<CR><LF>
    04 NRF_NVMC             Non-Secure<HT>	OK<CR><LF>
    05 NRF_UARTE1           Non-Secure<HT>	OK<CR><LF>
    06 NRF_UARTE2           Secure<HT>	<HT>	SKIP<CR><LF>
    07 NRF_TWIM2            Non-Secure<HT>	OK<CR><LF>
    08 NRF_SPIM3            Non-Secure<HT>	OK<CR><LF>
    09 NRF_TIMER0           Non-Secure<HT>	OK<CR><LF>
    10 NRF_TIMER1           Non-Secure<HT>	OK<CR><LF>
    11 NRF_TIMER2           Non-Secure<HT>	OK<CR><LF>
    12 NRF_SAADC            Non-Secure<HT>	OK<CR><LF>
    13 NRF_PWM0             Non-Secure<HT>	OK<CR><LF>
    14 NRF_PWM1             Non-Secure<HT>	OK<CR><LF>
    15 NRF_PWM2             Non-Secure<HT>	OK<CR><LF>
    16 NRF_PWM3             Non-Secure<HT>	OK<CR><LF>
    17 NRF_WDT              Non-Secure<HT>	OK<CR><LF>
    18 NRF_IPC              Non-Secure<HT>	OK<CR><LF>
    19 NRF_VMC              Non-Secure<HT>	OK<CR><LF>
    20 NRF_FPU              Non-Secure<HT>	OK<CR><LF>
    21 NRF_EGU0             Non-Secure<HT>	OK<CR><LF>
    22 NRF_EGU1             Non-Secure<HT>	OK<CR><LF>
    23 NRF_EGU2             Non-Secure<HT>	OK<CR><LF>
    24 NRF_EGU3             Non-Secure<HT>	OK<CR><LF>
    25 NRF_EGU4             Non-Secure<HT>	OK<CR><LF>
    26 NRF_EGU5             Non-Secure<HT>	OK<CR><LF>
    27 NRF_DPPIC            Non-Secure<HT>	OK<CR><LF>
    28 NRF_REGULATORS       Non-Secure<HT>	OK<CR><LF>
    29 NRF_PDM              Non-Secure<HT>	OK<CR><LF>
    30 NRF_I2S              Non-Secure<HT>	OK<CR><LF>
    31 NRF_GPIOTE1          Non-Secure<HT>	OK<CR><LF>
    <CR><LF>
    SPM: NS image at 0x20200<CR><LF>
    SPM: NS MSP at 0x20021b38<CR><LF>
    SPM: NS reset vector at 0x2b6dd<CR><LF>
    SPM: prepare to jump to Non-Secure image.<CR><LF>
    *** Booting Zephyr OS build v2.7.0-ncs1  ***<CR><LF>
    [00:00:00.206,420] <ESC><wrn> at_notif: Already initialized. Nothing to do<ESC><CR><LF>
    [00:00:00.213,714] <ESC><inf> asset_tracker: Asset tracker started<ESC><CR><LF>
    [00:00:00.219,940] <ESC><inf> watchdog: Watchdog timeout installed. Timeout: 60000<ESC><CR><LF>
    [00:00:00.227,569] <ESC><inf> watchdog: Watchdog started<ESC><CR><LF>
    [00:00:00.240,295] <ESC><dbg> nrf_cloud_transport.nct_client_id_set: client_id = nrf-351358814108376<ESC><CR><LF>
    [00:00:00.249,816] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: accepted_topic: nrf-351358814108376/shadow/get/accepted<ESC><CR><LF>
    [00:00:00.261,260] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: rejected_topic: $aws/things/nrf-351358814108376/shadow/get/rejected<ESC><CR><LF>
    [00:00:00.273,834] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: update_delta_topic: $aws/things/nrf-351358814108376/shadow/update/delta<ESC><CR><LF>
    [00:00:00.286,743] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: update_topic: $aws/things/nrf-351358814108376/shadow/update<ESC><CR><LF>
    [00:00:00.298,645] <ESC><dbg> nrf_cloud_transport.nct_topics_populate: shadow_get_topic: $aws/things/nrf-351358814108376/shadow/get<ESC><CR><LF>
    [00:00:00.310,607] <ESC><dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1<ESC><CR><LF>
    [00:00:00.318,420] <ESC><inf> asset_tracker: Connecting to LTE network.<ESC><CR><LF>
    [00:00:00.325,042] <ESC><inf> asset_tracker: This may take several minutes.<ESC><CR><LF>
    [00:00:02.033,294] <ESC><inf> asset_tracker: LTE cell changed: Cell ID: 84690705, Tracking area: 36867<ESC><CR><LF>
    [00:00:02.149,444] <ESC><inf> asset_tracker: RRC mode: Connected<ESC><CR><LF>
    [00:00:03.584,320] <ESC><inf> asset_tracker: Network registration status: Connected - roaming<ESC><CR><LF>
    [00:00:0[00:00:03.593,902] <ESC><inf> asset_tracker: PSM parameter update: TAU: -1, Active time: -1<ESC><CR><LF>
    3.593,017] <ESC><inf> asset_tracker: Connected to LTE network.<ESC><CR><LF>
    [00:00:03.608,428] <ESC><inf> asset_tracker: Connecting to cloud, attempt 1 of 8<ESC><CR><LF>
    [00:00:03.615,844] <ESC><inf> asset_tracker: Cloud connection request sent.<ESC><CR><LF>
    [00:00:03.622,833] <ESC><inf> asset_tracker: Connection response timeout is set to 30 seconds.<ESC><CR><LF>
    [00:00:03.631,591] <ESC><inf> asset_tracker: DATE_TIME_OBTAINED_MODEM<ESC><CR><LF>
    [00:00:03.638,061] <ESC><dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1<ESC><CR><LF>
    [00:00:03.645,751] <ESC><dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_TRANSPORT_CONNECTING<ESC><CR><LF>
    [00:00:03.654,357] <ESC><inf> asset_tracker: CLOUD_EVT_CONNECTING<ESC><CR><LF>
    [00:00:03.888,732] <ESC><dbg> nrf_cloud_transport.nct_connect: IPv4 address: 54.237.207.157<ESC><CR><LF>
    [00:00:03.897,125] <ESC><dbg> nrf_cloud_transport.nct_mqtt_connect: MQTT clean session flag: 1<ESC><CR><LF>
    [00:00:04.584,472] <ESC><inf> asset_tracker: DATE_TIME_OBTAINED_MODEM<ESC><CR><LF>
    [00:00:05.905,975] <ESC><dbg> nrf_cloud_transport.nct_mqtt_connect: Using socket send timeout of 60 seconds<ESC><CR><LF>
    [00:00:05.915,771] <ESC><dbg> nrf_cloud.nrf_cloud_run: Cloud connection request sent<ESC><CR><LF>
    [00:00:08.097,106] <ESC><dbg> nrf_cloud_transport.nct_mqtt_evt_handler: MQTT_EVT_DISCONNECT: result = -128<ESC><CR><LF>
    [00:00:08.106,781] <ESC><dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1<ESC><CR><LF>
    [00:00:08.114,501] <ESC><dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED<ESC><CR><LF>
    [00:00:08.123,260] <ESC><inf> asset_tracker: CLOUD_EVT_DISCONNECTED: 1<ESC><CR><LF>
    [00:00:08.129,852] <ESC><inf> asset_tracker: Disconnected by the cloud.<ESC><CR><LF>
    [00:00:08.136,535] <ESC><inf> asset_tracker: This can occur during initial nRF Cloud provisioning.<ESC><CR><LF>
    [00:00:08.145,568] <ESC><inf> asset_tracker: Attempting reconnect in 10 seconds...<ESC><CR><LF>
    [00:00:08.153,228] <ESC><err> nrf_cloud_transport: MQTT input error: -128<ESC><CR><LF>
    [00:00:08.160,308] <ESC><dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1<ESC><CR><LF>
    [00:00:08.168,029] <ESC><dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED<ESC><CR><LF>
    [00:00:08.176,788] <ESC><inf> asset_tracker: CLOUD_EVT_DISCONNECTED: 1<ESC><CR><LF>
    [00:00:08.183,380] <ESC><inf> asset_tracker: Disconnected by the cloud.<ESC><CR><LF>
    [00:00:08.190,063] <ESC><inf> asset_tracker: This can occur if the device has the wrong nRF Cloud certificates<ESC><CR><LF>
    [00:00:08.200,134] <ESC><inf> asset_tracker: or if the device has been removed from nRF Cloud.<ESC><CR><LF>
    [00:00:08.208,831] <ESC><inf> asset_tracker: Attempting reconnect in 480 seconds...<ESC><CR><LF>
    [00:00:08.216,583] <ESC><dbg> nrf_cloud.nrf_cloud_run: The cloud socket is already closed<ESC><CR><LF>
    [00:00:13.533,843] <ESC><inf> asset_tracker: RRC mode: Idle<ESC><CR><LF>

    from above log two reasons for not connecting 

    a)Wrong certificate 

    b)No device added to nrf cloud

    5)For certificate addition I have followed the following procedure 

    a) Followed the following link to add the certificate to the LTE IoT 4 click Mikroe board

     https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_thingy91%2FUG%2Fthingy91%2Fupdating_certificates%2Fprovisioning_certificate.html

    b)Certificates added successfully as you can see on LTE Link Monitor

    to verify it I ran the command AT%CMNG=1 and got the following response

     0,6,"0606060606060606060606060606060606060606060606060606060606060606"
    %CMNG: 16842753,0,"0000000000000000000000000000000000000000000000000000000000000000"
    %CMNG: 16842753,1,"0101010101010101010101010101010101010101010101010101010101010101"
    %CMNG: 16842753,2,"0202020202020202020202020202020202020202020202020202020202020202"

    is that OK ?

    c)Next step was to add the certificates to the asset tracker firmware. For that I did ..

    added the certificates and my client ID to certificates.h (in the asset tracker sample) and added CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y to prj.conf

    6)Modem FW version is 1.1.0, if need to update it then can you help me with how to update it? In Nrf DK we can load it via the programmer.

    Thanks & Regards,

    Muhammad Usman


Related