Skip to main content

Protobuf API Reference

admin.proto

AdminMessage

message description

This message is handled by the Admin module and is responsible for all settings/channel read/write operations. This message is used to do settings operations to both remote AND local nodes. (Prior to 1.2 these operations were done via special ToRadio operations)

FieldTypeDescription
oneof variant.set_ownerUserSet the owner for this node
oneof variant.set_channelChannelSet channels (using the new API). A special channel is the "primary channel". The other records are secondary channels. Note: only one channel can be marked as primary. If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.
oneof variant.get_channel_requestuint32Send the specified channel in the response to this message NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present)
oneof variant.get_channel_responseChannelTODO: REPLACE
oneof variant.get_owner_requestboolSend the current owner data in the response to this message.
oneof variant.get_owner_responseUserTODO: REPLACE
oneof variant.get_config_requestAdminMessage.ConfigTypeAsk for the following config data to be sent
oneof variant.get_config_responseConfigSend the current Config in the response to this message.
oneof variant.set_configConfigSet the current Config
oneof variant.confirm_set_configboolSent immediatly after a config change has been sent to ensure comms, if this is not recieved, the config will be reverted after 10 mins
oneof variant.get_module_config_requestAdminMessage.ModuleConfigTypeAsk for the following config data to be sent
oneof variant.get_module_config_responseModuleConfigSend the current Config in the response to this message.
oneof variant.set_module_configModuleConfigSet the current Config
oneof variant.confirm_set_module_configboolSent immediatly after a config change has been sent to ensure comms, if this is not recieved, the config will be reverted after 10 mins
oneof variant.get_all_channel_requestboolSend all channels in the response to this message
oneof variant.confirm_set_channelboolSetting channels/radio config remotely carries the risk that you might send an invalid config and the radio never talks to your mesh again. Therefore if setting either of these properties remotely, you must send a confirm_xxx message within 10 minutes. If you fail to do so, the radio will assume loss of comms and revert your changes. These messages are optional when changing the local node.
oneof variant.confirm_set_radioboolTODO: REPLACE
oneof variant.exit_simulatorboolThis message is only supported for the simulator porduino build. If received the simulator will exit successfully.
oneof variant.reboot_secondsint32Tell the node to reboot in this many seconds (or <0 to cancel reboot)
oneof variant.get_canned_message_module_messages_requestboolGet the Canned Message Module messages in the response to this message.
oneof variant.get_canned_message_module_messages_responsestringGet the Canned Message Module messages in the response to this message.
oneof variant.set_canned_message_module_messagesstringSet the Canned Message Module messages text.
oneof variant.shutdown_secondsint32Tell the node to shutdown in this many seconds (or <0 to cancel shutdown)
oneof variant.get_device_metadata_requestuint32Request the node to send device metadata (firmware, protobuf version, etc)
oneof variant.get_device_metadata_responseDeviceMetadataDevice metadata response

AdminMessage.ConfigType

enum description

TODO: REPLACE

NameNumberDescription
DEVICE_CONFIG0TODO: REPLACE
POSITION_CONFIG1TODO: REPLACE
POWER_CONFIG2TODO: REPLACE
WIFI_CONFIG3TODO: REPLACE
DISPLAY_CONFIG4TODO: REPLACE
LORA_CONFIG5TODO: REPLACE
BLUETOOTH_CONFIG6TODO: REPLACE

AdminMessage.ModuleConfigType

enum description

TODO: REPLACE

NameNumberDescription
MQTT_CONFIG0TODO: REPLACE
SERIAL_CONFIG1TODO: REPLACE
EXTNOTIF_CONFIG2TODO: REPLACE
STOREFORWARD_CONFIG3TODO: REPLACE
RANGETEST_CONFIG4TODO: REPLACE
TELEMETRY_CONFIG5TODO: REPLACE
CANNEDMSG_CONFIG6TODO: REPLACE

apponly.proto

ChannelSet

message description

This is the most compact possible representation for a set of channels. It includes only one PRIMARY channel (which must be first) and any SECONDARY channels. No DISABLED channels are included. This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL

FieldTypeDescription
settingsChannelSettingsChannel list with settings
lora_configConfig.LoRaConfigLoRa config

cannedmessages.proto

CannedMessageModuleConfig

message description

Canned message module configuration.

FieldTypeDescription
messagesstringPredefined messages for canned message module separated by '

channel.proto

Channel

message description

A pair of a channel number, mode and the (sharable) settings for that channel

FieldTypeDescription
indexint32The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1) (Someday - not currently implemented) An index of -1 could be used to mean "set by name", in which case the target node will find and set the channel by settings.name.
settingsChannelSettingsThe new settings, or NULL to disable that channel
roleChannel.RoleTODO: REPLACE

ChannelSettings

message description

Full settings (center freq, spread factor, pre-shared secret key etc...) needed to configure a radio for speaking on a particular channel This information can be encoded as a QRcode/url so that other users can configure their radio to join the same channel. A note about how channel names are shown to users: channelname-Xy poundsymbol is a prefix used to indicate this is a channel name (idea from @professr). Where X is a letter from A-Z (base 26) representing a hash of the PSK for this channel - so that if the user changes anything about the channel (which does force a new PSK) this letter will also change. Thus preventing user confusion if two friends try to type in a channel name of "BobsChan" and then can't talk because their PSKs will be different. The PSK is hashed into this letter by "0x41 + [xor all bytes of the psk ] modulo 26" This also allows the option of someday if people have the PSK off (zero), the users COULD type in a channel name and be able to talk. Y is a lower case letter from a-z that represents the channel 'speed' settings (for some future definition of speed) FIXME: Add description of multi-channel support and how primary vs secondary channels are used. FIXME: explain how apps use channels for security. explain how remote settings and remote gpio are managed as an example

FieldTypeDescription
channel_numuint32NOTE: this field is independent and unrelated to the concepts in channel.proto. this is controlling the actual hardware frequency the radio is transmitting on. In a perfect world we would have called it something else (band?) but I forgot to make this change during the big 1.2 renaming. Most users should never need to be exposed to this field/concept. A channel number between 1 and 13 (or whatever the max is in the current region). If ZERO then the rule is "use the old channel name hash based algorithm to derive the channel number") If using the hash algorithm the channel number will be: hash(channel_name) % NUM_CHANNELS (Where num channels depends on the regulatory region). NUM_CHANNELS_US is 13, for other values see MeshRadio.h in the device code. hash a string into an integer - djb2 by Dan Bernstein. - http://www.cse.yorku.ca/~oz/hash.html unsigned long hash(char str) { unsigned long hash = 5381; int c; while ((c = str++) != 0) hash = ((hash << 5) + hash) + (unsigned char) c; return hash; }
pskbytesA simple pre-shared key for now for crypto. Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256). A special shorthand is used for 1 byte long psks. These psks should be treated as only minimally secure, because they are listed in this source code. Those bytes are mapped using the following scheme: 0 = No crypto 1 = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0xbf} 2 through 10 = The default channel key, except with 1 through 9 added to the last byte. Shown to user as simple1 through 10
namestringA SHORT name that will be packed into the URL. Less than 12 bytes. Something for end users to call the channel If this is the empty string it is assumed that this channel is the special (minimally secure) "Default"channel. In user interfaces it should be rendered as a local language translation of "X". For channel_num hashing empty string will be treated as "X". Where "X" is selected based on the English words listed above for ModemPreset
idfixed32Used to construct a globally unique channel ID. The full globally unique ID will be: "name.id" where ID is shown as base36. 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. And the penalty for collision is low as well, it just means that anyone trying to decrypt channel messages might need to try multiple candidate channels. Any time a non wire compatible change is made to a channel, this field should be regenerated. There are a small number of 'special' globally known (and fairly) insecure standard channels. Those channels do not have a numeric id included in the settings, but instead it is pulled from a table of well known IDs. (see Well Known Channels FIXME)
uplink_enabledboolIf true, messages on the mesh will be sent to the public internet by any gateway ndoe
downlink_enabledboolIf true, messages seen on the internet will be forwarded to the local mesh.

