Skip to main content

Channel Configuration

The Channels config options are: Index, Roles, and Settings. Channel config uses an admin message sending a Channel protobuf which also consists of a ChannelSettings protobuf.

info

Channel Settings (as described on this page) should not be confused with Modem Preset Settings

Modem Preset Settings contain the modem configuration (frequency settings, spreading factor, bandwidth, etc.) used for the LoRa radio. These settings are identical for all channels and can not be unique per channel.

Channel Settings contain information for segregating message groups, configuring optional encryption, and enabling or disabling messaging over internet gateways. These settings are unique and configurable per channel.

Channel Config Valuesโ€‹

Indexโ€‹

The channel index begins at 0 and ends at 7.

Indexing can not be modified.

IndexChannelDefault RolePurpose
01PRIMARYUsed as default channel
12DISABLEDUser defined
23DISABLEDUser defined
34DISABLEDUser defined
45DISABLEDUser defined
56DISABLEDUser defined
67DISABLEDUser defined
78DISABLEDUser defined
note

You can not have DISABLED channels in-between active channels such as PRIMARY and SECONDARY. Active channels must be consecutive.

Roleโ€‹

Each channel is assigned one of 3 roles:

  1. PRIMARY or 1
    • This is the first channel that is created for you on initial setup.
    • Only one primary channel can exist and can not be disabled.
    • Direct messages are only available on this channel.
  2. SECONDARY or 2
    • Can modify the encryption key (PSK).
  3. DISABLED or 0
    • The channel is no longer available for use.
    • The channel settings are set to default.

Channel Settings Valuesโ€‹

The Channel Settings options are: ID, Name, PSK, Downlink Enabled, and Uplink Enabled. Channel settings are embedded in the Channel protobuf as a ChannelSettings protobuf and sent as an admin message.

note

The full globally unique ID will be constructed from the Name and ID (<name>.<id>) where ID is base36 encoded. Assuming that the number of Meshtastic users is below 20K (true for a long time) the chance of this 64 bit random number colliding with anyone else is super low. The penalty for collision is low as well.

IDโ€‹

Used to construct a globally unique channel ID.

Set to 0 by default.

Nameโ€‹

A short identifier for the channel. (< 12 bytes)

Reserved NamePurpose
"" (default)If left empty on the Primary channel, this designates the default channel.
adminOn Secondary channels, the name admin (case sensitive) designates the admin channel used to administer nodes over the mesh

PSKโ€‹

The encryption key used for private channels.

Hex byte 0x01 for the Primary default channel.

Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256).

If enabled, messages captured from a public internet gateway will be forwarded to the local mesh.

Set to false by default for all channels.

If enabled, messages from the mesh will be sent to the public internet through any node's configured gateway.

Set to false by default for all channels.

info

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

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.

Example:
meshtastic --ch-set name "My Channel" --ch-set psk random --ch-set uplink_enabled true --ch-index 4

Idโ€‹

Set the PRIMARY channel ID
meshtastic --ch-set id 1234 --ch-index 0

Nameโ€‹

Set channel name for the PRIMARY channel
# without spaces
meshtastic --ch-set name MyChannel --ch-index 0
# with spaces
meshtastic --ch-set name "My Channel" --ch-index 0

PSKโ€‹

If you use Meshtastic for exchanging messages you don't want other people to see, random is the setting you should use. Selecting default or any of the simple values from the following table will use publicly known encryption keys. They're shipped with Meshtastic source code and thus, anyone can listen to messages encrypted by them. They're great for testing and public channels.

SettingBehavior
noneDisable Encryption
defaultDefault Encryption (use the weak encryption key)
randomGenerate a secure 256-bit encryption key. Use this setting for private communication.
simple0- simple254Uses a single byte encoding for encryption
Set encryption to default on PRIMARY channel
meshtastic --ch-set psk default --ch-index 0
Set encryption to random on PRIMARY channel
meshtastic --ch-set psk random --ch-index 0
Set encryption to single byte on PRIMARY channel
meshtastic --ch-set psk simple15 --ch-index 0
Set encryption to your own key on PRIMARY channel
meshtastic --ch-set psk 0x1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b1a1a1a1a2b2b2b2b --ch-index 0
Disable encryption on PRIMARY channel
meshtastic --ch-set psk none --ch-index 0

For configuring gateways, please see MQTT

Enable/Disable Uplink on PRIMARY channel
meshtastic --ch-set uplink_enabled true --ch-index 0
meshtastic --ch-set uplink_enabled false --ch-index 0
Enable/Disable Downlink on SECONDARY channel
meshtastic --ch-set downlink_enabled true --ch-index 1
meshtastic --ch-set downlink_enabled false --ch-index 5