meshtastic 0.0.179 → 0.0.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/documentation/README.md +3 -2
- data/documentation/admin-channel.md +64 -0
- data/documentation/admin-config.md +59 -0
- data/documentation/admin-firmware-nordic.md +86 -0
- data/documentation/admin-firmware-serial.md +180 -0
- data/documentation/admin-firmware.md +126 -0
- data/documentation/admin.md +88 -35
- data/documentation/atak.md +93 -10
- data/documentation/channel.md +1 -28
- data/documentation/config.md +1 -27
- data/documentation/mesh-interface.md +7 -0
- data/documentation/meshtastic.md +2 -2
- data/lib/meshtastic/admin/channel.rb +164 -0
- data/lib/meshtastic/admin/config.rb +213 -0
- data/lib/meshtastic/admin/firmware/ble.rb +207 -0
- data/lib/meshtastic/admin/firmware/nordic_dfu.rb +218 -0
- data/lib/meshtastic/admin/firmware/serial_bootloader.rb +233 -0
- data/lib/meshtastic/admin/firmware.rb +288 -0
- data/lib/meshtastic/admin.rb +688 -34
- data/lib/meshtastic/apponly.rb +19 -7
- data/lib/meshtastic/atak.rb +295 -17
- data/lib/meshtastic/bluetooth/bluez.rb +20 -1
- data/lib/meshtastic/bluetooth.rb +70 -59
- data/lib/meshtastic/cannedmessages.rb +13 -6
- data/lib/meshtastic/channel.rb +3 -25
- data/lib/meshtastic/clientonly.rb +19 -7
- data/lib/meshtastic/config.rb +3 -24
- data/lib/meshtastic/config_pb.rb +2 -1
- data/lib/meshtastic/connection_status.rb +12 -5
- data/lib/meshtastic/deviceonly.rb +19 -7
- data/lib/meshtastic/localonly.rb +19 -7
- data/lib/meshtastic/mesh_interface.rb +19 -0
- data/lib/meshtastic/module_config.rb +13 -7
- data/lib/meshtastic/mqtt.rb +72 -35
- data/lib/meshtastic/paxcount.rb +17 -6
- data/lib/meshtastic/portnums.rb +13 -6
- data/lib/meshtastic/position.rb +16 -6
- data/lib/meshtastic/remote_hardware.rb +27 -11
- data/lib/meshtastic/rtttl.rb +17 -8
- data/lib/meshtastic/serial.rb +81 -70
- data/lib/meshtastic/storeforward.rb +13 -6
- data/lib/meshtastic/storeforward_pb.rb +1 -1
- data/lib/meshtastic/stream_interface.rb +11 -0
- data/lib/meshtastic/tcp.rb +73 -22
- data/lib/meshtastic/telemetry.rb +15 -6
- data/lib/meshtastic/traceroute.rb +15 -6
- data/lib/meshtastic/util.rb +3 -1
- data/lib/meshtastic/version.rb +1 -1
- data/lib/meshtastic/xmodem.rb +12 -5
- data/lib/meshtastic.rb +22 -3
- data/spec/conventions_spec.rb +321 -0
- data/spec/lib/meshtastic/admin/channel_spec.rb +202 -0
- data/spec/lib/meshtastic/admin/config_spec.rb +114 -0
- data/spec/lib/meshtastic/admin/firmware/ble_spec.rb +170 -0
- data/spec/lib/meshtastic/admin/firmware/nordic_dfu_spec.rb +248 -0
- data/spec/lib/meshtastic/admin/firmware/serial_bootloader_spec.rb +263 -0
- data/spec/lib/meshtastic/admin/firmware_spec.rb +315 -0
- data/spec/lib/meshtastic/admin_spec.rb +412 -1
- data/spec/lib/meshtastic/apponly_spec.rb +1 -1
- data/spec/lib/meshtastic/atak_spec.rb +129 -4
- data/spec/lib/meshtastic/bluetooth_spec.rb +1 -1
- data/spec/lib/meshtastic/channel_spec.rb +2 -20
- data/spec/lib/meshtastic/config_spec.rb +2 -20
- data/spec/lib/meshtastic/connection_status_spec.rb +1 -1
- data/spec/lib/meshtastic/deviceonly_spec.rb +1 -1
- data/spec/lib/meshtastic/localonly_spec.rb +1 -1
- data/spec/lib/meshtastic/mesh_interface_spec.rb +31 -0
- data/spec/lib/meshtastic/portnums_spec.rb +2 -2
- metadata +24 -6
|
@@ -4,13 +4,13 @@ require 'meshtastic/cannedmessages_pb'
|
|
|
4
4
|
|
|
5
5
|
module Meshtastic
|
|
6
6
|
module Cannedmessages
|
|
7
|
-
def self.encode(opts = {})
|
|
7
|
+
public_class_method def self.encode(opts = {})
|
|
8
8
|
config = Meshtastic::CannedMessageModuleConfig.new
|
|
9
9
|
config.messages = opts.fetch(:messages, '')
|
|
10
10
|
config
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
def self.send(opts = {})
|
|
13
|
+
public_class_method def self.send(opts = {})
|
|
14
14
|
data = Meshtastic::Data.new(
|
|
15
15
|
portnum: :TEXT_MESSAGE_APP,
|
|
16
16
|
payload: encode(opts).messages.to_s.b
|
|
@@ -18,14 +18,21 @@ module Meshtastic
|
|
|
18
18
|
Meshtastic.deliver_data(opts.merge(data: data, port_num: Meshtastic::PortNum::TEXT_MESSAGE_APP))
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def self.authors
|
|
21
|
+
public_class_method def self.authors
|
|
22
22
|
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
def self.help
|
|
26
|
-
puts "USAGE:
|
|
27
|
-
#
|
|
25
|
+
public_class_method def self.help
|
|
26
|
+
puts " USAGE:
|
|
27
|
+
# Run the encode class method for this module.
|
|
28
|
+
#{self}.encode
|
|
29
|
+
|
|
30
|
+
# Run the send class method for this module.
|
|
31
|
+
#{self}.send
|
|
32
|
+
|
|
33
|
+
# Run the authors class method for this module.
|
|
28
34
|
#{self}.authors
|
|
35
|
+
|
|
29
36
|
"
|
|
30
37
|
end
|
|
31
38
|
end
|
data/lib/meshtastic/channel.rb
CHANGED
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# Protobuf class Meshtastic::Channel lives in channel_pb.
|
|
4
|
+
# Admin get/set API: Meshtastic::Admin::Channel
|
|
3
5
|
require 'meshtastic/channel_pb'
|
|
4
|
-
|
|
5
|
-
module Meshtastic
|
|
6
|
-
class Channel
|
|
7
|
-
def self.get(opts = {})
|
|
8
|
-
Admin.get_channel(opts)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def self.set(opts = {})
|
|
12
|
-
channel = opts[:channel] || opts[:channel_settings] || new
|
|
13
|
-
Admin.set_channel(opts.merge(channel_settings: channel))
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def self.authors
|
|
17
|
-
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def self.help
|
|
21
|
-
puts "USAGE:
|
|
22
|
-
#{self}.get(serial_obj: serial_obj, index: 0)
|
|
23
|
-
#{self}.set(serial_obj: serial_obj, channel: #{self}.new)
|
|
24
|
-
#{self}.authors
|
|
25
|
-
"
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
6
|
+
require 'meshtastic/admin/channel'
|
|
@@ -4,26 +4,38 @@ require 'meshtastic/clientonly_pb'
|
|
|
4
4
|
|
|
5
5
|
module Meshtastic
|
|
6
6
|
module Clientonly
|
|
7
|
-
def self.encode(opts = {})
|
|
7
|
+
public_class_method def self.encode(opts = {})
|
|
8
8
|
profile = Meshtastic::DeviceProfile.new
|
|
9
9
|
profile.long_name = opts[:long_name].to_s if opts[:long_name]
|
|
10
10
|
profile.short_name = opts[:short_name].to_s if opts[:short_name]
|
|
11
11
|
profile
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def self.decode(
|
|
14
|
+
public_class_method def self.decode(opts = {})
|
|
15
|
+
bytes = opts[:bytes]
|
|
15
16
|
Meshtastic::DeviceProfile.decode(bytes)
|
|
16
17
|
end
|
|
17
18
|
|
|
18
|
-
def self.authors
|
|
19
|
+
public_class_method def self.authors
|
|
19
20
|
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
20
21
|
end
|
|
21
22
|
|
|
22
|
-
def self.help
|
|
23
|
-
puts "USAGE:
|
|
24
|
-
#
|
|
25
|
-
#{self}.
|
|
23
|
+
public_class_method def self.help
|
|
24
|
+
puts " USAGE:
|
|
25
|
+
# Run the encode class method for this module.
|
|
26
|
+
#{self}.encode(
|
|
27
|
+
long_name: 'optional - value for long_name passed into encode',
|
|
28
|
+
short_name: 'optional - value for short_name passed into encode'
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# Run the decode class method for this module.
|
|
32
|
+
#{self}.decode(
|
|
33
|
+
bytes: 'optional - value for bytes passed into decode'
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# Run the authors class method for this module.
|
|
26
37
|
#{self}.authors
|
|
38
|
+
|
|
27
39
|
"
|
|
28
40
|
end
|
|
29
41
|
end
|
data/lib/meshtastic/config.rb
CHANGED
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# Protobuf class Meshtastic::Config lives in config_pb.
|
|
4
|
+
# Admin get/set API: Meshtastic::Admin::Config
|
|
3
5
|
require 'meshtastic/config_pb'
|
|
4
|
-
|
|
5
|
-
module Meshtastic
|
|
6
|
-
class Config
|
|
7
|
-
def self.get(opts = {})
|
|
8
|
-
Admin.get_config(opts)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def self.set(opts = {})
|
|
12
|
-
Admin.set_config(opts.merge(config: opts.fetch(:config)))
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.authors
|
|
16
|
-
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def self.help
|
|
20
|
-
puts "USAGE:
|
|
21
|
-
#{self}.get(serial_obj: serial_obj, config_type: :LORA_CONFIG)
|
|
22
|
-
#{self}.set(serial_obj: serial_obj, config: #{self}.new)
|
|
23
|
-
#{self}.authors
|
|
24
|
-
"
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
6
|
+
require 'meshtastic/admin/config'
|
data/lib/meshtastic/config_pb.rb
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
require 'google/protobuf'
|
|
6
6
|
|
|
7
7
|
require 'meshtastic/device_ui_pb'
|
|
8
|
+
require 'meshtastic/field_metadata_pb'
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
descriptor_data = "\n\x17meshtastic/config.proto\x12\nmeshtastic\x1a\x1ameshtastic/device_ui.proto\"\xe1.\n\x06\x43onfig\x12\x31\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1f.meshtastic.Config.DeviceConfigH\x00\x12\x35\n\x08position\x18\x02 \x01(\x0b\x32!.meshtastic.Config.PositionConfigH\x00\x12/\n\x05power\x18\x03 \x01(\x0b\x32\x1e.meshtastic.Config.PowerConfigH\x00\x12\x33\n\x07network\x18\x04 \x01(\x0b\x32 .meshtastic.Config.NetworkConfigH\x00\x12\x33\n\x07\x64isplay\x18\x05 \x01(\x0b\x32 .meshtastic.Config.DisplayConfigH\x00\x12-\n\x04lora\x18\x06 \x01(\x0b\x32\x1d.meshtastic.Config.LoRaConfigH\x00\x12\x37\n\tbluetooth\x18\x07 \x01(\x0b\x32\".meshtastic.Config.BluetoothConfigH\x00\x12\x35\n\x08security\x18\x08 \x01(\x0b\x32!.meshtastic.Config.SecurityConfigH\x00\x12\x39\n\nsessionkey\x18\t \x01(\x0b\x32#.meshtastic.Config.SessionkeyConfigH\x00\x12/\n\tdevice_ui\x18\n \x01(\x0b\x32\x1a.meshtastic.DeviceUIConfigH\x00\x1a\xf6\x06\n\x0c\x44\x65viceConfig\x12\x32\n\x04role\x18\x01 \x01(\x0e\x32$.meshtastic.Config.DeviceConfig.Role\x12\x1a\n\x0eserial_enabled\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x13\n\x0b\x62utton_gpio\x18\x04 \x01(\r\x12\x13\n\x0b\x62uzzer_gpio\x18\x05 \x01(\r\x12I\n\x10rebroadcast_mode\x18\x06 \x01(\x0e\x32/.meshtastic.Config.DeviceConfig.RebroadcastMode\x12 \n\x18node_info_broadcast_secs\x18\x07 \x01(\r\x12\"\n\x1a\x64ouble_tap_as_button_press\x18\x08 \x01(\x08\x12\x16\n\nis_managed\x18\t \x01(\x08\x42\x02\x18\x01\x12\x1c\n\x14\x64isable_triple_click\x18\n \x01(\x08\x12\r\n\x05tzdef\x18\x0b \x01(\t\x12\x1e\n\x16led_heartbeat_disabled\x18\x0c \x01(\x08\x12?\n\x0b\x62uzzer_mode\x18\r \x01(\x0e\x32*.meshtastic.Config.DeviceConfig.BuzzerMode\"\xd4\x01\n\x04Role\x12\n\n\x06\x43LIENT\x10\x00\x12\x0f\n\x0b\x43LIENT_MUTE\x10\x01\x12\n\n\x06ROUTER\x10\x02\x12\x15\n\rROUTER_CLIENT\x10\x03\x1a\x02\x08\x01\x12\x10\n\x08REPEATER\x10\x04\x1a\x02\x08\x01\x12\x0b\n\x07TRACKER\x10\x05\x12\n\n\x06SENSOR\x10\x06\x12\x07\n\x03TAK\x10\x07\x12\x11\n\rCLIENT_HIDDEN\x10\x08\x12\x12\n\x0eLOST_AND_FOUND\x10\t\x12\x0f\n\x0bTAK_TRACKER\x10\n\x12\x0f\n\x0bROUTER_LATE\x10\x0b\x12\x0f\n\x0b\x43LIENT_BASE\x10\x0c\"s\n\x0fRebroadcastMode\x12\x07\n\x03\x41LL\x10\x00\x12\x15\n\x11\x41LL_SKIP_DECODING\x10\x01\x12\x0e\n\nLOCAL_ONLY\x10\x02\x12\x0e\n\nKNOWN_ONLY\x10\x03\x12\x08\n\x04NONE\x10\x04\x12\x16\n\x12\x43ORE_PORTNUMS_ONLY\x10\x05\"i\n\nBuzzerMode\x12\x0f\n\x0b\x41LL_ENABLED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x16\n\x12NOTIFICATIONS_ONLY\x10\x02\x12\x0f\n\x0bSYSTEM_ONLY\x10\x03\x12\x13\n\x0f\x44IRECT_MSG_ONLY\x10\x04\x1a\x91\x05\n\x0ePositionConfig\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12(\n position_broadcast_smart_enabled\x18\x02 \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\x03 \x01(\x08\x12\x17\n\x0bgps_enabled\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13gps_update_interval\x18\x05 \x01(\r\x12\x1c\n\x10gps_attempt_time\x18\x06 \x01(\rB\x02\x18\x01\x12\x16\n\x0eposition_flags\x18\x07 \x01(\r\x12\x0f\n\x07rx_gpio\x18\x08 \x01(\r\x12\x0f\n\x07tx_gpio\x18\t \x01(\r\x12(\n broadcast_smart_minimum_distance\x18\n \x01(\r\x12-\n%broadcast_smart_minimum_interval_secs\x18\x0b \x01(\r\x12\x13\n\x0bgps_en_gpio\x18\x0c \x01(\r\x12;\n\x08gps_mode\x18\r \x01(\x0e\x32).meshtastic.Config.PositionConfig.GpsMode\"\xab\x01\n\rPositionFlags\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x41LTITUDE\x10\x01\x12\x10\n\x0c\x41LTITUDE_MSL\x10\x02\x12\x16\n\x12GEOIDAL_SEPARATION\x10\x04\x12\x07\n\x03\x44OP\x10\x08\x12\t\n\x05HVDOP\x10\x10\x12\r\n\tSATINVIEW\x10 \x12\n\n\x06SEQ_NO\x10@\x12\x0e\n\tTIMESTAMP\x10\x80\x01\x12\x0c\n\x07HEADING\x10\x80\x02\x12\n\n\x05SPEED\x10\x80\x04\"5\n\x07GpsMode\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0f\n\x0bNOT_PRESENT\x10\x02\x1a\x84\x02\n\x0bPowerConfig\x12\x17\n\x0fis_power_saving\x18\x01 \x01(\x08\x12&\n\x1eon_battery_shutdown_after_secs\x18\x02 \x01(\r\x12\x1f\n\x17\x61\x64\x63_multiplier_override\x18\x03 \x01(\x02\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x10\n\x08sds_secs\x18\x06 \x01(\r\x12\x0f\n\x07ls_secs\x18\x07 \x01(\r\x12\x15\n\rmin_wake_secs\x18\x08 \x01(\r\x12\"\n\x1a\x64\x65vice_battery_ina_address\x18\t \x01(\r\x12\x18\n\x10powermon_enables\x18 \x01(\x04\x1a\xe5\x03\n\rNetworkConfig\x12\x14\n\x0cwifi_enabled\x18\x01 \x01(\x08\x12\x11\n\twifi_ssid\x18\x03 \x01(\t\x12\x10\n\x08wifi_psk\x18\x04 \x01(\t\x12\x12\n\nntp_server\x18\x05 \x01(\t\x12\x13\n\x0b\x65th_enabled\x18\x06 \x01(\x08\x12\x42\n\x0c\x61\x64\x64ress_mode\x18\x07 \x01(\x0e\x32,.meshtastic.Config.NetworkConfig.AddressMode\x12@\n\x0bipv4_config\x18\x08 \x01(\x0b\x32+.meshtastic.Config.NetworkConfig.IpV4Config\x12\x16\n\x0ersyslog_server\x18\t \x01(\t\x12\x19\n\x11\x65nabled_protocols\x18\n \x01(\r\x12\x14\n\x0cipv6_enabled\x18\x0b \x01(\x08\x1a\x46\n\nIpV4Config\x12\n\n\x02ip\x18\x01 \x01(\x07\x12\x0f\n\x07gateway\x18\x02 \x01(\x07\x12\x0e\n\x06subnet\x18\x03 \x01(\x07\x12\x0b\n\x03\x64ns\x18\x04 \x01(\x07\"#\n\x0b\x41\x64\x64ressMode\x12\x08\n\x04\x44HCP\x10\x00\x12\n\n\x06STATIC\x10\x01\"4\n\rProtocolFlags\x12\x10\n\x0cNO_BROADCAST\x10\x00\x12\x11\n\rUDP_BROADCAST\x10\x01\x1a\xc2\x08\n\rDisplayConfig\x12\x16\n\x0escreen_on_secs\x18\x01 \x01(\r\x12V\n\ngps_format\x18\x02 \x01(\x0e\x32>.meshtastic.Config.DisplayConfig.DeprecatedGpsCoordinateFormatB\x02\x18\x01\x12!\n\x19\x61uto_screen_carousel_secs\x18\x03 \x01(\r\x12\x1d\n\x11\x63ompass_north_top\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\x13\n\x0b\x66lip_screen\x18\x05 \x01(\x08\x12<\n\x05units\x18\x06 \x01(\x0e\x32-.meshtastic.Config.DisplayConfig.DisplayUnits\x12\x37\n\x04oled\x18\x07 \x01(\x0e\x32).meshtastic.Config.DisplayConfig.OledType\x12\x41\n\x0b\x64isplaymode\x18\x08 \x01(\x0e\x32,.meshtastic.Config.DisplayConfig.DisplayMode\x12\x14\n\x0cheading_bold\x18\t \x01(\x08\x12\x1d\n\x15wake_on_tap_or_motion\x18\n \x01(\x08\x12P\n\x13\x63ompass_orientation\x18\x0b \x01(\x0e\x32\x33.meshtastic.Config.DisplayConfig.CompassOrientation\x12\x15\n\ruse_12h_clock\x18\x0c \x01(\x08\x12\x1a\n\x12use_long_node_name\x18\r \x01(\x08\x12\x1e\n\x16\x65nable_message_bubbles\x18\x0e \x01(\x08\"+\n\x1d\x44\x65precatedGpsCoordinateFormat\x12\n\n\x06UNUSED\x10\x00\"(\n\x0c\x44isplayUnits\x12\n\n\x06METRIC\x10\x00\x12\x0c\n\x08IMPERIAL\x10\x01\"\x7f\n\x08OledType\x12\r\n\tOLED_AUTO\x10\x00\x12\x10\n\x0cOLED_SSD1306\x10\x01\x12\x0f\n\x0bOLED_SH1106\x10\x02\x12\x0f\n\x0bOLED_SH1107\x10\x03\x12\x17\n\x13OLED_SH1107_128_128\x10\x04\x12\x17\n\x13OLED_SH1107_ROTATED\x10\x05\"A\n\x0b\x44isplayMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08TWOCOLOR\x10\x01\x12\x0c\n\x08INVERTED\x10\x02\x12\t\n\x05\x43OLOR\x10\x03\"\xba\x01\n\x12\x43ompassOrientation\x12\r\n\tDEGREES_0\x10\x00\x12\x0e\n\nDEGREES_90\x10\x01\x12\x0f\n\x0b\x44\x45GREES_180\x10\x02\x12\x0f\n\x0b\x44\x45GREES_270\x10\x03\x12\x16\n\x12\x44\x45GREES_0_INVERTED\x10\x04\x12\x17\n\x13\x44\x45GREES_90_INVERTED\x10\x05\x12\x18\n\x14\x44\x45GREES_180_INVERTED\x10\x06\x12\x18\n\x14\x44\x45GREES_270_INVERTED\x10\x07\x1a\x8f\x0b\n\nLoRaConfig\x12\x12\n\nuse_preset\x18\x01 \x01(\x08\x12?\n\x0cmodem_preset\x18\x02 \x01(\x0e\x32).meshtastic.Config.LoRaConfig.ModemPreset\x12\x11\n\tbandwidth\x18\x03 \x01(\r\x12\x15\n\rspread_factor\x18\x04 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x05 \x01(\r\x12\x18\n\x10\x66requency_offset\x18\x06 \x01(\x02\x12\x38\n\x06region\x18\x07 \x01(\x0e\x32(.meshtastic.Config.LoRaConfig.RegionCode\x12\x11\n\thop_limit\x18\x08 \x01(\r\x12\x12\n\ntx_enabled\x18\t \x01(\x08\x12\x10\n\x08tx_power\x18\n \x01(\x05\x12\x13\n\x0b\x63hannel_num\x18\x0b \x01(\r\x12\x1b\n\x13override_duty_cycle\x18\x0c \x01(\x08\x12\x1e\n\x16sx126x_rx_boosted_gain\x18\r \x01(\x08\x12\x1a\n\x12override_frequency\x18\x0e \x01(\x02\x12\x17\n\x0fpa_fan_disabled\x18\x0f \x01(\x08\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x13\n\x0bignore_mqtt\x18h \x01(\x08\x12\x19\n\x11\x63onfig_ok_to_mqtt\x18i \x01(\x08\x12@\n\x0c\x66\x65m_lna_mode\x18j \x01(\x0e\x32*.meshtastic.Config.LoRaConfig.FEM_LNA_Mode\x12\x17\n\x0fserial_hal_only\x18k \x01(\x08\"\xc8\x03\n\nRegionCode\x12\t\n\x05UNSET\x10\x00\x12\x06\n\x02US\x10\x01\x12\n\n\x06\x45U_433\x10\x02\x12\n\n\x06\x45U_868\x10\x03\x12\x06\n\x02\x43N\x10\x04\x12\x06\n\x02JP\x10\x05\x12\x07\n\x03\x41NZ\x10\x06\x12\x06\n\x02KR\x10\x07\x12\x06\n\x02TW\x10\x08\x12\x06\n\x02RU\x10\t\x12\x06\n\x02IN\x10\n\x12\n\n\x06NZ_865\x10\x0b\x12\x06\n\x02TH\x10\x0c\x12\x0b\n\x07LORA_24\x10\r\x12\n\n\x06UA_433\x10\x0e\x12\x0e\n\x06UA_868\x10\x0f\x1a\x02\x08\x01\x12\n\n\x06MY_433\x10\x10\x12\n\n\x06MY_919\x10\x11\x12\n\n\x06SG_923\x10\x12\x12\n\n\x06PH_433\x10\x13\x12\n\n\x06PH_868\x10\x14\x12\n\n\x06PH_915\x10\x15\x12\x0b\n\x07\x41NZ_433\x10\x16\x12\n\n\x06KZ_433\x10\x17\x12\n\n\x06KZ_863\x10\x18\x12\n\n\x06NP_865\x10\x19\x12\n\n\x06\x42R_902\x10\x1a\x12\x0b\n\x07ITU1_2M\x10\x1b\x12\x0b\n\x07ITU2_2M\x10\x1c\x12\n\n\x06\x45U_866\x10\x1d\x12\n\n\x06\x45U_874\x10\x1e\x12\n\n\x06\x45U_917\x10\x1f\x12\x0c\n\x08\x45U_N_868\x10 \x12\x0b\n\x07ITU3_2M\x10!\x12\r\n\tITU1_70CM\x10\"\x12\r\n\tITU2_70CM\x10#\x12\r\n\tITU3_70CM\x10$\x12\x0e\n\nITU2_125CM\x10%\"\xad\x02\n\x0bModemPreset\x12\r\n\tLONG_FAST\x10\x00\x12\x11\n\tLONG_SLOW\x10\x01\x1a\x02\x08\x01\x12\x16\n\x0eVERY_LONG_SLOW\x10\x02\x1a\x02\x08\x01\x12\x0f\n\x0bMEDIUM_SLOW\x10\x03\x12\x0f\n\x0bMEDIUM_FAST\x10\x04\x12\x0e\n\nSHORT_SLOW\x10\x05\x12\x0e\n\nSHORT_FAST\x10\x06\x12\x11\n\rLONG_MODERATE\x10\x07\x12\x0f\n\x0bSHORT_TURBO\x10\x08\x12\x0e\n\nLONG_TURBO\x10\t\x12\r\n\tLITE_FAST\x10\n\x12\r\n\tLITE_SLOW\x10\x0b\x12\x0f\n\x0bNARROW_FAST\x10\x0c\x12\x0f\n\x0bNARROW_SLOW\x10\r\x12\r\n\tTINY_FAST\x10\x0e\x12\r\n\tTINY_SLOW\x10\x0f\x12\x10\n\x0cMEDIUM_TURBO\x10\x10\":\n\x0c\x46\x45M_LNA_Mode\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0f\n\x0bNOT_PRESENT\x10\x02\x1a\xad\x01\n\x0f\x42luetoothConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12<\n\x04mode\x18\x02 \x01(\x0e\x32..meshtastic.Config.BluetoothConfig.PairingMode\x12\x11\n\tfixed_pin\x18\x03 \x01(\r\"8\n\x0bPairingMode\x12\x0e\n\nRANDOM_PIN\x10\x00\x12\r\n\tFIXED_PIN\x10\x01\x12\n\n\x06NO_PIN\x10\x02\x1a\x9c\x03\n\x0eSecurityConfig\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12\x13\n\x0bprivate_key\x18\x02 \x01(\x0c\x12\x11\n\tadmin_key\x18\x03 \x03(\x0c\x12\x12\n\nis_managed\x18\x04 \x01(\x08\x12\x16\n\x0eserial_enabled\x18\x05 \x01(\x08\x12\x1d\n\x15\x64\x65\x62ug_log_api_enabled\x18\x06 \x01(\x08\x12\x1d\n\x15\x61\x64min_channel_enabled\x18\x08 \x01(\x08\x12X\n\x17packet_signature_policy\x18\t \x01(\x0e\x32\x37.meshtastic.Config.SecurityConfig.PacketSignaturePolicy\"\x89\x01\n\x15PacketSignaturePolicy\x12&\n\"PACKET_SIGNATURE_POLICY_COMPATIBLE\x10\x00\x12$\n PACKET_SIGNATURE_POLICY_BALANCED\x10\x01\x12\"\n\x1ePACKET_SIGNATURE_POLICY_STRICT\x10\x02\x1a\x12\n\x10SessionkeyConfigB\x11\n\x0fpayload_variantBb\n\x14org.meshtastic.protoB\x0c\x43onfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3"
|
|
11
|
+
descriptor_data = "\n\x17meshtastic/config.proto\x12\nmeshtastic\x1a\x1ameshtastic/device_ui.proto\x1a\x1fmeshtastic/field_metadata.proto\"\x80\x31\n\x06\x43onfig\x12\x31\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1f.meshtastic.Config.DeviceConfigH\x00\x12\x35\n\x08position\x18\x02 \x01(\x0b\x32!.meshtastic.Config.PositionConfigH\x00\x12/\n\x05power\x18\x03 \x01(\x0b\x32\x1e.meshtastic.Config.PowerConfigH\x00\x12\x33\n\x07network\x18\x04 \x01(\x0b\x32 .meshtastic.Config.NetworkConfigH\x00\x12\x33\n\x07\x64isplay\x18\x05 \x01(\x0b\x32 .meshtastic.Config.DisplayConfigH\x00\x12-\n\x04lora\x18\x06 \x01(\x0b\x32\x1d.meshtastic.Config.LoRaConfigH\x00\x12\x37\n\tbluetooth\x18\x07 \x01(\x0b\x32\".meshtastic.Config.BluetoothConfigH\x00\x12\x35\n\x08security\x18\x08 \x01(\x0b\x32!.meshtastic.Config.SecurityConfigH\x00\x12\x39\n\nsessionkey\x18\t \x01(\x0b\x32#.meshtastic.Config.SessionkeyConfigH\x00\x12/\n\tdevice_ui\x18\n \x01(\x0b\x32\x1a.meshtastic.DeviceUIConfigH\x00\x1a\xf6\x06\n\x0c\x44\x65viceConfig\x12\x32\n\x04role\x18\x01 \x01(\x0e\x32$.meshtastic.Config.DeviceConfig.Role\x12\x1a\n\x0eserial_enabled\x18\x02 \x01(\x08\x42\x02\x18\x01\x12\x13\n\x0b\x62utton_gpio\x18\x04 \x01(\r\x12\x13\n\x0b\x62uzzer_gpio\x18\x05 \x01(\r\x12I\n\x10rebroadcast_mode\x18\x06 \x01(\x0e\x32/.meshtastic.Config.DeviceConfig.RebroadcastMode\x12 \n\x18node_info_broadcast_secs\x18\x07 \x01(\r\x12\"\n\x1a\x64ouble_tap_as_button_press\x18\x08 \x01(\x08\x12\x16\n\nis_managed\x18\t \x01(\x08\x42\x02\x18\x01\x12\x1c\n\x14\x64isable_triple_click\x18\n \x01(\x08\x12\r\n\x05tzdef\x18\x0b \x01(\t\x12\x1e\n\x16led_heartbeat_disabled\x18\x0c \x01(\x08\x12?\n\x0b\x62uzzer_mode\x18\r \x01(\x0e\x32*.meshtastic.Config.DeviceConfig.BuzzerMode\"\xd4\x01\n\x04Role\x12\n\n\x06\x43LIENT\x10\x00\x12\x0f\n\x0b\x43LIENT_MUTE\x10\x01\x12\n\n\x06ROUTER\x10\x02\x12\x15\n\rROUTER_CLIENT\x10\x03\x1a\x02\x08\x01\x12\x10\n\x08REPEATER\x10\x04\x1a\x02\x08\x01\x12\x0b\n\x07TRACKER\x10\x05\x12\n\n\x06SENSOR\x10\x06\x12\x07\n\x03TAK\x10\x07\x12\x11\n\rCLIENT_HIDDEN\x10\x08\x12\x12\n\x0eLOST_AND_FOUND\x10\t\x12\x0f\n\x0bTAK_TRACKER\x10\n\x12\x0f\n\x0bROUTER_LATE\x10\x0b\x12\x0f\n\x0b\x43LIENT_BASE\x10\x0c\"s\n\x0fRebroadcastMode\x12\x07\n\x03\x41LL\x10\x00\x12\x15\n\x11\x41LL_SKIP_DECODING\x10\x01\x12\x0e\n\nLOCAL_ONLY\x10\x02\x12\x0e\n\nKNOWN_ONLY\x10\x03\x12\x08\n\x04NONE\x10\x04\x12\x16\n\x12\x43ORE_PORTNUMS_ONLY\x10\x05\"i\n\nBuzzerMode\x12\x0f\n\x0b\x41LL_ENABLED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x16\n\x12NOTIFICATIONS_ONLY\x10\x02\x12\x0f\n\x0bSYSTEM_ONLY\x10\x03\x12\x13\n\x0f\x44IRECT_MSG_ONLY\x10\x04\x1a\xf8\x05\n\x0ePositionConfig\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12(\n position_broadcast_smart_enabled\x18\x02 \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\x03 \x01(\x08\x12\x17\n\x0bgps_enabled\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13gps_update_interval\x18\x05 \x01(\r\x12\x1c\n\x10gps_attempt_time\x18\x06 \x01(\rB\x02\x18\x01\x12\x16\n\x0eposition_flags\x18\x07 \x01(\r\x12\x17\n\x07rx_gpio\x18\x08 \x01(\rB\x06\xca\xf3\x18\x02\x08\x01\x12\x17\n\x07tx_gpio\x18\t \x01(\rB\x06\xca\xf3\x18\x02\x08\x01\x12(\n broadcast_smart_minimum_distance\x18\n \x01(\r\x12-\n%broadcast_smart_minimum_interval_secs\x18\x0b \x01(\r\x12\x13\n\x0bgps_en_gpio\x18\x0c \x01(\r\x12;\n\x08gps_mode\x18\r \x01(\x0e\x32).meshtastic.Config.PositionConfig.GpsMode\"\x82\x02\n\rPositionFlags\x12\t\n\x05UNSET\x10\x00\x12\x63\n\x08\x41LTITUDE\x10\x01\x1aU\xca\xf3\x18Q:\x08\x41ltitudeBEInclude an altitude value in position reports, when one is available.\x12\x10\n\x0c\x41LTITUDE_MSL\x10\x02\x12\x16\n\x12GEOIDAL_SEPARATION\x10\x04\x12\x07\n\x03\x44OP\x10\x08\x12\t\n\x05HVDOP\x10\x10\x12\r\n\tSATINVIEW\x10 \x12\n\n\x06SEQ_NO\x10@\x12\x0e\n\tTIMESTAMP\x10\x80\x01\x12\x0c\n\x07HEADING\x10\x80\x02\x12\n\n\x05SPEED\x10\x80\x04\"5\n\x07GpsMode\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0f\n\x0bNOT_PRESENT\x10\x02\x1a\x84\x02\n\x0bPowerConfig\x12\x17\n\x0fis_power_saving\x18\x01 \x01(\x08\x12&\n\x1eon_battery_shutdown_after_secs\x18\x02 \x01(\r\x12\x1f\n\x17\x61\x64\x63_multiplier_override\x18\x03 \x01(\x02\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x10\n\x08sds_secs\x18\x06 \x01(\r\x12\x0f\n\x07ls_secs\x18\x07 \x01(\r\x12\x15\n\rmin_wake_secs\x18\x08 \x01(\r\x12\"\n\x1a\x64\x65vice_battery_ina_address\x18\t \x01(\r\x12\x18\n\x10powermon_enables\x18 \x01(\x04\x1a\xe5\x03\n\rNetworkConfig\x12\x14\n\x0cwifi_enabled\x18\x01 \x01(\x08\x12\x11\n\twifi_ssid\x18\x03 \x01(\t\x12\x10\n\x08wifi_psk\x18\x04 \x01(\t\x12\x12\n\nntp_server\x18\x05 \x01(\t\x12\x13\n\x0b\x65th_enabled\x18\x06 \x01(\x08\x12\x42\n\x0c\x61\x64\x64ress_mode\x18\x07 \x01(\x0e\x32,.meshtastic.Config.NetworkConfig.AddressMode\x12@\n\x0bipv4_config\x18\x08 \x01(\x0b\x32+.meshtastic.Config.NetworkConfig.IpV4Config\x12\x16\n\x0ersyslog_server\x18\t \x01(\t\x12\x19\n\x11\x65nabled_protocols\x18\n \x01(\r\x12\x14\n\x0cipv6_enabled\x18\x0b \x01(\x08\x1a\x46\n\nIpV4Config\x12\n\n\x02ip\x18\x01 \x01(\x07\x12\x0f\n\x07gateway\x18\x02 \x01(\x07\x12\x0e\n\x06subnet\x18\x03 \x01(\x07\x12\x0b\n\x03\x64ns\x18\x04 \x01(\x07\"#\n\x0b\x41\x64\x64ressMode\x12\x08\n\x04\x44HCP\x10\x00\x12\n\n\x06STATIC\x10\x01\"4\n\rProtocolFlags\x12\x10\n\x0cNO_BROADCAST\x10\x00\x12\x11\n\rUDP_BROADCAST\x10\x01\x1a\xc2\x08\n\rDisplayConfig\x12\x16\n\x0escreen_on_secs\x18\x01 \x01(\r\x12V\n\ngps_format\x18\x02 \x01(\x0e\x32>.meshtastic.Config.DisplayConfig.DeprecatedGpsCoordinateFormatB\x02\x18\x01\x12!\n\x19\x61uto_screen_carousel_secs\x18\x03 \x01(\r\x12\x1d\n\x11\x63ompass_north_top\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\x13\n\x0b\x66lip_screen\x18\x05 \x01(\x08\x12<\n\x05units\x18\x06 \x01(\x0e\x32-.meshtastic.Config.DisplayConfig.DisplayUnits\x12\x37\n\x04oled\x18\x07 \x01(\x0e\x32).meshtastic.Config.DisplayConfig.OledType\x12\x41\n\x0b\x64isplaymode\x18\x08 \x01(\x0e\x32,.meshtastic.Config.DisplayConfig.DisplayMode\x12\x14\n\x0cheading_bold\x18\t \x01(\x08\x12\x1d\n\x15wake_on_tap_or_motion\x18\n \x01(\x08\x12P\n\x13\x63ompass_orientation\x18\x0b \x01(\x0e\x32\x33.meshtastic.Config.DisplayConfig.CompassOrientation\x12\x15\n\ruse_12h_clock\x18\x0c \x01(\x08\x12\x1a\n\x12use_long_node_name\x18\r \x01(\x08\x12\x1e\n\x16\x65nable_message_bubbles\x18\x0e \x01(\x08\"+\n\x1d\x44\x65precatedGpsCoordinateFormat\x12\n\n\x06UNUSED\x10\x00\"(\n\x0c\x44isplayUnits\x12\n\n\x06METRIC\x10\x00\x12\x0c\n\x08IMPERIAL\x10\x01\"\x7f\n\x08OledType\x12\r\n\tOLED_AUTO\x10\x00\x12\x10\n\x0cOLED_SSD1306\x10\x01\x12\x0f\n\x0bOLED_SH1106\x10\x02\x12\x0f\n\x0bOLED_SH1107\x10\x03\x12\x17\n\x13OLED_SH1107_128_128\x10\x04\x12\x17\n\x13OLED_SH1107_ROTATED\x10\x05\"A\n\x0b\x44isplayMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08TWOCOLOR\x10\x01\x12\x0c\n\x08INVERTED\x10\x02\x12\t\n\x05\x43OLOR\x10\x03\"\xba\x01\n\x12\x43ompassOrientation\x12\r\n\tDEGREES_0\x10\x00\x12\x0e\n\nDEGREES_90\x10\x01\x12\x0f\n\x0b\x44\x45GREES_180\x10\x02\x12\x0f\n\x0b\x44\x45GREES_270\x10\x03\x12\x16\n\x12\x44\x45GREES_0_INVERTED\x10\x04\x12\x17\n\x13\x44\x45GREES_90_INVERTED\x10\x05\x12\x18\n\x14\x44\x45GREES_180_INVERTED\x10\x06\x12\x18\n\x14\x44\x45GREES_270_INVERTED\x10\x07\x1a\xc7\x0c\n\nLoRaConfig\x12\x12\n\nuse_preset\x18\x01 \x01(\x08\x12?\n\x0cmodem_preset\x18\x02 \x01(\x0e\x32).meshtastic.Config.LoRaConfig.ModemPreset\x12\x11\n\tbandwidth\x18\x03 \x01(\r\x12\x15\n\rspread_factor\x18\x04 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x05 \x01(\r\x12\x18\n\x10\x66requency_offset\x18\x06 \x01(\x02\x12\x38\n\x06region\x18\x07 \x01(\x0e\x32(.meshtastic.Config.LoRaConfig.RegionCode\x12\x9d\x01\n\thop_limit\x18\x08 \x01(\rB\x89\x01\xca\xf3\x18\x84\x01\x19\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x1c@:\tHop LimitBIHow many times a message may be repeated before it stops being forwarded.J\x1ahops|ttl|range|rebroadcast\x12\x12\n\ntx_enabled\x18\t \x01(\x08\x12\x10\n\x08tx_power\x18\n \x01(\x05\x12\x13\n\x0b\x63hannel_num\x18\x0b \x01(\r\x12\x1b\n\x13override_duty_cycle\x18\x0c \x01(\x08\x12\x1e\n\x16sx126x_rx_boosted_gain\x18\r \x01(\x08\x12\x1a\n\x12override_frequency\x18\x0e \x01(\x02\x12\x17\n\x0fpa_fan_disabled\x18\x0f \x01(\x08\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x13\n\x0bignore_mqtt\x18h \x01(\x08\x12\x19\n\x11\x63onfig_ok_to_mqtt\x18i \x01(\x08\x12@\n\x0c\x66\x65m_lna_mode\x18j \x01(\x0e\x32*.meshtastic.Config.LoRaConfig.FEM_LNA_Mode\x12\x17\n\x0fserial_hal_only\x18k \x01(\x08\"\xc8\x03\n\nRegionCode\x12\t\n\x05UNSET\x10\x00\x12\x06\n\x02US\x10\x01\x12\n\n\x06\x45U_433\x10\x02\x12\n\n\x06\x45U_868\x10\x03\x12\x06\n\x02\x43N\x10\x04\x12\x06\n\x02JP\x10\x05\x12\x07\n\x03\x41NZ\x10\x06\x12\x06\n\x02KR\x10\x07\x12\x06\n\x02TW\x10\x08\x12\x06\n\x02RU\x10\t\x12\x06\n\x02IN\x10\n\x12\n\n\x06NZ_865\x10\x0b\x12\x06\n\x02TH\x10\x0c\x12\x0b\n\x07LORA_24\x10\r\x12\n\n\x06UA_433\x10\x0e\x12\x0e\n\x06UA_868\x10\x0f\x1a\x02\x08\x01\x12\n\n\x06MY_433\x10\x10\x12\n\n\x06MY_919\x10\x11\x12\n\n\x06SG_923\x10\x12\x12\n\n\x06PH_433\x10\x13\x12\n\n\x06PH_868\x10\x14\x12\n\n\x06PH_915\x10\x15\x12\x0b\n\x07\x41NZ_433\x10\x16\x12\n\n\x06KZ_433\x10\x17\x12\n\n\x06KZ_863\x10\x18\x12\n\n\x06NP_865\x10\x19\x12\n\n\x06\x42R_902\x10\x1a\x12\x0b\n\x07ITU1_2M\x10\x1b\x12\x0b\n\x07ITU2_2M\x10\x1c\x12\n\n\x06\x45U_866\x10\x1d\x12\n\n\x06\x45U_874\x10\x1e\x12\n\n\x06\x45U_917\x10\x1f\x12\x0c\n\x08\x45U_N_868\x10 \x12\x0b\n\x07ITU3_2M\x10!\x12\r\n\tITU1_70CM\x10\"\x12\r\n\tITU2_70CM\x10#\x12\r\n\tITU3_70CM\x10$\x12\x0e\n\nITU2_125CM\x10%\"\xd8\x02\n\x0bModemPreset\x12\x38\n\tLONG_FAST\x10\x00\x1a)\xca\xf3\x18%:\x11Long Range - FastJ\x10longfast|default\x12\x11\n\tLONG_SLOW\x10\x01\x1a\x02\x08\x01\x12\x16\n\x0eVERY_LONG_SLOW\x10\x02\x1a\x02\x08\x01\x12\x0f\n\x0bMEDIUM_SLOW\x10\x03\x12\x0f\n\x0bMEDIUM_FAST\x10\x04\x12\x0e\n\nSHORT_SLOW\x10\x05\x12\x0e\n\nSHORT_FAST\x10\x06\x12\x11\n\rLONG_MODERATE\x10\x07\x12\x0f\n\x0bSHORT_TURBO\x10\x08\x12\x0e\n\nLONG_TURBO\x10\t\x12\r\n\tLITE_FAST\x10\n\x12\r\n\tLITE_SLOW\x10\x0b\x12\x0f\n\x0bNARROW_FAST\x10\x0c\x12\x0f\n\x0bNARROW_SLOW\x10\r\x12\r\n\tTINY_FAST\x10\x0e\x12\r\n\tTINY_SLOW\x10\x0f\x12\x10\n\x0cMEDIUM_TURBO\x10\x10\":\n\x0c\x46\x45M_LNA_Mode\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0f\n\x0bNOT_PRESENT\x10\x02\x1a\xad\x01\n\x0f\x42luetoothConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12<\n\x04mode\x18\x02 \x01(\x0e\x32..meshtastic.Config.BluetoothConfig.PairingMode\x12\x11\n\tfixed_pin\x18\x03 \x01(\r\"8\n\x0bPairingMode\x12\x0e\n\nRANDOM_PIN\x10\x00\x12\r\n\tFIXED_PIN\x10\x01\x12\n\n\x06NO_PIN\x10\x02\x1a\x9c\x03\n\x0eSecurityConfig\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12\x13\n\x0bprivate_key\x18\x02 \x01(\x0c\x12\x11\n\tadmin_key\x18\x03 \x03(\x0c\x12\x12\n\nis_managed\x18\x04 \x01(\x08\x12\x16\n\x0eserial_enabled\x18\x05 \x01(\x08\x12\x1d\n\x15\x64\x65\x62ug_log_api_enabled\x18\x06 \x01(\x08\x12\x1d\n\x15\x61\x64min_channel_enabled\x18\x08 \x01(\x08\x12X\n\x17packet_signature_policy\x18\t \x01(\x0e\x32\x37.meshtastic.Config.SecurityConfig.PacketSignaturePolicy\"\x89\x01\n\x15PacketSignaturePolicy\x12&\n\"PACKET_SIGNATURE_POLICY_COMPATIBLE\x10\x00\x12$\n PACKET_SIGNATURE_POLICY_BALANCED\x10\x01\x12\"\n\x1ePACKET_SIGNATURE_POLICY_STRICT\x10\x02\x1a\x12\n\x10SessionkeyConfigB\x11\n\x0fpayload_variantBb\n\x14org.meshtastic.protoB\x0c\x43onfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3"
|
|
11
12
|
|
|
12
13
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
14
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -4,18 +4,25 @@ require 'meshtastic/connection_status_pb'
|
|
|
4
4
|
|
|
5
5
|
module Meshtastic
|
|
6
6
|
module ConnectionStatus
|
|
7
|
-
def self.decode(
|
|
7
|
+
public_class_method def self.decode(opts = {})
|
|
8
|
+
bytes = opts[:bytes]
|
|
8
9
|
Meshtastic::DeviceConnectionStatus.decode(bytes)
|
|
9
10
|
end
|
|
10
11
|
|
|
11
|
-
def self.authors
|
|
12
|
+
public_class_method def self.authors
|
|
12
13
|
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
13
14
|
end
|
|
14
15
|
|
|
15
|
-
def self.help
|
|
16
|
-
puts "USAGE:
|
|
17
|
-
#
|
|
16
|
+
public_class_method def self.help
|
|
17
|
+
puts " USAGE:
|
|
18
|
+
# Run the decode class method for this module.
|
|
19
|
+
#{self}.decode(
|
|
20
|
+
bytes: 'optional - value for bytes passed into decode'
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
# Run the authors class method for this module.
|
|
18
24
|
#{self}.authors
|
|
25
|
+
|
|
19
26
|
"
|
|
20
27
|
end
|
|
21
28
|
end
|
|
@@ -4,23 +4,35 @@ require 'meshtastic/deviceonly_pb'
|
|
|
4
4
|
|
|
5
5
|
module Meshtastic
|
|
6
6
|
module Deviceonly
|
|
7
|
-
def self.decode_state(
|
|
7
|
+
public_class_method def self.decode_state(opts = {})
|
|
8
|
+
bytes = opts[:bytes]
|
|
8
9
|
Meshtastic::DeviceState.decode(bytes)
|
|
9
10
|
end
|
|
10
11
|
|
|
11
|
-
def self.decode_nodedb(
|
|
12
|
+
public_class_method def self.decode_nodedb(opts = {})
|
|
13
|
+
bytes = opts[:bytes]
|
|
12
14
|
Meshtastic::NodeDatabase.decode(bytes)
|
|
13
15
|
end
|
|
14
16
|
|
|
15
|
-
def self.authors
|
|
17
|
+
public_class_method def self.authors
|
|
16
18
|
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
17
19
|
end
|
|
18
20
|
|
|
19
|
-
def self.help
|
|
20
|
-
puts "USAGE:
|
|
21
|
-
#
|
|
22
|
-
#{self}.
|
|
21
|
+
public_class_method def self.help
|
|
22
|
+
puts " USAGE:
|
|
23
|
+
# Run the decode_state class method for this module.
|
|
24
|
+
#{self}.decode_state(
|
|
25
|
+
bytes: 'optional - value for bytes passed into decode_state'
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
# Run the decode_nodedb class method for this module.
|
|
29
|
+
#{self}.decode_nodedb(
|
|
30
|
+
bytes: 'optional - value for bytes passed into decode_nodedb'
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
# Run the authors class method for this module.
|
|
23
34
|
#{self}.authors
|
|
35
|
+
|
|
24
36
|
"
|
|
25
37
|
end
|
|
26
38
|
end
|
data/lib/meshtastic/localonly.rb
CHANGED
|
@@ -4,23 +4,35 @@ require 'meshtastic/localonly_pb'
|
|
|
4
4
|
|
|
5
5
|
module Meshtastic
|
|
6
6
|
module Localonly
|
|
7
|
-
def self.decode_config(
|
|
7
|
+
public_class_method def self.decode_config(opts = {})
|
|
8
|
+
bytes = opts[:bytes]
|
|
8
9
|
Meshtastic::LocalConfig.decode(bytes)
|
|
9
10
|
end
|
|
10
11
|
|
|
11
|
-
def self.decode_module_config(
|
|
12
|
+
public_class_method def self.decode_module_config(opts = {})
|
|
13
|
+
bytes = opts[:bytes]
|
|
12
14
|
Meshtastic::LocalModuleConfig.decode(bytes)
|
|
13
15
|
end
|
|
14
16
|
|
|
15
|
-
def self.authors
|
|
17
|
+
public_class_method def self.authors
|
|
16
18
|
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
17
19
|
end
|
|
18
20
|
|
|
19
|
-
def self.help
|
|
20
|
-
puts "USAGE:
|
|
21
|
-
#
|
|
22
|
-
#{self}.
|
|
21
|
+
public_class_method def self.help
|
|
22
|
+
puts " USAGE:
|
|
23
|
+
# Run the decode_config class method for this module.
|
|
24
|
+
#{self}.decode_config(
|
|
25
|
+
bytes: 'optional - value for bytes passed into decode_config'
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
# Run the decode_module_config class method for this module.
|
|
29
|
+
#{self}.decode_module_config(
|
|
30
|
+
bytes: 'optional - value for bytes passed into decode_module_config'
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
# Run the authors class method for this module.
|
|
23
34
|
#{self}.authors
|
|
35
|
+
|
|
24
36
|
"
|
|
25
37
|
end
|
|
26
38
|
end
|
|
@@ -233,6 +233,12 @@ module Meshtastic
|
|
|
233
233
|
mesh_packet.want_ack = want_ack
|
|
234
234
|
mesh_packet.hop_limit = hop_limit
|
|
235
235
|
mesh_packet.id = generate_packet_id(last_packet_id: last_packet_id)
|
|
236
|
+
mesh_packet.pki_encrypted = opts[:pki_encrypted] if opts.key?(:pki_encrypted)
|
|
237
|
+
mesh_packet.public_key = opts[:public_key] if opts[:public_key]
|
|
238
|
+
if mesh_packet.pki_encrypted
|
|
239
|
+
raise ArgumentError, 'PKI encryption requires a radio transport without host PSK encryption' unless via == :radio && (psks.nil? || psks.empty?)
|
|
240
|
+
raise ArgumentError, 'recipient public_key must contain 32 bytes' unless mesh_packet.public_key.bytesize == 32
|
|
241
|
+
end
|
|
236
242
|
|
|
237
243
|
# When psks is nil/empty, leave the packet decoded so the radio (serial/TCP)
|
|
238
244
|
# device can apply the channel PSK itself. MQTT callers must pass psks so the
|
|
@@ -340,6 +346,8 @@ module Meshtastic
|
|
|
340
346
|
channel: channel,
|
|
341
347
|
want_ack: want_ack,
|
|
342
348
|
hop_limit: hop_limit,
|
|
349
|
+
pki_encrypted: opts.fetch(:pki_encrypted, false),
|
|
350
|
+
public_key: opts[:public_key],
|
|
343
351
|
psks: psks
|
|
344
352
|
)
|
|
345
353
|
rescue StandardError => e
|
|
@@ -613,5 +621,16 @@ module Meshtastic
|
|
|
613
621
|
#{self}.authors
|
|
614
622
|
"
|
|
615
623
|
end
|
|
624
|
+
|
|
625
|
+
public_class_method def self.authors
|
|
626
|
+
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
public_class_method def self.help
|
|
630
|
+
puts "USAGE:
|
|
631
|
+
# Print the AUTHOR(S) string for this module.
|
|
632
|
+
#{self}.authors
|
|
633
|
+
"
|
|
634
|
+
end
|
|
616
635
|
end
|
|
617
636
|
end
|
|
@@ -4,23 +4,29 @@ require 'meshtastic/module_config_pb'
|
|
|
4
4
|
|
|
5
5
|
module Meshtastic
|
|
6
6
|
class ModuleConfig
|
|
7
|
-
def self.get(opts = {})
|
|
7
|
+
public_class_method def self.get(opts = {})
|
|
8
8
|
Admin.send(opts.merge(get_module_config_request: opts.fetch(:module_config_type, :MQTT_CONFIG)))
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
def self.set(opts = {})
|
|
11
|
+
public_class_method def self.set(opts = {})
|
|
12
12
|
Admin.send(opts.merge(set_module_config: opts.fetch(:module_config)))
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def self.authors
|
|
15
|
+
public_class_method def self.authors
|
|
16
16
|
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def self.help
|
|
20
|
-
puts "USAGE:
|
|
21
|
-
#
|
|
22
|
-
#{self}.
|
|
19
|
+
public_class_method def self.help
|
|
20
|
+
puts " USAGE:
|
|
21
|
+
# Run the get class method for this module.
|
|
22
|
+
#{self}.get
|
|
23
|
+
|
|
24
|
+
# Run the set class method for this module.
|
|
25
|
+
#{self}.set
|
|
26
|
+
|
|
27
|
+
# Run the authors class method for this module.
|
|
23
28
|
#{self}.authors
|
|
29
|
+
|
|
24
30
|
"
|
|
25
31
|
end
|
|
26
32
|
end
|
data/lib/meshtastic/mqtt.rb
CHANGED
|
@@ -280,6 +280,27 @@ module Meshtastic
|
|
|
280
280
|
raise e
|
|
281
281
|
end
|
|
282
282
|
|
|
283
|
+
public_class_method def self.send_data(opts = {})
|
|
284
|
+
mqtt_obj = opts[:mqtt_obj]
|
|
285
|
+
raise ArgumentError, 'mqtt_obj is required' unless mqtt_obj
|
|
286
|
+
raise ArgumentError, 'data is required' unless opts[:data].is_a?(Meshtastic::Data)
|
|
287
|
+
|
|
288
|
+
opts = opts.dup
|
|
289
|
+
opts[:from] ||= mqtt_obj.client_id
|
|
290
|
+
opts[:to] ||= '!ffffffff'
|
|
291
|
+
opts[:root_topic] ||= 'msh'
|
|
292
|
+
opts[:region] ||= 'US'
|
|
293
|
+
opts[:topic] ||= '2/e/LongFast/#'
|
|
294
|
+
opts[:topic] = opts[:topic].to_s.gsub('/#', '')
|
|
295
|
+
opts[:channel] ||= 6
|
|
296
|
+
absolute_topic = "#{opts[:root_topic]}/#{opts[:region]}/#{opts[:topic]}/#{opts[:from]}"
|
|
297
|
+
opts[:topic] = absolute_topic
|
|
298
|
+
opts[:via] = :mqtt
|
|
299
|
+
mqtt_obj.publish(absolute_topic, Meshtastic::MeshInterface.new.send_data(opts))
|
|
300
|
+
rescue StandardError => e
|
|
301
|
+
raise e
|
|
302
|
+
end
|
|
303
|
+
|
|
283
304
|
# Supported Method Parameters::
|
|
284
305
|
# mqtt_obj = Meshtastic.disconnect(
|
|
285
306
|
# mqtt_obj: 'required - mqtt_obj returned from #connect method'
|
|
@@ -304,52 +325,68 @@ module Meshtastic
|
|
|
304
325
|
# Display Usage for this Module
|
|
305
326
|
|
|
306
327
|
public_class_method def self.help
|
|
307
|
-
puts "USAGE:
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
328
|
+
puts " USAGE:
|
|
329
|
+
# Run the connect class method for this module.
|
|
330
|
+
#{self}.connect(
|
|
331
|
+
host: 'optional - value for host passed into connect',
|
|
332
|
+
port: 'optional - value for port passed into connect',
|
|
333
|
+
tls: 'optional - value for tls passed into connect',
|
|
334
|
+
username: 'optional - value for username passed into connect',
|
|
335
|
+
password: 'optional - value for password passed into connect',
|
|
336
|
+
client_id: 'optional - value for client_id passed into connect',
|
|
337
|
+
keep_alive: 'optional - value for keep_alive passed into connect',
|
|
338
|
+
ack_timeout: 'optional - value for ack_timeout passed into connect'
|
|
317
339
|
)
|
|
318
340
|
|
|
341
|
+
# Run the subscribe class method for this module.
|
|
319
342
|
#{self}.subscribe(
|
|
320
|
-
mqtt_obj: '
|
|
321
|
-
root_topic: 'optional -
|
|
322
|
-
region: 'optional -
|
|
323
|
-
topic: 'optional -
|
|
324
|
-
psks: 'optional -
|
|
325
|
-
qos: 'optional -
|
|
326
|
-
json: 'optional -
|
|
327
|
-
exclude: 'optional -
|
|
328
|
-
include: 'optional -
|
|
329
|
-
gps_metadata: 'optional -
|
|
343
|
+
mqtt_obj: 'optional - value for mqtt_obj passed into subscribe',
|
|
344
|
+
root_topic: 'optional - value for root_topic passed into subscribe',
|
|
345
|
+
region: 'optional - value for region passed into subscribe',
|
|
346
|
+
topic: 'optional - value for topic passed into subscribe',
|
|
347
|
+
psks: 'optional - value for psks passed into subscribe',
|
|
348
|
+
qos: 'optional - value for qos passed into subscribe',
|
|
349
|
+
json: 'optional - value for json passed into subscribe',
|
|
350
|
+
exclude: 'optional - value for exclude passed into subscribe',
|
|
351
|
+
include: 'optional - value for include passed into subscribe',
|
|
352
|
+
gps_metadata: 'optional - value for gps_metadata passed into subscribe',
|
|
353
|
+
include_raw: 'optional - value for include_raw passed into subscribe'
|
|
330
354
|
)
|
|
331
355
|
|
|
356
|
+
# Run the send_text class method for this module.
|
|
332
357
|
#{self}.send_text(
|
|
333
|
-
mqtt_obj: '
|
|
334
|
-
from: '
|
|
335
|
-
to: 'optional -
|
|
336
|
-
root_topic: 'optional -
|
|
337
|
-
region: 'optional -
|
|
338
|
-
topic: 'optional -
|
|
339
|
-
channel: 'optional - channel
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
358
|
+
mqtt_obj: 'optional - value for mqtt_obj passed into send_text',
|
|
359
|
+
from: 'optional - value for from passed into send_text',
|
|
360
|
+
to: 'optional - value for to passed into send_text',
|
|
361
|
+
root_topic: 'optional - value for root_topic passed into send_text',
|
|
362
|
+
region: 'optional - value for region passed into send_text',
|
|
363
|
+
topic: 'optional - value for topic passed into send_text',
|
|
364
|
+
channel: 'optional - value for channel passed into send_text',
|
|
365
|
+
via: 'optional - value for via passed into send_text',
|
|
366
|
+
text: 'optional - value for text passed into send_text'
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
# Run the send_data class method for this module.
|
|
370
|
+
#{self}.send_data(
|
|
371
|
+
mqtt_obj: 'optional - value for mqtt_obj passed into send_data',
|
|
372
|
+
data: 'optional - value for data passed into send_data',
|
|
373
|
+
from: 'optional - value for from passed into send_data',
|
|
374
|
+
to: 'optional - value for to passed into send_data',
|
|
375
|
+
root_topic: 'optional - value for root_topic passed into send_data',
|
|
376
|
+
region: 'optional - value for region passed into send_data',
|
|
377
|
+
topic: 'optional - value for topic passed into send_data',
|
|
378
|
+
channel: 'optional - value for channel passed into send_data',
|
|
379
|
+
via: 'optional - value for via passed into send_data'
|
|
346
380
|
)
|
|
347
381
|
|
|
348
|
-
|
|
349
|
-
|
|
382
|
+
# Run the disconnect class method for this module.
|
|
383
|
+
#{self}.disconnect(
|
|
384
|
+
mqtt_obj: 'optional - value for mqtt_obj passed into disconnect'
|
|
350
385
|
)
|
|
351
386
|
|
|
387
|
+
# Run the authors class method for this module.
|
|
352
388
|
#{self}.authors
|
|
389
|
+
|
|
353
390
|
"
|
|
354
391
|
end
|
|
355
392
|
end
|
data/lib/meshtastic/paxcount.rb
CHANGED
|
@@ -4,7 +4,7 @@ require 'meshtastic/paxcount_pb'
|
|
|
4
4
|
|
|
5
5
|
module Meshtastic
|
|
6
6
|
class Paxcount
|
|
7
|
-
def self.build(opts = {})
|
|
7
|
+
public_class_method def self.build(opts = {})
|
|
8
8
|
count = new
|
|
9
9
|
count.wifi = opts[:wifi].to_i if opts[:wifi]
|
|
10
10
|
count.ble = opts[:ble].to_i if opts[:ble]
|
|
@@ -12,7 +12,7 @@ module Meshtastic
|
|
|
12
12
|
count
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def self.transmit(opts = {})
|
|
15
|
+
public_class_method def self.transmit(opts = {})
|
|
16
16
|
data = Meshtastic::Data.new(
|
|
17
17
|
portnum: :PAXCOUNTER_APP,
|
|
18
18
|
payload: build(opts).to_proto
|
|
@@ -20,14 +20,25 @@ module Meshtastic
|
|
|
20
20
|
Meshtastic.deliver_data(opts.merge(data: data, port_num: Meshtastic::PortNum::PAXCOUNTER_APP))
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def self.authors
|
|
23
|
+
public_class_method def self.authors
|
|
24
24
|
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
def self.help
|
|
28
|
-
puts "USAGE:
|
|
29
|
-
#
|
|
27
|
+
public_class_method def self.help
|
|
28
|
+
puts " USAGE:
|
|
29
|
+
# Run the build class method for this module.
|
|
30
|
+
#{self}.build(
|
|
31
|
+
wifi: 'optional - value for wifi passed into build',
|
|
32
|
+
ble: 'optional - value for ble passed into build',
|
|
33
|
+
uptime: 'optional - value for uptime passed into build'
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# Run the transmit class method for this module.
|
|
37
|
+
#{self}.transmit
|
|
38
|
+
|
|
39
|
+
# Run the authors class method for this module.
|
|
30
40
|
#{self}.authors
|
|
41
|
+
|
|
31
42
|
"
|
|
32
43
|
end
|
|
33
44
|
end
|
data/lib/meshtastic/portnums.rb
CHANGED
|
@@ -4,7 +4,8 @@ require 'meshtastic/portnums_pb'
|
|
|
4
4
|
|
|
5
5
|
module Meshtastic
|
|
6
6
|
module Portnums
|
|
7
|
-
def self.lookup(
|
|
7
|
+
public_class_method def self.lookup(opts = {})
|
|
8
|
+
name_or_number = opts[:value] || opts[:name_or_number]
|
|
8
9
|
if name_or_number.is_a?(Integer)
|
|
9
10
|
Meshtastic::PortNum.lookup(name_or_number)
|
|
10
11
|
else
|
|
@@ -12,15 +13,21 @@ module Meshtastic
|
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
|
|
15
|
-
def self.authors
|
|
16
|
+
public_class_method def self.authors
|
|
16
17
|
"AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n "
|
|
17
18
|
end
|
|
18
19
|
|
|
19
|
-
def self.help
|
|
20
|
-
puts "USAGE:
|
|
21
|
-
#
|
|
22
|
-
#{self}.lookup(
|
|
20
|
+
public_class_method def self.help
|
|
21
|
+
puts " USAGE:
|
|
22
|
+
# Run the lookup class method for this module.
|
|
23
|
+
#{self}.lookup(
|
|
24
|
+
value: 'optional - value for value passed into lookup',
|
|
25
|
+
name_or_number: 'optional - value for name_or_number passed into lookup'
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
# Run the authors class method for this module.
|
|
23
29
|
#{self}.authors
|
|
30
|
+
|
|
24
31
|
"
|
|
25
32
|
end
|
|
26
33
|
end
|