Channel.Role

enum description

How this channel is being used (or not). Note: this field is an enum to give us options for the future. In particular, someday we might make a 'SCANNING' option. SCANNING channels could have different frequencies and the radio would occasionally check that freq to see if anything is being transmitted. For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow cross band routing as needed. If a device has only a single radio (the common case) only one channel can be PRIMARY at a time (but any number of SECONDARY channels can't be sent received on that common frequency)

NameNumberDescription
DISABLED0This channel is not in use right now
PRIMARY1This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY
SECONDARY2Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc) are ignored, only psk is used.

config.proto

Config

FieldTypeDescription
oneof payloadVariant.deviceConfig.DeviceConfignone
oneof payloadVariant.positionConfig.PositionConfignone
oneof payloadVariant.powerConfig.PowerConfignone
oneof payloadVariant.wifiConfig.WiFiConfignone
oneof payloadVariant.displayConfig.DisplayConfignone
oneof payloadVariant.loraConfig.LoRaConfignone
oneof payloadVariant.bluetoothConfig.BluetoothConfignone

Config.BluetoothConfig

FieldTypeDescription
enabledboolEnable Bluetooth on the device
modeConfig.BluetoothConfig.PairingModeDetermines the pairing strategy for the device
fixed_pinuint32Specified pin for PairingMode.FixedPin

Config.DeviceConfig

message description

Configuration

FieldTypeDescription
roleConfig.DeviceConfig.RoleSets the role of node
serial_disabledboolIf set, this will disable the SerialConsole by not initilizing the StreamAPI
factory_resetboolThis setting is never saved to disk, but if set, all device settings will be returned to factory defaults.
debug_log_enabledboolBy default we turn off logging as soon as an API client connects (to keep shared serial link quiet). Set this to true to leave the debug log outputting even when API is active.
ntp_serverstringNTP server to use if WiFi is conneced, defaults to 0.pool.ntp.org

Config.DisplayConfig

message description

Display Config

FieldTypeDescription
screen_on_secsuint32Number of seconds the screen stays on after pressing the user button or receiving a message 0 for default of one minute MAXUINT for always on
gps_formatConfig.DisplayConfig.GpsCoordinateFormatHow the GPS coordinates are formatted on the OLED screen.
auto_screen_carousel_secsuint32Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds. Potentially useful for devices without user buttons.
compass_north_topboolIf this is set, the displayed compass will always point north. if unset, the old behaviour (top of display is heading direction) is used.

Config.LoRaConfig

message description

Lora Config

FieldTypeDescription
tx_powerint32If zero then, use default max legal continuous power (ie. something that won't burn out the radio hardware) In most cases you should use zero here. Units are in dBm.
modem_presetConfig.LoRaConfig.ModemPresetEither modem_config or bandwidth/spreading/coding will be specified - NOT BOTH. As a heuristic: If bandwidth is specified, do not use modem_config. Because protobufs take ZERO space when the value is zero this works out nicely. This value is replaced by bandwidth/spread_factor/coding_rate. If you'd like to experiment with other options add them to MeshRadio.cpp in the device code.
bandwidthuint32Bandwidth in MHz Certain bandwidth numbers are 'special' and will be converted to the appropriate floating point value: 31 -> 31.25MHz
spread_factoruint32A number from 7 to 12. Indicates number of chirps per symbol as 1<<spread_factor.
coding_rateuint32The denominator of the coding rate. ie for 4/8, the value is 8. 5/8 the value is 5.
frequency_offsetfloatThis parameter is for advanced users with advanced test equipment, we do not recommend most users use it. A frequency offset that is added to to the calculated band center frequency. Used to correct for crystal calibration errors.
regionConfig.LoRaConfig.RegionCodeThe region code for the radio (US, CN, EU433, etc...)
hop_limituint32Maximum number of hops. This can't be greater than 7. Default of 3
tx_disabledboolDisable TX from the LoRa radio. Useful for hot-swapping antennas and other tests. Defaults to false
ignore_incominguint32For testing it is useful sometimes to force a node to never listen to particular other nodes (simulating radio out of range). All nodenums listed in ignore_incoming will have packets they send droped on receive (by router.cpp)

Config.PositionConfig

message description

Position Config

FieldTypeDescription
position_broadcast_secsuint32We should send our position this often (but only if it has changed significantly) Defaults to 15 minutes
position_broadcast_smart_disabledboolDisable adaptive position braoadcast, which is now the default.
fixed_positionboolIf set, this node is at a fixed position. We will generate GPS position updates at the regular interval, but use whatever the last lat/lon/alt we have for the node. The lat/lon/alt can be set by an internal GPS or with the help of the app.
gps_disabledboolShould the GPS be disabled for this node?
gps_update_intervaluint32How often should we try to get GPS position (in seconds) or zero for the default of once every 30 seconds or a very large value (maxint) to update only once at boot.
gps_attempt_timeuint32How long should we try to get our position during each gps_update_interval attempt? (in seconds) Or if zero, use the default of 30 seconds. If we don't get a new gps fix in that time, the gps will be put into sleep until the next gps_update_rate window.
position_flagsuint32Bit field of boolean configuration options for POSITION messages (bitwise OR of PositionFlags)

Config.PowerConfig

message description

Power Config\ See Power Config for additional power config details.

FieldTypeDescription
charge_currentConfig.PowerConfig.ChargeCurrentSets the current of the battery charger TBEAM 1.1 Only
is_power_savingboolIf set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in we should try to minimize power consumption as much as possible. YOU DO NOT NEED TO SET THIS IF YOU'VE set is_router (it is implied in that case). Advanced Option
on_battery_shutdown_after_secsuint32If non-zero, the device will fully power off this many seconds after external power is removed.
adc_multiplier_overridefloatRatio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k) Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation. Should be set to floating point value between 2 and 4 Fixes issues on Heltec v2
wait_bluetooth_secsuint32Wait Bluetooth Seconds The number of seconds for to wait before turning off BLE in No Bluetooth states 0 for default of 1 minute
mesh_sds_timeout_secsuint32Mesh Super Deep Sleep Timeout Seconds While in Light Sleep if this value is exceeded we will lower into super deep sleep for sds_secs (default 1 year) or a button press 0 for default of two hours, MAXUINT for disabled
sds_secsuint32Super Deep Sleep Seconds While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep for this value (default 1 year) or a button press 0 for default of one year
ls_secsuint32Light Sleep Seconds In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on ESP32 Only 0 for default of 300
min_wake_secsuint32Minimum Wake Seconds While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value 0 for default of 10 seconds

Config.WiFiConfig

message description

WiFi Config

FieldTypeDescription
enabledboolEnable WiFi (disables Bluetooth)
modeConfig.WiFiConfig.WiFiModeIf set, this node will try to join the specified wifi network and acquire an address via DHCP
ssidstringIf set, this node will try to join the specified wifi network and acquire an address via DHCP
pskstringIf set, will be use to authenticate to the named wifi

