---
id: device
title: Device Configuration
slug: /settings/config/device
sidebar_label: Device
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

The device config options are: Role, Serial Output, and Debug Log. Device config uses an admin message sending a `Config.Device` protobuf.

## Device Config Values

### Role

Sets the role of the node.

Acceptable values:

|      Value      |                                                                                                                                                                                                                         Description                                                                                                                                                                                                                          |
| :-------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|    `CLIENT`     |                                                                                                                                                                                                           Client (default) - App connected client.                                                                                                                                                                                                           |
|  `CLIENT_MUTE`  |                                                                                                                                                                 Client Mute - Same as a client except packets will not hop over this node, does not contribute to routing packets for mesh.                                                                                                                                                                  |
|    `ROUTER`     | Router - Mesh packets will prefer to be routed over this node. The assumption is that Router-type devices will be placed in locations with a height/range/antenna advantage, and therefore have better overall coverage. This node will not be used by client apps. The WiFi/Bluetooth radios and the OLED screen will be put to sleep. Please note: Due to the preferred routing, this role may cause higher power usage due to more frequent transmission. |
| `ROUTER_CLIENT` |                                                                                                                    Router Client - Hybrid of the Client and Router roles. Similar to Router, except the Router Client can be used as both a Router and an app connected Client. WiFi/Bluetooth and OLED screen will not be put to sleep.                                                                                                                     |
| `REPEATER`[^1]  |   Repeater - Mesh packets will be rebroadcast by this device without showing the device as part of the mesh network. This role is useful for a cleaner mesh setup where users do not need information about the Repeater node, or to prevent direct messaging to an unmonitored Repeater. Channel and modem settings must be identical to the mesh network being repeated. Please see Rebroadcast Mode for additional settings specific to this role.[^1]    |
|  `TRACKER`[^1]  |                                                                                                                  Tracker - For use with devices intended as a GPS tracker. Position packets sent from this device will be higher priority, with position broadcasting every two minutes. Smart Position Broadcast will default to off.[^1]                                                                                                                   |

[^1]: These roles are new as of the 2.0.15 alpha release. They are still a work in progress and as such features and functionality may not work as described and can evolve or change as development continues.

### Rebroadcast Mode

This setting defines the device's behavior for how messages are rebroadcasted. [^2]

[^2]: This setting is new as of the 2.0.16 alpha release. It is still a work in progress and as such features and functionality may not work as described and can evolve or change as development continues.

|        Value        |                                                                                      Description                                                                                      |
| :-----------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|        `ALL`        |                        ALL (Default) - Rebroadcast any observed message, whether it was on our private channel or from another mesh with the same lora params.                        |
| `All_SKIP_DECODING` |                      ALL_SKIP_DECODING - Same as behavior as ALL, but skips packet decoding and simply rebroadcasts them. **Only available with Repeater role.**                      |
|    `LOCAL_ONLY`     | LOCAL_ONLY - Ignores observed messages from foreign meshes that are open or those which it cannot decrypt. Only rebroadcasts message on the nodes local primary / secondary channels. |

### Serial Console

Acceptable values: `true` or `false`

Disabling this will disable the SerialConsole by not initializing the StreamAPI.

### Debug Log

Acceptable values: `true` or `false`

By default we turn off logging as soon as an API client connects. Set this to true to leave the debug log outputting even when API is active.

### GPIO for user button

This is the GPIO pin number that will be used for the user button, if your device does not come with a predefined user button.

### GPIO for PWM Buzzer

This is the GPIO pin number that will be used for the PWM buzzer, if your device does not come with a predefined buzzer.

## Device Config Client Availability

<Tabs
groupId="settings"
defaultValue="apple"
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
{label: 'CLI', value: 'cli'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">

:::info

Device Config is available for Android.

1. Open the Meshtastic App
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Device Settings > Device Config**

:::

</TabItem>
<TabItem value="apple">

:::info
All device config options other than NTP Server are available on iOS, iPadOS and macOS at Settings > Radio Configuration > Device.
:::

</TabItem>
<TabItem value="cli">

:::info

All device config options are available in the python CLI. Example commands are below:

:::

| Setting                  | Acceptable Values                                                         | Default  |
| ------------------------ | ------------------------------------------------------------------------- | -------- |
| device.debug_log_enabled | `true`, `false`                                                           | `false`  |
| device.role              | `CLIENT`, `CLIENT_MUTE`, `ROUTER`, `ROUTER_CLIENT`, `REPEATER`, `TRACKER` | `CLIENT` |
| device.rebroadcast_mode  | `ALL`, `ALL_SKIP_DECODING`, `LOCAL_ONLY`                                  | `ALL`    |
| device.serial_enabled    | `true`, `false`                                                           | `true`   |
| device.button_gpio       | `0` - `34`                                                                | `0`      |
| device.buzzer_gpio       | `0` - `34`                                                                | `0`      |

:::tip

Because the device will reboot after each command is sent via CLI, it is recommended when setting multiple values in a config section that commands be chained together as one.

```shell title="Example:"
meshtastic --set device.role CLIENT --set device.debug_log_enabled true
```

:::

```shell title="Set the role to client"
meshtastic --set device.role CLIENT
```

```shell title="Disable serial console"
meshtastic --set device.serial_enabled false
```

```shell title="Enable debug logging"
meshtastic --set device.debug_log_enabled true
```

</TabItem>
<TabItem value="web">

:::info
All device config options are available in the Web UI.
:::

  </TabItem>
</Tabs>
