Getting started with nRF9160 DK

This section will get you started with your nRF9160 DK. You will update the firmware (both the application firmware and the modem firmware) and the nRF Cloud certificates of the DK, and conduct some initial tests.

Minimum requirements

Make sure you have all the required hardware and that your computer has one of the supported operating systems.

Hardware

Software

  • Microsoft Windows 10

  • macOS X, latest version

  • Ubuntu Linux, latest Long Term Support (LTS) version

Installing the required software

To work with the nRF9160 DK firmware and certificates, install nRF Connect for Desktop.

After installing and starting the application, install the following apps:

  • Programmer

  • LTE Link Monitor

Updating the DK firmware

Download the latest application and modem firmware from the nRF9160 DK Downloads page and extract to a folder of your choice.

The downloaded zip contains the following firmware:

Application firmware

The img_app_bl folder contains full firmware images for different applications. When following this guide, use an image for the nRF9160: Asset Tracker v2 application. Asset Tracker v2 simulates sensor data and transmits it to Nordic Semiconductor’s cloud solution, nRF Cloud.

Depending on where you are located, you need the image with either LTE-M or NB-IoT support. Check with your SIM card provider for the mode they support at your location. For the iBasis SIM card provided with the nRF9160 DK, see iBasis IoT network coverage. If your location has support for both, you can choose either one.

Application firmware for Device Firmware Update (DFU)

The images in the img_fota_dfu_bin and img_fota_dfu_hex folders contain firmware images for DFU. When following this guide, you can ignore these images.

Modem firmware

The modem firmware is in a zip archive instead of a folder. The zip is named mfwnrf9160_ followed by the firmware version number. Do not unzip this file.

Updating the application firmware

To update the application firmware, complete the following steps. If you experience any problems during the process, restart the Programmer app by pressing Ctrl+R (command+R in macOS), and try again.

  1. Open the Programmer app.

  2. Make sure the PROG/DEBUG SW10 switch on the nRF9160 DK is set to nRF91. On DK v0.9.0 and earlier, this is the SW5 switch.

  3. Connect the nRF9160 DK to the computer with a micro-USB cable, and then turn the DK on.

  4. Click Select device and select the DK from the drop-down list. You can identify the nRF9160 DK by the fact that it has three COM ports when you expand its entry.

    Programmer - COM ports

    Programmer - COM ports

    If the three COM ports are not visible, press Ctrl+R in Windows or command+R in macOS to restart the Programmer application.

    The button text changes to the type of the selected device, with the SEGGER ID below the name. The Device Memory Layout section also changes its name to the device name, and indicates that the device is connected. If the Auto read memory option is selected in the Device section, the memory layout will update. If it is not selected and you wish to see the memory layout, click Read in the Device section.

  5. Click Add file in the File section, and select Browse.

    Programmer - Add file

    Programmer - Add file

  6. Navigate to where you extracted the firmware, and then to the img_app_bl folder there.

  7. Select either nrf9160dk_asset_tracker_v2_ltem_<version-number>.hex (LTE-M mode) or nrf9160dk_asset_tracker_v2_nbiot_<version-number>.hex (NB-IoT mode), depending on where you are located. Check with your SIM card provider for the mode supported at your location. If you are using the iBasis SIM card provided with the DK, you can see iBasis IoT network coverage . You can use either mode if your location has support for both.

    For NB-IoT, there is a second variant of the firmware in the nrf9160dk_asset_tracker_v2_nbiot_legacy_pco_<version-number>.hex file. Only use this legacy variant if your network does not support ePCO.

  8. Click the Erase & write button in the Device section to program the DK. Do not unplug or turn off the DK during this process.

    Programmer - Erase & write

    Programmer - Erase & write

If you continue to updating the modem firmware, you can go directly to Step 5.

Updating the modem firmware

