| 
									
										
										
										
											2020-11-28 02:40:47 +00:00
										 |  |  | syntax = "proto3";
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-17 11:03:10 +00:00
										 |  |  | package meshtastic;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-06 16:14:04 +00:00
										 |  |  | option csharp_namespace = "Meshtastic.Protobufs";
 | 
					
						
							| 
									
										
										
										
											2023-05-20 09:29:34 +00:00
										 |  |  | option go_package = "github.com/meshtastic/go/generated";
 | 
					
						
							|  |  |  | option java_outer_classname = "Portnums";
 | 
					
						
							|  |  |  | option java_package = "com.geeksville.mesh";
 | 
					
						
							| 
									
										
										
										
											2023-01-21 15:26:47 +00:00
										 |  |  | option swift_prefix = "";
 | 
					
						
							| 
									
										
										
										
											2020-12-07 11:49:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-29 02:11:10 +00:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * 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
 | 
					
						
							| 
									
										
										
										
											2021-04-20 09:08:28 +00:00
										 |  |  |  * master table.
 | 
					
						
							|  |  |  |  * PortNums should be assigned in the following range:
 | 
					
						
							| 
									
										
										
										
											2021-01-29 02:11:10 +00:00
										 |  |  |  * 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 #
 | 
					
						
							| 
									
										
										
										
											2021-02-23 23:15:20 +00:00
										 |  |  |  * We have change to this 'portnum' based scheme for specifying app handlers for particular payloads.
 | 
					
						
							| 
									
										
										
										
											2021-01-29 02:11:10 +00:00
										 |  |  |  * This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.
 | 
					
						
							|  |  |  |  */
 | 
					
						
							| 
									
										
										
										
											2020-11-28 02:40:47 +00:00
										 |  |  | enum PortNum {
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Deprecated: 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
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: binary undefined
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   UNKNOWN_APP = 0;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * A 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)
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: UTF-8 Plaintext (?)
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   TEXT_MESSAGE_APP = 1;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * Reserved for built-in GPIO/example app.
 | 
					
						
							|  |  |  |    * See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   REMOTE_HARDWARE_APP = 2;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * The built-in position messaging app.
 | 
					
						
							| 
									
										
										
										
											2024-03-02 22:50:39 +00:00
										 |  |  |    * Payload is a Position message.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   POSITION_APP = 3;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * The built-in user info app.
 | 
					
						
							| 
									
										
										
										
											2024-03-02 22:50:39 +00:00
										 |  |  |    * Payload is a User message.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   NODEINFO_APP = 4;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * Protocol control packets for mesh protocol use.
 | 
					
						
							| 
									
										
										
										
											2024-03-02 22:50:39 +00:00
										 |  |  |    * Payload is a Routing message.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   ROUTING_APP = 5;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * Admin control packets.
 | 
					
						
							| 
									
										
										
										
											2024-03-02 22:50:39 +00:00
										 |  |  |    * Payload is a AdminMessage message.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   ADMIN_APP = 6;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-24 04:03:32 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Compressed TEXT_MESSAGE payloads.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: UTF-8 Plaintext (?) with Unishox2 Compression
 | 
					
						
							|  |  |  |    * NOTE: The Device Firmware converts a TEXT_MESSAGE_APP to TEXT_MESSAGE_COMPRESSED_APP if the compressed
 | 
					
						
							|  |  |  |    * payload is shorter. There's no need for app developers to do this themselves. Also the firmware will decompress
 | 
					
						
							|  |  |  |    * any incoming TEXT_MESSAGE_COMPRESSED_APP payload and convert to TEXT_MESSAGE_APP.
 | 
					
						
							| 
									
										
										
										
											2022-05-24 04:03:32 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   TEXT_MESSAGE_COMPRESSED_APP = 7;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-04 01:02:01 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Waypoint payloads.
 | 
					
						
							| 
									
										
										
										
											2024-03-02 22:50:39 +00:00
										 |  |  |    * Payload is a Waypoint message.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2022-06-04 01:02:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   WAYPOINT_APP = 8;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-29 12:17:21 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Audio Payloads.
 | 
					
						
							| 
									
										
										
										
											2022-11-02 12:46:35 +00:00
										 |  |  |    * Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: codec2 audio frames
 | 
					
						
							|  |  |  |    * NOTE: audio frames contain a 3 byte header (0xc0 0xde 0xc2) and a one byte marker for the decompressed bitrate.
 | 
					
						
							|  |  |  |    * This marker comes from the 'moduleConfig.audio.bitrate' enum minus one.
 | 
					
						
							| 
									
										
										
										
											2022-11-02 12:46:35 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   AUDIO_APP = 9;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-18 12:43:31 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Same as Text Message but originating from Detection Sensor Module.
 | 
					
						
							| 
									
										
										
										
											2023-09-26 11:33:37 +00:00
										 |  |  |    * NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9
 | 
					
						
							| 
									
										
										
										
											2023-08-18 12:43:31 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   DETECTION_SENSOR_APP = 10;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Provides a 'ping' service that replies to any packet it receives.
 | 
					
						
							| 
									
										
										
										
											2022-02-27 08:58:46 +00:00
										 |  |  |    * Also serves as a small example module.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: ASCII Plaintext
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   REPLY_APP = 32;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * Used for the python IP tunnel feature
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: IP Packet. Handled by the python API, firmware ignores this one and pases on.
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   IP_TUNNEL_APP = 33;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-17 13:36:48 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Paxcounter lib included in the firmware
 | 
					
						
							|  |  |  |    * ENCODING: protobuf
 | 
					
						
							|  |  |  |    */
 | 
					
						
							|  |  |  |   PAXCOUNTER_APP = 34;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-21 22:39:30 +00:00
										 |  |  |   /*
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    * Provides 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.
 | 
					
						
							| 
									
										
										
										
											2022-03-09 07:06:09 +00:00
										 |  |  |    * Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: binary undefined
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   SERIAL_APP = 64;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * STORE_FORWARD_APP (Work in Progress)
 | 
					
						
							|  |  |  |    * Maintained by Jm Casler (MC Hamster) : jm@casler.org
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   STORE_FORWARD_APP = 65;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							| 
									
										
										
										
											2022-03-01 03:34:20 +00:00
										 |  |  |    * Optional port for messages for the range test module.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: ASCII Plaintext
 | 
					
						
							| 
									
										
										
										
											2023-09-26 11:33:37 +00:00
										 |  |  |    * NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   RANGE_TEST_APP = 66;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							| 
									
										
										
										
											2022-02-27 04:13:18 +00:00
										 |  |  |    * Provides a format to send and receive telemetry data from the Meshtastic network.
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    * Maintained by Charles Crossan (crossan007) : crossan007@gmail.com
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							| 
									
										
										
										
											2022-02-27 04:13:18 +00:00
										 |  |  |   TELEMETRY_APP = 67;
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * Experimental 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
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: arrays of int64 fields
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   ZPS_APP = 68;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-01 10:16:04 +00:00
										 |  |  |   /*
 | 
					
						
							| 
									
										
										
										
											2023-05-20 09:29:34 +00:00
										 |  |  |    * Used to let multiple instances of Linux native applications communicate
 | 
					
						
							| 
									
										
										
										
											2022-10-01 10:16:04 +00:00
										 |  |  |    * as if they did using their LoRa chip.
 | 
					
						
							| 
									
										
										
										
											2023-05-20 09:29:34 +00:00
										 |  |  |    * Maintained by GitHub user GUVWAF.
 | 
					
						
							|  |  |  |    * Project files at https://github.com/GUVWAF/Meshtasticator
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf (?)
 | 
					
						
							| 
									
										
										
										
											2022-10-01 10:16:04 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   SIMULATOR_APP = 69;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-05 19:30:35 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Provides a traceroute functionality to show the route a packet towards
 | 
					
						
							|  |  |  |    * a certain destination would take on the mesh.
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2022-12-05 19:30:35 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   TRACEROUTE_APP = 70;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-06 03:40:34 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Aggregates edge info for the network by sending out a list of each node's neighbors
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: Protobuf
 | 
					
						
							| 
									
										
										
										
											2023-03-06 03:40:34 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   NEIGHBORINFO_APP = 71;
 | 
					
						
							| 
									
										
										
										
											2024-02-02 01:11:15 +00:00
										 |  |  |   
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * ATAK Plugin
 | 
					
						
							|  |  |  |    * Portnum for payloads from the official Meshtastic ATAK plugin
 | 
					
						
							|  |  |  |    */
 | 
					
						
							|  |  |  |   ATAK_PLUGIN = 72;
 | 
					
						
							| 
									
										
										
										
											2023-03-06 03:40:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-09 16:06:24 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Provides unencrypted information about a node for consumption by a map via MQTT
 | 
					
						
							|  |  |  |    */
 | 
					
						
							|  |  |  |   MAP_REPORT_APP = 73;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |   /*
 | 
					
						
							|  |  |  |    * Private applications should use portnums >= 256.
 | 
					
						
							|  |  |  |    * To simplify initial development and testing you can use "PRIVATE_APP"
 | 
					
						
							| 
									
										
										
										
											2022-10-31 08:51:54 +00:00
										 |  |  |    * in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh))
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   PRIVATE_APP = 256;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							| 
									
										
										
										
											2022-02-27 08:58:46 +00:00
										 |  |  |    * ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder
 | 
					
						
							| 
									
										
										
										
											2023-08-03 12:19:56 +00:00
										 |  |  |    * ENCODING: libcotshrink
 | 
					
						
							| 
									
										
										
										
											2021-11-30 19:45:01 +00:00
										 |  |  |    */
 | 
					
						
							|  |  |  |   ATAK_FORWARDER = 257;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /*
 | 
					
						
							|  |  |  |    * Currently we limit port nums to no higher than this value
 | 
					
						
							|  |  |  |    */
 | 
					
						
							|  |  |  |   MAX = 511;
 | 
					
						
							| 
									
										
										
										
											2023-08-18 12:43:31 +00:00
										 |  |  | }
 |