This project is based on the NCS Example Application.
Before getting started, make sure you have a proper nRF Connect SDK development environment. Follow the official Getting started guide.
Before initializing start the toolchain environment:
nrfutil toolchain-manager launch --shell
The first step is to initialize the workspace folder (hello-nrfcloud
) where the
firmware
project and all nRF Connect SDK modules will be cloned. Run the
following command:
# initialize hello-nrfcloud workspace
west init -m https://github.com/hello-nrfcloud/firmware --mr main hello-nrfcloud
cd hello-nrfcloud
# enable Bosch environmental sensor driver
west config manifest.group-filter +bsec
# update nRF Connect SDK modules
west update
# use sysbuild by default
west config build.sysbuild True
First change folder:
cd project
To build the application, run the following command:
west build -b thingy91x/nrf9151/ns app
When using the serial bootloader, you can update using this command:
west thingy91x-dfu
When using an external debugger, you can flash using this command:
west flash --erase
Experimental: You can also use pyOCD to flash the nRF9151 using the CMSIS-DAP interface provided by the Connectivity Bridge firmware.
Note: Don't use pyOCD with JLink probes, use nrfutil-device or the west runner in that case. pyOCD seems to be unmaintained at the moment, so this might not be fixed.
Another note: Sometimes, the nRF9151 is detected as protected and is mass-erased automatically. In that case, simply flash the bootloader as well.
To flash just the app:
pyocd flash build/app/zephyr/zephyr.signed.hex
To flash the bootloader (included in releases):
pyocd flash nrf91-bl-v2.hex
To erase the chip including UICR:
pyocd erase --mass
Experimental: You can update the modem firmware using pyOCD. A simple way to do this is to use the included nrf91_flasher
script:
python3 scripts/nrf91_flasher.py -m mfw_nrf91x1_2.0.1.zip
LED effect | Color | Meaning | Duration (seconds) |
---|---|---|---|
Blinking | Yellow | Device is (re-)connecting to the LTE network | NA |
Blinking | Green | Location searching | NA |
Blinking slow | Blue | Device is actively polling cloud | 10 minutes after last config update or button press |
Solid | Configured | Device has received a LED configuration | NA |
Blinking rapid | Red | Fatal error, the device will reboot | NA |
Blinking slow | Red | Irrecoverable Fatal error | NA |
Modem traces are enabled by default on the Thingy:91 device. These traces can be output to UART for analysis using the nRF Connect for Desktop Cellular Monitor application.
-
Connect to a Serial Terminal
- Connect your Thingy:91 device to a serial terminal on UART 0. This will allow you to interact with the device's shell commands. You might need to push Button 1 to wake the UART up.
-
Set Up Cellular Monitor Application
- Open the Cellular Monitor Application.
- Connect the Thingy:91 to the application, select UART 1 as the trace output, and click Start Traces to begin capturing modem activity.
-
Dump Traces via UART
- Use the following shell commands in the connected serial terminal to manage and dump the modem traces on UART 1:
modem_trace stop # Stop modem tracing if running modem_trace size # Check the size of stored traces modem_trace dump_uart # Dump traces to UART 1 for analysis