To update the modem firmware, complete the following steps. If you experience any problems during the process, restart the Programmer app by pressing Ctrl+R (command+R on macOS), and try again.

  1. Open the Programmer app.

  2. Make sure the PROG/DEBUG SW10 switch on the nRF9160 DK is set to nRF91. On DK v0.9.0 and earlier, this is the SW5 switch.

  3. Connect the nRF9160 DK to the computer with a micro-USB cable, and then turn the DK on.

  4. Click Select device and select the DK from the drop-down list. You can identify the nRF9160 DK by the fact that it has three COM ports.

    Programmer - COM ports

    Programmer - COM ports

    If the three COM ports are not visible, press Ctrl+R in Windows or command+R in macOS to restart the Programmer application.

    The drop-down text changes to the type of the selected device, with the SEGGER ID below the name. The Device Memory Layout section also changes its name to the device name, and indicates that the device is connected. If the Auto read memory option is selected in the Device section of the side panel, the memory layout will update. If it is not selected and you wish to see the memory layout, click Read in the Device section of the side panel.

  5. Click Add file in the File section, and select Browse.

    Programmer - Add file

    Programmer - Add file

  6. Navigate to where you extracted the firmware, and choose the mfwnrf9160_<version-number>.zip file.

  7. Click Write in the Device section of the side panel.

    Programmer - Write

    Programmer - Write

    The Modem DFU dialog window appears.

    Modem DFU window

    The Modem DFU window

  8. Click the Write button in the Modem DFU dialog window to update the firmware. Do not unplug or turn off the device during this process.

When the update is complete, you see a success message.

Note

If you experience problems updating the modem firmware, click Erase all in the Device section of the side panel and try updating again.

Doing this erases the contents of the flash memory, so the application must be programmed again to the DK.

Connecting the DK to nRF Cloud

To test the nRF9160 DK with the nRF9160: Asset Tracker v2 application, you need an nRF Cloud account. nRF Cloud is Nordic Semiconductor’s platform for connecting your IoT devices to the cloud, viewing and analyzing device message data, prototyping ideas that use Nordic Semiconductor’s chips, and more.

nRF Cloud also includes a public REST Application Programming Interface (API) that can be used for building your own IoT solutions. If you wish to use the REST API, you need to update the nRF Cloud certificate of your DK.

Creating an nRF Cloud account

To create an nRF Cloud account, complete the following steps:

  1. Go to nRF Cloud and click Register.

  2. Enter your email address and choose a password, then click Create Account. nRF Cloud will send you a verification email.

  3. Copy the 6-digit verification code and paste it into the registration dialog box. If you do not see the verification email, check your junk mail for an email from no-reply@verificationemail.com.

    If you closed the registration dialog box, you can repeat Step 1 and then click Already have a code?. Then enter your email and the verification code.

You can now sign in on nRF Cloud with your email and the password you chose. After signing in, you are taken to the dashboard view that displays your device count and service usage.

Connecting to nRF Cloud

To transmit data from your nRF9160 DK to nRF Cloud, you must activate your SIM card and add the nRF9160 DK to your nRF Cloud account.

Note

If you activated your iBasis SIM card before, click Skip this step in Step 4 instead of filling in the information.

If you are using a SIM card from another provider, make sure you activate it through your network operator, then click Skip this step in Step 4 instead of filling in the information.

Complete the following steps:

  1. Go to nRF Cloud and sign in.

  2. Click the + icon in the top left corner. The Add New window appears.

    nRF Cloud - Plus icon

    nRF Cloud - Plus icon

  3. Click LTE Device. The Activate SIM Card window appears.

    nRF Cloud - Add New window

    nRF Cloud - Add New window

  4. Activate your iBasis SIM card by entering the 18-digit Integrated Circuit Card Identifier (ICCID) and the Personal Unblocking Key (PUK), accepting the Terms and the Privacy Policy, and clicking Activate SIM.

    The ICCID and the PUK are printed on the SIM card. Reveal the PUK by scratching off the area on the back of the SIM card. The ICCID is the 18 digits printed on the SIM itself.

    nRF Cloud - Activate SIM Card window

    nRF Cloud - Activate SIM Card window

    After the SIM card is activated, you are redirected to the Add LTE Device screen. Leave the browser window open and continue with the next step before you enter the information on this screen.

  5. Punch out the nano-SIM from the SIM card and plug it into the SIM card holder on the nRF9160 DK.

  6. Optional: If you want to test the optional GPS functionality and you have an external GPS antenna for your nRF9160 DK, attach it to connector J2 to the left of the LTE antenna. See nRF9160 DK GPS for more information.

  7. Connect the nRF9160 DK to the computer with a USB cable and turn it on, or reset the device if it is already turned on.

  8. Wait up to three minutes for the device to find the cellular network and connect to the nRF Cloud server.

    At this stage, the device is provisioned on nRF Cloud, but not yet associated with your nRF Cloud account. When the DK has connected, the LED3 double pulse blinks to indicate that user association is required and you can move to the next step.

  9. In the Add LTE Device screen from Step 4, enter your device ID and ownership code.

    nRF Cloud - Add LTE Device window

    nRF Cloud - Add LTE Device window

    • Device ID: the device ID is composed of nrf- and the 15-digit International Mobile (Station) Equipment Identity (IMEI) number that is printed on the label of your nRF9160 DK. For example, nrf-123456789012345.

    • Ownership code: the ownership code is the PIN or the hardware ID of your DK, and it is found on the label of your nRF9160 DK.

      If the label contains a PIN in addition to the IMEI number, enter this pin. If it does not contain a PIN, enter the Hardware ID (HWID) HEX code, with or without colons. For example, AA:BB:CC:DD:EE:FF or AABBCCDDEEFF.

      Note

      The ownership code serves as a password and proves that you own the specific nRF9160 DK. Therefore, do not share it with anyone.

  10. Click Add Device and wait for the device to reconnect to nRF Cloud. It is normal for the device to disconnect and reconnect multiple times during device provisioning.

