diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6eba5cc..8db5e30 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,3 +10,21 @@ - [ ] All top level messages commented - [ ] All enum members have unique descriptions + + +### New Hardware Model Acceptance Policy + +Due to limited availability and ongoing support, new Hardware Models will only be accepted from [Meshtastic Backers and Partners](https://meshtastic.com/). The Meshtastic team reserves the right to make exceptions to this policy. + +#### Alternative for Community Contributors + +You are welcome to use one of the existing DIY hardware models in your PlatformIO environment and create a pull request in the firmware project. Please note the following conditions: + +- The device will **not** be officially supported by the core Meshtastic team. +- The device will **not** appear in the [Web Flasher](https://flasher.meshtastic.org/) or Github release assets. +- You will be responsible for ongoing maintenance and support. +- Community-contributed / DIY hardware models are considered experimental and will likely have limited or no testing. + +#### Getting Official Support + +To have your hardware model officially supported and included in the Meshtastic ecosystem, consider becoming a Meshtastic Backer or Partner. Visit [meshtastic.com](https://meshtastic.com/) for more information about partnership opportunities. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/README.md b/README.md index 9e36197..f837862 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,4 @@ The [Protobuf](https://developers.google.com/protocol-buffers) message definitio ## Stats ![Alt](https://repobeats.axiom.co/api/embed/47e9ee1d81d9c0fdd2b4b5b4c673adb1756f6db5.svg "Repobeats analytics image") + diff --git a/meshtastic/admin.options b/meshtastic/admin.options index 022c4fd..4a28ff2 100644 --- a/meshtastic/admin.options +++ b/meshtastic/admin.options @@ -2,6 +2,11 @@ *AdminMessage.session_passkey max_size:8 +*AdminMessage.InputEvent.event_code int_size:8 +*AdminMessage.InputEvent.kb_char int_size:8 +*AdminMessage.InputEvent.touch_x int_size:16 +*AdminMessage.InputEvent.touch_y int_size:16 + *AdminMessage.set_canned_message_module_messages max_size:201 *AdminMessage.get_canned_message_module_messages_response max_size:201 *AdminMessage.delete_file_request max_size:201 diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index e9691ed..c93a964 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -74,7 +74,7 @@ message AdminMessage { SECURITY_CONFIG = 7; /* - * + * Session key config */ SESSIONKEY_CONFIG = 8; @@ -166,6 +166,28 @@ message AdminMessage { SD = 1; } + /* + * Input event message to be sent to the node. + */ + message InputEvent { + /* + * The input event code + */ + uint32 event_code = 1; + /* + * Keyboard character code + */ + uint32 kb_char = 2; + /* + * The touch X coordinate + */ + uint32 touch_x = 3; + /* + * The touch Y coordinate + */ + uint32 touch_y = 4; + } + /* * TODO: REPLACE */ @@ -296,6 +318,13 @@ message AdminMessage { * Remove backups of the node's preferences */ BackupLocation remove_backup_preferences = 26; + + /* + * Send an input event to the node. + * This is used to trigger physical input events like button presses, touch events, etc. + */ + InputEvent send_input_event = 27; + /* * Set the owner for this node */ @@ -397,6 +426,16 @@ message AdminMessage { */ bool commit_edit_settings = 65; + /* + * Add a contact (User) to the nodedb + */ + SharedContact add_contact = 66; + + /* + * Initiate or respond to a key verification request + */ + KeyVerificationAdmin key_verification = 67; + /* * Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared. */ @@ -472,3 +511,70 @@ message NodeRemoteHardwarePinsResponse { */ repeated NodeRemoteHardwarePin node_remote_hardware_pins = 1; } + +message SharedContact { + /* + * The node number of the contact + */ + uint32 node_num = 1; + + /* + * The User of the contact + */ + User user = 2; + + /* + * Add this contact to the blocked / ignored list + */ + bool should_ignore = 3; +} + + /* + * This message is used by a client to initiate or complete a key verification + */ +message KeyVerificationAdmin { + /* + * Three stages of this request. + */ + enum MessageType { + + /* + * This is the first stage, where a client initiates + */ + INITIATE_VERIFICATION = 0; + + /* + * After the nonce has been returned over the mesh, the client prompts for the security number + * And uses this message to provide it to the node. + */ + PROVIDE_SECURITY_NUMBER = 1; + + /* + * Once the user has compared the verification message, this message notifies the node. + */ + DO_VERIFY = 2; + + /* + * This is the cancel path, can be taken at any point + */ + DO_NOT_VERIFY = 3; + + } + + MessageType message_type = 1; + + /* + * The nodenum we're requesting + */ + uint32 remote_nodenum = 2; + + /* + * The nonce is used to track the connection + */ + uint64 nonce = 3; + + /* + * The 4 digit code generated by the remote node, and communicated outside the mesh + */ + optional uint32 security_number = 4; +} diff --git a/meshtastic/config.options b/meshtastic/config.options index 9310cf0..3f6d81c 100644 --- a/meshtastic/config.options +++ b/meshtastic/config.options @@ -1,5 +1,7 @@ # longest current is 45 chars, plan with a bit of buffer *DeviceConfig.tzdef max_size:65 +*DeviceConfig.buzzer_mode int_size:8 + *NetworkConfig.wifi_ssid max_size:33 *NetworkConfig.wifi_psk max_size:65 diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 95eb13e..d587207 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -41,7 +41,7 @@ message Config { * Description: Combination of both ROUTER and CLIENT. Not for mobile devices. * Deprecated in v2.3.15 because improper usage is impacting public meshes: Use ROUTER or CLIENT instead. */ - + ROUTER_CLIENT = 3 [deprecated = true]; /* @@ -150,6 +150,36 @@ message Config { CORE_PORTNUMS_ONLY = 5; } + /* + * Defines buzzer behavior for audio feedback + */ + enum BuzzerMode { + /* + * Default behavior. + * Buzzer is enabled for all audio feedback including button presses and alerts. + */ + ALL_ENABLED = 0; + + /* + * Disabled. + * All buzzer audio feedback is disabled. + */ + DISABLED = 1; + + /* + * Notifications Only. + * Buzzer is enabled only for notifications and alerts, but not for button presses. + * External notification config determines the specifics of the notification behavior. + */ + NOTIFICATIONS_ONLY = 2; + + /* + * Non-notification system buzzer tones only. + * Buzzer is enabled only for non-notification tones such as button presses, startup, shutdown, but not for alerts. + */ + SYSTEM_ONLY = 3; + } + /* * Sets the role of node */ @@ -207,9 +237,15 @@ message Config { string tzdef = 11; /* - * If true, disable the default blinking LED (LED_PIN) behavior on the device + * If true, disable the default blinking LED (LED_PIN) behavior on the device */ bool led_heartbeat_disabled = 12; + + /* + * Controls buzzer behavior for audio feedback + * Defaults to ENABLED + */ + BuzzerMode buzzer_mode = 13; } /* @@ -380,7 +416,7 @@ message Config { */ message PowerConfig { /* - * Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. + * Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. * Don't use this setting if you want to use your device with the phone apps or are using a device without a user button. * Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles */ @@ -434,7 +470,7 @@ message Config { * If non-zero, we want powermon log outputs. With the particular (bitfield) sources enabled. * Note: we picked an ID of 32 so that lower more efficient IDs can be used for more frequently used options. */ - uint64 powermon_enables = 32; + uint64 powermon_enables = 32; } /* @@ -492,7 +528,7 @@ message Config { string wifi_psk = 4; /* - * NTP server to use if WiFi is conneced, defaults to `0.pool.ntp.org` + * NTP server to use if WiFi is conneced, defaults to `meshtastic.pool.ntp.org` */ string ntp_server = 5; @@ -521,6 +557,11 @@ message Config { */ uint32 enabled_protocols = 10; + /* + * Enable/Disable ipv6 support + */ + bool ipv6_enabled = 11; + /* * Available flags auxiliary network protocols */ @@ -603,17 +644,17 @@ message Config { */ enum OledType { /* - * Default / Auto + * Default / Autodetect */ OLED_AUTO = 0; /* - * Default / Auto + * Default / Autodetect */ OLED_SSD1306 = 1; /* - * Default / Auto + * Default / Autodetect */ OLED_SH1106 = 2; @@ -621,6 +662,11 @@ message Config { * Can not be auto detected but set by proto. Used for 128x128 screens */ OLED_SH1107 = 3; + + /* + * Can not be auto detected but set by proto. Used for 128x64 screens + */ + OLED_SH1107_128_64 = 4; } /* @@ -850,21 +896,26 @@ message Config { * Singapore 923mhz */ SG_923 = 18; - + /* * Philippines 433mhz */ PH_433 = 19; - + /* * Philippines 868mhz */ PH_868 = 20; - + /* * Philippines 915mhz */ PH_915 = 21; + /* + * Australia / New Zealand 433MHz + */ + ANZ_433 = 22; + } /* @@ -1139,4 +1190,4 @@ message Config { SessionkeyConfig sessionkey = 9; DeviceUIConfig device_ui = 10; } -} \ No newline at end of file +} diff --git a/meshtastic/device_ui.options b/meshtastic/device_ui.options index 5aa61d0..67bee23 100644 --- a/meshtastic/device_ui.options +++ b/meshtastic/device_ui.options @@ -2,9 +2,10 @@ *DeviceUIConfig.screen_timeout int_size:16 *DeviceUIConfig.ring_tone_id int_size:8 *DeviceUIConfig.calibration_data max_size:16 +*DeviceUIConfig.compass_mode int_size:8 *NodeFilter.node_name max_size:16 *NodeFilter.hops_away int_size:8 *NodeFilter.channel int_size:8 *NodeHighlight.node_name max_size:16 *GeoPoint.zoom int_size:8 -*Map.style max_size:20 +*Map.style max_size:20 \ No newline at end of file diff --git a/meshtastic/device_ui.proto b/meshtastic/device_ui.proto index 9ac40a3..b943600 100644 --- a/meshtastic/device_ui.proto +++ b/meshtastic/device_ui.proto @@ -19,24 +19,24 @@ message DeviceUIConfig { uint32 version = 1; /* - * TFT display brightness 1..255 + * TFT display brightness 1..255 */ uint32 screen_brightness = 2; /* - * Screen timeout 0..900 + * Screen timeout 0..900 */ uint32 screen_timeout = 3; /* - * Screen/Settings lock enabled + * Screen/Settings lock enabled */ bool screen_lock = 4; bool settings_lock = 5; uint32 pin_code = 6; /* - * Color theme + * Color theme */ Theme theme = 7; @@ -48,12 +48,12 @@ message DeviceUIConfig { uint32 ring_tone_id = 10; /* - * Localization + * Localization */ Language language = 11; /* - * Node list filter + * Node list filter */ NodeFilter node_filter = 12; @@ -71,6 +71,23 @@ message DeviceUIConfig { * Map related data */ Map map_data = 15; + + /* + * Compass mode + */ + CompassMode compass_mode = 16; + + /* + * RGB color for BaseUI + * 0xRRGGBB format, e.g. 0xFF0000 for red + */ + uint32 screen_rgb_color = 17; + + /* + * Clockface analog style + * true for analog clockface, false for digital clockface + */ + bool is_clockface_analog = 18; } @@ -84,32 +101,32 @@ message NodeFilter { * Filter offline nodes */ bool offline_switch = 2; - + /* * Filter nodes w/o public key */ bool public_key_switch = 3; - + /* * Filter based on hops away */ int32 hops_away = 4; - + /* * Filter nodes w/o position */ bool position_switch = 5; - + /* * Filter nodes by matching name string */ string node_name = 6; - + /* * Filter based on channel */ int32 channel = 7; - + } message NodeHighlight { @@ -122,7 +139,7 @@ message NodeHighlight { * Highlight nodes w/ position */ bool position_switch = 2; - + /* * Highlight nodes w/ telemetry data */ @@ -132,12 +149,12 @@ message NodeHighlight { * Highlight nodes w/ iaq data */ bool iaq_switch = 4; - + /* * Highlight nodes by matching name string */ string node_name = 5; - + } message GeoPoint { @@ -147,10 +164,10 @@ message GeoPoint { int32 zoom = 1; /* - * Coordinate: latitude + * Coordinate: latitude */ int32 latitude = 2; - + /* * Coordinate: longitude */ @@ -167,13 +184,30 @@ message Map { * Map tile style */ string style = 2; - + /* * Map scroll follows GPS */ bool follow_gps = 3; } +enum CompassMode { + /* + * Compass with dynamic ring and heading + */ + DYNAMIC = 0; + + /* + * Compass with fixed ring and heading + */ + FIXED_RING = 1; + + /* + * Compass with heading and freeze option + */ + FREEZE_HEADING = 2; +} + enum Theme { /* * Dark @@ -227,17 +261,17 @@ enum Language { * Swedish */ SWEDISH = 6; - + /* * Finnish */ FINNISH = 7; - + /* * Polish */ POLISH = 8; - + /* * Turkish */ @@ -273,6 +307,16 @@ enum Language { */ SLOVENIAN = 15; + /* + * Ukrainian + */ + UKRAINIAN = 16; + + /* + * Bulgarian + */ + BULGARIAN = 17; + /* * Simplified Chinese (experimental) */ @@ -283,4 +327,3 @@ enum Language { */ TRADITIONAL_CHINESE = 31; } - diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 481bfba..acde0f1 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -94,6 +94,11 @@ message UserLite { * This is sent out to other nodes on the mesh to allow them to compute a shared secret key. */ bytes public_key = 7; + + /* + * Whether or not the node can be messaged + */ + optional bool is_unmessagable = 9; } message NodeInfoLite { @@ -156,9 +161,15 @@ message NodeInfoLite { bool is_ignored = 11; /* - * Last byte of the node number of the node that should be used as the next hop to reach this node. + * Last byte of the node number of the node that should be used as the next hop to reach this node. */ uint32 next_hop = 12; + + /* + * Bitfield for storing booleans. + * LSB 0 is_key_manually_verified + */ + uint32 bitfield = 13; } /* @@ -288,4 +299,4 @@ message ChannelFile { * The node's user (owner) information */ User owner = 6; -} \ No newline at end of file +} diff --git a/meshtastic/interdevice.proto b/meshtastic/interdevice.proto index 5b890b2..54e950f 100644 --- a/meshtastic/interdevice.proto +++ b/meshtastic/interdevice.proto @@ -41,4 +41,4 @@ message InterdeviceMessage { string nmea = 1; SensorData sensor = 2; } -} \ No newline at end of file +} diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index e2c905d..49dd597 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -58,6 +58,15 @@ *ClientNotification.message max_size:400 +*KeyVerificationNumberInform.remote_longname max_size:40 +*KeyVerificationNumberRequest.remote_longname max_size:40 +*KeyVerificationFinal.remote_longname max_size:40 +*KeyVerificationFinal.verification_characters max_size:10 + +*KeyVerification.hash1 max_size:32 +*KeyVerification.hash2 max_size:32 + + # MyMessage.name max_size:40 # or fixed_length or fixed_count, or max_count diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 502e65a..bf0d6d6 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -339,7 +339,7 @@ enum HardwareModel { * Heltec HRU-3601: https://heltec.org/project/hru-3601/ */ HELTEC_HRU_3601 = 23; - + /* * Heltec Wireless Bridge */ @@ -542,7 +542,7 @@ enum HardwareModel { CDEBYTE_EORA_S3 = 61; /* - * TWC_MESH_V4 + * TWC_MESH_V4 * Adafruit NRF52840 feather express with SX1262, SSD1306 OLED and NEO6M GPS */ TWC_MESH_V4 = 62; @@ -558,27 +558,27 @@ enum HardwareModel { * ESP32-D0WDQ6 With SX1276/SKY66122, SSD1306 OLED and No GPS */ RADIOMASTER_900_BANDIT_NANO = 64; - + /* * Heltec Capsule Sensor V3 with ESP32-S3 CPU, Portable LoRa device that can replace GNSS modules or sensors */ HELTEC_CAPSULE_SENSOR_V3 = 65; - + /* * Heltec Vision Master T190 with ESP32-S3 CPU, and a 1.90 inch TFT display */ HELTEC_VISION_MASTER_T190 = 66; - + /* * Heltec Vision Master E213 with ESP32-S3 CPU, and a 2.13 inch E-Ink display */ HELTEC_VISION_MASTER_E213 = 67; - + /* * Heltec Vision Master E290 with ESP32-S3 CPU, and a 2.9 inch E-Ink display */ HELTEC_VISION_MASTER_E290 = 68; - + /* * Heltec Mesh Node T114 board with nRF52840 CPU, and a 1.14 inch TFT display, Ultimate low-power design, * specifically adapted for the Meshtatic project @@ -594,7 +594,7 @@ enum HardwareModel { * Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. */ TRACKER_T1000_E = 71; - + /* * RAK3172 STM32WLE5 Module (https://store.rakwireless.com/products/wisduo-lpwan-module-rak3172) */ @@ -626,7 +626,7 @@ enum HardwareModel { * */ RP2040_FEATHER_RFM95 = 76; - + /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */ M5STACK_COREBASIC = 77; M5STACK_CORE2 = 78; @@ -636,7 +636,7 @@ enum HardwareModel { /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */ M5STACK_CORES3 = 80; - + /* Seeed XIAO S3 DK*/ SEEED_XIAO_S3 = 81; @@ -675,7 +675,101 @@ enum HardwareModel { * https://www.loraitalia.it */ MESHLINK = 87; + + /* + * Seeed XIAO nRF52840 + Wio SX1262 kit + */ + XIAO_NRF52_KIT = 88; + /* + * Elecrow ThinkNode M1 & M2 + * https://www.elecrow.com/wiki/ThinkNode-M1_Transceiver_Device(Meshtastic)_Power_By_nRF52840.html + * https://www.elecrow.com/wiki/ThinkNode-M2_Transceiver_Device(Meshtastic)_Power_By_NRF52840.html (this actually uses ESP32-S3) + */ + THINKNODE_M1 = 89; + THINKNODE_M2 = 90; + + /* + * Lilygo T-ETH-Elite + */ + T_ETH_ELITE = 91; + + /* + * Heltec HRI-3621 industrial probe + */ + HELTEC_SENSOR_HUB = 92; + + /* + * Reserved Fried Chicken ID for future use + */ + RESERVED_FRIED_CHICKEN = 93; + + /* + * Heltec Magnetic Power Bank with Meshtastic compatible + */ + HELTEC_MESH_POCKET = 94; + + /* + * Seeed Solar Node + */ + SEEED_SOLAR_NODE = 95; + + /* + * NomadStar Meteor Pro https://nomadstar.ch/ + */ + NOMADSTAR_METEOR_PRO = 96; + + /* + * Elecrow CrowPanel Advance models, ESP32-S3 and TFT with SX1262 radio plugin + */ + CROWPANEL = 97; + + /** + * Lilygo LINK32 board with sensors + */ + LINK_32 = 98; + + /** + * Seeed Tracker L1 + */ + SEEED_WIO_TRACKER_L1 = 99; + + /** + * Seeed Tracker L1 EINK driver + */ + SEEED_WIO_TRACKER_L1_EINK = 100; + + /* + * Reserved ID for future and past use + */ + QWANTZ_TINY_ARMS = 101; + + /** + * Lilygo T-Deck Pro + */ + T_DECK_PRO = 102; + + /** + * Lilygo TLora Pager + */ + T_LORA_PAGER = 103; + + /** + * GAT562 Mesh Trial Tracker + */ + GAT562_MESH_TRIAL_TRACKER = 104; + + /** + * RAKwireless WisMesh Tag + */ + WISMESH_TAG = 105; + + /** + * RAKwireless WisBlock Core RAK3312 https://docs.rakwireless.com/product-categories/wisduo/rak3112-module/overview/ + */ + RAK3312 = 106; + + /* * ------------------------------------------------------------------------------------------------------------------------------------------ @@ -759,6 +853,11 @@ message User { * This is sent out to other nodes on the mesh to allow them to compute a shared secret key. */ bytes public_key = 8; + + /* + * Whether or not the node can be messaged + */ + optional bool is_unmessagable = 9; } /* @@ -959,6 +1058,28 @@ message Data { optional uint32 bitfield = 9; } +/* + * The actual over-the-mesh message doing KeyVerification + */ +message KeyVerification { + + /* + * random value Selected by the requesting node + */ + uint64 nonce = 1; + + /* + * The final authoritative hash, only to be sent by NodeA at the end of the handshake + */ + bytes hash1 = 2; + + /* + * The intermediary hash (actually derived from hash1), + * sent from NodeB to NodeA in response to the initial message. + */ + bytes hash2 = 3; +} + /* * Waypoint message, used to share arbitrary locations across the mesh */ @@ -1097,12 +1218,12 @@ message MeshPacket { /* * Higher priority for specific message types (portnums) to distinguish between other reliable packets. - */ + */ HIGH = 100; /* * Higher priority alert message used for critical alerts which take priority over other reliable packets. - */ + */ ALERT = 110; /* @@ -1267,7 +1388,7 @@ message MeshPacket { bool pki_encrypted = 17; /* - * Last byte of the node number of the node that should be used as the next hop in routing. + * Last byte of the node number of the node that should be used as the next hop in routing. * Set by the firmware internally, clients are not supposed to set this. */ uint32 next_hop = 18; @@ -1407,6 +1528,13 @@ message NodeInfo { * Persists between NodeDB internal clean ups */ bool is_ignored = 11; + + /* + * True if node public key has been verified. + * Persists between NodeDB internal clean ups + * LSB 0 of the bitfield + */ + bool is_key_manually_verified = 12; } /* @@ -1741,8 +1869,33 @@ message ClientNotification { * The message body of the notification */ string message = 4; + + oneof payload_variant { + KeyVerificationNumberInform key_verification_number_inform = 11; + KeyVerificationNumberRequest key_verification_number_request = 12; + KeyVerificationFinal key_verification_final = 13; + DuplicatedPublicKey duplicated_public_key = 14; + LowEntropyKey low_entropy_key = 15; + } } +message KeyVerificationNumberInform { + uint64 nonce = 1; + string remote_longname = 2; + uint32 security_number = 3; +} +message KeyVerificationNumberRequest { + uint64 nonce = 1; + string remote_longname = 2; +} +message KeyVerificationFinal { + uint64 nonce = 1; + string remote_longname = 2; + bool isSender = 3; + string verification_characters = 4; +} +message DuplicatedPublicKey {} +message LowEntropyKey {} /* * Individual File info for the device */ @@ -2015,6 +2168,16 @@ enum ExcludedModules { * Paxcounter module */ PAXCOUNTER_CONFIG = 0x1000; + + /* + * Bluetooth config (not technically a module, but used to indicate bluetooth capabilities) + */ + BLUETOOTH_CONFIG = 0x2000; + + /* + * Network config (not technically a module, but used to indicate network capabilities) + */ + NETWORK_CONFIG = 0x4000; } /* diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index aa30abc..e6c1694 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -95,6 +95,11 @@ message ModuleConfig { * Bits of precision for the location sent (default of 32 is full precision). */ uint32 position_precision = 2; + + /* + * Whether we have opted-in to report our location to the map + */ + bool should_report_location = 3; } /* @@ -136,7 +141,7 @@ message ModuleConfig { * Whether in addition to sending it to MQTT and the PhoneAPI, our NeighborInfo should be transmitted over LoRa. * Note that this is not available on a channel with default key and name. */ - bool transmit_over_lora = 3; + bool transmit_over_lora = 3; } /* @@ -331,6 +336,9 @@ message ModuleConfig { CALTOPO = 5; // Ecowitt WS85 weather station WS85 = 6; + // VE.Direct is a serial protocol used by Victron Energy products + // https://beta.ivc.no/wiki/index.php/Victron_VE_Direct_DIY_Cable + VE_DIRECT = 7; } /* diff --git a/meshtastic/mqtt.proto b/meshtastic/mqtt.proto index 2dbc820..4edf0c4 100644 --- a/meshtastic/mqtt.proto +++ b/meshtastic/mqtt.proto @@ -103,4 +103,10 @@ message MapReport { * Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) */ uint32 num_online_local_nodes = 13; + + /* + * User has opted in to share their location (map report) with the mqtt server + * Controlled by map_report.should_report_location + */ + bool has_opted_report_location = 14; } diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index a4b55e5..e388a6f 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -110,6 +110,11 @@ enum PortNum { */ ALERT_APP = 11; + /* + * Module/port for handling key verification requests. + */ + KEY_VERIFICATION_APP = 12; + /* * Provides a 'ping' service that replies to any packet it receives. * Also serves as a small example module. @@ -206,6 +211,19 @@ enum PortNum { */ POWERSTRESS_APP = 74; + /* + * Reticulum Network Stack Tunnel App + * ENCODING: Fragmented RNS Packet. Handled by Meshtastic RNS interface + */ + RETICULUM_TUNNEL_APP = 76; + + /* + * App for transporting Cayenne Low Power Payload, popular for LoRaWAN sensor nodes. Offers ability to send + * arbitrary telemetry over meshtastic that is not covered by telemetry.proto + * ENCODING: CayenneLLP + */ + CAYENNE_APP = 77; + /* * Private applications should use portnums >= 256. * To simplify initial development and testing you can use "PRIVATE_APP" @@ -223,4 +241,4 @@ enum PortNum { * Currently we limit port nums to no higher than this value */ MAX = 511; -} \ No newline at end of file +} diff --git a/meshtastic/powermon.proto b/meshtastic/powermon.proto index 5f65b51..dbb89b9 100644 --- a/meshtastic/powermon.proto +++ b/meshtastic/powermon.proto @@ -101,4 +101,4 @@ message PowerStressMessage { Opcode cmd = 1; float num_seconds = 2; -} \ No newline at end of file +} diff --git a/meshtastic/telemetry.options b/meshtastic/telemetry.options index 79b1f12..3c7238a 100644 --- a/meshtastic/telemetry.options +++ b/meshtastic/telemetry.options @@ -3,9 +3,15 @@ *EnvironmentMetrics.iaq int_size:16 *EnvironmentMetrics.wind_direction int_size:16 +*EnvironmentMetrics.soil_moisture int_size:8 *LocalStats.num_online_nodes int_size:16 *LocalStats.num_total_nodes int_size:16 *HealthMetrics.heart_bpm int_size:8 *HealthMetrics.spO2 int_size:8 + +*HostMetrics.load1 int_size:16 +*HostMetrics.load5 int_size:16 +*HostMetrics.load15 int_size:16 +*HostMetrics.user_string max_size:200 diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 4b5b3f2..c39a586 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -72,7 +72,7 @@ message EnvironmentMetrics { */ optional float current = 6; - /* + /* * relative scale IAQ value as measured by Bosch BME680 . value 0-500. * Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here. */ @@ -144,6 +144,15 @@ message EnvironmentMetrics { */ optional float rainfall_24h = 20; + /* + * Soil moisture measured (% 1-100) + */ + optional uint32 soil_moisture = 21; + + /* + * Soil temperature measured (*C) + */ + optional float soil_temperature = 22; } /* @@ -179,6 +188,56 @@ message PowerMetrics { * Current (Ch3) */ optional float ch3_current = 6; + + /* + * Voltage (Ch4) + */ + optional float ch4_voltage = 7; + + /* + * Current (Ch4) + */ + optional float ch4_current = 8; + + /* + * Voltage (Ch5) + */ + optional float ch5_voltage = 9; + + /* + * Current (Ch5) + */ + optional float ch5_current = 10; + + /* + * Voltage (Ch6) + */ + optional float ch6_voltage = 11; + + /* + * Current (Ch6) + */ + optional float ch6_current = 12; + + /* + * Voltage (Ch7) + */ + optional float ch7_voltage = 13; + + /* + * Current (Ch7) + */ + optional float ch7_current = 14; + + /* + * Voltage (Ch8) + */ + optional float ch8_voltage = 15; + + /* + * Current (Ch8) + */ + optional float ch8_current = 16; } /* @@ -244,11 +303,21 @@ message AirQualityMetrics { * 10.0um Particle Count */ optional uint32 particles_100um = 12; - + /* - * 10.0um Particle Count + * CO2 concentration in ppm */ optional uint32 co2 = 13; + + /* + * CO2 sensor temperature in degC + */ + optional float co2_temperature = 14; + + /* + * CO2 sensor relative humidity in % + */ + optional float co2_humidity = 15; } /* @@ -272,7 +341,7 @@ message LocalStats { * Number of packets sent */ uint32 num_packets_tx = 4; - + /* * Number of packets received (both good and bad) */ @@ -309,6 +378,16 @@ message LocalStats { * This will always be zero for ROUTERs/REPEATERs. If this number is high, some other node(s) is/are relaying faster than you. */ uint32 num_tx_relay_canceled = 11; + + /* + * Number of bytes used in the heap + */ + uint32 heap_total_bytes = 12; + + /* + * Number of bytes free in the heap + */ + uint32 heap_free_bytes = 13; } /* @@ -331,6 +410,58 @@ message LocalStats { optional float temperature = 3; } +/* + * Linux host metrics + */ +message HostMetrics { + /* + * Host system uptime + */ + uint32 uptime_seconds = 1; + + /* + * Host system free memory + */ + uint64 freemem_bytes = 2; + + /* + * Host system disk space free for / + */ + uint64 diskfree1_bytes = 3; + + /* + * Secondary system disk space free + */ + optional uint64 diskfree2_bytes = 4; + + /* + * Tertiary disk space free + */ + optional uint64 diskfree3_bytes = 5; + + /* + * Host system one minute load in 1/100ths + */ + uint32 load1 = 6; + + /* + * Host system five minute load in 1/100ths + */ + uint32 load5 = 7; + + /* + * Host system fifteen minute load in 1/100ths + */ + uint32 load15 = 8; + + /* + * Optional User-provided string for arbitrary host system information + * that doesn't make sense as a dedicated entry. + */ + optional string user_string = 9; +} + + /* * Types of Measurements the telemetry module is equipped to handle */ @@ -370,6 +501,11 @@ message Telemetry { * Health telemetry metrics */ HealthMetrics health_metrics = 7; + + /* + * Linux host metrics + */ + HostMetrics host_metrics = 8; } } @@ -491,17 +627,17 @@ enum TelemetrySensorType { * AMS TSL25911FN RGB Light Sensor */ TSL25911FN = 22; - + /* * AHT10 Integrated temperature and humidity sensor */ AHT10 = 23; /* - * DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) + * DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) */ DFROBOT_LARK = 24; - + /* * NAU7802 Scale Chip or compatible */ @@ -528,15 +664,15 @@ enum TelemetrySensorType { CUSTOM_SENSOR = 29; /* - * MAX30102 Pulse Oximeter and Heart-Rate Sensor + * MAX30102 Pulse Oximeter and Heart-Rate Sensor */ MAX30102 = 30; - + /* * MLX90614 non-contact IR temperature sensor */ MLX90614 = 31; - + /* * SCD40/SCD41 CO2, humidity, temperature sensor */ @@ -546,7 +682,7 @@ enum TelemetrySensorType { * ClimateGuard RadSens, radiation, Geiger-Muller Tube */ RADSENS = 33; - + /* * High accuracy current and voltage */ @@ -557,6 +693,30 @@ enum TelemetrySensorType { */ DFROBOT_RAIN = 35; + /* + * Infineon DPS310 High accuracy pressure and temperature + */ + DPS310 = 36; + + /* + * RAKWireless RAK12035 Soil Moisture Sensor Module + */ + RAK12035 = 37; + + /* + * MAX17261 lipo battery gauge + */ + MAX17261 = 38; + + /* + * PCT2075 Temperature Sensor + */ + PCT2075 = 39; + + /* + * ADS1X15 ADC + */ + ADS1X15 = 40; } /* diff --git a/nanopb.proto b/nanopb.proto index 2f27e34..1c107c1 100644 --- a/nanopb.proto +++ b/nanopb.proto @@ -9,6 +9,7 @@ syntax = "proto2"; import "google/protobuf/descriptor.proto"; +option go_package = "github.com/meshtastic/go/generated"; option java_package = "fi.kapsi.koti.jpa.nanopb"; enum FieldType {