# newtmgr Setup

## Flashing the Firmware through USB

You will be required to flash a new firmware to your Conexio BLITZ 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 dual-core firmware (e.g. updating the main app or network firmware)
* Updating the device bootloader firmware.

To do so successfully, follow these steps.

## 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 BLITZ 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 BLITZ device.
{% endhint %}

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

{% 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.**

### 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 BLITZ 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 BLITZ DK.
{% endhint %}

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


---

# Agent Instructions: 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:

```
GET https://docs.conexiotech.com/getting-started-with-conexio-blitz/conexio-blitz-overview/programming-and-debugging/newtmgr-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
