diff --git a/.github/workflows/create_tag.yml b/.github/workflows/create_tag.yml index 3305aec..d2302f5 100644 --- a/.github/workflows/create_tag.yml +++ b/.github/workflows/create_tag.yml @@ -21,10 +21,6 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - - name: Checkout master - run: git switch master - - id: version name: Get current version run: | @@ -69,4 +65,4 @@ jobs: # buf_token: ${{ secrets.BUF_TOKEN }} run: | export BUF_TOKEN=${{ secrets.BUF_TOKEN }} - buf push --tag ${{ github.ref_name }} + buf push --tag ${{ steps.version.outputs.NEW_VERSION }} diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 05c975a..bc757d1 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -10,7 +10,6 @@ option swift_prefix = ""; import "meshtastic/channel.proto"; import "meshtastic/config.proto"; -import "meshtastic/device_metadata.proto"; import "meshtastic/mesh.proto"; import "meshtastic/module_config.proto"; import "meshtastic/connection_status.proto"; @@ -257,7 +256,7 @@ message AdminMessage { int32 reboot_ota_seconds = 95; /* - * This message is only supported for the simulator porduino build. + * This message is only supported for the simulator Portduino build. * If received the simulator will exit successfully. */ bool exit_simulator = 96; diff --git a/meshtastic/channel.proto b/meshtastic/channel.proto index ab6e988..05d1dd5 100644 --- a/meshtastic/channel.proto +++ b/meshtastic/channel.proto @@ -9,11 +9,9 @@ option csharp_namespace = "Meshtastic.Protobufs"; option swift_prefix = ""; /* - * 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 + * 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 + * A note about how channel names are shown to users: channelname-X * 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 @@ -23,8 +21,6 @@ option swift_prefix = ""; * 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 @@ -44,7 +40,7 @@ message ChannelSettings { * 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} + * `1` = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01} * `2` through 10 = The default channel key, except with 1 through 9 added to the last byte. * Shown to user as simple1 through 10 */ diff --git a/meshtastic/config.proto b/meshtastic/config.proto index bb6e627..416be4d 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -55,6 +55,12 @@ message Config { * Position Mesh packets will be prioritized higher and sent more frequently by default. */ TRACKER = 5; + + /* + * Sensor device role + * Telemetry Mesh packets will be prioritized higher and sent more frequently by default. + */ + SENSOR = 6; } /* @@ -118,6 +124,11 @@ message Config { * Defaults to 900 Seconds (15 minutes) */ uint32 node_info_broadcast_secs = 7; + + /* + * Treat double tap interrupt on supported accelerometers as a button press if set to true + */ + bool double_tap_as_button_press = 8; } /* @@ -246,7 +257,15 @@ message Config { */ uint32 tx_gpio = 9; + /* + * The minimum distance in meters traveled (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + */ + uint32 broadcast_smart_minimum_distance = 10; + /* + * The minumum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + */ + uint32 broadcast_smart_minimum_interval_secs = 11; } /* @@ -554,6 +573,11 @@ message Config { * Print first line in pseudo-bold? FALSE is original style, TRUE is bold */ bool heading_bold = 9; + + /* + * Should we wake the screen up on accelerometer detected motion or tap + */ + bool wake_on_tap_or_motion = 10; } /* @@ -579,7 +603,7 @@ message Config { EU_433 = 2; /* - * European Union 433mhz + * European Union 868mhz */ EU_868 = 3; @@ -692,7 +716,7 @@ message Config { } /* - * When enabled, the `modem_preset` fields will be adheared to, else the `bandwidth`/`spread_factor`/`coding_rate` + * When enabled, the `modem_preset` fields will be adhered to, else the `bandwidth`/`spread_factor`/`coding_rate` * will be taked from their respective manually defined fields */ bool use_preset = 1; @@ -750,7 +774,7 @@ message Config { bool tx_enabled = 9; /* - * If zero then, use default max legal continuous power (ie. something that won't + * If 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. @@ -758,7 +782,7 @@ message Config { int32 tx_power = 10; /* - * This is controlling the actual hardware frequency the radio is transmitting on. + * This controls the actual hardware frequency the radio transmits on. * Most users should never need to be exposed to this field/concept. * A channel number between 1 and NUM_CHANNELS (whatever the max is in the current region). * If ZERO then the rule is "use the old channel name hash based @@ -792,7 +816,7 @@ message Config { /* * For 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) + * in ignore_incoming will have packets they send dropped on receive (by router.cpp) */ repeated uint32 ignore_incoming = 103; @@ -802,17 +826,17 @@ message Config { enum PairingMode { /* - * Device generates a random pin that will be shown on the screen of the device for pairing + * Device generates a random PIN that will be shown on the screen of the device for pairing */ RANDOM_PIN = 0; /* - * Device requires a specified fixed pin for pairing + * Device requires a specified fixed PIN for pairing */ FIXED_PIN = 1; /* - * Device requires no pin for pairing + * Device requires no PIN for pairing */ NO_PIN = 2; } @@ -828,7 +852,7 @@ message Config { PairingMode mode = 2; /* - * Specified pin for PairingMode.FixedPin + * Specified PIN for PairingMode.FixedPin */ uint32 fixed_pin = 3; diff --git a/meshtastic/connection_status.proto b/meshtastic/connection_status.proto index ee35c9f..76cce6e 100644 --- a/meshtastic/connection_status.proto +++ b/meshtastic/connection_status.proto @@ -39,12 +39,12 @@ message WifiConnectionStatus { NetworkConnectionStatus status = 1; /* - * WiFi access point ssid + * WiFi access point SSID */ string ssid = 2; /* - * Rssi of wireless connection + * RSSI of wireless connection */ int32 rssi = 3; } @@ -89,12 +89,12 @@ message NetworkConnectionStatus { */ message BluetoothConnectionStatus { /* - * The pairing pin for bluetooth + * The pairing PIN for bluetooth */ uint32 pin = 1; /* - * Rssi of bluetooth connection + * RSSI of bluetooth connection */ int32 rssi = 2; @@ -109,7 +109,7 @@ message BluetoothConnectionStatus { */ message SerialConnectionStatus { /* - * The serial baud rate + * Serial baud rate */ uint32 baud = 1; diff --git a/meshtastic/device_metadata.options b/meshtastic/device_metadata.options deleted file mode 100644 index d1c7f95..0000000 --- a/meshtastic/device_metadata.options +++ /dev/null @@ -1 +0,0 @@ -*DeviceMetadata.firmware_version max_size:18 diff --git a/meshtastic/device_metadata.proto b/meshtastic/device_metadata.proto deleted file mode 100644 index 59ab00a..0000000 --- a/meshtastic/device_metadata.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package meshtastic; - -option java_package = "com.geeksville.mesh"; -option java_outer_classname = "DeviceMetadataProtos"; -option go_package = "github.com/meshtastic/go/generated"; -option csharp_namespace = "Meshtastic.Protobufs"; -option swift_prefix = ""; - -import "meshtastic/config.proto"; -import "meshtastic/mesh.proto"; - -/* - * Device metadata response - */ -message DeviceMetadata { - /* - * Device firmware version string - */ - string firmware_version = 1; - - /* - * Device state version - */ - uint32 device_state_version = 2; - - /* - * Indicates whether the device can shutdown CPU natively or via power management chip - */ - bool canShutdown = 3; - - /* - * Indicates that the device has native wifi capability - */ - bool hasWifi = 4; - - /* - * Indicates that the device has native bluetooth capability - */ - bool hasBluetooth = 5; - - /* - * Indicates that the device has an ethernet peripheral - */ - bool hasEthernet = 6; - - /* - * Indicates that the device's role in the mesh - */ - Config.DeviceConfig.Role role = 7; - - /* - * Indicates the device's current enabled position flags - */ - uint32 position_flags = 8; - - /* - * Device hardware model - */ - HardwareModel hw_model = 9; -} diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 2bab282..d8456cf 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -62,7 +62,7 @@ message DeviceState { bool no_save = 9; /* - * Some GPSes seem to have bogus settings from the factory, so we always do one factory reset. + * Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset. */ bool did_gps_reset = 11; @@ -115,7 +115,7 @@ enum ScreenFonts { /* * 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. + * show a secondary bootup screen with custom logo and text for 2.5 seconds. */ message OEMStore { @@ -130,7 +130,7 @@ message OEMStore { uint32 oem_icon_height = 2; /* - * The Logo in xbm bytechar format + * The Logo in XBM bytechar format */ bytes oem_icon_bits = 3; diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 378e4d3..3a10eff 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -13,6 +13,8 @@ # outside of this envelope *Data.payload max_size:237 +*NodeInfo.channel int_size:8 + # Big enough for 1.2.28.568032c-d *MyNodeInfo.firmware_version max_size:18 @@ -49,4 +51,8 @@ *Waypoint.name max_size:30 *Waypoint.description max_size:100 -*NeighborInfo.neighbors max_count:10 \ No newline at end of file +<<<<<<< HEAD +*NeighborInfo.neighbors max_count:10 +======= +*DeviceMetadata.firmware_version max_size:18 +>>>>>>> 3e5ab67ff6659476df66bde6bbbae3c520460db9 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 0b10243..3768d22 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -302,6 +302,11 @@ enum HardwareModel { * TODO: REPLACE */ TLORA_T3_S3 = 16; + + /* + * B&Q Consulting Nano G1 Explorer: https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer + */ + NANO_G1_EXPLORER = 17; /* * B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station @@ -309,7 +314,9 @@ enum HardwareModel { STATION_G1 = 25; /* + * --------------------------------------------------------------------------- * Less common/prototype boards listed here (needs one more byte over the air) + * --------------------------------------------------------------------------- */ LORA_RELAY_V1 = 32; @@ -381,10 +388,12 @@ enum HardwareModel { /* * BetaFPV ExpressLRS "Nano" TX Module 900MHz with ESP32 CPU */ - BETAFPV_900_NANO_TX = 46; + BETAFPV_900_NANO_TX = 46; /* + * ------------------------------------------------------------------------------------------------------------------------------------------ * Reserved 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. + * ------------------------------------------------------------------------------------------------------------------------------------------ */ PRIVATE_HW = 255; } @@ -966,6 +975,12 @@ message NodeInfo { * The latest device metrics for the node. */ DeviceMetrics device_metrics = 6; + + /* + * local channel index we heard that node on. Only populated if its not the default channel. + */ + uint32 channel = 7; + } /* @@ -1304,6 +1319,11 @@ message FromRadio { * File Transfer Chunk */ XModem xmodemPacket = 12; + + /* + * Device metadata message + */ + DeviceMetadata metadata = 13; } } @@ -1409,3 +1429,53 @@ message Neighbor { */ fixed32 rx_time = 3; } + +/* + * Device metadata response + */ + message DeviceMetadata { + /* + * Device firmware version string + */ + string firmware_version = 1; + + /* + * Device state version + */ + uint32 device_state_version = 2; + + /* + * Indicates whether the device can shutdown CPU natively or via power management chip + */ + bool canShutdown = 3; + + /* + * Indicates that the device has native wifi capability + */ + bool hasWifi = 4; + + /* + * Indicates that the device has native bluetooth capability + */ + bool hasBluetooth = 5; + + /* + * Indicates that the device has an ethernet peripheral + */ + bool hasEthernet = 6; + + /* + * Indicates that the device's role in the mesh + */ + Config.DeviceConfig.Role role = 7; + + /* + * Indicates the device's current enabled position flags + */ + uint32 position_flags = 8; + + /* + * Device hardware model + */ + HardwareModel hw_model = 9; +} diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 7fcc6a2..3201d87 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -56,6 +56,11 @@ message ModuleConfig { * Whether to send / consume json packets on MQTT */ bool json_enabled = 6; + + /* + * If true, we attempt to establish a secure connection using TLS + */ + bool tls_enabled = 7; } /* @@ -373,6 +378,17 @@ message ModuleConfig { * display the results in Fahrenheit as a "user preference". */ bool environment_display_fahrenheit = 5; + + /* + * Enable/Disable the air quality metrics + */ + bool air_quality_enabled = 6; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + uint32 air_quality_interval = 7; } /* diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index e9c0349..740ffde 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -13,7 +13,7 @@ option swift_prefix = ""; */ message DeviceMetrics { /* - * 1-100 (0 means powered) + * 0-100 (>100 means powered) */ uint32 battery_level = 1;