Config.BluetoothConfig.PairingMode

NameNumberDescription
RandomPin0Device generates a random pin that will be shown on the screen of the device for pairing
FixedPin1Device requires a specified fixed pin for pairing
NoPin2Device requires no pin for pairing

Config.DeviceConfig.Role

enum description

Defines the device's role on the Mesh network

NameNumberDescription
Client0Client device role
ClientMute1Client Mute device role Same as a client except packets will not hop over this node, does not contribute to routing packets for mesh.
Router2Router device role. 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.
RouterClient3Router Client device role 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.

Config.DisplayConfig.GpsCoordinateFormat

enum description

How the GPS coordinates are displayed on the OLED screen.

NameNumberDescription
GpsFormatDec0GPS coordinates are displayed in the normal decimal degrees format: DD.DDDDDD DDD.DDDDDD
GpsFormatDMS1GPS coordinates are displayed in the degrees minutes seconds format: DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant
GpsFormatUTM2Universal Transverse Mercator format: ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing
GpsFormatMGRS3Military Grid Reference System format: ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square, E is easting, N is northing
GpsFormatOLC4Open Location Code (aka Plus Codes).
GpsFormatOSGR5Ordnance Survey Grid Reference (the National Grid System of the UK). Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square, E is the easting, N is the northing

Config.LoRaConfig.ModemPreset

enum description

Standard predefined channel settings Note: these mappings must match ModemPreset Choice in the device code.

NameNumberDescription
LongFast0Long Range - Fast
LongSlow1Long Range - Slow
VLongSlow2Very Long Range - Slow
MedSlow3Medium Range - Slow
MedFast4Medium Range - Fast
ShortSlow5Short Range - Slow
ShortFast6Short Range - Fast

Config.LoRaConfig.RegionCode

NameNumberDescription
Unset0Region is not set
US1United States
EU4332European Union 433mhz
EU8683European Union 433mhz
CN4China
JP5Japan
ANZ6Australia / New Zealand
KR7Korea
TW8Taiwan
RU9Russia
IN10India
NZ86511New Zealand 865mhz
TH12Thailand

Config.PositionConfig.PositionFlags

enum description

Bit field of boolean configuration options, indicating which optional fields to include when assembling POSITION messages Longitude and latitude are always included (also time if GPS-synced) NOTE: the more fields are included, the larger the message will be - leading to longer airtime and a higher risk of packet loss

NameNumberDescription
POS_UNDEFINED0Required for compilation
POS_ALTITUDE1Include an altitude value (if available)
POS_ALT_MSL2Altitude value is MSL
POS_GEO_SEP4Include geoidal separation
POS_DOP8Include the DOP value ; PDOP used by default, see below
POS_HVDOP16If POS_DOP set, send separate HDOP / VDOP values instead of PDOP
POS_SATINVIEW32Include number of "satellites in view"
POS_SEQ_NOS64Include a sequence number incremented per packet
POS_TIMESTAMP128Include positional timestamp (from GPS solution)
POS_HEADING256Include positional heading Intended for use with vehicle not walking speeds walking speeds are likely to be error prone like the compass
POS_SPEED512Include positional speed Intended for use with vehicle not walking speeds walking speeds are likely to be error prone like the compass

Config.PowerConfig.ChargeCurrent

enum description

Sets the charge control current of devices with a battery charger that can be configured TBEAM 1.1 Only

NameNumberDescription
MAUnset0none
MA1001none
MA1902none
MA2803none
MA3604none
MA4505none
MA5506none
MA6307none
MA7008none
MA7809none
MA88010none
MA96011none
MA100012none
MA108013none
MA116014none
MA124015none
MA132016none

Config.WiFiConfig.WiFiMode

NameNumberDescription
Client0This mode is used to connect to an external WiFi network
AccessPoint1In this mode the node will operate as an AP (and DHCP server)
AccessPointHidden2If set, the node AP will broadcast as a hidden SSID

device_metadata.proto

DeviceMetadata

message description

Device metadata response

FieldTypeDescription
firmware_versionstringDevice firmware version string
device_state_versionuint32Device state version

deviceonly.proto

ChannelFile

message description

The on-disk saved channels

FieldTypeDescription
channelsChannelThe channels our node knows about
versionuint32A version integer used to invalidate old save files when we make incompatible changes This integer is set at build time and is private to NodeDB.cpp in the device code.

DeviceState

message description

This message is never sent over the wire, but it is used for serializing DB state to flash in the device code FIXME, since we write this each time we enter deep sleep (and have infinite flash) it would be better to use some sort of append only data structure for the receive queue and use the preferences store for the other stuff

FieldTypeDescription
my_nodeMyNodeInfoRead only settings/info about this node
ownerUserMy owner info
node_dbNodeInfoTODO: REPLACE
receive_queueMeshPacketReceived packets saved for delivery to the phone
versionuint32A version integer used to invalidate old save files when we make incompatible changes This integer is set at build time and is private to NodeDB.cpp in the device code.
rx_text_messageMeshPacketWe keep the last received text message (only) stored in the device flash, so we can show it on the screen. Might be null
no_saveboolUsed only during development. Indicates developer is testing and changes should never be saved to flash.
did_gps_resetboolSome GPSes seem to have bogus settings from the factory, so we always do one factory reset.

OEMStore

message description

This can be used for customizing the firmware distribution. If populated, show a secondary bootup screen with cuatom logo and text for 2.5 seconds.

FieldTypeDescription
oem_icon_widthuint32The Logo width in Px
oem_icon_heightuint32The Logo height in Px
oem_icon_bitsbytesThe Logo in xbm bytechar format
oem_fontScreenFontsUse this font for the OEM text.
oem_textstringUse this font for the OEM text.

ScreenFonts

enum description

TODO: REPLACE

NameNumberDescription
FONT_SMALL0TODO: REPLACE
FONT_MEDIUM1TODO: REPLACE
FONT_LARGE2TODO: REPLACE

localonly.proto

LocalConfig

FieldTypeDescription
deviceConfig.DeviceConfigThe part of the config that is specific to the Device
positionConfig.PositionConfigThe part of the config that is specific to the GPS Position
powerConfig.PowerConfigThe part of the config that is specific to the Power settings
wifiConfig.WiFiConfigThe part of the config that is specific to the Wifi Settings
displayConfig.DisplayConfigThe part of the config that is specific to the Display
loraConfig.LoRaConfigThe part of the config that is specific to the Lora Radio
bluetoothConfig.BluetoothConfigThe part of the config that is specific to the Bluetooth settings
versionuint32A version integer used to invalidate old save files when we make incompatible changes This integer is set at build time and is private to NodeDB.cpp in the device code.

LocalModuleConfig

FieldTypeDescription
mqttModuleConfig.MQTTConfigThe part of the config that is specific to the MQTT module
serialModuleConfig.SerialConfigThe part of the config that is specific to the Serial module
external_notificationModuleConfig.ExternalNotificationConfigThe part of the config that is specific to the ExternalNotification module
store_forwardModuleConfig.StoreForwardConfigThe part of the config that is specific to the Store & Forward module
range_testModuleConfig.RangeTestConfigThe part of the config that is specific to the RangeTest module
telemetryModuleConfig.TelemetryConfigThe part of the config that is specific to the Telemetry module
canned_messageModuleConfig.CannedMessageConfigThe part of the config that is specific to the Canned Message module
versionuint32A version integer used to invalidate old save files when we make incompatible changes This integer is set at build time and is private to NodeDB.cpp in the device code.

