Getting started with Thingy:91

This guide helps you get started with Thingy:91. It tells you how to update the Thingy:91 application and modem firmware and connect the Thingy:91 to nRF Cloud.

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

Requirements for setting up the Thingy:91

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

Hardware

  • nano-Subscriber Identity Module (SIM) card that supports LTE-M or Narrowband Internet of Things (NB-IoT) (The Thingy:91 comes shipped with an iBasis SIM card.)

  • Micro-USB 2.0 cable

  • Computer

Software

  • Microsoft Windows 10

  • macOS X, latest version

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

Preparing for setup

Before you start updating the modem firmware and application on the Thingy:91, you must do some preliminary configurations.

Complete the following steps to prepare the Thingy:91 for setup:

  1. Install the nRF Connect Programmer application on the computer:

    1. Go to nRF Connect for Desktop Downloads.

    2. Download and install nRF Connect for Desktop.

    3. Open nRF Connect for Desktop.

    4. Find Programmer in the list of applications and click Install.

  1. Download the firmware:

    1. Go to Thingy:91 product website (downloads).

    2. Download the zip file containing the latest Thingy:91 application and modem firmware.

    3. Extract the zip file to a folder of your choice.

    The CONTENTS.txt file in the extracted folder contains the location and names of the different firmware images.

    Note

    You can also use these precompiled firmware image files for restoring the firmware to its initial image.

  2. Prepare the Thingy:91 hardware:

    1. Open the box and take out the Thingy:91 and the iBasis Subscriber Identity Module (SIM) card it comes shipped with.

    2. Plug the Thingy:91 into the computer using a micro-Universal Serial Bus (USB) cable.

    3. Power the Thingy:91 on by switching SW1 to the ON position.

      Thingy:91 Power switch (SW1)

      Thingy:91 Power switch (SW1)

Programming firmware

Thingy:91 (v1.5.0 or lower) comes preloaded with the nRF9160: Asset Tracker firmware and modem firmware on the nRF9160 System in Package (SiP), and the Connectivity bridge application firmware on the nRF52840 System on Chip (SoC) that enable the device to use the environment sensors and track the device using Global Positioning System (GPS). The data is transmitted to nRF Cloud.

Before you start using the Thingy:91, it is recommended that you update the application firmware to nRF9160: Asset Tracker v2. You must also update the modem firmware. You can update the application and modem firmware on a Thingy:91 through a Universal Serial Bus (USB) cable using MCUboot. MCUboot is a secure bootloader that is used to update applications if you do not have an external debugger.

Note

To update the Thingy:91 through USB, the nRF9160 SiP and nRF52840 SoC bootloaders must be factory-compatible. The bootloaders might not be factory-compatible if the nRF9160 SiP or nRF52840 SoC has been updated with an external debug probe. To restore the bootloaders, program the nRF9160 SiP or nRF52840 SoC with the Thingy:91 firmware files through an external debug probe.

Alternatively, you can use an external debug probe.

Note

The external debug probe must support Arm Cortex-M33, such as the nRF9160 DK. You need a 10-pin 2x5 socket-socket 1.27 mm IDC (Serial Wire Debug (SWD)) JTAG cable to connect to the external debug probe.

The board enters bootloader mode if any of the following buttons are pressed while the Thingy:91 is being powered on (using SW1):

  • SW3 - The main button used to flash the nRF9160 SiP.

  • SW4 - The button used to update the nRF52840 SoC.

Following are the three recommended steps when you start to program a Thingy:91:

  1. Updating the Connectivity bridge application firmware in the nRF52840 SoC.

  2. Updating the modem firmware on the nRF9160 SoC (especially if you want to incorporate the latest changes from a newly released modem firmware).

  3. Programming the application firmware on the nRF9160 SiP.

Before you start, make sure the Thingy:91 is connected to the computer with a micro-USB cable.

Note

Do not unplug the Nordic Thingy:91 during this process.

Updating the firmware in the nRF52840 SoC

To update the firmware, complete the following steps:

  1. Open nRF Connect for Desktop and launch the Programmer application.

  2. Scroll down in the menu on the left and make sure Enable MCUboot is selected.

    Programmer - Enable MCUboot

    Programmer - Enable MCUboot

  3. Switch off the Thingy:91.

  4. Press SW4 while switching SW1 to the ON position.

    thingy91_sw1_sw4

    Thingy:91 - SW1 SW4 switch

  5. In the Programmer navigation bar, click SELECT DEVICE. A drop-down menu appears.

    Programmer - Select device

    Programmer - Select device

  6. In the menu, select the entry corresponding to your device.

    Note

    The device entry might not be the same in all cases and can vary depending on the application version and the operating system.

  7. In the menu on the left, click Add file in the FILE section, and select Browse. A file explorer window appears.

    Programmer - Add file

    Programmer - Add file

  8. Navigate to the folder you downloaded and extracted from the Nordic Semiconductor website in the Download firmware step.

  9. Open the folder img_fota_dfu_hex that contains the HEX files for updating over USB. See the CONTENTS.txt file for information on which file you need.

  10. Select the Connectivity bridge firmware file.

  11. Click Open.

  12. Scroll down in the menu on the left to the DEVICE section and click Write.

    Programmer - Writing of HEX files

    Programmer - Writing of HEX files

    The MCUboot DFU window appears.

    Programmer - MCUboot DFU

    Programmer - MCUboot DFU

  13. In the MCUboot DFU window, click Write. When the update is complete, a “Completed successfully” message appears.

  14. Scroll up in the menu on the left to the FILE section and click Clear files.

