> For the complete documentation index, see [llms.txt](https://docs.arkelectron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkelectron.com/products/sensor/ark-mag/firmware.md).

# Firmware

ARK MAG runs the [PX4 DroneCAN Firmware](https://docs.px4.io/main/en/dronecan/px4_cannode_fw.html). As such, it supports firmware update over the CAN bus and [dynamic node allocation](https://docs.px4.io/main/en/dronecan/#node-id-allocation).

The flight controller flashes the node firmware over CAN.

{% embed url="<https://docs.px4.io/main/en/dronecan/#firmware-update>" %}

* Firmware target: `ark_mag_default`
* Bootloader target: `ark_mag_canbootloader`

Node firmware built in October 2026 or later can rewrite its own CAN bootloader: set `SYS_BL_UPDATE` to `1` on the node. The flight controller logs `bootloader updated`, `bootloader unchanged` or `bootloader update failed`, and the parameter returns to `0`.

## Node Parameters

Set these on the ARK MAG, then reboot it. Use [QGroundControl](https://docs.px4.io/main/en/dronecan/#qgc-cannode-parameter-configuration), where each CAN node is a separate *Component X* under **Vehicle Settings > Parameters**, or the [DroneCAN GUI Tool](/knowledge-base/knowledge-base/dronecan-gui-tool-guide.md).

| Parameter         | Default | Description                                                                                                                 |
| ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `CANNODE_TERM`    | 0       | Set to `1` on the last node of the CAN bus                                                                                  |
| `CANNODE_NODE_ID` | 0       | Fixed node ID (1–125). `0` uses dynamic node allocation                                                                     |
| `CANNODE_PUB_MAG` | 1       | Publish magnetometer messages on the CAN bus                                                                                |
| `SYS_BL_UPDATE`   | 0       | Set to `1` to rewrite the CAN bootloader from the running firmware. Firmware built before October 2026 lacks this parameter |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.arkelectron.com/products/sensor/ark-mag/firmware.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
