> For the complete documentation index, see [llms.txt](https://docs.conexiotech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.conexiotech.com/master/programming-and-debugging/newtmgr-setup.md).

# newtmgr Setup

<figure><img src="/files/aFieDoywTAOajnci4zRM" alt=""><figcaption></figcaption></figure>

## Flashing the Firmware through USB

You will be required to flash a new firmware to your Conexio Stratus device in one of the following cases:

* Developing and testing the application firmware (e.g. adding features to the application firmware or bug fixes)
* Updating the nRF91 modem firmware (e.g. updating the main modem core firmware)
* Updating the device bootloader firmware.

To do so successfully, follow these steps.

## 1. Installing SiLab USB VCP Drivers

To recognize the Conexio Stratus COM port properly by your machine, first, download and install the respective driver software for your machine from [<mark style="color:red;">usb-to-uart-bridge-vcp-drivers</mark>](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers).

## 2. newtmgr

`newtmgr` is an image management tool that can be used to interact with the bootloader and images on the device. `newtmgr` will be used to load the application firmware via the USB serial interface to the Stratus device. For full details on the newtmgr tool and the entire command set, see the [<mark style="color:red;">official newtmgr documentation</mark>](https://mynewt.apache.org/latest/newtmgr/index.html).

{% hint style="info" %}
newtmgr will be used to load the application firmware via the USB serial interface to the Stratus device.
{% endhint %}

### 2.1 Installing newtmgr

For details on installing the newtmgr tool on your operating system of choice see:

* [<mark style="color:red;">macOS installation</mark>](https://mynewt.apache.org/latest/newt/install/newt_mac.html).
* [<mark style="color:red;">Linux installation</mark>](https://mynewt.apache.org/latest/newt/install/newt_linux.html).
* [<mark style="color:red;">Windows installation</mark>](https://mynewt.apache.org/latest/newt/install/newt_windows.html).

If the above macOS installation does not work, follow these simple steps to get the newtmgr up and running.

### For macOS Apple Silicon (ARM/M-series Mac)

Build from source with Go (recommended)

```
# Install Go if you don't have it
brew install go

# Install newtmgr via go install
go install mynewt.apache.org/newtmgr/newtmgr@latest
```

Then add Go's bin directory to your PATH if it isn't already:

If you're running bash (nRF Connect for VS Code uses bash)

Add the path to \~/.bash\_profile instead:

```
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.bash_profile
source ~/.bash_profile
```

Then test:

```
newtmgr version
```

If you're using \~/.zprofile instead of \~/.zshrc

```
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.zprofile
source ~/.zprofile
```

Great, you're all set. Now you can use newtmgr to upload firmware to your device.

### For macOS x86\_64 only

#### **Option 1:**

```
% brew install newtmgr
```

To install `juullabs-oss/mynewt/mynewt-newtmgr`, run:

```
brew install juullabs-oss/mynewt/mynewt-newtmgr
```

Then check by executing:

```
which newtmgr
```

which should return:

```
/usr/local/bin/newtmgr
```

#### **Option 2:**

{% file src="/files/Bw4tiYPw83UQT6AafatR" %}

Download the above-zipped folder, extract, and place the newtmgr executable inside the directory: **/usr/local/bin/.**

&#x20;**/usr/local/bin/** is normally hidden. To view, it go to **MAC OS HDD** and inside here press command+shift+. to view the hidden **usr** folder.

Then navigate to usr/local/bin. After doing the above steps, in the terminal when you will issue the command: **which newtmgr** should display: **/usr/local/bin/newtmgr.**

### 2.2 Connection Profiles

The `newtmgr` tool works with connection profiles, such as serial, depending on how you wish to communicate with the device under test.

Before you can use `newtmgr` to program your Conexio Stratus kit, you will need to set up at least one connection profile, as described below, making it easier to update your device whenever needed. Open a terminal window and enter the following command:

{% tabs %}
{% tab title="Windows" %}
newtmgr conn add serial type=serial connstring="dev=COM5,baud=115200"
{% endtab %}

{% tab title="macOS/Linux" %}

```shell
newtmgr conn add serial type=serial connstring='dev=/dev/tty.SLAB_USBtoUART,baud=115200' 
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Make sure that the COM port on Windows matches the one attached to the Stratus DK.
{% endhint %}

```bash
newtmgr conn show
Connection profiles:
  serial: type=serial, connstring='dev=/dev/tty.SLAB_USBtoUART,baud=115200'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.conexiotech.com/master/programming-and-debugging/newtmgr-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