mesh.proto

Compressed

message description

Compressed message payload

FieldTypeDescription
portnumPortNumPortNum to determine the how to handle the compressed payload.
databytesCompressed data.

Data

message description

(Formerly called SubPacket) The payload portion fo a packet, this is the actual bytes that are sent inside a radio packet (because from/to are broken out by the comms library)

FieldTypeDescription
portnumPortNumFormerly named typ and of type Type
payloadbytesTODO: REPLACE
want_responseboolNot normally used, but for testing a sender can request that recipient responds in kind (i.e. if it received a position, it should unicast back it's position). Note: that if you set this on a broadcast you will receive many replies.
destfixed32The address of the destination node. This field is is filled in by the mesh radio device software, application layer software should never need it. RouteDiscovery messages must populate this. Other message types might need to if they are doing multihop routing.
sourcefixed32The address of the original sender for this message. This field should only be populated for reliable multihop packets (to keep packets small).
request_idfixed32Only used in routing or response messages. Indicates the original message ID that this message is reporting failure on. (formerly called original_id)
reply_idfixed32If set, this message is intened to be a reply to a previously sent message with the defined id.
emojifixed32Defaults to false. If true, then what is in the payload should be treated as an emoji like giving a message a heart or poop emoji.

FromRadio

message description

Packets from the radio to the phone will appear on the fromRadio characteristic. It will support READ and NOTIFY. When a new packet arrives the device will BLE notify? It will sit in that descriptor until consumed by the phone, at which point the next item in the FIFO will be populated.

FieldTypeDescription
iduint32The packet id, used to allow the phone to request missing read packets from the FIFO, see our bluetooth docs
oneof payloadVariant.packetMeshPacketLog levels, chosen to match python logging conventions.
oneof payloadVariant.my_infoMyNodeInfoTells the phone what our node number is, can be -1 if we've not yet joined a mesh. NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps.
oneof payloadVariant.node_infoNodeInfoOne packet is sent for each node in the on radio DB starts over with the first node in our DB
oneof payloadVariant.configConfigInclude a part of the config (was: RadioConfig radio)
oneof payloadVariant.log_recordLogRecordSet to send debug console output over our protobuf stream
oneof payloadVariant.config_complete_iduint32Sent as true once the device has finished sending all of the responses to want_config recipient should check if this ID matches our original request nonce, if not, it means your config responses haven't started yet. NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps.
oneof payloadVariant.rebootedboolSent to tell clients the radio has just rebooted. Set to true if present. Not used on all transports, currently just used for the serial console. NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps.
oneof payloadVariant.moduleConfigModuleConfigInclude module config

LogRecord

message description

Debug output from the device. To minimize the size of records inside the device code, if a time/source/level is not set on the message it is assumed to be a continuation of the previously sent message. This allows the device code to use fixed maxlen 64 byte strings for messages, and then extend as needed by emitting multiple records.

FieldTypeDescription
messagestringLog levels, chosen to match python logging conventions.
timefixed32Seconds since 1970 - or 0 for unknown/unset
sourcestringUsually based on thread name - if known
levelLogRecord.LevelNot yet set

MeshPacket

message description

A packet envelope sent/received over the mesh only payloadVariant is sent in the payload portion of the LORA packet. The other fields are either not sent at all, or sent in the special 16 byte LORA header.

FieldTypeDescription
fromfixed32The sending node number. Note: Our crypto implementation uses this field as well. See crypto for details. FIXME - really should be fixed32 instead, this encoding only hurts the ble link though.
tofixed32The (immediatSee Priority description for more details.y should be fixed32 instead, this encoding only hurts the ble link though.
channeluint32(Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on. If unset, packet was on the primary channel. A particular node might know only a subset of channels in use on the mesh. Therefore channel_index is inherently a local concept and meaningless to send between nodes. Very briefly, while sending and receiving deep inside the device Router code, this field instead contains the 'channel hash' instead of the index. This 'trick' is only used while the payloadVariant is an 'encrypted'.
oneof payloadVariant.decodedDataTODO: REPLACE
oneof payloadVariant.encryptedbytesTODO: REPLACE
idfixed32A unique ID for this packet. Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space). Otherwise a unique ID for this packet, useful for flooding algorithms. ID only needs to be unique on a per sender basis, and it only needs to be unique for a few minutes (long enough to last for the length of any ACK or the completion of a mesh broadcast flood). Note: Our crypto implementation uses this id as well. See crypto for details. FIXME - really should be fixed32 instead, this encoding only hurts the ble link though.
rx_timefixed32The time this message was received by the esp32 (secs since 1970). Note: this field is never sent on the radio link itself (to save space) Times are typically not sent over the mesh, but they will be added to any Packet (chain of SubPacket) sent to the phone (so the phone can know exact time of reception)
rx_snrfloatNever* sent over the radio links. Set during reception to indicate the SNR of this packet. Used to collect statistics on current link quality.
hop_limituint32If unset treated as zero (no forwarding, send to adjacent nodes only) if 1, allow hopping through one node, etc... For our usecase real world topologies probably have a max of about 3. This field is normally placed into a few of bits in the header.
want_ackboolThis packet is being sent as a reliable message, we would prefer it to arrive at the destination. We would like to receive a ack packet in response. Broadcasts messages treat this flag specially: Since acks for broadcasts would rapidly flood the channel, the normal ack behavior is suppressed. Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm). If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message. So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender. If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic. Note: This flag is normally sent in a flag bit in the header when sent over the wire
priorityMeshPacket.PriorityThe priority of this message for sending. See MeshPacket.Priority description for more details.
rx_rssiint32rssi of received packet. Only sent to phone for dispay purposes.
delayedMeshPacket.DelayedDescribe if this message is delayed

MyNodeInfo

message description

Unique local debugging info for this node Note: we don't include position or the user info, because that will come in the Sent to the phone in response to WantNodes.

FieldTypeDescription
my_node_numuint32Tells the phone what our node number is, default starting value is lowbyte of macaddr, but it will be fixed if that is already in use
has_gpsboolNote: This flag merely means we detected a hardware GPS in our node. Not the same as UserPreferences.location_sharing
max_channelsuint32The maximum number of 'software' channels that can be set on this node.
firmware_versionstring0.0.5 etc...
error_codeCriticalErrorCodeAn error message we'd like to report back to the mothership through analytics. It indicates a serious bug occurred on the device, the device coped with it, but we still want to tell the devs about the bug. This field will be cleared after the phone reads MyNodeInfo (i.e. it will only be reported once) a numeric error code to go with error message, zero means no error
error_addressuint32A numeric error address (nonzero if available)
error_countuint32The total number of errors this node has ever encountered (well - since the last time we discarded preferences)
reboot_countuint32The total number of reboots this node has ever encountered (well - since the last time we discarded preferences)
bitratefloatCalculated bitrate of the current channel (in Bytes Per Second)
message_timeout_msecuint32How long before we consider a message abandoned and we can clear our caches of any messages in flight Normally quite large to handle the worst case message delivery time, 5 minutes. Formerly called FLOOD_EXPIRE_TIME in the device code
min_app_versionuint32The minimum app version that can talk to this device. Phone/PC apps should compare this to their build number and if too low tell the user they must update their app
air_period_txuint3224 time windows of 1hr each with the airtime transmitted out of the device per hour.
air_period_rxuint3224 time windows of 1hr each with the airtime of valid packets for your mesh.
has_wifiboolIs the device wifi capable?
channel_utilizationfloatUtilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
air_util_txfloatPercent of airtime for transmission used within the last hour.

NodeInfo

message description

The bluetooth to device link: Old BTLE protocol docs from TODO, merge in above and make real docs... use protocol buffers, and NanoPB messages from device to phone: POSITION_UPDATE (..., time) TEXT_RECEIVED(from, text, time) OPAQUE_RECEIVED(from, payload, time) (for signal messages or other applications) messages from phone to device: SET_MYID(id, human readable long, human readable short) (send down the unique ID string used for this node, a human readable string shown for that id, and a very short human readable string suitable for oled screen) SEND_OPAQUE(dest, payload) (for signal messages or other applications) SEND_TEXT(dest, text) Get all nodes() (returns list of nodes, with full info, last time seen, loc, battery level etc) SET_CONFIG (switches device to a new set of radio params and preshared key, drops all existing nodes, force our node to rejoin this new group) Full information about a node on the mesh

FieldTypeDescription
numuint32The node number
userUserThe user info for this node
positionPositionThis position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. Position.time now indicates the last time we received a POSITION from that node.
snrfloatReturns the Signal-to-noise ratio (SNR) of the last received message, as measured by the receiver. Return SNR of the last received message in dB
last_heardfixed32Set to indicate the last time we received a packet from this node
device_metricsDeviceMetricsThe latest device metrics for the node.

Position

message description

a gps position

FieldTypeDescription
latitude_isfixed32The new preferred location encoding, divide by 1e-7 to get degrees in floating point
longitude_isfixed32TODO: REPLACE
altitudeint32In meters above MSL (but see issue #359)
timefixed32This is usually not sent over the mesh (to save space), but it is sent from the phone so that the local device can set its RTC If it is sent over the mesh (because there are devices on the mesh without GPS), it will only be sent by devices which has a hardware GPS clock. seconds since 1970
location_sourcePosition.LocSourceTODO: REPLACE
altitude_sourcePosition.AltSourceTODO: REPLACE
pos_timestampfixed32Positional timestamp (actual timestamp of GPS solution) in integer epoch seconds
pos_time_millisint32Pos. timestamp milliseconds adjustment (rarely available or required)
altitude_haesint32HAE altitude in meters - can be used instead of MSL altitude
alt_geoid_sepsint32Geoidal separation in meters
PDOPuint32Horizontal, Vertical and Position Dilution of Precision, in 1/100 units - PDOP is sufficient for most cases - for higher precision scenarios, HDOP and VDOP can be used instead, in which case PDOP becomes redundant (PDOP=sqrt(HDOP^2 + VDOP^2)) TODO: REMOVE/INTEGRATE
HDOPuint32TODO: REPLACE
VDOPuint32TODO: REPLACE
gps_accuracyuint32GPS accuracy (a hardware specific constant) in mm multiplied with DOP to calculate positional accuracy Default: "'bout three meters-ish" :)
ground_speeduint32Ground speed in m/s and True North TRACK in 1/100 degrees Clarification of terms: - "track" is the direction of motion (measured in horizontal plane) - "heading" is where the fuselage points (measured in horizontal plane) - "yaw" indicates a relative rotation about the vertical axis TODO: REMOVE/INTEGRATE
ground_trackuint32TODO: REPLACE
fix_qualityuint32GPS fix quality (from NMEA GxGGA statement or similar)
fix_typeuint32GPS fix type 2D/3D (from NMEA GxGSA statement)
sats_in_viewuint32GPS "Satellites in View" number
sensor_iduint32Sensor ID - in case multiple positioning sensors are being used
pos_next_updateuint32Estimated/expected time (in seconds) until next update: - if we update at fixed intervals of X seconds, use X - if we update at dynamic intervals (based on relative movement etc), but "AT LEAST every Y seconds", use Y
pos_seq_numberuint32A sequence number, incremented with each Position message to help detect lost updates if needed

RouteDiscovery

message description

A message used in our Dynamic Source Routing protocol (RFC 4728 based)

FieldTypeDescription
routefixed32The list of nodenums this packet has visited so far

Routing

message description

A Routing control Data packet handled by the routing module

FieldTypeDescription
oneof variant.route_requestRouteDiscoveryA route request going from the requester
oneof variant.route_replyRouteDiscoveryA route reply
oneof variant.error_reasonRouting.ErrorA failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide details on the type of failure).

