Getting started with nRF9160 DK

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

If you have already set up your nRF9160 DK and want to learn more, see the following documentation:

If you want to go through a hands-on online training to familiarize yourself with cellular IoT technologies and development of cellular applications, enroll in the Cellular IoT Fundamentals course in the Nordic Developer Academy.

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.

Alternatively, for a more concise nRF Cloud firmware application, you can build and install the nRF9160: nRF Cloud MQTT multi-service sample. See Building and programming an application for details on building a firmware sample application.

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 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.

Note

Updating the modem firmware erases the contents of the flash memory, so the application must be programmed again to the nRF9160 DK.

  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 its 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 window appears.

    Modem DFU window

    The Modem DFU window

  8. Click the Write button in the Modem DFU 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. If you update the application firmware now, you can go directly to Step 5 of Updating the application firmware.

Note

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

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 drop-down text changes to the type of the selected device, with its 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

Connecting the nRF9160 DK to nRF Cloud

To transmit data from your nRF9160 DK to nRF Cloud, 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.

Creating an nRF Cloud account

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

  1. Open the nRF Cloud landing page 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 log in to nRF Cloud with your email and password. After logging in, you are taken to the dashboard view that displays your device count and service usage. Next, you need to activate the SIM card you will use in the nRF9160 DK.

Connecting 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.

To activate the iBasis Subscriber Identity Module (SIM) card that comes shipped with the nRF9160 DK and add the nRF9160 DK to nRF Cloud, complete the following steps:

  1. Log in to the nRF Cloud portal.

  2. Click the + icon in the top left corner.

    nRF Cloud - Plus icon

    nRF Cloud - Plus icon

    The Add New window appears.

    nRF Cloud - Add New window

    nRF Cloud - Add New window

  3. In the Add New window, click LTE Device. The Activate SIM Card window appears.

    nRF Cloud - Activate SIM Card window

    nRF Cloud - Activate SIM Card window

  4. Complete the following steps in the Activate SIM Card window to activate your iBasis SIM card:

    1. Enter the 18-digit Integrated Circuit Card Identifier (ICCID) or the 19-digit eUICC Identifier (EID) in the SIM ICCID/EID text box.

      Note

      The SIM cards can have either the EID or the ICCID printed on it.

    2. Enter the Personal Unblocking Key (PUK) in the PUK text box.

      The PUK is printed on the SIM card. Reveal the PUK by scratching off the area on the back of the SIM card.

    3. Accept the Terms and the Privacy Policy.

    4. Click the Activate SIM button.

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

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

  2. 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.

  3. 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.

  4. In the Add LTE Device window 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.

  5. 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. Log in to the nRF Cloud portal.

  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 the nRF Cloud portal. 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. Log in to the nRF Cloud portal.

  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.

Next steps

You have now completed getting started with the nRF9160 DK. See the following links for where to go next: