meshtastic/docs/configuration/device-config/device.mdx

115 lines
3.7 KiB
Plaintext
Raw Normal View History

2022-06-24 19:40:15 -07:00
---
id: device
title: Device Configuration
2022-11-02 11:46:54 -07:00
slug: /settings/config/device
2022-06-24 19:40:15 -07:00
sidebar_label: Device
---
2023-01-19 05:01:57 -08:00
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
2022-06-24 19:40:15 -07:00
2023-01-19 05:01:57 -08:00
The device config options are: Role, Serial Output, and Debug Log. Device config uses an admin message sending a `Config.Device` protobuf.
2022-06-24 19:40:15 -07:00
## Device Config Values
### Role
2023-01-19 05:01:57 -08:00
Sets the role of node.
2022-06-24 19:40:15 -07:00
Acceptable values:
2023-01-19 05:01:57 -08:00
| 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. This node will not be used by client apps. The WiFi/BLE radios and the OLED screen will be put to sleep. |
| `ROUTER_CLIENT` | Router Client - Mesh packets will prefer to be routed over this node. The Router Client can be used as both a Router and an app connected Client. |
2022-06-24 19:40:15 -07:00
2023-01-19 05:01:57 -08:00
### Serial Console
2022-06-24 19:40:15 -07:00
Acceptable values: `true` or `false`
Disabling this will disable the SerialConsole by not initializing the StreamAPI.
2022-06-24 19:40:15 -07:00
### Debug Log
2023-01-19 05:01:57 -08:00
2022-06-24 19:40:15 -07:00
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.
2022-06-24 19:40:15 -07:00
## Device Config Client Availability
<Tabs
groupId="settings"
defaultValue="apple"
2022-06-24 19:40:15 -07:00
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
2022-06-29 22:33:26 -07:00
{label: 'CLI', value: 'cli'},
2022-06-24 19:40:15 -07:00
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
:::info
2022-12-04 13:01:17 -08:00
2022-12-04 12:59:56 -08:00
Device Config is available for Android.
1. Open the Meshtastic App
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Device Settings > Device Config**
2022-06-24 19:40:15 -07:00
:::
</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
2022-08-03 08:14:18 -07:00
All device config options are available in the python CLI. Example commands are below:
2022-06-24 19:40:15 -07:00
:::
| Setting | Acceptable Values | Default |
2023-01-19 05:01:57 -08:00
| ------------------------ | -------------------------------------------------- | -------- |
| device.debug_log_enabled | `true`, `false` | `false` |
| device.role | `CLIENT`, `CLIENT_MUTE`, `ROUTER`, `ROUTER_CLIENT` | `CLIENT` |
| device.serial_enabled | `true`, `false` | `true` |
:::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
```
:::
2022-06-24 19:40:15 -07:00
```shell title="Set the role to client"
meshtastic --set device.role CLIENT
2022-06-24 19:40:15 -07:00
```
```shell title="Disable serial console"
2022-09-22 15:41:16 -07:00
meshtastic --set device.serial_enabled false
2022-06-24 19:40:15 -07:00
```
```shell title="Enable debug logging"
meshtastic --set device.debug_log_enabled true
2022-06-24 19:40:15 -07:00
```
</TabItem>
<TabItem value="web">
2022-06-24 19:40:15 -07:00
:::info
All device config options are available in the Web UI.
2022-06-24 19:40:15 -07:00
:::
2023-01-19 05:01:57 -08:00
2022-06-24 19:40:15 -07:00
</TabItem>
</Tabs>