ToRadio

message description

Packets/commands to the radio will be written (reliably) to the toRadio characteristic. Once the write completes the phone can assume it is handled.

FieldTypeDescription
oneof payloadVariant.packetMeshPacketSend this packet on the mesh
oneof payloadVariant.peer_infoToRadio.PeerInfoInformation about the peer, sent after the phone sneds want_config_id. Old clients do not send this, which is fine.
oneof payloadVariant.want_config_iduint32Phone wants radio to send full node db to the phone, This is typically the first packet sent to the radio when the phone gets a bluetooth connection. The radio will respond by sending back a MyNodeInfo, a owner, a radio config and a series of FromRadio.node_infos, and config_complete the integer you write into this field will be reported back in the config_complete_id response this allows clients to never be confused by a stale old partially sent config.
oneof payloadVariant.disconnectboolTell API server we are disconnecting now. This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link. (Sending this message is optional for clients)

ToRadio.PeerInfo

message description

Instead of sending want_config_id as a uint32, newer clients send this structure with information about the client.

FieldTypeDescription
app_versionuint32The numeric version code for the client application, which in some cases are used to control device behavior (so the device can make assumptions about who is using the API.
mqtt_gatewayboolTrue if the peer device can gateway MQTT packets. If true, the device will not try to send packets to the internet directly, instead it will pass the packets to the peer for dispatching. This feature is optional, if set to false the device will assume the client can not gateway to MQTT.

User

message description

Broadcast when a newly powered mesh node wants to find a node num it can use Sent from the phone over bluetooth to set the user id for the owner of this node. Also sent from nodes to each other when a new node signs on (so all clients can have this info) The algorithm is as follows: when a node starts up, it broadcasts their user and the normal flow is for all other nodes to reply with their User as well (so the new node can build its nodedb) If a node ever receives a User (not just the first broadcast) message where the sender node number equals our node number, that indicates a collision has occurred and the following steps should happen: If the receiving node (that was already in the mesh)'s macaddr is LOWER than the new User who just tried to sign in: it gets to keep its nodenum. We send a broadcast message of OUR User (we use a broadcast so that the other node can receive our message, considering we have the same id - it also serves to let observers correct their nodedb) - this case is rare so it should be okay. If any node receives a User where the macaddr is GTE than their local macaddr, they have been vetoed and should pick a new random nodenum (filtering against whatever it knows about the nodedb) and rebroadcast their User. A few nodenums are reserved and will never be requested: 0xff - broadcast 0 through 3 - for future use

FieldTypeDescription
idstringA globally unique ID string for this user. In the case of Signal that would mean +16504442323, for the default macaddr derived id it would be !<8 hexidecimal bytes>. Note: app developers are encouraged to also use the following standard node IDs "^all" (for broadcast), "^local" (for the locally connected node)
long_namestringA full name for this user, i.e. "Kevin Hester"
short_namestringA VERY short name, ideally two characters. Suitable for a tiny OLED screen
macaddrbytesThis is the addr of the radio. Not populated by the phone, but added by the esp32 when broadcasting
hw_modelHardwareModelTBEAM, HELTEC, etc... Starting in 1.2.11 moved to hw_model enum in the NodeInfo object. Apps will still need the string here for older builds (so OTA update can find the right image), but if the enum is available it will be used instead.
is_licensedboolIn some regions Ham radio operators have different bandwidth limitations than others. If this user is a licensed operator, set this flag. Also, "long_name" should be their licence number.

Waypoint

message description

Waypoint message, used to share arbitrary locations across the mesh

FieldTypeDescription
iduint32Id of the waypoint
latitude_isfixed32latitude_i
longitude_isfixed32longitude_i
expireuint32Time the waypoint is to expire (epoch)
lockedboolIf true, only allow the original sender to update the waypoint.
namestringName of the waypoint - max 30 chars
descriptionstringDescription of the waypoint - max 100 chars

Constants

enum description

Shared constants between device and phone

NameNumberDescription
Unused0First enum must be zero, and we are just using this enum to pass int constants between two very different environments
DATA_PAYLOAD_LEN237From mesh.options note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is outside of this envelope

CriticalErrorCode

enum description

Error codes for critical errors The device might report these fault codes on the screen. If you encounter a fault code, please post on the meshtastic.discourse.group and we'll try to help.

NameNumberDescription
None0TODO: REPLACE
TxWatchdog1A software bug was detected while trying to send lora
SleepEnterWait2A software bug was detected on entry to sleep
NoRadio3No Lora radio hardware could be found
Unspecified4Not normally used
UBloxInitFailed5We failed while configuring a UBlox GPS
NoAXP1926This board was expected to have a power management chip and it is missing or broken
InvalidRadioSetting7The channel tried to set a radio setting which is not supported by this chipset, radio comms settings are now undefined.
TransmitFailed8Radio transmit hardware failure. We sent data to the radio chip, but it didn't reply with an interrupt.
Brownout9We detected that the main CPU voltage dropped below the minumum acceptable value
SX1262Failure10Selftest of SX1262 radio chip failed
RadioSpiBug11A (likely software but possibly hardware) failure was detected while trying to send packets. If this occurs on your board, please post in the forum so that we can ask you to collect some information to allow fixing this bug

HardwareModel

enum description

Note: these enum names must EXACTLY match the string used in the device bin/build-all.sh script. Because they will be used to find firmware filenames in the android app for OTA updates. To match the old style filenames, _ is converted to -, p is converted to .

NameNumberDescription
UNSET0TODO: REPLACE
TLORA_V21TODO: REPLACE
TLORA_V12TODO: REPLACE
TLORA_V2_1_1p63TODO: REPLACE
TBEAM4TODO: REPLACE
HELTEC_V2_05The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13 (see HELTEC_V2 for the new version).
TBEAM0p76TODO: REPLACE
T_ECHO7TODO: REPLACE
TLORA_V1_1p38TODO: REPLACE
RAK46319TODO: REPLACE
HELTEC_V2_110The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37. Sadly they did not update anything on the silkscreen to identify this board
HELTEC_V111Ancient heltec WiFi_Lora_32 board
LORA_RELAY_V132Less common/prototype boards listed here (needs one more byte over the air)
NRF52840DK33TODO: REPLACE
PPR34TODO: REPLACE
GENIEBLOCKS35TODO: REPLACE
NRF52_UNKNOWN36TODO: REPLACE
PORTDUINO37TODO: REPLACE
ANDROID_SIM38The simulator built into the android app
DIY_V139Custom DIY device based on @NanoVHF schematics: https://github.com/NanoVHF/Meshtastic-DIY/tree/main/Schematics
RAK1120040RAK WisBlock ESP32 core: https://docs.rakwireless.com/Product-Categories/WisBlock/RAK11200/Overview/
NANO_G141B&Q Consulting Nano Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:nano
NRF52840_PCA1005942nRF52840 Dongle : https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle/
DR_DEV43Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3
M5STACK44M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/
STATION_G145B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station
PRIVATE_HW255Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.

LogRecord.Level

enum description

Log levels, chosen to match python logging conventions.

NameNumberDescription
UNSET0Log levels, chosen to match python logging conventions.
CRITICAL50Log levels, chosen to match python logging conventions.
ERROR40Log levels, chosen to match python logging conventions.
WARNING30Log levels, chosen to match python logging conventions.
INFO20Log levels, chosen to match python logging conventions.
DEBUG10Log levels, chosen to match python logging conventions.
TRACE5Log levels, chosen to match python logging conventions.

MeshPacket.Delayed

enum description

Identify if this is a delayed packet

NameNumberDescription
NO_DELAY0If unset, the message is being sent in real time.
DELAYED_BROADCAST1The message is delayed and was originally a broadcast
DELAYED_DIRECT2The message is delayed and was originally a direct message

MeshPacket.Priority

enum description

The priority of this message for sending. Higher priorities are sent first (when managing the transmit queue). This field is never sent over the air, it is only used internally inside of a local device node. API clients (either on the local node or connected directly to the node) can set this parameter if necessary. (values must be <= 127 to keep protobuf field to one byte in size. Detailed background on this field: I noticed a funny side effect of lora being so slow: Usually when making a protocol there isn’t much need to use message priority to change the order of transmission (because interfaces are fairly fast). But for lora where packets can take a few seconds each, it is very important to make sure that critical packets are sent ASAP. In the case of meshtastic that means we want to send protocol acks as soon as possible (to prevent unneeded retransmissions), we want routing messages to be sent next, then messages marked as reliable and finally ‘background’ packets like periodic position updates. So I bit the bullet and implemented a new (internal - not sent over the air) field in MeshPacket called ‘priority’. And the transmission queue in the router object is now a priority queue.

NameNumberDescription
UNSET0Treated as Priority.DEFAULT
MIN1TODO: REPLACE
BACKGROUND10Background position updates are sent with very low priority - if the link is super congested they might not go out at all
DEFAULT64This priority is used for most messages that don't have a priority set
RELIABLE70If priority is unset but the message is marked as want_ack, assume it is important and use a slightly higher priority
ACK120Ack/naks are sent with very high priority to ensure that retransmission stops as soon as possible
MAX127TODO: REPLACE

Position.AltSource

enum description

How the altitude was acquired: manual, GPS int/ext, etc Default: same as location_source if present

NameNumberDescription
ALTSRC_UNSPECIFIED0TODO: REPLACE
ALTSRC_MANUAL_ENTRY1TODO: REPLACE
ALTSRC_GPS_INTERNAL2TODO: REPLACE
ALTSRC_GPS_EXTERNAL3TODO: REPLACE
ALTSRC_BAROMETRIC4TODO: REPLACE

Position.LocSource

enum description

How the location was acquired: manual, onboard GPS, external (EUD) GPS

NameNumberDescription
LOCSRC_UNSPECIFIED0TODO: REPLACE
LOCSRC_MANUAL_ENTRY1TODO: REPLACE
LOCSRC_GPS_INTERNAL2TODO: REPLACE
LOCSRC_GPS_EXTERNAL3TODO: REPLACE

More location sources can be added here when available: GSM, radio beacons (BLE etc), location fingerprinting etc TODO: REMOVE/INTEGRATE |

Routing.Error

enum description

A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide details on the type of failure).

NameNumberDescription
NONE0This message is not a failure
NO_ROUTE1Our node doesn't have a route to the requested destination anymore.
GOT_NAK2We received a nak while trying to forward on your behalf
TIMEOUT3TODO: REPLACE
NO_INTERFACE4No suitable interface could be found for delivering this packet
MAX_RETRANSMIT5We reached the max retransmission count (typically for naive flood routing)
NO_CHANNEL6No suitable channel was found for sending this packet (i.e. was requested channel index disabled?)
TOO_LARGE7The packet was too big for sending (exceeds interface MTU after encoding)
NO_RESPONSE8The request had want_response set, the request reached the destination node, but no service on that node wants to send a response (possibly due to bad channel permissions)
BAD_REQUEST32The application layer service on the remote node received your request, but considered your request somehow invalid
NOT_AUTHORIZED33The application layer service on the remote node received your request, but considered your request not authorized (i.e you did not send the request on the required bound channel)

module_config.proto

ModuleConfig

message description

Module Config

FieldTypeDescription
oneof payloadVariant.mqttModuleConfig.MQTTConfigTODO: REPLACE
oneof payloadVariant.serialModuleConfig.SerialConfigTODO: REPLACE
oneof payloadVariant.external_notificationModuleConfig.ExternalNotificationConfigTODO: REPLACE
oneof payloadVariant.store_forwardModuleConfig.StoreForwardConfigTODO: REPLACE
oneof payloadVariant.range_testModuleConfig.RangeTestConfigTODO: REPLACE
oneof payloadVariant.telemetryModuleConfig.TelemetryConfigTODO: REPLACE
oneof payloadVariant.canned_messageModuleConfig.CannedMessageConfigTODO: REPLACE

ModuleConfig.CannedMessageConfig

message description

TODO: REPLACE

FieldTypeDescription
rotary1_enabledboolEnable the rotary encoder #1. This is a 'dumb' encoder sending pulses on both A and B pins while rotating.
inputbroker_pin_auint32GPIO pin for rotary encoder A port.
inputbroker_pin_buint32GPIO pin for rotary encoder B port.
inputbroker_pin_pressuint32GPIO pin for rotary encoder Press port.
inputbroker_event_cwModuleConfig.CannedMessageConfig.InputEventCharGenerate input event on CW of this kind.
inputbroker_event_ccwModuleConfig.CannedMessageConfig.InputEventCharGenerate input event on CCW of this kind.
inputbroker_event_pressModuleConfig.CannedMessageConfig.InputEventCharGenerate input event on Press of this kind.
updown1_enabledboolEnable the Up/Down/Select input device. Can be RAK rotary encoder or 3 buttons. Uses the a/b/press definitions from inputbroker.
enabledboolEnable/disable CannedMessageModule.
allow_input_sourcestringInput event origin accepted by the canned message module. Can be e.g. "rotEnc1", "upDownEnc1" or keyword "_any"
send_bellboolCannedMessageModule also sends a bell character with the messages. ExternalNotificationModule can benefit from this feature.

ModuleConfig.ExternalNotificationConfig

message description

External Notifications Config

FieldTypeDescription
enabledboolPreferences for the ExternalNotificationModule FIXME - Move this out of UserPreferences and into a section for module configuration.
output_msuint32TODO: REPLACE
outputuint32TODO: REPLACE
activeboolTODO: REPLACE
alert_messageboolTODO: REPLACE
alert_bellboolTODO: REPLACE

ModuleConfig.MQTTConfig

message description

MQTT Client Config

FieldTypeDescription
enabledboolIf a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as is_uplink_enabled or is_downlink_enabled. But if this flag is set, all MQTT features will be disabled and no servers will be contacted.
addressstringThe server to use for our MQTT global message gateway feature. If not set, the default server will be used
usernamestringMQTT username to use (most useful for a custom MQTT server). If using a custom server, this will be honoured even if empty. If using the default server, this will only be honoured if set, otherwise the device will use the default username
passwordstringMQTT password to use (most useful for a custom MQTT server). If using a custom server, this will be honoured even if empty. If using the default server, this will only be honoured if set, otherwise the device will use the default password
encryption_enabledboolWhether to send encrypted or decrypted packets to MQTT. This parameter is only honoured if you also set server (the default official mqtt.meshtastic.org server can handle encrypted packets) Decrypted packets may be useful for external systems that want to consume meshtastic packets
json_enabledboolWhether to send / consume json packets on MQTT

ModuleConfig.RangeTestConfig

message description

Preferences for the RangeTestModule

FieldTypeDescription
enabledboolEnable the Range Test Module
senderuint32Send out range test messages from this node
saveboolBool value indicating that this node should save a RangeTest.csv file. ESP32 Only

ModuleConfig.SerialConfig

message description

Serial Config

FieldTypeDescription
enabledboolPreferences for the SerialModule FIXME - Move this out of UserPreferences and into a section for module configuration.
echoboolTODO: REPLACE
rxduint32TODO: REPLACE
txduint32TODO: REPLACE
baudModuleConfig.SerialConfig.Serial_BaudTODO: REPLACE
timeoutuint32TODO: REPLACE
modeModuleConfig.SerialConfig.Serial_ModeTODO: REPLACE

ModuleConfig.StoreForwardConfig

message description

Store and Forward Module Config

FieldTypeDescription
enabledboolEnable the Store and Forward Module
heartbeatboolTODO: REPLACE
recordsuint32TODO: REPLACE
history_return_maxuint32TODO: REPLACE
history_return_windowuint32TODO: REPLACE

ModuleConfig.TelemetryConfig

message description

Configuration for both device and environment metrics

FieldTypeDescription
device_update_intervaluint32Interval in seconds of how often we should try to send our device metrics to the mesh
environment_update_intervaluint32none
environment_measurement_enabledboolPreferences for the Telemetry Module (Environment) Enable/Disable the telemetry measurement module measurement collection
environment_screen_enabledboolEnable/Disable the telemetry measurement module on-device display
environment_display_fahrenheitboolWe'll always read the sensor in Celsius, but sometimes we might want to display the results in Fahrenheit as a "user preference".

ModuleConfig.CannedMessageConfig.InputEventChar

enum description

TODO: REPLACE

NameNumberDescription
KEY_NONE0TODO: REPLACE
KEY_UP17TODO: REPLACE
KEY_DOWN18TODO: REPLACE
KEY_LEFT19TODO: REPLACE
KEY_RIGHT20TODO: REPLACE
KEY_SELECT10'\n'
KEY_BACK27TODO: REPLACE
KEY_CANCEL24TODO: REPLACE

ModuleConfig.SerialConfig.Serial_Baud

enum description

TODO: REPLACE

NameNumberDescription
BAUD_Default0none
BAUD_1101none
BAUD_3002none
BAUD_6003none
BAUD_12004none
BAUD_24005none
BAUD_48006none
BAUD_96007none
BAUD_192008none
BAUD_384009none
BAUD_5760010none
BAUD_11520011none
BAUD_23040012none
BAUD_46080013none
BAUD_57600014none
BAUD_92160015none

ModuleConfig.SerialConfig.Serial_Mode

enum description

TODO: REPLACE

NameNumberDescription
MODE_Default0none
MODE_SIMPLE1none
MODE_PROTO2none

mqtt.proto

ServiceEnvelope

message description

This message wraps a MeshPacket with extra metadata about the sender and how it arrived.

FieldTypeDescription
packetMeshPacketThe (probably encrypted) packet
channel_idstringThe global channel ID it was sent on
gateway_idstringThe sending gateway node ID. Can we use this to authenticate/prevent fake nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as the globally trusted nodenum

portnums.proto

PortNum

enum description

For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a unique 'portnum' for their application. If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this master table. PortNums should be assigned in the following range: 0-63 Core Meshtastic use, do not use for third party apps 64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to register your application 256-511 Use one of these portnums for your private applications that you don't want to register publically All other values are reserved. Note: This was formerly a Type enum named 'typ' with the same id # We have change to this 'portnum' based scheme for specifying app handlers for particular payloads. This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.

NameNumberDescription
UNKNOWN_APP0Deprecated: do not use in new code (formerly called OPAQUE) A message sent from a device outside of the mesh, in a form the mesh does not understand NOTE: This must be 0, because it is documented in IMeshService.aidl to be so
TEXT_MESSAGE_APP1A simple UTF-8 text message, which even the little micros in the mesh can understand and show on their screen eventually in some circumstances even signal might send messages in this form (see below)
REMOTE_HARDWARE_APP2Reserved for built-in GPIO/example app. See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
POSITION_APP3The built-in position messaging app. Payload is a Position message
NODEINFO_APP4The built-in user info app. Payload is a User message
ROUTING_APP5Protocol control packets for mesh protocol use. Payload is a Routing message
ADMIN_APP6Admin control packets. Payload is a AdminMessage message
TEXT_MESSAGE_COMPRESSED_APP7Compressed TEXT_MESSAGE payloads.
WAYPOINT_APP8Waypoint payloads. Payload is a Waypoint message
REPLY_APP32Provides a 'ping' service that replies to any packet it receives. Also serves as a small example module.
IP_TUNNEL_APP33Used for the python IP tunnel feature
SERIAL_APP64Provides a hardware serial interface to send and receive from the Meshtastic network. Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network. Maximum packet size of 240 bytes. Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp.
STORE_FORWARD_APP65STORE_FORWARD_APP (Work in Progress) Maintained by Jm Casler (MC Hamster) : jm@casler.org
RANGE_TEST_APP66Optional port for messages for the range test module.
TELEMETRY_APP67Provides a format to send and receive telemetry data from the Meshtastic network. Maintained by Charles Crossan (crossan007) : crossan007@gmail.com
ZPS_APP68Experimental tools for estimating node position without a GPS Maintained by Github user a-f-G-U-C (a Meshtastic contributor) Project files at https://github.com/a-f-G-U-C/Meshtastic-ZPS
PRIVATE_APP256Private applications should use portnums >= 256. To simplify initial development and testing you can use "PRIVATE_APP" in your code without needing to rebuild protobuf files (via regen-protos.sh)
ATAK_FORWARDER257ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder
MAX511Currently we limit port nums to no higher than this value

remote_hardware.proto

HardwareMessage

message description

An example app to show off the module system. This message is used for REMOTE_HARDWARE_APP PortNums. Also provides easy remote access to any GPIO. In the future other remote hardware operations can be added based on user interest (i.e. serial output, spi/i2c input/output). FIXME - currently this feature is turned on by default which is dangerous because no security yet (beyond the channel mechanism). It should be off by default and then protected based on some TBD mechanism (a special channel once multichannel support is included?)

FieldTypeDescription
typHardwareMessage.TypeWhat type of HardwareMessage is this?
gpio_maskuint64What gpios are we changing. Not used for all MessageTypes, see MessageType for details
gpio_valueuint64For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios. Not used for all MessageTypes, see MessageType for details

HardwareMessage.Type

enum description

TODO: REPLACE

NameNumberDescription
UNSET0Unset/unused
WRITE_GPIOS1Set gpio gpios based on gpio_mask/gpio_value
WATCH_GPIOS2We are now interested in watching the gpio_mask gpios. If the selected gpios change, please broadcast GPIOS_CHANGED. Will implicitly change the gpios requested to be INPUT gpios.
GPIOS_CHANGED3The gpios listed in gpio_mask have changed, the new values are listed in gpio_value
READ_GPIOS4Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated
READ_GPIOS_REPLY5A reply to READ_GPIOS. gpio_mask and gpio_value will be populated

storeforward.proto

StoreAndForward

message description

TODO: REPLACE

FieldTypeDescription
rrStoreAndForward.RequestResponseTODO: REPLACE
statsStoreAndForward.StatisticsTODO: REPLACE
historyStoreAndForward.HistoryTODO: REPLACE
heartbeatStoreAndForward.HeartbeatTODO: REPLACE

StoreAndForward.Heartbeat

message description

TODO: REPLACE

FieldTypeDescription
perioduint32Number of that will be sent to the client
secondaryuint32If set, this is not the primary Store & Forward router on the mesh

StoreAndForward.History

message description

TODO: REPLACE

FieldTypeDescription
history_messagesuint32Number of that will be sent to the client
windowuint32The window of messages that was used to filter the history client requested
last_requestuint32The window of messages that was used to filter the history client requested

StoreAndForward.Statistics

message description

TODO: REPLACE

FieldTypeDescription
messages_totaluint32Number of messages we have ever seen
messages_saveduint32Number of messages we have currently saved our history.
messages_maxuint32Maximum number of messages we will save
up_timeuint32Router uptime in seconds
requestsuint32Number of times any client sent a request to the S&F.
requests_historyuint32Number of times the history was requested.
heartbeatboolIs the heartbeat enabled on the server?
return_maxuint32Is the heartbeat enabled on the server?
return_windowuint32Is the heartbeat enabled on the server?

StoreAndForward.RequestResponse

enum description

1 - 99 = From Router 101 - 199 = From Client

NameNumberDescription
UNSET0Unset/unused
ROUTER_ERROR1Router is an in error state.
ROUTER_HEARTBEAT2Router heartbeat
ROUTER_PING3Router has requested the client respond. This can work as a "are you there" message.
ROUTER_PONG4The response to a "Ping"
ROUTER_BUSY5Router is currently busy. Please try again later.
ROUTER_HISTORY6Router is responding to a request for history.
CLIENT_ERROR101Client is an in error state.
CLIENT_HISTORY102Client has requested a replay from the router.
CLIENT_STATS103Client has requested stats from the router.
CLIENT_PING104Client has requested the router respond. This can work as a "are you there" message.
CLIENT_PONG105The response to a "Ping"
CLIENT_ABORT106Client has requested that the router abort processing the client's request

telemetry.proto

DeviceMetrics

message description

Key native device metrics such as battery level

FieldTypeDescription
battery_leveluint321-100 (0 means powered)
voltagefloatVoltage measured
channel_utilizationfloatUtilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
air_util_txfloatPercent of airtime for transmission used within the last hour.

EnvironmentMetrics

message description

Weather station or other environmental metrics

FieldTypeDescription
temperaturefloatTemperature measured
relative_humidityfloatRelative humidity percent measured
barometric_pressurefloatBarometric pressure in hPA measured
gas_resistancefloatGas resistance in mOhm measured
voltagefloatVoltage measured
currentfloatCurrent measured

Telemetry

message description

Types of Measurements the telemetry module is equipped to handle

FieldTypeDescription
timefixed32This is usually not sent over the mesh (to save space), but it is sent from the phone so that the local device can set its RTC If it is sent over the mesh (because there are devices on the mesh without GPS), it will only be sent by devices which has a hardware GPS clock (IE Mobile Phone). seconds since 1970
oneof variant.device_metricsDeviceMetricsKey native device metrics such as battery level
oneof variant.environment_metricsEnvironmentMetricsWeather station or other environmental metrics

TelemetrySensorType

enum description

TODO: REPLACE

NameNumberDescription
NotSet0No external telemetry sensor explicitly set
BME2801High accuracy temperature, pressure, humidity
BME6802High accuracy temperature, pressure, humidity, and air resistance
MCP98083Very high accuracy temperature
INA2604Moderate accuracy current and voltage
INA2195Moderate accuracy current and voltage
BMP2806High accuracy temperature and pressure