2021-04-27 14:07:02 -07:00
---
2022-03-08 23:10:41 -08:00
id: serial-module
2022-06-25 00:01:26 -07:00
title: Serial Plugin Settings
sidebar_label: Serial Plugin
2021-04-27 14:07:02 -07:00
---
2022-03-08 23:10:41 -08:00
2021-05-05 09:18:44 -07:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2022-02-23 05:24:55 -08:00
:::warning
GPIO access is fundamentally dangerous because invalid options can physically damage or destroy your hardware. Ensure that you fully understand the schematic for your particular device before trying this as we do not offer a warranty. Use at your own risk.
:::
2021-04-27 14:07:02 -07:00
2022-02-23 05:25:16 -08:00
:::note
2022-06-25 00:01:26 -07:00
This plugin requires attaching a peripheral accessory to your device. It will not work without one.
2022-02-23 05:25:16 -08:00
:::
2021-04-27 14:07:02 -07:00
## Overview
2022-06-25 00:01:26 -07:00
This is a simple interface to send messages over the mesh network by sending strings over a serial port. Anything you send the node will be turned into a message sent out over the mesh, and anything received from the mesh will be sent to the serial port. Note that this plugin does not (yet) allow arbitrary protobuf commands to be sent over the serial connection.
2021-04-27 14:07:02 -07:00
2022-01-28 10:11:19 -08:00
:::tip
2022-06-25 00:01:26 -07:00
Once plugin settings are changed, a **reset** is required for them to take effect.
2022-01-28 10:11:19 -08:00
:::
2022-03-17 13:54:11 -07:00
:::tip
Connect the TX pin to the other device's RX pin, and vice versa. Connect their grounds to each other (not necessary if they're both plugged into the same USB power source.)
:::
2021-04-27 14:07:02 -07:00
## Settings
2022-03-08 23:10:41 -08:00
| Setting | Acceptable Values | Default |
| :-------------------: | :-----------------: | :-----: |
2022-06-25 00:01:26 -07:00
| serial_plugin_enabled | `true`, `false` | `false` |
| serial_plugin_echo | `true`, `false` | `false` |
| serial_plugin_mode | `integer` | `0` |
| serial_plugin_rxd | `integer` (GPIO) | `0` |
| serial_plugin_timeout | `integer` (seconds) | `0` |
| serial_plugin_txd | `integer` (GPIO) | `0` |
2021-05-03 13:17:02 -07:00
2022-06-25 00:01:26 -07:00
### serial_plugin_enabled
2021-05-03 13:17:02 -07:00
2022-06-25 00:01:26 -07:00
Enables the plugin.
2021-05-03 13:17:02 -07:00
2022-02-01 17:58:26 -08:00
<Tabs
2022-03-08 23:10:41 -08:00
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
2022-06-25 00:01:26 -07:00
```shell title="Enable plugin"
meshtastic --set serial_plugin_enabled true
2022-03-08 23:10:41 -08:00
```
2022-06-25 00:01:26 -07:00
```shell title="Disable plugin"
meshtastic --set serial_plugin_enabled false
2022-03-08 23:10:41 -08:00
```
2022-02-01 17:58:26 -08:00
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
2022-06-25 00:01:26 -07:00
### serial_plugin_echo
2021-05-03 13:17:02 -07:00
2022-02-11 12:54:01 -08:00
If set, any packets you send will be echoed back to your device.
2021-05-03 13:17:02 -07:00
2022-02-01 17:58:26 -08:00
<Tabs
2022-03-08 23:10:41 -08:00
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
2022-06-25 00:01:26 -07:00
```shell title="Enable serial_plugin_echo"
meshtastic --set serial_plugin_echo true
2022-03-08 23:10:41 -08:00
```
2022-06-25 00:01:26 -07:00
```shell title="Disable serial_plugin_echo"
meshtastic --set serial_plugin_echo false
2022-03-08 23:10:41 -08:00
```
2022-02-01 17:58:26 -08:00
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
2022-06-25 00:01:26 -07:00
### serial_plugin_mode
2021-05-03 13:17:02 -07:00
<!--- TODO --->
2022-02-01 17:58:26 -08:00
<Tabs
2022-03-08 23:10:41 -08:00
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
2022-02-01 17:58:26 -08:00
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
2022-06-25 00:01:26 -07:00
### serial_plugin_rxd
2021-05-03 13:17:02 -07:00
2022-02-11 12:54:01 -08:00
Set the GPIO pin to the RXD pin you have set up.
2021-05-03 13:17:02 -07:00
2022-02-23 05:29:05 -08:00
:::caution
To prevent damaging your device, double check your device's schematics before attaching to the GPIO pins and setting this value.
:::
2022-02-01 17:58:26 -08:00
<Tabs
2022-03-08 23:10:41 -08:00
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
2022-02-01 17:58:26 -08:00
2022-02-11 12:54:01 -08:00
:::note
Replace `GPIO` in the below command with the GPIO number your circuit is attached to.
2022-02-01 17:58:26 -08:00
:::
2022-04-01 06:34:49 -07:00
```shell title="Set RXD to GPIO pin number"
2022-06-25 00:01:26 -07:00
meshtastic --set serial_plugin_rxd GPIO
2022-03-08 23:10:41 -08:00
```
2022-02-11 12:54:01 -08:00
2022-02-01 17:58:26 -08:00
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
2022-06-25 00:01:26 -07:00
### serial_plugin_timeout
2021-05-03 13:17:02 -07:00
2022-02-11 12:54:01 -08:00
The amount of time to wait before we consider your packet as "done".
2021-05-03 13:17:02 -07:00
2022-02-01 17:58:26 -08:00
<Tabs
2022-03-08 23:10:41 -08:00
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
2022-06-25 00:01:26 -07:00
```shell title="Set serial_plugin_timeout to 15 seconds"
meshtastic --set serial_plugin_timeout 15
2022-03-08 23:10:41 -08:00
```
2022-02-01 17:58:26 -08:00
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>
2022-06-25 00:01:26 -07:00
### serial_plugin_txd
2021-05-03 13:17:02 -07:00
2022-02-11 12:54:01 -08:00
Set the GPIO pin to the TXD pin you have set up.
2021-04-27 14:07:02 -07:00
2022-02-23 05:29:05 -08:00
:::caution
To prevent damaging your device, double check your device's schematics before attaching to the GPIO pins and setting this value.
:::
2022-02-01 17:58:26 -08:00
<Tabs
2022-03-08 23:10:41 -08:00
groupId="settings"
defaultValue="cli"
values={[
{label: 'CLI', value: 'cli'},
{label: 'Android', value: 'android'},
{label: 'iOS', value: 'iOS'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="cli">
2022-02-01 17:58:26 -08:00
2022-02-11 12:54:01 -08:00
:::note
Replace `GPIO` in the below command with the GPIO number your circuit is attached to.
2022-02-01 17:58:26 -08:00
:::
2022-04-01 06:34:49 -07:00
```shell title="Set TXD to GPIO pin number"
2022-06-25 00:01:26 -07:00
meshtastic --set serial_plugin_txd GPIO
2022-03-08 23:10:41 -08:00
```
2022-02-11 12:54:01 -08:00
2022-02-01 17:58:26 -08:00
</TabItem>
<TabItem value="android">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="iOS">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
<TabItem value="web">
:::info
Configuring this setting is not yet available for the selected platform. If this is incorrect please update the documentation for this page.
:::
</TabItem>
</Tabs>