The nRF9160 DK is now added to your nRF Cloud account. This is indicated by the blinking of LED3 on the DK, which shows that it is publishing data. See Asset Tracker v2 LED indication for more information.

On nRF Cloud, you can access the device by clicking Devices under Device Management in the navigation pane on the left.

Testing the DK

After successfully associating your nRF9160 DK with your nRF Cloud account, you can start testing it. The application programmed in the DK is nRF9160: Asset Tracker v2, and it is used for the testing.

For a basic test, complete the following steps:

  1. Turn on or reset your nRF9160 DK.

  2. Go to nRF Cloud and sign in.

  3. Click Devices under Device Management in the navigation pane on the left.

    nRF Cloud - Devices

    nRF Cloud - Devices

  4. From the Devices view, open the entry for your device.

  5. Observe that the DK is sending data to nRF Cloud.

If you experience problems and need to check the log messages, open nRF Connect for Desktop and launch the LTE Link Monitor app. After connecting to your DK, you can see the log messages in the terminal view.

Testing the cellular connection with the AT Client sample

The nRF9160: AT Client sample enables you to send AT commands to the modem of your nRF9160 DK to test and monitor the cellular connection. You can use it to troubleshoot and debug any connection problems.

Complete the following steps to test the cellular connection using the AT Client sample:

  1. Follow the steps in Updating the application firmware to program the sample to the DK. When choosing the HEX file, choose nrf9160dk_at_client_<version-number>.hex instead of one for Asset Tracker v2.

  2. Test the AT Client sample as described in the Testing section of the nRF9160: AT Client documentation.

Testing the GNSS functionality

nRF9160: Asset Tracker v2 supports acquiring GNSS position and transmitting it to nRF Cloud.

To achieve the fastest Time To First Fix of GNSS position, the following conditions need to be met:

  • The device must be able to connect to nRF Cloud. You can confirm this by checking whether the status of your DK is displayed correctly on nRF Cloud. The cloud connection is used to download GPS assistance data.

  • Your network operator should support Power Saving Mode (PSM) or Extended Discontinuous Reception (eDRX) with the SIM card that you are using. If you are using an iBasis SIM card, check the iBasis network coverage spreadsheet to see the supported features and network coverage for different countries.

    The device may be able to acquire a GNSS position fix even if the network does not support PSM or eDRX for your SIM card, but it will likely take longer to do so.

For best results retrieving GNSS data, place the nRF9160 DK outside with a clear view of the sky. It might also work indoors if the device is near a window.

Complete the following steps to test the GNSS functionality:

  1. If you have an external antenna for your nRF9160 DK, attach it to connector J2 to the left of the LTE antenna. See nRF9160 DK GPS for more information.

  2. Turn on or reset your DK.

  3. Go to nRF Cloud and sign in.

  4. Click Devices under Device Management in the navigation pane on the left.

    nRF Cloud - Devices

    nRF Cloud - Devices

  5. From the Devices view, open the entry for your device.

  6. Observe that after a while, the GNSS data is displayed on the map in the GPS Data card on nRF Cloud.