Update the modem firmware on the nRF9160 SiP

To update the modem firmware using USB, complete the following steps:

  1. Open nRF Connect for Desktop and launch the Programmer application if you do not have it open already.

  2. Make sure that Enable MCUboot is selected.

  3. Switch off the Thingy:91.

  4. Press SW3 while switching SW1 to the ON position.

    Thingy:91 - SW1 SW3 switch

    Thingy:91 - SW1 SW3 switch

  5. In the menu, select Thingy:91.

  6. In the menu on the left, click Add file in the FILE section, and select Browse. A file explorer window appears.

    Programmer - Add file

    Programmer - Add file

  1. Navigate to the folder you downloaded and extracted from the Nordic Semiconductor website in the Download firmware step.

  2. Find the modem firmware zip file with the name similar to mfw_nrf9160_*.zip and the number of the latest version.

    Note

    Do not extract the modem firmware zip file.

  3. Select the zip file and click Open.

  1. In the Programmer application, scroll down in the menu on the left to the DEVICE section and click Write.

    Programmer - Update modem

    Programmer - Update modem

    The Modem DFU via MCUboot window appears.

    Programmer - Modem DFU via MCUboot

    Programmer - Modem DFU via MCUboot

  2. In the Modem DFU via MCUboot window, click Write. When the update is complete, a Completed successfully message appears.

Program the nRF9160 SiP application

To program the application firmware using USB, complete the following steps:

  1. Open nRF Connect for Desktop and launch the Programmer application if you have not done already.

  2. Make sure that Enable MCUboot is selected.

  3. Switch off the Thingy:91.

  4. Press SW3 while switching SW1 to the ON position.

    Thingy:91 - SW1 SW3 switch

    Thingy:91 - SW1 SW3 switch

  5. In the Programmer navigation bar, click SELECT DEVICE. A drop-down menu appears.

    Programmer - Select device

    Programmer - Select device

  6. In the menu, select Thingy:91.

  7. In the menu on the left, click Add file in the FILE section, and select Browse. A file explorer window appears.

    Programmer - Add file

    Programmer - Add file

  8. Navigate to the folder you downloaded and extracted from the Nordic Semiconductor website in the Download firmware step.

  9. Open the folder img_fota_dfu_hex that contains the HEX files for updating over USB. See the CONTENTS.txt file for information on which file you need.

  10. Select the appropriate Asset Tracker v2 firmware file.

    Note

    If you are connecting over NB-IoT and your operator does not support extended Protocol Configuration Options (ePCO), select the file that has legacy Protocol Configuration Options (PCO) mode enabled.

  11. Click Open.

  12. Scroll down in the menu on the left to the DEVICE section and click Write.

    Programmer - Writing of HEX files

    Programmer - Writing of HEX files

    The MCUboot DFU window appears.

    Programmer - MCUboot DFU

    Programmer - MCUboot DFU

  13. In the MCUboot DFU window, click Write. When the update is complete, a Completed successfully message appears.

  14. Scroll up in the menu on the left to the FILE section and click Clear files.

You can now disconnect the Thingy:91 from the computer.

Next, you need to create a cloud account if you do not have one already.

Connecting the Thingy:91 to nRF Cloud

To transmit data from your Thingy:91 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 Thingy:91.

Connecting to nRF Cloud

You must activate your SIM card and add the Thingy:91 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 Thingy:91 and add the Thingy:91 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 Thingy:91.

    Inserting SIM

    Inserting SIM

  2. Connect the Thingy:91 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 Thingy:91 to connect to the LTE network and to nRF Cloud.

    After a few moments, the nRF Cloud user association process starts. This is indicated by white double pulse blinking of the Thingy:91’s RGB LED as indicated in Operating states.

  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 Thingy:91. It is case sensitive, so make sure all the letters are lower-case.

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

    PIN and IMEI on Thingy:91

    PIN and IMEI on Thingy:91

    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 Thingy:91. Therefore, do not share it with anyone.

  5. Click Add Device.

    The message “Device added to account. Waiting for it to connect…” appears.

    Note

    If you see an error message, check the error code and see nRF Cloud REST API (v1) to find out what is causing the error.

  6. When the message has disappeared, go to the menu on the left and click Devices.

    You can see the Thingy:91 in your device list and all the sensor data being transmitted to the cloud from the Thingy:91. The LED on the Thingy:91 should be blinking green, which indicates that it is transmitting all the data to the cloud.

    Note

    It might take a while for the sensor data to appear in the nRF Cloud portal, depending on the duration of time GNSS uses to search for a fix.

Next steps

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