From f7ec8cda7e452f6b0d8adec4c1b5a1dc080e8638 Mon Sep 17 00:00:00 2001 From: iz1kga Date: Fri, 12 Feb 2021 22:38:22 +0100 Subject: [PATCH 01/48] First Try to solve issue #54 by IZ1IVA adding the feature requested --- meshtastic/__main__.py | 33 ++++++++++++++++++++++++++++++--- setup.py | 2 +- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index c1c6a51..cf011e1 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -8,6 +8,7 @@ import google.protobuf.json_format import pyqrcode import traceback import pkg_resources +from easy_table import EasyTable """We only import the tunnel code if we are on a platform that can run it""" have_tunnel = platform.system() == 'Linux' @@ -132,6 +133,26 @@ def setRouter(interface, on): prefs.gps_attempt_time = 0 prefs.gps_update_interval = 0 +def printNodes(nodes): + #Create the table and define the structure + table = EasyTable("Nodes") + table.setCorners("/", "\\", "\\", "/") + table.setOuterStructure("|", "-") + table.setInnerStructure("|", "-", "+") + + tableData = [] + for node in nodes: + #aux var to get not defined keys + lat=node['position'].get("latitude", "N/A") + lon=node['position'].get("longitude", "N/A") + alt=node['position'].get("altitude", "N/A") + batt=node['position'].get("batteryLevel", "N/A") + snr=node.get("snr", "N/A") + tableData.append({"User":node['user']['longName'], + "Position":"Lat:"+lat+",Lon:"+lon+",Alt:"+alt, + "Battery":batt, "SNR":snr}) + table.setData(tableData) + table.displayTable() def onConnected(interface): """Callback invoked when we connect to a radio""" @@ -273,6 +294,10 @@ def onConnected(interface): for n in interface.nodes.values(): print(n) + if args.nodes: + closeNow = True + printNodes(interface.nodes.values()) + if args.qr: closeNow = True print(f"Channel URL {interface.channelURL}") @@ -283,7 +308,7 @@ def onConnected(interface): from . import tunnel closeNow = False # Even if others said we could close, stay open if the user asked for a tunnel tunnel.Tunnel(interface, subnet=args.tunnel_net) - + except Exception as ex: print(ex) @@ -291,7 +316,6 @@ def onConnected(interface): if (not args.seriallog) and closeNow: interface.close() # after running command then exit - def onNode(node): """Callback invoked when the node DB changes""" print(f"Node changed: {node}") @@ -316,7 +340,7 @@ def common(): args.destOrAll = "^all" if not args.seriallog: - if args.info or args.set or args.seturl or args.setowner or args.setlat or args.setlon or \ + if args.info or args.nodes or args.set or args.seturl or args.setowner or args.setlat or args.setlon or \ args.settime or \ args.setch_longslow or args.setch_shortfast or args.setstr or args.setchan or args.sendtext or \ args.router != None or args.qr: @@ -367,6 +391,9 @@ def initParser(): parser.add_argument("--info", help="Read and display the radio config information", action="store_true") + parser.add_argument("--nodes", help="Print Node List in a pretty formatted table", + action="store_true") + parser.add_argument("--qr", help="Display the QR code that corresponds to the current channel", action="store_true") diff --git a/setup.py b/setup.py index 7f01ed4..ac6167d 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ setup( include_package_data=True, install_requires=["pyserial>=3.4", "protobuf>=3.13.0", "pypubsub>=4.0.3", "dotmap>=1.3.14", "pexpect>=4.6.0", "pyqrcode>=1.2.1", - "pygatt>=4.0.5"], + "pygatt>=4.0.5", "easy-table>=0.0.4"], extras_require={ 'tunnel': ["pytap2>=2.0.0"] }, From c0e374430bd69182cc46168e8b92893b081f2030 Mon Sep 17 00:00:00 2001 From: iz1kga Date: Fri, 12 Feb 2021 22:50:14 +0100 Subject: [PATCH 02/48] cast data as string in order to avoid concatenation error --- meshtastic/__main__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index cf011e1..06289ce 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -143,11 +143,11 @@ def printNodes(nodes): tableData = [] for node in nodes: #aux var to get not defined keys - lat=node['position'].get("latitude", "N/A") - lon=node['position'].get("longitude", "N/A") - alt=node['position'].get("altitude", "N/A") - batt=node['position'].get("batteryLevel", "N/A") - snr=node.get("snr", "N/A") + lat=str(node['position'].get("latitude", "N/A")) + lon=str(node['position'].get("longitude", "N/A")) + alt=str(node['position'].get("altitude", "N/A")) + batt=str(node['position'].get("batteryLevel", "N/A")) + snr=str(node.get("snr", "N/A")) tableData.append({"User":node['user']['longName'], "Position":"Lat:"+lat+",Lon:"+lon+",Alt:"+alt, "Battery":batt, "SNR":snr}) From 6b6f0cd19dbe68503ae9f9769c55572011f79dd7 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 13 Feb 2021 14:11:48 +0800 Subject: [PATCH 03/48] 1.1.46 --- README.md | 2 +- docs/meshtastic/mesh_pb2.html | 172 +++++++++++++++++++++++------- docs/meshtastic/portnums_pb2.html | 13 ++- docs/meshtastic/test.html | 4 +- meshtastic/mesh_pb2.py | 127 +++++++++++++++------- meshtastic/portnums_pb2.py | 13 ++- meshtastic/test.py | 2 +- proto | 2 +- setup.py | 2 +- 9 files changed, 249 insertions(+), 88 deletions(-) diff --git a/README.md b/README.md index cec5399..af589d3 100644 --- a/README.md +++ b/README.md @@ -105,5 +105,5 @@ sudo usermod -a -G dialout If you need to build a new release you'll need: ``` apt install pandoc -sudo pip3 install markdown pandoc webencodings pyparsing +sudo pip3 install markdown pandoc webencodings pyparsing twine ``` \ No newline at end of file diff --git a/docs/meshtastic/mesh_pb2.html b/docs/meshtastic/mesh_pb2.html index e38cda5..9795504 100644 --- a/docs/meshtastic/mesh_pb2.html +++ b/docs/meshtastic/mesh_pb2.html @@ -48,7 +48,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003', - serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xd5\x01\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xd9\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x19\n\x11\x63urrent_packet_id\x18\x0b \x01(\r\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xdd\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' , dependencies=[portnums__pb2.DESCRIPTOR,]) @@ -85,8 +85,8 @@ _ERRORREASON = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3776, - serialized_end=3877, + serialized_start=3913, + serialized_end=4014, ) _sym_db.RegisterEnumDescriptor(_ERRORREASON) @@ -108,8 +108,8 @@ _CONSTANTS = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3879, - serialized_end=3925, + serialized_start=4016, + serialized_end=4062, ) _sym_db.RegisterEnumDescriptor(_CONSTANTS) @@ -159,8 +159,8 @@ _REGIONCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3927, - serialized_end=4021, + serialized_start=4064, + serialized_end=4158, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -242,8 +242,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4024, - serialized_end=4233, + serialized_start=4161, + serialized_end=4370, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -277,8 +277,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4235, - serialized_end=4341, + serialized_start=4372, + serialized_end=4478, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -304,8 +304,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4343, - serialized_end=4407, + serialized_start=4480, + serialized_end=4544, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -355,8 +355,8 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4410, - serialized_end=4585, + serialized_start=4547, + serialized_end=4722, ) _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE) @@ -414,6 +414,48 @@ InvalidRadioSetting = 7 TransmitFailed = 8 +_MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( + name='Priority', + full_name='MeshPacket.Priority', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='UNSET', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MIN', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BACKGROUND', index=2, number=10, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='DEFAULT', index=3, number=64, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='RELIABLE', index=4, number=70, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ACK', index=5, number=120, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MAX', index=6, number=127, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=903, + serialized_end=994, +) +_sym_db.RegisterEnumDescriptor(_MESHPACKET_PRIORITY) + _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( name='ModemConfig', full_name='ChannelSettings.ModemConfig', @@ -439,8 +481,8 @@ _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=1144, - serialized_end=1240, + serialized_start=1277, + serialized_end=1373, ) _sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG) @@ -481,8 +523,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3203, - serialized_end=3291, + serialized_start=3340, + serialized_end=3428, ) _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL) @@ -858,11 +900,19 @@ _MESHPACKET = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='priority', full_name='MeshPacket.priority', index=10, + number=12, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ + _MESHPACKET_PRIORITY, ], serialized_options=None, is_extendable=False, @@ -874,7 +924,7 @@ _MESHPACKET = _descriptor.Descriptor( index=0, containing_type=None, fields=[]), ], serialized_start=666, - serialized_end=879, + serialized_end=1012, ) @@ -975,8 +1025,8 @@ _CHANNELSETTINGS = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=882, - serialized_end=1240, + serialized_start=1015, + serialized_end=1373, ) @@ -1293,8 +1343,8 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1358, - serialized_end=2653, + serialized_start=1491, + serialized_end=2786, ) _RADIOCONFIG = _descriptor.Descriptor( @@ -1330,8 +1380,8 @@ _RADIOCONFIG = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1243, - serialized_end=2653, + serialized_start=1376, + serialized_end=2786, ) @@ -1389,8 +1439,8 @@ _NODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2655, - serialized_end=2759, + serialized_start=2788, + serialized_end=2892, ) @@ -1477,7 +1527,7 @@ _MYNODEINFO = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=b'\030\001', file=DESCRIPTOR), _descriptor.FieldDescriptor( name='node_num_bits', full_name='MyNodeInfo.node_num_bits', index=11, number=12, type=13, cpp_type=3, label=1, @@ -1511,8 +1561,8 @@ _MYNODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2762, - serialized_end=3107, + serialized_start=2895, + serialized_end=3244, ) @@ -1564,8 +1614,8 @@ _LOGRECORD = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3110, - serialized_end=3291, + serialized_start=3247, + serialized_end=3428, ) @@ -1654,8 +1704,8 @@ _FROMRADIO = _descriptor.Descriptor( name='payloadVariant', full_name='FromRadio.payloadVariant', index=0, containing_type=None, fields=[]), ], - serialized_start=3294, - serialized_end=3583, + serialized_start=3431, + serialized_end=3720, ) @@ -1716,8 +1766,8 @@ _TORADIO = _descriptor.Descriptor( name='payloadVariant', full_name='ToRadio.payloadVariant', index=0, containing_type=None, fields=[]), ], - serialized_start=3586, - serialized_end=3774, + serialized_start=3723, + serialized_end=3911, ) _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM @@ -1752,6 +1802,8 @@ _SUBPACKET.oneofs_by_name['ackVariant'].fields.append( _SUBPACKET.fields_by_name['fail_id']) _SUBPACKET.fields_by_name['fail_id'].containing_oneof = _SUBPACKET.oneofs_by_name['ackVariant'] _MESHPACKET.fields_by_name['decoded'].message_type = _SUBPACKET +_MESHPACKET.fields_by_name['priority'].enum_type = _MESHPACKET_PRIORITY +_MESHPACKET_PRIORITY.containing_type = _MESHPACKET _MESHPACKET.oneofs_by_name['payloadVariant'].fields.append( _MESHPACKET.fields_by_name['decoded']) _MESHPACKET.fields_by_name['decoded'].containing_oneof = _MESHPACKET.oneofs_by_name['payloadVariant'] @@ -1947,6 +1999,7 @@ DESCRIPTOR._options = None _SUBPACKET.fields_by_name['position']._options = None _SUBPACKET.fields_by_name['user']._options = None _RADIOCONFIG.fields_by_name['channel_settings']._options = None +_MYNODEINFO.fields_by_name['current_packet_id']._options = None # @@protoc_insertion_point(module_scope) @@ -2216,10 +2269,42 @@ _RADIOCONFIG.fields_by_name['channel_settings']._options = None

Class variables

+
var ACK
+
+
+
+
var BACKGROUND
+
+
+
+
var DEFAULT
+
+
+
var DESCRIPTOR
+
var MAX
+
+
+
+
var MIN
+
+
+
+
var Priority
+
+
+
+
var RELIABLE
+
+
+
+
var UNSET
+
+
+

Instance variables

@@ -2247,6 +2332,10 @@ _RADIOCONFIG.fields_by_name['channel_settings']._options = None

Field MeshPacket.id

+
var priority
+
+

Field MeshPacket.priority

+
var rx_snr

Field MeshPacket.rx_snr

@@ -2719,13 +2808,22 @@ _RADIOCONFIG.fields_by_name['channel_settings']._options = None
  • MeshPacket

      +
    • ACK
    • +
    • BACKGROUND
    • +
    • DEFAULT
    • DESCRIPTOR
    • +
    • MAX
    • +
    • MIN
    • +
    • Priority
    • +
    • RELIABLE
    • +
    • UNSET
    • channel_index
    • decoded
    • encrypted
    • from
    • hop_limit
    • id
    • +
    • priority
    • rx_snr
    • rx_time
    • to
    • diff --git a/docs/meshtastic/portnums_pb2.html b/docs/meshtastic/portnums_pb2.html index ee809ab..62a1449 100644 --- a/docs/meshtastic/portnums_pb2.html +++ b/docs/meshtastic/portnums_pb2.html @@ -47,7 +47,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', - serialized_pb=b'\n\x0eportnums.proto*\xdd\x01\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + serialized_pb=b'\n\x0eportnums.proto*\xf1\x01\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -93,18 +93,22 @@ _PORTNUM = _descriptor.EnumDescriptor( serialized_options=None, type=None), _descriptor.EnumValueDescriptor( - name='PRIVATE_APP', index=9, number=256, + name='RANGE_TEST_APP', index=9, number=66, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( - name='ATAK_FORWARDER', index=10, number=257, + name='PRIVATE_APP', index=10, number=256, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ATAK_FORWARDER', index=11, number=257, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=19, - serialized_end=240, + serialized_end=260, ) _sym_db.RegisterEnumDescriptor(_PORTNUM) @@ -118,6 +122,7 @@ REPLY_APP = 32 IP_TUNNEL_APP = 33 SERIAL_APP = 64 STORE_FORWARD_APP = 65 +RANGE_TEST_APP = 66 PRIVATE_APP = 256 ATAK_FORWARDER = 257 diff --git a/docs/meshtastic/test.html b/docs/meshtastic/test.html index 25bd594..ccd2028 100644 --- a/docs/meshtastic/test.html +++ b/docs/meshtastic/test.html @@ -123,7 +123,7 @@ def testThread(numTests=50): f"Test failed, expected packet not received ({numFail} failures so far)") else: numSuccess = numSuccess + 1 - logging.info(f"Test succeeded ({numSuccess} successes so far)") + logging.info(f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") if numFail >= 3: for i in interfaces: @@ -375,7 +375,7 @@ toInterface {[type]} – [description]

      f"Test failed, expected packet not received ({numFail} failures so far)") else: numSuccess = numSuccess + 1 - logging.info(f"Test succeeded ({numSuccess} successes so far)") + logging.info(f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") if numFail >= 3: for i in interfaces: diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py index 8a9b0c2..9ff5eb7 100644 --- a/meshtastic/mesh_pb2.py +++ b/meshtastic/mesh_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003', - serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xd5\x01\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xd9\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x19\n\x11\x63urrent_packet_id\x18\x0b \x01(\r\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xdd\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' , dependencies=[portnums__pb2.DESCRIPTOR,]) @@ -57,8 +57,8 @@ _ERRORREASON = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3776, - serialized_end=3877, + serialized_start=3913, + serialized_end=4014, ) _sym_db.RegisterEnumDescriptor(_ERRORREASON) @@ -80,8 +80,8 @@ _CONSTANTS = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3879, - serialized_end=3925, + serialized_start=4016, + serialized_end=4062, ) _sym_db.RegisterEnumDescriptor(_CONSTANTS) @@ -131,8 +131,8 @@ _REGIONCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3927, - serialized_end=4021, + serialized_start=4064, + serialized_end=4158, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -214,8 +214,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4024, - serialized_end=4233, + serialized_start=4161, + serialized_end=4370, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -249,8 +249,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4235, - serialized_end=4341, + serialized_start=4372, + serialized_end=4478, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -276,8 +276,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4343, - serialized_end=4407, + serialized_start=4480, + serialized_end=4544, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -327,8 +327,8 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4410, - serialized_end=4585, + serialized_start=4547, + serialized_end=4722, ) _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE) @@ -386,6 +386,48 @@ InvalidRadioSetting = 7 TransmitFailed = 8 +_MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( + name='Priority', + full_name='MeshPacket.Priority', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='UNSET', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MIN', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BACKGROUND', index=2, number=10, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='DEFAULT', index=3, number=64, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='RELIABLE', index=4, number=70, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ACK', index=5, number=120, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MAX', index=6, number=127, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=903, + serialized_end=994, +) +_sym_db.RegisterEnumDescriptor(_MESHPACKET_PRIORITY) + _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( name='ModemConfig', full_name='ChannelSettings.ModemConfig', @@ -411,8 +453,8 @@ _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=1144, - serialized_end=1240, + serialized_start=1277, + serialized_end=1373, ) _sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG) @@ -453,8 +495,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3203, - serialized_end=3291, + serialized_start=3340, + serialized_end=3428, ) _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL) @@ -830,11 +872,19 @@ _MESHPACKET = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='priority', full_name='MeshPacket.priority', index=10, + number=12, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ + _MESHPACKET_PRIORITY, ], serialized_options=None, is_extendable=False, @@ -846,7 +896,7 @@ _MESHPACKET = _descriptor.Descriptor( index=0, containing_type=None, fields=[]), ], serialized_start=666, - serialized_end=879, + serialized_end=1012, ) @@ -947,8 +997,8 @@ _CHANNELSETTINGS = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=882, - serialized_end=1240, + serialized_start=1015, + serialized_end=1373, ) @@ -1265,8 +1315,8 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1358, - serialized_end=2653, + serialized_start=1491, + serialized_end=2786, ) _RADIOCONFIG = _descriptor.Descriptor( @@ -1302,8 +1352,8 @@ _RADIOCONFIG = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1243, - serialized_end=2653, + serialized_start=1376, + serialized_end=2786, ) @@ -1361,8 +1411,8 @@ _NODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2655, - serialized_end=2759, + serialized_start=2788, + serialized_end=2892, ) @@ -1449,7 +1499,7 @@ _MYNODEINFO = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=b'\030\001', file=DESCRIPTOR), _descriptor.FieldDescriptor( name='node_num_bits', full_name='MyNodeInfo.node_num_bits', index=11, number=12, type=13, cpp_type=3, label=1, @@ -1483,8 +1533,8 @@ _MYNODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2762, - serialized_end=3107, + serialized_start=2895, + serialized_end=3244, ) @@ -1536,8 +1586,8 @@ _LOGRECORD = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3110, - serialized_end=3291, + serialized_start=3247, + serialized_end=3428, ) @@ -1626,8 +1676,8 @@ _FROMRADIO = _descriptor.Descriptor( name='payloadVariant', full_name='FromRadio.payloadVariant', index=0, containing_type=None, fields=[]), ], - serialized_start=3294, - serialized_end=3583, + serialized_start=3431, + serialized_end=3720, ) @@ -1688,8 +1738,8 @@ _TORADIO = _descriptor.Descriptor( name='payloadVariant', full_name='ToRadio.payloadVariant', index=0, containing_type=None, fields=[]), ], - serialized_start=3586, - serialized_end=3774, + serialized_start=3723, + serialized_end=3911, ) _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM @@ -1724,6 +1774,8 @@ _SUBPACKET.oneofs_by_name['ackVariant'].fields.append( _SUBPACKET.fields_by_name['fail_id']) _SUBPACKET.fields_by_name['fail_id'].containing_oneof = _SUBPACKET.oneofs_by_name['ackVariant'] _MESHPACKET.fields_by_name['decoded'].message_type = _SUBPACKET +_MESHPACKET.fields_by_name['priority'].enum_type = _MESHPACKET_PRIORITY +_MESHPACKET_PRIORITY.containing_type = _MESHPACKET _MESHPACKET.oneofs_by_name['payloadVariant'].fields.append( _MESHPACKET.fields_by_name['decoded']) _MESHPACKET.fields_by_name['decoded'].containing_oneof = _MESHPACKET.oneofs_by_name['payloadVariant'] @@ -1919,4 +1971,5 @@ DESCRIPTOR._options = None _SUBPACKET.fields_by_name['position']._options = None _SUBPACKET.fields_by_name['user']._options = None _RADIOCONFIG.fields_by_name['channel_settings']._options = None +_MYNODEINFO.fields_by_name['current_packet_id']._options = None # @@protoc_insertion_point(module_scope) diff --git a/meshtastic/portnums_pb2.py b/meshtastic/portnums_pb2.py index 171a206..75ce197 100644 --- a/meshtastic/portnums_pb2.py +++ b/meshtastic/portnums_pb2.py @@ -19,7 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', - serialized_pb=b'\n\x0eportnums.proto*\xdd\x01\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + serialized_pb=b'\n\x0eportnums.proto*\xf1\x01\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -65,18 +65,22 @@ _PORTNUM = _descriptor.EnumDescriptor( serialized_options=None, type=None), _descriptor.EnumValueDescriptor( - name='PRIVATE_APP', index=9, number=256, + name='RANGE_TEST_APP', index=9, number=66, serialized_options=None, type=None), _descriptor.EnumValueDescriptor( - name='ATAK_FORWARDER', index=10, number=257, + name='PRIVATE_APP', index=10, number=256, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ATAK_FORWARDER', index=11, number=257, serialized_options=None, type=None), ], containing_type=None, serialized_options=None, serialized_start=19, - serialized_end=240, + serialized_end=260, ) _sym_db.RegisterEnumDescriptor(_PORTNUM) @@ -90,6 +94,7 @@ REPLY_APP = 32 IP_TUNNEL_APP = 33 SERIAL_APP = 64 STORE_FORWARD_APP = 65 +RANGE_TEST_APP = 66 PRIVATE_APP = 256 ATAK_FORWARDER = 257 diff --git a/meshtastic/test.py b/meshtastic/test.py index 142d56f..1f71674 100644 --- a/meshtastic/test.py +++ b/meshtastic/test.py @@ -95,7 +95,7 @@ def testThread(numTests=50): f"Test failed, expected packet not received ({numFail} failures so far)") else: numSuccess = numSuccess + 1 - logging.info(f"Test succeeded ({numSuccess} successes so far)") + logging.info(f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") if numFail >= 3: for i in interfaces: diff --git a/proto b/proto index 8492e40..0cadaed 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 8492e4030ad928ee5fc97f8ead95325dba7f9492 +Subproject commit 0cadaed3953f66cf1edc99d0fa53e4fd5ebf56d6 diff --git a/setup.py b/setup.py index ac6167d..548a06a 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.1.45", + version="1.1.46", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown", From cb0a65dae986324a183cddc353ed862e6d113367 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Mon, 15 Feb 2021 14:19:49 +0800 Subject: [PATCH 04/48] fix #57 for rasberrypi --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 548a06a..1290742 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.1.46", + version="1.1.49", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown", @@ -29,7 +29,7 @@ setup( include_package_data=True, install_requires=["pyserial>=3.4", "protobuf>=3.13.0", "pypubsub>=4.0.3", "dotmap>=1.3.14", "pexpect>=4.6.0", "pyqrcode>=1.2.1", - "pygatt>=4.0.5", "easy-table>=0.0.4"], + "pygatt>=4.0.5", "easy-table==0.0.4"], extras_require={ 'tunnel': ["pytap2>=2.0.0"] }, From 6706c111a6e3c2b7c1102fe61cdfc24e6d7aea42 Mon Sep 17 00:00:00 2001 From: iz1kga Date: Mon, 15 Feb 2021 11:35:17 +0100 Subject: [PATCH 05/48] fixed decimal places and LastHeard --- meshtastic/__main__.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 06289ce..53b8694 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -133,6 +133,16 @@ def setRouter(interface, on): prefs.gps_attempt_time = 0 prefs.gps_update_interval = 0 + +#Returns formatted value +def formatFloat(value, formatStr, default="N/A"): + return formatStr.format(value) if value else default + +#Returns Last Heard Time in human readable format +def getLH(ts, default="N/A"): + return datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S') if ts else default + +#Print Nodes def printNodes(nodes): #Create the table and define the structure table = EasyTable("Nodes") @@ -143,14 +153,15 @@ def printNodes(nodes): tableData = [] for node in nodes: #aux var to get not defined keys - lat=str(node['position'].get("latitude", "N/A")) - lon=str(node['position'].get("longitude", "N/A")) - alt=str(node['position'].get("altitude", "N/A")) - batt=str(node['position'].get("batteryLevel", "N/A")) - snr=str(node.get("snr", "N/A")) + LH= getLH(node['position'].get("time")) + lat=formatFloat(node['position'].get("latitude"), "{:.4f}", "N/A") + lon=formatFloat(node['position'].get("longitude"), "{:.4f}", "N/A") + alt=formatFloat(node['position'].get("altitude"), "{:.4f}", "N/A") + batt=formatFloat(node['position'].get("batteryLevel"), "{:.2f}", "N/A") + snr=formatFloat(node.get("snr"), "{:.2f}", "N/A") tableData.append({"User":node['user']['longName'], "Position":"Lat:"+lat+",Lon:"+lon+",Alt:"+alt, - "Battery":batt, "SNR":snr}) + "Battery":batt, "SNR":snr, "LastHeard":LH}) table.setData(tableData) table.displayTable() From 6cd8c17df50a5839e453fbae598dadab20695835 Mon Sep 17 00:00:00 2001 From: iz1kga Date: Mon, 15 Feb 2021 14:20:13 +0100 Subject: [PATCH 06/48] fix missing datetime --- meshtastic/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 53b8694..212ad07 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -8,6 +8,7 @@ import google.protobuf.json_format import pyqrcode import traceback import pkg_resources +from datetime import datetime from easy_table import EasyTable """We only import the tunnel code if we are on a platform that can run it""" @@ -156,7 +157,7 @@ def printNodes(nodes): LH= getLH(node['position'].get("time")) lat=formatFloat(node['position'].get("latitude"), "{:.4f}", "N/A") lon=formatFloat(node['position'].get("longitude"), "{:.4f}", "N/A") - alt=formatFloat(node['position'].get("altitude"), "{:.4f}", "N/A") + alt=formatFloat(node['position'].get("altitude"), "{:.2f}", "N/A") batt=formatFloat(node['position'].get("batteryLevel"), "{:.2f}", "N/A") snr=formatFloat(node.get("snr"), "{:.2f}", "N/A") tableData.append({"User":node['user']['longName'], From a29076dc8e719eba21c2346e37acebc1196d5fd0 Mon Sep 17 00:00:00 2001 From: iz1kga Date: Mon, 15 Feb 2021 14:41:55 +0100 Subject: [PATCH 07/48] unit & cosmetic --- meshtastic/__main__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 212ad07..dc10406 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -136,8 +136,8 @@ def setRouter(interface, on): #Returns formatted value -def formatFloat(value, formatStr, default="N/A"): - return formatStr.format(value) if value else default +def formatFloat(value, formatStr="{:.2f}", unit="", default="N/A"): + return formatStr.format(value)+unit if value else default #Returns Last Heard Time in human readable format def getLH(ts, default="N/A"): @@ -155,13 +155,13 @@ def printNodes(nodes): for node in nodes: #aux var to get not defined keys LH= getLH(node['position'].get("time")) - lat=formatFloat(node['position'].get("latitude"), "{:.4f}", "N/A") - lon=formatFloat(node['position'].get("longitude"), "{:.4f}", "N/A") - alt=formatFloat(node['position'].get("altitude"), "{:.2f}", "N/A") - batt=formatFloat(node['position'].get("batteryLevel"), "{:.2f}", "N/A") - snr=formatFloat(node.get("snr"), "{:.2f}", "N/A") + lat=formatFloat(node['position'].get("latitude"), "{:.4f}", "°") + lon=formatFloat(node['position'].get("longitude"), "{:.4f}", "°") + alt=formatFloat(node['position'].get("altitude"), "{:.0f}", " m") + batt=formatFloat(node['position'].get("batteryLevel"), "{:.2f}", "%") + snr=formatFloat(node.get("snr"), "{:.2f}", " dB") tableData.append({"User":node['user']['longName'], - "Position":"Lat:"+lat+",Lon:"+lon+",Alt:"+alt, + "Position":"Lat:"+lat+", Lon:"+lon+", Alt:"+alt, "Battery":batt, "SNR":snr, "LastHeard":LH}) table.setData(tableData) table.displayTable() From f28bc836cb0ba1dbd5d0ad334a560d0cd26664e6 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Tue, 23 Feb 2021 10:52:11 +0800 Subject: [PATCH 08/48] update protos --- meshtastic/apponly_pb2.py | 10 +- meshtastic/deviceonly_pb2.py | 24 +- meshtastic/environmental_measurement_pb2.py | 84 +++ meshtastic/mesh_pb2.py | 557 ++++++++++++-------- meshtastic/portnums_pb2.py | 54 +- meshtastic/remote_hardware_pb2.py | 29 +- proto | 2 +- 7 files changed, 491 insertions(+), 269 deletions(-) create mode 100644 meshtastic/environmental_measurement_pb2.py diff --git a/meshtastic/apponly_pb2.py b/meshtastic/apponly_pb2.py index b61e850..41aaeb0 100644 --- a/meshtastic/apponly_pb2.py +++ b/meshtastic/apponly_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: apponly.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -19,6 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\007AppOnlyH\003', + create_key=_descriptor._internal_create_key, serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\tB \n\x13\x63om.geeksville.meshB\x07\x41ppOnlyH\x03\x62\x06proto3' , dependencies=[mesh__pb2.DESCRIPTOR,]) @@ -32,6 +33,7 @@ _SERVICEENVELOPE = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='packet', full_name='ServiceEnvelope.packet', index=0, @@ -39,21 +41,21 @@ _SERVICEENVELOPE = _descriptor.Descriptor( has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='channel_id', full_name='ServiceEnvelope.channel_id', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gateway_id', full_name='ServiceEnvelope.gateway_id', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], diff --git a/meshtastic/deviceonly_pb2.py b/meshtastic/deviceonly_pb2.py index e1f110a..56d0150 100644 --- a/meshtastic/deviceonly_pb2.py +++ b/meshtastic/deviceonly_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: deviceonly.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -19,6 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nDeviceOnlyH\003', + create_key=_descriptor._internal_create_key, serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\"\xab\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12,\n\x12secondary_channels\x18\x0c \x03(\x0b\x32\x10.ChannelSettingsB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3' , dependencies=[mesh__pb2.DESCRIPTOR,]) @@ -32,6 +33,7 @@ _DEVICESTATE = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='radio', full_name='DeviceState.radio', index=0, @@ -39,70 +41,70 @@ _DEVICESTATE = _descriptor.Descriptor( has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='my_node', full_name='DeviceState.my_node', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='owner', full_name='DeviceState.owner', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='node_db', full_name='DeviceState.node_db', index=3, number=4, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receive_queue', full_name='DeviceState.receive_queue', index=4, number=5, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='version', full_name='DeviceState.version', index=5, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rx_text_message', full_name='DeviceState.rx_text_message', index=6, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='no_save', full_name='DeviceState.no_save', index=7, number=9, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='did_gps_reset', full_name='DeviceState.did_gps_reset', index=8, number=11, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='secondary_channels', full_name='DeviceState.secondary_channels', index=9, number=12, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], diff --git a/meshtastic/environmental_measurement_pb2.py b/meshtastic/environmental_measurement_pb2.py new file mode 100644 index 0000000..b502db8 --- /dev/null +++ b/meshtastic/environmental_measurement_pb2.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: environmental_measurement.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='environmental_measurement.proto', + package='', + syntax='proto3', + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x1f\x65nvironmental_measurement.proto\"g\n\x18\x45nvironmentalMeasurement\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x62\x06proto3' +) + + + + +_ENVIRONMENTALMEASUREMENT = _descriptor.Descriptor( + name='EnvironmentalMeasurement', + full_name='EnvironmentalMeasurement', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='temperature', full_name='EnvironmentalMeasurement.temperature', index=0, + number=1, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='relative_humidity', full_name='EnvironmentalMeasurement.relative_humidity', index=1, + number=2, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='barometric_pressure', full_name='EnvironmentalMeasurement.barometric_pressure', index=2, + number=3, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=35, + serialized_end=138, +) + +DESCRIPTOR.message_types_by_name['EnvironmentalMeasurement'] = _ENVIRONMENTALMEASUREMENT +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +EnvironmentalMeasurement = _reflection.GeneratedProtocolMessageType('EnvironmentalMeasurement', (_message.Message,), { + 'DESCRIPTOR' : _ENVIRONMENTALMEASUREMENT, + '__module__' : 'environmental_measurement_pb2' + # @@protoc_insertion_point(class_scope:EnvironmentalMeasurement) + }) +_sym_db.RegisterMessage(EnvironmentalMeasurement) + + +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py index 9ff5eb7..34c279e 100644 --- a/meshtastic/mesh_pb2.py +++ b/meshtastic/mesh_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mesh.proto - +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -20,7 +20,8 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003', - serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xdd\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xe1\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' , dependencies=[portnums__pb2.DESCRIPTOR,]) @@ -29,36 +30,43 @@ _ERRORREASON = _descriptor.EnumDescriptor( full_name='ErrorReason', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='NONE', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NO_ROUTE', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='GOT_NAK', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TIMEOUT', index=3, number=3, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NO_INTERFACE', index=4, number=4, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MAX_RETRANSMIT', index=5, number=5, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=3913, - serialized_end=4014, + serialized_start=3917, + serialized_end=4018, ) _sym_db.RegisterEnumDescriptor(_ERRORREASON) @@ -68,20 +76,23 @@ _CONSTANTS = _descriptor.EnumDescriptor( full_name='Constants', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='Unused', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DATA_PAYLOAD_LEN', index=1, number=240, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=4016, - serialized_end=4062, + serialized_start=4020, + serialized_end=4066, ) _sym_db.RegisterEnumDescriptor(_CONSTANTS) @@ -91,48 +102,58 @@ _REGIONCODE = _descriptor.EnumDescriptor( full_name='RegionCode', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='Unset', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='US', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='EU433', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='EU865', index=3, number=3, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CN', index=4, number=4, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='JP', index=5, number=5, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ANZ', index=6, number=6, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='KR', index=7, number=7, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TW', index=8, number=8, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=4064, - serialized_end=4158, + serialized_start=4068, + serialized_end=4162, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -142,80 +163,98 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( full_name='ChargeCurrent', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='MAUnset', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA100', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA190', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA280', index=3, number=3, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA360', index=4, number=4, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA450', index=5, number=5, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA550', index=6, number=6, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA630', index=7, number=7, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA700', index=8, number=8, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA780', index=9, number=9, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA880', index=10, number=10, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA960', index=11, number=11, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA1000', index=12, number=12, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA1080', index=13, number=13, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA1160', index=14, number=14, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA1240', index=15, number=15, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MA1320', index=16, number=16, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=4161, - serialized_end=4370, + serialized_start=4165, + serialized_end=4374, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -225,32 +264,38 @@ _GPSOPERATION = _descriptor.EnumDescriptor( full_name='GpsOperation', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='GpsOpUnset', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='GpsOpStationary', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='GpsOpMobile', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='GpsOpTimeOnly', index=3, number=3, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='GpsOpDisabled', index=4, number=4, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=4372, - serialized_end=4478, + serialized_start=4376, + serialized_end=4482, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -260,24 +305,28 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( full_name='LocationSharing', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='LocUnset', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='LocEnabled', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='LocDisabled', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=4480, - serialized_end=4544, + serialized_start=4484, + serialized_end=4548, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -287,48 +336,58 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor( full_name='CriticalErrorCode', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='None', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TxWatchdog', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SleepEnterWait', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NoRadio', index=3, number=3, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='Unspecified', index=4, number=4, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='UBloxInitFailed', index=5, number=5, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NoAXP192', index=6, number=6, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='InvalidRadioSetting', index=7, number=7, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TransmitFailed', index=8, number=8, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=4547, - serialized_end=4722, + serialized_start=4551, + serialized_end=4726, ) _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE) @@ -391,35 +450,43 @@ _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( full_name='MeshPacket.Priority', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNSET', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MIN', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BACKGROUND', index=2, number=10, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEFAULT', index=3, number=64, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RELIABLE', index=4, number=70, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ACK', index=5, number=120, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MAX', index=6, number=127, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, @@ -433,23 +500,28 @@ _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( full_name='ChannelSettings.ModemConfig', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='Bw125Cr45Sf128', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='Bw500Cr45Sf128', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='Bw31_25Cr48Sf512', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='Bw125Cr48Sf4096', index=3, number=3, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, @@ -463,40 +535,48 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( full_name='LogRecord.Level', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNSET', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CRITICAL', index=1, number=50, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ERROR', index=2, number=40, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WARNING', index=3, number=30, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='INFO', index=4, number=20, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEBUG', index=5, number=10, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TRACE', index=6, number=5, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=3340, - serialized_end=3428, + serialized_start=3344, + serialized_end=3432, ) _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL) @@ -507,6 +587,7 @@ _POSITION = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='latitude_i', full_name='Position.latitude_i', index=0, @@ -514,35 +595,35 @@ _POSITION = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='longitude_i', full_name='Position.longitude_i', index=1, number=8, type=17, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='altitude', full_name='Position.altitude', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='battery_level', full_name='Position.battery_level', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='time', full_name='Position.time', index=4, number=9, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -566,6 +647,7 @@ _DATA = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='portnum', full_name='Data.portnum', index=0, @@ -573,14 +655,14 @@ _DATA = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payload', full_name='Data.payload', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -604,6 +686,7 @@ _USER = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='User.id', index=0, @@ -611,28 +694,28 @@ _USER = _descriptor.Descriptor( has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='long_name', full_name='User.long_name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='short_name', full_name='User.short_name', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='macaddr', full_name='User.macaddr', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -656,6 +739,7 @@ _ROUTEDISCOVERY = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='route', full_name='RouteDiscovery.route', index=0, @@ -663,7 +747,7 @@ _ROUTEDISCOVERY = _descriptor.Descriptor( has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -687,6 +771,7 @@ _SUBPACKET = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='data', full_name='SubPacket.data', index=0, @@ -694,84 +779,84 @@ _SUBPACKET = _descriptor.Descriptor( has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='route_request', full_name='SubPacket.route_request', index=1, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='route_reply', full_name='SubPacket.route_reply', index=2, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='error_reason', full_name='SubPacket.error_reason', index=3, number=13, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='position', full_name='SubPacket.position', index=4, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR), + serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user', full_name='SubPacket.user', index=5, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR), + serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='want_response', full_name='SubPacket.want_response', index=6, number=5, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='success_id', full_name='SubPacket.success_id', index=7, number=10, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fail_id', full_name='SubPacket.fail_id', index=8, number=11, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='dest', full_name='SubPacket.dest', index=9, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='source', full_name='SubPacket.source', index=10, number=12, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='original_id', full_name='SubPacket.original_id', index=11, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -785,10 +870,14 @@ _SUBPACKET = _descriptor.Descriptor( oneofs=[ _descriptor.OneofDescriptor( name='payloadVariant', full_name='SubPacket.payloadVariant', - index=0, containing_type=None, fields=[]), + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), _descriptor.OneofDescriptor( name='ackVariant', full_name='SubPacket.ackVariant', - index=1, containing_type=None, fields=[]), + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], serialized_start=300, serialized_end=663, @@ -801,6 +890,7 @@ _MESHPACKET = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='from', full_name='MeshPacket.from', index=0, @@ -808,77 +898,77 @@ _MESHPACKET = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='to', full_name='MeshPacket.to', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='channel_index', full_name='MeshPacket.channel_index', index=2, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='decoded', full_name='MeshPacket.decoded', index=3, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='encrypted', full_name='MeshPacket.encrypted', index=4, number=8, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='id', full_name='MeshPacket.id', index=5, number=6, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rx_time', full_name='MeshPacket.rx_time', index=6, number=9, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rx_snr', full_name='MeshPacket.rx_snr', index=7, number=7, type=2, cpp_type=6, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hop_limit', full_name='MeshPacket.hop_limit', index=8, number=10, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='want_ack', full_name='MeshPacket.want_ack', index=9, number=11, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='priority', full_name='MeshPacket.priority', index=10, number=12, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -893,7 +983,9 @@ _MESHPACKET = _descriptor.Descriptor( oneofs=[ _descriptor.OneofDescriptor( name='payloadVariant', full_name='MeshPacket.payloadVariant', - index=0, containing_type=None, fields=[]), + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], serialized_start=666, serialized_end=1012, @@ -906,6 +998,7 @@ _CHANNELSETTINGS = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='tx_power', full_name='ChannelSettings.tx_power', index=0, @@ -913,77 +1006,77 @@ _CHANNELSETTINGS = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='modem_config', full_name='ChannelSettings.modem_config', index=1, number=3, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bandwidth', full_name='ChannelSettings.bandwidth', index=2, number=6, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='spread_factor', full_name='ChannelSettings.spread_factor', index=3, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='coding_rate', full_name='ChannelSettings.coding_rate', index=4, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='channel_num', full_name='ChannelSettings.channel_num', index=5, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='psk', full_name='ChannelSettings.psk', index=6, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='name', full_name='ChannelSettings.name', index=7, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='id', full_name='ChannelSettings.id', index=8, number=10, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uplink_enabled', full_name='ChannelSettings.uplink_enabled', index=9, number=16, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='downlink_enabled', full_name='ChannelSettings.downlink_enabled', index=10, number=17, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1008,6 +1101,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='position_broadcast_secs', full_name='RadioConfig.UserPreferences.position_broadcast_secs', index=0, @@ -1015,294 +1109,294 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='send_owner_interval', full_name='RadioConfig.UserPreferences.send_owner_interval', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='wait_bluetooth_secs', full_name='RadioConfig.UserPreferences.wait_bluetooth_secs', index=2, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='screen_on_secs', full_name='RadioConfig.UserPreferences.screen_on_secs', index=3, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='phone_timeout_secs', full_name='RadioConfig.UserPreferences.phone_timeout_secs', index=4, number=6, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='phone_sds_timeout_sec', full_name='RadioConfig.UserPreferences.phone_sds_timeout_sec', index=5, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='mesh_sds_timeout_secs', full_name='RadioConfig.UserPreferences.mesh_sds_timeout_secs', index=6, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sds_secs', full_name='RadioConfig.UserPreferences.sds_secs', index=7, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ls_secs', full_name='RadioConfig.UserPreferences.ls_secs', index=8, number=10, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='min_wake_secs', full_name='RadioConfig.UserPreferences.min_wake_secs', index=9, number=11, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='wifi_ssid', full_name='RadioConfig.UserPreferences.wifi_ssid', index=10, number=12, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='wifi_password', full_name='RadioConfig.UserPreferences.wifi_password', index=11, number=13, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='wifi_ap_mode', full_name='RadioConfig.UserPreferences.wifi_ap_mode', index=12, number=14, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='region', full_name='RadioConfig.UserPreferences.region', index=13, number=15, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='charge_current', full_name='RadioConfig.UserPreferences.charge_current', index=14, number=16, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='is_router', full_name='RadioConfig.UserPreferences.is_router', index=15, number=37, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='is_low_power', full_name='RadioConfig.UserPreferences.is_low_power', index=16, number=38, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fixed_position', full_name='RadioConfig.UserPreferences.fixed_position', index=17, number=39, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='factory_reset', full_name='RadioConfig.UserPreferences.factory_reset', index=18, number=100, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='debug_log_enabled', full_name='RadioConfig.UserPreferences.debug_log_enabled', index=19, number=101, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='location_share', full_name='RadioConfig.UserPreferences.location_share', index=20, number=32, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gps_operation', full_name='RadioConfig.UserPreferences.gps_operation', index=21, number=33, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gps_update_interval', full_name='RadioConfig.UserPreferences.gps_update_interval', index=22, number=34, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gps_attempt_time', full_name='RadioConfig.UserPreferences.gps_attempt_time', index=23, number=36, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ignore_incoming', full_name='RadioConfig.UserPreferences.ignore_incoming', index=24, number=103, type=13, cpp_type=3, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='serialplugin_enabled', full_name='RadioConfig.UserPreferences.serialplugin_enabled', index=25, number=120, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='serialplugin_echo', full_name='RadioConfig.UserPreferences.serialplugin_echo', index=26, number=121, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='serialplugin_rxd', full_name='RadioConfig.UserPreferences.serialplugin_rxd', index=27, number=122, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='serialplugin_txd', full_name='RadioConfig.UserPreferences.serialplugin_txd', index=28, number=123, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='serialplugin_timeout', full_name='RadioConfig.UserPreferences.serialplugin_timeout', index=29, number=124, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='serialplugin_mode', full_name='RadioConfig.UserPreferences.serialplugin_mode', index=30, number=125, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ext_notification_plugin_enabled', full_name='RadioConfig.UserPreferences.ext_notification_plugin_enabled', index=31, number=126, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ext_notification_plugin_output_ms', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output_ms', index=32, number=127, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ext_notification_plugin_output', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output', index=33, number=128, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ext_notification_plugin_active', full_name='RadioConfig.UserPreferences.ext_notification_plugin_active', index=34, number=129, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ext_notification_plugin_alert_message', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_message', index=35, number=130, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ext_notification_plugin_alert_bell', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_bell', index=36, number=131, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='range_test_plugin_enabled', full_name='RadioConfig.UserPreferences.range_test_plugin_enabled', index=37, number=132, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='range_test_plugin_sender', full_name='RadioConfig.UserPreferences.range_test_plugin_sender', index=38, number=133, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='range_test_plugin_save', full_name='RadioConfig.UserPreferences.range_test_plugin_save', index=39, number=134, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='store_forward_plugin_enabled', full_name='RadioConfig.UserPreferences.store_forward_plugin_enabled', index=40, number=136, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='store_forward_plugin_records', full_name='RadioConfig.UserPreferences.store_forward_plugin_records', index=41, number=137, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1325,6 +1419,7 @@ _RADIOCONFIG = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='preferences', full_name='RadioConfig.preferences', index=0, @@ -1332,14 +1427,14 @@ _RADIOCONFIG = _descriptor.Descriptor( has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='channel_settings', full_name='RadioConfig.channel_settings', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR), + serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1363,6 +1458,7 @@ _NODEINFO = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='num', full_name='NodeInfo.num', index=0, @@ -1370,35 +1466,35 @@ _NODEINFO = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user', full_name='NodeInfo.user', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='position', full_name='NodeInfo.position', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='snr', full_name='NodeInfo.snr', index=3, number=7, type=2, cpp_type=6, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='next_hop', full_name='NodeInfo.next_hop', index=4, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1422,6 +1518,7 @@ _MYNODEINFO = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='my_node_num', full_name='MyNodeInfo.my_node_num', index=0, @@ -1429,98 +1526,98 @@ _MYNODEINFO = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='has_gps', full_name='MyNodeInfo.has_gps', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='num_channels', full_name='MyNodeInfo.num_channels', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='region', full_name='MyNodeInfo.region', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hw_model', full_name='MyNodeInfo.hw_model', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='firmware_version', full_name='MyNodeInfo.firmware_version', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='error_code', full_name='MyNodeInfo.error_code', index=6, number=7, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='error_address', full_name='MyNodeInfo.error_address', index=7, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='error_count', full_name='MyNodeInfo.error_count', index=8, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='packet_id_bits', full_name='MyNodeInfo.packet_id_bits', index=9, number=10, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='current_packet_id', full_name='MyNodeInfo.current_packet_id', index=10, number=11, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR), + serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='node_num_bits', full_name='MyNodeInfo.node_num_bits', index=11, number=12, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='message_timeout_msec', full_name='MyNodeInfo.message_timeout_msec', index=12, number=13, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='min_app_version', full_name='MyNodeInfo.min_app_version', index=13, number=14, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1534,7 +1631,7 @@ _MYNODEINFO = _descriptor.Descriptor( oneofs=[ ], serialized_start=2895, - serialized_end=3244, + serialized_end=3248, ) @@ -1544,6 +1641,7 @@ _LOGRECORD = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='message', full_name='LogRecord.message', index=0, @@ -1551,28 +1649,28 @@ _LOGRECORD = _descriptor.Descriptor( has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='time', full_name='LogRecord.time', index=1, number=2, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='source', full_name='LogRecord.source', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='level', full_name='LogRecord.level', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1586,8 +1684,8 @@ _LOGRECORD = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3247, - serialized_end=3428, + serialized_start=3251, + serialized_end=3432, ) @@ -1597,6 +1695,7 @@ _FROMRADIO = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='num', full_name='FromRadio.num', index=0, @@ -1604,63 +1703,63 @@ _FROMRADIO = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='packet', full_name='FromRadio.packet', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='my_info', full_name='FromRadio.my_info', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='node_info', full_name='FromRadio.node_info', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='radio', full_name='FromRadio.radio', index=4, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='log_record', full_name='FromRadio.log_record', index=5, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='config_complete_id', full_name='FromRadio.config_complete_id', index=6, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rebooted', full_name='FromRadio.rebooted', index=7, number=9, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='channel', full_name='FromRadio.channel', index=8, number=10, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1674,10 +1773,12 @@ _FROMRADIO = _descriptor.Descriptor( oneofs=[ _descriptor.OneofDescriptor( name='payloadVariant', full_name='FromRadio.payloadVariant', - index=0, containing_type=None, fields=[]), + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=3431, - serialized_end=3720, + serialized_start=3435, + serialized_end=3724, ) @@ -1687,6 +1788,7 @@ _TORADIO = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='packet', full_name='ToRadio.packet', index=0, @@ -1694,35 +1796,35 @@ _TORADIO = _descriptor.Descriptor( has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='want_config_id', full_name='ToRadio.want_config_id', index=1, number=100, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='set_radio', full_name='ToRadio.set_radio', index=2, number=101, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='set_owner', full_name='ToRadio.set_owner', index=3, number=102, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='set_channel', full_name='ToRadio.set_channel', index=4, number=103, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1736,10 +1838,12 @@ _TORADIO = _descriptor.Descriptor( oneofs=[ _descriptor.OneofDescriptor( name='payloadVariant', full_name='ToRadio.payloadVariant', - index=0, containing_type=None, fields=[]), + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=3723, - serialized_end=3911, + serialized_start=3727, + serialized_end=3915, ) _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM @@ -1971,5 +2075,6 @@ DESCRIPTOR._options = None _SUBPACKET.fields_by_name['position']._options = None _SUBPACKET.fields_by_name['user']._options = None _RADIOCONFIG.fields_by_name['channel_settings']._options = None +_MYNODEINFO.fields_by_name['region']._options = None _MYNODEINFO.fields_by_name['current_packet_id']._options = None # @@protoc_insertion_point(module_scope) diff --git a/meshtastic/portnums_pb2.py b/meshtastic/portnums_pb2.py index 75ce197..eee63a2 100644 --- a/meshtastic/portnums_pb2.py +++ b/meshtastic/portnums_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: portnums.proto - +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -19,7 +19,8 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', - serialized_pb=b'\n\x0eportnums.proto*\xf1\x01\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x0eportnums.proto*\x94\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -27,60 +28,78 @@ _PORTNUM = _descriptor.EnumDescriptor( full_name='PortNum', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN_APP', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TEXT_MESSAGE_APP', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='REMOTE_HARDWARE_APP', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='POSITION_APP', index=3, number=3, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NODEINFO_APP', index=4, number=4, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='REPLY_APP', index=5, number=32, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='IP_TUNNEL_APP', index=6, number=33, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SERIAL_APP', index=7, number=64, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='STORE_FORWARD_APP', index=8, number=65, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RANGE_TEST_APP', index=9, number=66, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='PRIVATE_APP', index=10, number=256, + name='ENVIRONMENTAL_MEASUREMENT_APP', index=10, number=67, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ATAK_FORWARDER', index=11, number=257, + name='PRIVATE_APP', index=11, number=256, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ATAK_FORWARDER', index=12, number=257, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=19, - serialized_end=260, + serialized_end=295, ) _sym_db.RegisterEnumDescriptor(_PORTNUM) @@ -95,6 +114,7 @@ IP_TUNNEL_APP = 33 SERIAL_APP = 64 STORE_FORWARD_APP = 65 RANGE_TEST_APP = 66 +ENVIRONMENTAL_MEASUREMENT_APP = 67 PRIVATE_APP = 256 ATAK_FORWARDER = 257 diff --git a/meshtastic/remote_hardware_pb2.py b/meshtastic/remote_hardware_pb2.py index 31052e0..ee6a78e 100644 --- a/meshtastic/remote_hardware_pb2.py +++ b/meshtastic/remote_hardware_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: remote_hardware.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -18,6 +18,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( package='', syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\016RemoteHardwareH\003', + create_key=_descriptor._internal_create_key, serialized_pb=b'\n\x15remote_hardware.proto\"\xca\x01\n\x0fHardwareMessage\x12\"\n\x03typ\x18\x01 \x01(\x0e\x32\x15.HardwareMessage.Type\x12\x11\n\tgpio_mask\x18\x02 \x01(\x04\x12\x12\n\ngpio_value\x18\x03 \x01(\x04\"l\n\x04Type\x12\t\n\x05UNSET\x10\x00\x12\x0f\n\x0bWRITE_GPIOS\x10\x01\x12\x0f\n\x0bWATCH_GPIOS\x10\x02\x12\x11\n\rGPIOS_CHANGED\x10\x03\x12\x0e\n\nREAD_GPIOS\x10\x04\x12\x14\n\x10READ_GPIOS_REPLY\x10\x05\x42\'\n\x13\x63om.geeksville.meshB\x0eRemoteHardwareH\x03\x62\x06proto3' ) @@ -28,31 +29,38 @@ _HARDWAREMESSAGE_TYPE = _descriptor.EnumDescriptor( full_name='HardwareMessage.Type', filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNSET', index=0, number=0, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WRITE_GPIOS', index=1, number=1, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WATCH_GPIOS', index=2, number=2, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='GPIOS_CHANGED', index=3, number=3, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='READ_GPIOS', index=4, number=4, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='READ_GPIOS_REPLY', index=5, number=5, serialized_options=None, - type=None), + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, @@ -68,6 +76,7 @@ _HARDWAREMESSAGE = _descriptor.Descriptor( filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='typ', full_name='HardwareMessage.typ', index=0, @@ -75,21 +84,21 @@ _HARDWAREMESSAGE = _descriptor.Descriptor( has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gpio_mask', full_name='HardwareMessage.gpio_mask', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gpio_value', full_name='HardwareMessage.gpio_value', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], diff --git a/proto b/proto index 0cadaed..96257b7 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 0cadaed3953f66cf1edc99d0fa53e4fd5ebf56d6 +Subproject commit 96257b7b94b3cb837df2a94899d7503e88ca5fde From ac29acd905979cabf81a76c607cc11cc6ef6a9e7 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Tue, 23 Feb 2021 10:56:04 +0800 Subject: [PATCH 09/48] 1.2 protos --- meshtastic/apponly_pb2.py | 43 +- meshtastic/deviceonly_pb2.py | 8 +- meshtastic/mesh_pb2.py | 734 +++++++++++++++++++---------------- meshtastic/portnums_pb2.py | 38 +- proto | 2 +- 5 files changed, 475 insertions(+), 350 deletions(-) diff --git a/meshtastic/apponly_pb2.py b/meshtastic/apponly_pb2.py index 41aaeb0..c0d385c 100644 --- a/meshtastic/apponly_pb2.py +++ b/meshtastic/apponly_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\007AppOnlyH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\tB \n\x13\x63om.geeksville.meshB\x07\x41ppOnlyH\x03\x62\x06proto3' + serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\t\"0\n\nChannelSet\x12\"\n\x08settings\x18\x01 \x03(\x0b\x32\x10.ChannelSettingsB \n\x13\x63om.geeksville.meshB\x07\x41ppOnlyH\x03\x62\x06proto3' , dependencies=[mesh__pb2.DESCRIPTOR,]) @@ -72,8 +72,42 @@ _SERVICEENVELOPE = _descriptor.Descriptor( serialized_end=115, ) + +_CHANNELSET = _descriptor.Descriptor( + name='ChannelSet', + full_name='ChannelSet', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='settings', full_name='ChannelSet.settings', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=117, + serialized_end=165, +) + _SERVICEENVELOPE.fields_by_name['packet'].message_type = mesh__pb2._MESHPACKET +_CHANNELSET.fields_by_name['settings'].message_type = mesh__pb2._CHANNELSETTINGS DESCRIPTOR.message_types_by_name['ServiceEnvelope'] = _SERVICEENVELOPE +DESCRIPTOR.message_types_by_name['ChannelSet'] = _CHANNELSET _sym_db.RegisterFileDescriptor(DESCRIPTOR) ServiceEnvelope = _reflection.GeneratedProtocolMessageType('ServiceEnvelope', (_message.Message,), { @@ -83,6 +117,13 @@ ServiceEnvelope = _reflection.GeneratedProtocolMessageType('ServiceEnvelope', (_ }) _sym_db.RegisterMessage(ServiceEnvelope) +ChannelSet = _reflection.GeneratedProtocolMessageType('ChannelSet', (_message.Message,), { + 'DESCRIPTOR' : _CHANNELSET, + '__module__' : 'apponly_pb2' + # @@protoc_insertion_point(class_scope:ChannelSet) + }) +_sym_db.RegisterMessage(ChannelSet) + DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope) diff --git a/meshtastic/deviceonly_pb2.py b/meshtastic/deviceonly_pb2.py index 56d0150..97bae2a 100644 --- a/meshtastic/deviceonly_pb2.py +++ b/meshtastic/deviceonly_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nDeviceOnlyH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\"\xab\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12,\n\x12secondary_channels\x18\x0c \x03(\x0b\x32\x10.ChannelSettingsB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3' + serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\"\x99\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12\x1a\n\x08\x63hannels\x18\x0c \x03(\x0b\x32\x08.ChannelB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3' , dependencies=[mesh__pb2.DESCRIPTOR,]) @@ -99,7 +99,7 @@ _DEVICESTATE = _descriptor.Descriptor( is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='secondary_channels', full_name='DeviceState.secondary_channels', index=9, + name='channels', full_name='DeviceState.channels', index=9, number=12, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -118,7 +118,7 @@ _DEVICESTATE = _descriptor.Descriptor( oneofs=[ ], serialized_start=33, - serialized_end=332, + serialized_end=314, ) _DEVICESTATE.fields_by_name['radio'].message_type = mesh__pb2._RADIOCONFIG @@ -127,7 +127,7 @@ _DEVICESTATE.fields_by_name['owner'].message_type = mesh__pb2._USER _DEVICESTATE.fields_by_name['node_db'].message_type = mesh__pb2._NODEINFO _DEVICESTATE.fields_by_name['receive_queue'].message_type = mesh__pb2._MESHPACKET _DEVICESTATE.fields_by_name['rx_text_message'].message_type = mesh__pb2._MESHPACKET -_DEVICESTATE.fields_by_name['secondary_channels'].message_type = mesh__pb2._CHANNELSETTINGS +_DEVICESTATE.fields_by_name['channels'].message_type = mesh__pb2._CHANNEL DESCRIPTOR.message_types_by_name['DeviceState'] = _DEVICESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py index 34c279e..7fbdfa1 100644 --- a/meshtastic/mesh_pb2.py +++ b/meshtastic/mesh_pb2.py @@ -21,56 +21,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xe1\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\xcc\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\x12\x14\n\nsuccess_id\x18\x04 \x01(\x07H\x00\x12\x11\n\x07\x66\x61il_id\x18\x05 \x01(\x07H\x00\x12\x13\n\x0boriginal_id\x18\x06 \x01(\x07\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"g\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\t \x01(\r\x12\x10\n\x08want_ack\x18\n \x01(\x08\x12&\n\x08priority\x18\x0b \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\"\xd2\n\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\x9f\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12\x1b\n\x07\x63hannel\x18\n \x01(\x0b\x32\x08.ChannelH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03\"Z\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02\"y\n\x0c\x41\x64minMessage\x12!\n\tset_radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x02 \x01(\x0b\x32\x05.UserH\x00\x12\x1f\n\x0bset_channel\x18\x03 \x01(\x0b\x32\x08.ChannelH\x00\x42\t\n\x07variant*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' , dependencies=[portnums__pb2.DESCRIPTOR,]) -_ERRORREASON = _descriptor.EnumDescriptor( - name='ErrorReason', - full_name='ErrorReason', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='NONE', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='NO_ROUTE', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GOT_NAK', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='TIMEOUT', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='NO_INTERFACE', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MAX_RETRANSMIT', index=5, number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=3917, - serialized_end=4018, -) -_sym_db.RegisterEnumDescriptor(_ERRORREASON) - -ErrorReason = enum_type_wrapper.EnumTypeWrapper(_ERRORREASON) _CONSTANTS = _descriptor.EnumDescriptor( name='Constants', full_name='Constants', @@ -91,8 +45,8 @@ _CONSTANTS = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4020, - serialized_end=4066, + serialized_start=3985, + serialized_end=4031, ) _sym_db.RegisterEnumDescriptor(_CONSTANTS) @@ -152,8 +106,8 @@ _REGIONCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4068, - serialized_end=4162, + serialized_start=4033, + serialized_end=4127, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -253,8 +207,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4165, - serialized_end=4374, + serialized_start=4130, + serialized_end=4339, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -294,8 +248,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4376, - serialized_end=4482, + serialized_start=4341, + serialized_end=4447, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -325,8 +279,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4484, - serialized_end=4548, + serialized_start=4449, + serialized_end=4513, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -386,18 +340,12 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4551, - serialized_end=4726, + serialized_start=4516, + serialized_end=4691, ) _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE) CriticalErrorCode = enum_type_wrapper.EnumTypeWrapper(_CRITICALERRORCODE) -NONE = 0 -NO_ROUTE = 1 -GOT_NAK = 2 -TIMEOUT = 3 -NO_INTERFACE = 4 -MAX_RETRANSMIT = 5 Unused = 0 DATA_PAYLOAD_LEN = 240 Unset = 0 @@ -445,6 +393,61 @@ InvalidRadioSetting = 7 TransmitFailed = 8 +_ROUTING_ERROR = _descriptor.EnumDescriptor( + name='Error', + full_name='Routing.Error', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='NONE', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NO_ROUTE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GOT_NAK', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TIMEOUT', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NO_INTERFACE', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MAX_RETRANSMIT', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NO_CHANNEL', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TOO_LARGE', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=443, + serialized_end=569, +) +_sym_db.RegisterEnumDescriptor(_ROUTING_ERROR) + _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( name='Priority', full_name='MeshPacket.Priority', @@ -490,8 +493,8 @@ _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=903, - serialized_end=994, + serialized_start=914, + serialized_end=1005, ) _sym_db.RegisterEnumDescriptor(_MESHPACKET_PRIORITY) @@ -525,11 +528,41 @@ _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=1277, - serialized_end=1373, + serialized_start=1288, + serialized_end=1384, ) _sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG) +_CHANNEL_ROLE = _descriptor.EnumDescriptor( + name='Role', + full_name='Channel.Role', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='DISABLED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PRIMARY', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SECONDARY', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1478, + serialized_end=1526, +) +_sym_db.RegisterEnumDescriptor(_CHANNEL_ROLE) + _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( name='Level', full_name='LogRecord.Level', @@ -575,8 +608,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3344, - serialized_end=3432, + serialized_start=3390, + serialized_end=3478, ) _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL) @@ -591,14 +624,14 @@ _POSITION = _descriptor.Descriptor( fields=[ _descriptor.FieldDescriptor( name='latitude_i', full_name='Position.latitude_i', index=0, - number=7, type=17, cpp_type=1, label=1, + number=1, type=15, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='longitude_i', full_name='Position.longitude_i', index=1, - number=8, type=17, cpp_type=1, label=1, + number=2, type=15, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -641,45 +674,6 @@ _POSITION = _descriptor.Descriptor( ) -_DATA = _descriptor.Descriptor( - name='Data', - full_name='Data', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='portnum', full_name='Data.portnum', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='payload', full_name='Data.payload', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=138, - serialized_end=188, -) - - _USER = _descriptor.Descriptor( name='User', full_name='User', @@ -728,8 +722,8 @@ _USER = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=190, - serialized_end=264, + serialized_start=138, + serialized_end=212, ) @@ -743,7 +737,7 @@ _ROUTEDISCOVERY = _descriptor.Descriptor( fields=[ _descriptor.FieldDescriptor( name='route', full_name='RouteDiscovery.route', index=0, - number=2, type=5, cpp_type=1, label=3, + number=2, type=7, cpp_type=3, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -760,99 +754,123 @@ _ROUTEDISCOVERY = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=266, - serialized_end=297, + serialized_start=214, + serialized_end=245, ) -_SUBPACKET = _descriptor.Descriptor( - name='SubPacket', - full_name='SubPacket', +_ROUTING = _descriptor.Descriptor( + name='Routing', + full_name='Routing', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='data', full_name='SubPacket.data', index=0, - number=3, type=11, cpp_type=10, label=1, + name='route_request', full_name='Routing.route_request', index=0, + number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='route_request', full_name='SubPacket.route_request', index=1, - number=6, type=11, cpp_type=10, label=1, + name='route_reply', full_name='Routing.route_reply', index=1, + number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='route_reply', full_name='SubPacket.route_reply', index=2, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='error_reason', full_name='SubPacket.error_reason', index=3, - number=13, type=14, cpp_type=8, label=1, + name='error_reason', full_name='Routing.error_reason', index=2, + number=3, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='position', full_name='SubPacket.position', index=4, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='success_id', full_name='Routing.success_id', index=3, + number=4, type=7, cpp_type=3, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='user', full_name='SubPacket.user', index=5, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='fail_id', full_name='Routing.fail_id', index=4, + number=5, type=7, cpp_type=3, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='want_response', full_name='SubPacket.want_response', index=6, - number=5, type=8, cpp_type=7, label=1, + name='original_id', full_name='Routing.original_id', index=5, + number=6, type=7, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _ROUTING_ERROR, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='variant', full_name='Routing.variant', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=248, + serialized_end=580, +) + + +_DATA = _descriptor.Descriptor( + name='Data', + full_name='Data', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='portnum', full_name='Data.portnum', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='payload', full_name='Data.payload', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='want_response', full_name='Data.want_response', index=2, + number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='success_id', full_name='SubPacket.success_id', index=7, - number=10, type=13, cpp_type=3, label=1, + name='dest', full_name='Data.dest', index=3, + number=4, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='fail_id', full_name='SubPacket.fail_id', index=8, - number=11, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='dest', full_name='SubPacket.dest', index=9, - number=9, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='source', full_name='SubPacket.source', index=10, - number=12, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='original_id', full_name='SubPacket.original_id', index=11, - number=2, type=13, cpp_type=3, label=1, + name='source', full_name='Data.source', index=4, + number=5, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -868,19 +886,9 @@ _SUBPACKET = _descriptor.Descriptor( syntax='proto3', extension_ranges=[], oneofs=[ - _descriptor.OneofDescriptor( - name='payloadVariant', full_name='SubPacket.payloadVariant', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - _descriptor.OneofDescriptor( - name='ackVariant', full_name='SubPacket.ackVariant', - index=1, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), ], - serialized_start=300, - serialized_end=663, + serialized_start=582, + serialized_end=685, ) @@ -894,77 +902,77 @@ _MESHPACKET = _descriptor.Descriptor( fields=[ _descriptor.FieldDescriptor( name='from', full_name='MeshPacket.from', index=0, - number=1, type=13, cpp_type=3, label=1, + number=1, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='to', full_name='MeshPacket.to', index=1, - number=2, type=13, cpp_type=3, label=1, + number=2, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='channel_index', full_name='MeshPacket.channel_index', index=2, - number=4, type=13, cpp_type=3, label=1, + name='channel', full_name='MeshPacket.channel', index=2, + number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='decoded', full_name='MeshPacket.decoded', index=3, - number=3, type=11, cpp_type=10, label=1, + number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='encrypted', full_name='MeshPacket.encrypted', index=4, - number=8, type=12, cpp_type=9, label=1, + number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='id', full_name='MeshPacket.id', index=5, - number=6, type=13, cpp_type=3, label=1, + number=6, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rx_time', full_name='MeshPacket.rx_time', index=6, - number=9, type=7, cpp_type=3, label=1, + number=7, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rx_snr', full_name='MeshPacket.rx_snr', index=7, - number=7, type=2, cpp_type=6, label=1, + number=8, type=2, cpp_type=6, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hop_limit', full_name='MeshPacket.hop_limit', index=8, - number=10, type=13, cpp_type=3, label=1, + number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='want_ack', full_name='MeshPacket.want_ack', index=9, - number=11, type=8, cpp_type=7, label=1, + number=10, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='priority', full_name='MeshPacket.priority', index=10, - number=12, type=14, cpp_type=8, label=1, + number=11, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -987,8 +995,8 @@ _MESHPACKET = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=666, - serialized_end=1012, + serialized_start=688, + serialized_end=1023, ) @@ -1090,8 +1098,55 @@ _CHANNELSETTINGS = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1015, - serialized_end=1373, + serialized_start=1026, + serialized_end=1384, +) + + +_CHANNEL = _descriptor.Descriptor( + name='Channel', + full_name='Channel', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='index', full_name='Channel.index', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='settings', full_name='Channel.settings', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='role', full_name='Channel.role', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _CHANNEL_ROLE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1387, + serialized_end=1526, ) @@ -1409,8 +1464,8 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1491, - serialized_end=2786, + serialized_start=1596, + serialized_end=2891, ) _RADIOCONFIG = _descriptor.Descriptor( @@ -1428,13 +1483,6 @@ _RADIOCONFIG = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='channel_settings', full_name='RadioConfig.channel_settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1447,8 +1495,8 @@ _RADIOCONFIG = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1376, - serialized_end=2786, + serialized_start=1529, + serialized_end=2891, ) @@ -1507,8 +1555,8 @@ _NODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2788, - serialized_end=2892, + serialized_start=2893, + serialized_end=2997, ) @@ -1535,84 +1583,70 @@ _MYNODEINFO = _descriptor.Descriptor( is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='num_channels', full_name='MyNodeInfo.num_channels', index=2, - number=3, type=5, cpp_type=1, label=1, + name='num_bands', full_name='MyNodeInfo.num_bands', index=2, + number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='region', full_name='MyNodeInfo.region', index=3, + name='max_channels', full_name='MyNodeInfo.max_channels', index=3, + number=15, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='region', full_name='MyNodeInfo.region', index=4, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='hw_model', full_name='MyNodeInfo.hw_model', index=4, + name='hw_model', full_name='MyNodeInfo.hw_model', index=5, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='firmware_version', full_name='MyNodeInfo.firmware_version', index=5, + name='firmware_version', full_name='MyNodeInfo.firmware_version', index=6, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='error_code', full_name='MyNodeInfo.error_code', index=6, + name='error_code', full_name='MyNodeInfo.error_code', index=7, number=7, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='error_address', full_name='MyNodeInfo.error_address', index=7, + name='error_address', full_name='MyNodeInfo.error_address', index=8, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='error_count', full_name='MyNodeInfo.error_count', index=8, + name='error_count', full_name='MyNodeInfo.error_count', index=9, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='packet_id_bits', full_name='MyNodeInfo.packet_id_bits', index=9, - number=10, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='current_packet_id', full_name='MyNodeInfo.current_packet_id', index=10, - number=11, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='node_num_bits', full_name='MyNodeInfo.node_num_bits', index=11, - number=12, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='message_timeout_msec', full_name='MyNodeInfo.message_timeout_msec', index=12, + name='message_timeout_msec', full_name='MyNodeInfo.message_timeout_msec', index=10, number=13, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='min_app_version', full_name='MyNodeInfo.min_app_version', index=13, + name='min_app_version', full_name='MyNodeInfo.min_app_version', index=11, number=14, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -1630,8 +1664,8 @@ _MYNODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2895, - serialized_end=3248, + serialized_start=3000, + serialized_end=3294, ) @@ -1684,8 +1718,8 @@ _LOGRECORD = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3251, - serialized_end=3432, + serialized_start=3297, + serialized_end=3478, ) @@ -1706,7 +1740,7 @@ _FROMRADIO = _descriptor.Descriptor( serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='packet', full_name='FromRadio.packet', index=1, - number=2, type=11, cpp_type=10, label=1, + number=11, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1777,8 +1811,8 @@ _FROMRADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3435, - serialized_end=3724, + serialized_start=3481, + serialized_end=3768, ) @@ -1792,7 +1826,7 @@ _TORADIO = _descriptor.Descriptor( fields=[ _descriptor.FieldDescriptor( name='packet', full_name='ToRadio.packet', index=0, - number=1, type=11, cpp_type=10, label=1, + number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1804,27 +1838,6 @@ _TORADIO = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='set_radio', full_name='ToRadio.set_radio', index=2, - number=101, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='set_owner', full_name='ToRadio.set_owner', index=3, - number=102, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='set_channel', full_name='ToRadio.set_channel', index=4, - number=103, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1842,42 +1855,82 @@ _TORADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3727, - serialized_end=3915, + serialized_start=3770, + serialized_end=3860, ) + +_ADMINMESSAGE = _descriptor.Descriptor( + name='AdminMessage', + full_name='AdminMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='set_radio', full_name='AdminMessage.set_radio', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_owner', full_name='AdminMessage.set_owner', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_channel', full_name='AdminMessage.set_channel', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='variant', full_name='AdminMessage.variant', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=3862, + serialized_end=3983, +) + +_ROUTING.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY +_ROUTING.fields_by_name['route_reply'].message_type = _ROUTEDISCOVERY +_ROUTING.fields_by_name['error_reason'].enum_type = _ROUTING_ERROR +_ROUTING_ERROR.containing_type = _ROUTING +_ROUTING.oneofs_by_name['variant'].fields.append( + _ROUTING.fields_by_name['route_request']) +_ROUTING.fields_by_name['route_request'].containing_oneof = _ROUTING.oneofs_by_name['variant'] +_ROUTING.oneofs_by_name['variant'].fields.append( + _ROUTING.fields_by_name['route_reply']) +_ROUTING.fields_by_name['route_reply'].containing_oneof = _ROUTING.oneofs_by_name['variant'] +_ROUTING.oneofs_by_name['variant'].fields.append( + _ROUTING.fields_by_name['error_reason']) +_ROUTING.fields_by_name['error_reason'].containing_oneof = _ROUTING.oneofs_by_name['variant'] +_ROUTING.oneofs_by_name['variant'].fields.append( + _ROUTING.fields_by_name['success_id']) +_ROUTING.fields_by_name['success_id'].containing_oneof = _ROUTING.oneofs_by_name['variant'] +_ROUTING.oneofs_by_name['variant'].fields.append( + _ROUTING.fields_by_name['fail_id']) +_ROUTING.fields_by_name['fail_id'].containing_oneof = _ROUTING.oneofs_by_name['variant'] _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM -_SUBPACKET.fields_by_name['data'].message_type = _DATA -_SUBPACKET.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY -_SUBPACKET.fields_by_name['route_reply'].message_type = _ROUTEDISCOVERY -_SUBPACKET.fields_by_name['error_reason'].enum_type = _ERRORREASON -_SUBPACKET.fields_by_name['position'].message_type = _POSITION -_SUBPACKET.fields_by_name['user'].message_type = _USER -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['data']) -_SUBPACKET.fields_by_name['data'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['route_request']) -_SUBPACKET.fields_by_name['route_request'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['route_reply']) -_SUBPACKET.fields_by_name['route_reply'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['error_reason']) -_SUBPACKET.fields_by_name['error_reason'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['position']) -_SUBPACKET.fields_by_name['position'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['user']) -_SUBPACKET.fields_by_name['user'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['ackVariant'].fields.append( - _SUBPACKET.fields_by_name['success_id']) -_SUBPACKET.fields_by_name['success_id'].containing_oneof = _SUBPACKET.oneofs_by_name['ackVariant'] -_SUBPACKET.oneofs_by_name['ackVariant'].fields.append( - _SUBPACKET.fields_by_name['fail_id']) -_SUBPACKET.fields_by_name['fail_id'].containing_oneof = _SUBPACKET.oneofs_by_name['ackVariant'] -_MESHPACKET.fields_by_name['decoded'].message_type = _SUBPACKET +_MESHPACKET.fields_by_name['decoded'].message_type = _DATA _MESHPACKET.fields_by_name['priority'].enum_type = _MESHPACKET_PRIORITY _MESHPACKET_PRIORITY.containing_type = _MESHPACKET _MESHPACKET.oneofs_by_name['payloadVariant'].fields.append( @@ -1888,13 +1941,15 @@ _MESHPACKET.oneofs_by_name['payloadVariant'].fields.append( _MESHPACKET.fields_by_name['encrypted'].containing_oneof = _MESHPACKET.oneofs_by_name['payloadVariant'] _CHANNELSETTINGS.fields_by_name['modem_config'].enum_type = _CHANNELSETTINGS_MODEMCONFIG _CHANNELSETTINGS_MODEMCONFIG.containing_type = _CHANNELSETTINGS +_CHANNEL.fields_by_name['settings'].message_type = _CHANNELSETTINGS +_CHANNEL.fields_by_name['role'].enum_type = _CHANNEL_ROLE +_CHANNEL_ROLE.containing_type = _CHANNEL _RADIOCONFIG_USERPREFERENCES.fields_by_name['region'].enum_type = _REGIONCODE _RADIOCONFIG_USERPREFERENCES.fields_by_name['charge_current'].enum_type = _CHARGECURRENT _RADIOCONFIG_USERPREFERENCES.fields_by_name['location_share'].enum_type = _LOCATIONSHARING _RADIOCONFIG_USERPREFERENCES.fields_by_name['gps_operation'].enum_type = _GPSOPERATION _RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG _RADIOCONFIG.fields_by_name['preferences'].message_type = _RADIOCONFIG_USERPREFERENCES -_RADIOCONFIG.fields_by_name['channel_settings'].message_type = _CHANNELSETTINGS _NODEINFO.fields_by_name['user'].message_type = _USER _NODEINFO.fields_by_name['position'].message_type = _POSITION _MYNODEINFO.fields_by_name['error_code'].enum_type = _CRITICALERRORCODE @@ -1905,7 +1960,7 @@ _FROMRADIO.fields_by_name['my_info'].message_type = _MYNODEINFO _FROMRADIO.fields_by_name['node_info'].message_type = _NODEINFO _FROMRADIO.fields_by_name['radio'].message_type = _RADIOCONFIG _FROMRADIO.fields_by_name['log_record'].message_type = _LOGRECORD -_FROMRADIO.fields_by_name['channel'].message_type = _CHANNELSETTINGS +_FROMRADIO.fields_by_name['channel'].message_type = _CHANNEL _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['packet']) _FROMRADIO.fields_by_name['packet'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] @@ -1931,38 +1986,39 @@ _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['channel']) _FROMRADIO.fields_by_name['channel'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] _TORADIO.fields_by_name['packet'].message_type = _MESHPACKET -_TORADIO.fields_by_name['set_radio'].message_type = _RADIOCONFIG -_TORADIO.fields_by_name['set_owner'].message_type = _USER -_TORADIO.fields_by_name['set_channel'].message_type = _CHANNELSETTINGS _TORADIO.oneofs_by_name['payloadVariant'].fields.append( _TORADIO.fields_by_name['packet']) _TORADIO.fields_by_name['packet'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] _TORADIO.oneofs_by_name['payloadVariant'].fields.append( _TORADIO.fields_by_name['want_config_id']) _TORADIO.fields_by_name['want_config_id'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] -_TORADIO.oneofs_by_name['payloadVariant'].fields.append( - _TORADIO.fields_by_name['set_radio']) -_TORADIO.fields_by_name['set_radio'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] -_TORADIO.oneofs_by_name['payloadVariant'].fields.append( - _TORADIO.fields_by_name['set_owner']) -_TORADIO.fields_by_name['set_owner'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] -_TORADIO.oneofs_by_name['payloadVariant'].fields.append( - _TORADIO.fields_by_name['set_channel']) -_TORADIO.fields_by_name['set_channel'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] +_ADMINMESSAGE.fields_by_name['set_radio'].message_type = _RADIOCONFIG +_ADMINMESSAGE.fields_by_name['set_owner'].message_type = _USER +_ADMINMESSAGE.fields_by_name['set_channel'].message_type = _CHANNEL +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['set_radio']) +_ADMINMESSAGE.fields_by_name['set_radio'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['set_owner']) +_ADMINMESSAGE.fields_by_name['set_owner'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['set_channel']) +_ADMINMESSAGE.fields_by_name['set_channel'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] DESCRIPTOR.message_types_by_name['Position'] = _POSITION -DESCRIPTOR.message_types_by_name['Data'] = _DATA DESCRIPTOR.message_types_by_name['User'] = _USER DESCRIPTOR.message_types_by_name['RouteDiscovery'] = _ROUTEDISCOVERY -DESCRIPTOR.message_types_by_name['SubPacket'] = _SUBPACKET +DESCRIPTOR.message_types_by_name['Routing'] = _ROUTING +DESCRIPTOR.message_types_by_name['Data'] = _DATA DESCRIPTOR.message_types_by_name['MeshPacket'] = _MESHPACKET DESCRIPTOR.message_types_by_name['ChannelSettings'] = _CHANNELSETTINGS +DESCRIPTOR.message_types_by_name['Channel'] = _CHANNEL DESCRIPTOR.message_types_by_name['RadioConfig'] = _RADIOCONFIG DESCRIPTOR.message_types_by_name['NodeInfo'] = _NODEINFO DESCRIPTOR.message_types_by_name['MyNodeInfo'] = _MYNODEINFO DESCRIPTOR.message_types_by_name['LogRecord'] = _LOGRECORD DESCRIPTOR.message_types_by_name['FromRadio'] = _FROMRADIO DESCRIPTOR.message_types_by_name['ToRadio'] = _TORADIO -DESCRIPTOR.enum_types_by_name['ErrorReason'] = _ERRORREASON +DESCRIPTOR.message_types_by_name['AdminMessage'] = _ADMINMESSAGE DESCRIPTOR.enum_types_by_name['Constants'] = _CONSTANTS DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE DESCRIPTOR.enum_types_by_name['ChargeCurrent'] = _CHARGECURRENT @@ -1978,13 +2034,6 @@ Position = _reflection.GeneratedProtocolMessageType('Position', (_message.Messag }) _sym_db.RegisterMessage(Position) -Data = _reflection.GeneratedProtocolMessageType('Data', (_message.Message,), { - 'DESCRIPTOR' : _DATA, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:Data) - }) -_sym_db.RegisterMessage(Data) - User = _reflection.GeneratedProtocolMessageType('User', (_message.Message,), { 'DESCRIPTOR' : _USER, '__module__' : 'mesh_pb2' @@ -1999,12 +2048,19 @@ RouteDiscovery = _reflection.GeneratedProtocolMessageType('RouteDiscovery', (_me }) _sym_db.RegisterMessage(RouteDiscovery) -SubPacket = _reflection.GeneratedProtocolMessageType('SubPacket', (_message.Message,), { - 'DESCRIPTOR' : _SUBPACKET, +Routing = _reflection.GeneratedProtocolMessageType('Routing', (_message.Message,), { + 'DESCRIPTOR' : _ROUTING, '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:SubPacket) + # @@protoc_insertion_point(class_scope:Routing) }) -_sym_db.RegisterMessage(SubPacket) +_sym_db.RegisterMessage(Routing) + +Data = _reflection.GeneratedProtocolMessageType('Data', (_message.Message,), { + 'DESCRIPTOR' : _DATA, + '__module__' : 'mesh_pb2' + # @@protoc_insertion_point(class_scope:Data) + }) +_sym_db.RegisterMessage(Data) MeshPacket = _reflection.GeneratedProtocolMessageType('MeshPacket', (_message.Message,), { 'DESCRIPTOR' : _MESHPACKET, @@ -2020,6 +2076,13 @@ ChannelSettings = _reflection.GeneratedProtocolMessageType('ChannelSettings', (_ }) _sym_db.RegisterMessage(ChannelSettings) +Channel = _reflection.GeneratedProtocolMessageType('Channel', (_message.Message,), { + 'DESCRIPTOR' : _CHANNEL, + '__module__' : 'mesh_pb2' + # @@protoc_insertion_point(class_scope:Channel) + }) +_sym_db.RegisterMessage(Channel) + RadioConfig = _reflection.GeneratedProtocolMessageType('RadioConfig', (_message.Message,), { 'UserPreferences' : _reflection.GeneratedProtocolMessageType('UserPreferences', (_message.Message,), { @@ -2070,11 +2133,14 @@ ToRadio = _reflection.GeneratedProtocolMessageType('ToRadio', (_message.Message, }) _sym_db.RegisterMessage(ToRadio) +AdminMessage = _reflection.GeneratedProtocolMessageType('AdminMessage', (_message.Message,), { + 'DESCRIPTOR' : _ADMINMESSAGE, + '__module__' : 'mesh_pb2' + # @@protoc_insertion_point(class_scope:AdminMessage) + }) +_sym_db.RegisterMessage(AdminMessage) + DESCRIPTOR._options = None -_SUBPACKET.fields_by_name['position']._options = None -_SUBPACKET.fields_by_name['user']._options = None -_RADIOCONFIG.fields_by_name['channel_settings']._options = None _MYNODEINFO.fields_by_name['region']._options = None -_MYNODEINFO.fields_by_name['current_packet_id']._options = None # @@protoc_insertion_point(module_scope) diff --git a/meshtastic/portnums_pb2.py b/meshtastic/portnums_pb2.py index eee63a2..f677cd1 100644 --- a/meshtastic/portnums_pb2.py +++ b/meshtastic/portnums_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eportnums.proto*\x94\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -56,42 +56,57 @@ _PORTNUM = _descriptor.EnumDescriptor( type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='REPLY_APP', index=5, number=32, + name='ROUTING_APP', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='IP_TUNNEL_APP', index=6, number=33, + name='ADMIN_APP', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='SERIAL_APP', index=7, number=64, + name='REPLY_APP', index=7, number=32, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='STORE_FORWARD_APP', index=8, number=65, + name='IP_TUNNEL_APP', index=8, number=33, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='RANGE_TEST_APP', index=9, number=66, + name='SERIAL_APP', index=9, number=64, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ENVIRONMENTAL_MEASUREMENT_APP', index=10, number=67, + name='STORE_FORWARD_APP', index=10, number=65, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='PRIVATE_APP', index=11, number=256, + name='RANGE_TEST_APP', index=11, number=66, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ATAK_FORWARDER', index=12, number=257, + name='ENVIRONMENTAL_MEASUREMENT_APP', index=12, number=67, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PRIVATE_APP', index=13, number=256, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ATAK_FORWARDER', index=14, number=257, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MAX', index=15, number=511, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), @@ -99,7 +114,7 @@ _PORTNUM = _descriptor.EnumDescriptor( containing_type=None, serialized_options=None, serialized_start=19, - serialized_end=295, + serialized_end=337, ) _sym_db.RegisterEnumDescriptor(_PORTNUM) @@ -109,6 +124,8 @@ TEXT_MESSAGE_APP = 1 REMOTE_HARDWARE_APP = 2 POSITION_APP = 3 NODEINFO_APP = 4 +ROUTING_APP = 5 +ADMIN_APP = 6 REPLY_APP = 32 IP_TUNNEL_APP = 33 SERIAL_APP = 64 @@ -117,6 +134,7 @@ RANGE_TEST_APP = 66 ENVIRONMENTAL_MEASUREMENT_APP = 67 PRIVATE_APP = 256 ATAK_FORWARDER = 257 +MAX = 511 DESCRIPTOR.enum_types_by_name['PortNum'] = _PORTNUM diff --git a/proto b/proto index 96257b7..f6ff4cc 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 96257b7b94b3cb837df2a94899d7503e88ca5fde +Subproject commit f6ff4cc0c98b201342c32776eeeb9ace83b450dd From 5c6302917eec05fbb13865f57ff3a2ba1404769e Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Tue, 23 Feb 2021 13:25:45 +0800 Subject: [PATCH 10/48] sending works for the new 1.2 --- meshtastic/__init__.py | 112 ++++++++++++++++++++++------------------- setup.py | 2 +- 2 files changed, 60 insertions(+), 54 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index bf3aa27..794327e 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -79,7 +79,14 @@ MY_CONFIG_ID = 42 format is Mmmss (where M is 1+the numeric major number. i.e. 20120 means 1.1.20 """ -OUR_APP_VERSION = 20120 +OUR_APP_VERSION = 20200 + +def catchAndIgnore(reason, closure): + """Call a closure but if it throws an excpetion print it and continue""" + try: + closure() + except BaseException as ex: + logging.error(f"Exception thrown in {reason}: {ex}") class MeshInterface: """Interface class for meshtastic devices @@ -149,8 +156,8 @@ class MeshInterface: if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: raise Exception("Data payload too big") meshPacket = mesh_pb2.MeshPacket() - meshPacket.decoded.data.payload = data - meshPacket.decoded.data.portnum = portNum + meshPacket.decoded.payload = data + meshPacket.decoded.portnum = portNum meshPacket.decoded.want_response = wantResponse return self.sendPacket(meshPacket, destinationId, wantAck=wantAck) @@ -319,13 +326,13 @@ class MeshInterface: def _disconnected(self): """Called by subclasses to tell clients this interface has disconnected""" self.isConnected.clear() - pub.sendMessage("meshtastic.connection.lost", interface=self) + catchAndIgnore("disconnection publish", lambda: pub.sendMessage("meshtastic.connection.lost", interface=self)) def _connected(self): """Called by this class to tell clients we are now fully connected to a node """ self.isConnected.set() - pub.sendMessage("meshtastic.connection.established", interface=self) + catchAndIgnore("connection publish", lambda: pub.sendMessage("meshtastic.connection.established", interface=self)) def _startConfig(self): """Start device packets flowing""" @@ -343,6 +350,7 @@ class MeshInterface: if self.noProto: logging.warn(f"Not sending packet because protocol use is disabled by noProto") else: + logging.debug(f"Sending toRadio: {toRadio}") self._sendToRadioImpl(toRadio) def _sendToRadioImpl(self, toRadio): @@ -454,63 +462,61 @@ class MeshInterface: if meshPacket.decoded.HasField("user") or meshPacket.decoded.HasField("position"): logging.warn("Ignoring old position/user message. Recommend you update firmware to 1.1.20 or later") - if meshPacket.decoded.HasField("data"): + # The default MessageToDict converts byte arrays into base64 strings. + # We don't want that - it messes up data payload. So slam in the correct + # byte array. + asDict["decoded"]["payload"] = meshPacket.decoded.payload - # The default MessageToDict converts byte arrays into base64 strings. - # We don't want that - it messes up data payload. So slam in the correct - # byte array. - asDict["decoded"]["data"]["payload"] = meshPacket.decoded.data.payload + # UNKNOWN_APP is the default protobuf portnum value, and therefore if not set it will not be populated at all + # to make API usage easier, set it to prevent confusion + if not "portnum" in asDict["decoded"]: + asDict["decoded"]["portnum"] = portnums_pb2.PortNum.Name(portnums_pb2.PortNum.UNKNOWN_APP) - # UNKNOWN_APP is the default protobuf portnum value, and therefore if not set it will not be populated at all - # to make API usage easier, set it to prevent confusion - if not "portnum" in asDict["decoded"]["data"]: - asDict["decoded"]["data"]["portnum"] = portnums_pb2.PortNum.Name(portnums_pb2.PortNum.UNKNOWN_APP) + portnum = asDict["decoded"]["portnum"] - portnum = asDict["decoded"]["data"]["portnum"] + topic = f"meshtastic.receive.data.{portnum}" - topic = f"meshtastic.receive.data.{portnum}" + # For text messages, we go ahead and decode the text to ascii for our users + if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.TEXT_MESSAGE_APP): + topic = "meshtastic.receive.text" - # For text messages, we go ahead and decode the text to ascii for our users - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.TEXT_MESSAGE_APP): - topic = "meshtastic.receive.text" + # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate + # the decoded.data.text and we log an error message. This at least allows some delivery to + # the app and the app can deal with the missing decoded representation. + # + # Usually btw this problem is caused by apps sending binary data but setting the payload type to + # text. + try: + asDict["decoded"]["text"] = meshPacket.decoded.payload.decode("utf-8") + except Exception as ex: + logging.error(f"Malformatted utf8 in text message: {ex}") - # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate - # the decoded.data.text and we log an error message. This at least allows some delivery to - # the app and the app can deal with the missing decoded representation. - # - # Usually btw this problem is caused by apps sending binary data but setting the payload type to - # text. - try: - asDict["decoded"]["data"]["text"] = meshPacket.decoded.data.payload.decode("utf-8") - except Exception as ex: - logging.error(f"Malformatted utf8 in text message: {ex}") + # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg + if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.POSITION_APP): + topic = "meshtastic.receive.position" + pb = mesh_pb2.Position() + pb.ParseFromString(meshPacket.decoded.payload) + p = google.protobuf.json_format.MessageToDict(pb) + self._fixupPosition(p) + asDict["decoded"]["position"] = p + # update node DB as needed + self._getOrCreateByNum(asDict["from"])["position"] = p - # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.POSITION_APP): - topic = "meshtastic.receive.position" - pb = mesh_pb2.Position() - pb.ParseFromString(meshPacket.decoded.data.payload) - p = google.protobuf.json_format.MessageToDict(pb) - self._fixupPosition(p) - asDict["decoded"]["data"]["position"] = p - # update node DB as needed - self._getOrCreateByNum(asDict["from"])["position"] = p - - # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.NODEINFO_APP): - topic = "meshtastic.receive.user" - pb = mesh_pb2.User() - pb.ParseFromString(meshPacket.decoded.data.payload) - u = google.protobuf.json_format.MessageToDict(pb) - asDict["decoded"]["data"]["user"] = u - # update node DB as needed - n = self._getOrCreateByNum(asDict["from"]) - n["user"] = u - # We now have a node ID, make sure it is uptodate in that table - self.nodes[u["id"]] = n + # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg + if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.NODEINFO_APP): + topic = "meshtastic.receive.user" + pb = mesh_pb2.User() + pb.ParseFromString(meshPacket.decoded.payload) + u = google.protobuf.json_format.MessageToDict(pb) + asDict["decoded"]["user"] = u + # update node DB as needed + n = self._getOrCreateByNum(asDict["from"]) + n["user"] = u + # We now have a node ID, make sure it is uptodate in that table + self.nodes[u["id"]] = n logging.debug(f"Publishing topic {topic}") - pub.sendMessage(topic, packet=asDict, interface=self) + catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage(topic, packet=asDict, interface=self)) # Our standard BLE characteristics diff --git a/setup.py b/setup.py index 1290742..0307dd5 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.1.49", + version="1.2.00", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown", From 3ef6c5e3abc876564c444701abd1304ea86b3990 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Tue, 23 Feb 2021 14:30:49 +0800 Subject: [PATCH 11/48] fixes for 1.2 api --- meshtastic/__init__.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 794327e..2ecb871 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -457,11 +457,6 @@ class MeshInterface: # asObj = DotMap(asDict) topic = "meshtastic.receive" # Generic unknown packet type - # Warn users if firmware doesn't use new portnum based data encodings - # But do not crash, because the lib will still basically work and ignore those packet types - if meshPacket.decoded.HasField("user") or meshPacket.decoded.HasField("position"): - logging.warn("Ignoring old position/user message. Recommend you update firmware to 1.1.20 or later") - # The default MessageToDict converts byte arrays into base64 strings. # We don't want that - it messes up data payload. So slam in the correct # byte array. From 5ff3fb2fe194cf56c3609371b7b9a413ade82b72 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Tue, 23 Feb 2021 14:35:05 +0800 Subject: [PATCH 12/48] tests now pass again --- meshtastic/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/test.py b/meshtastic/test.py index 1f71674..c81c085 100644 --- a/meshtastic/test.py +++ b/meshtastic/test.py @@ -27,7 +27,7 @@ def onReceive(packet, interface): print(f"From {interface.stream.port}: {packet}") p = DotMap(packet) - if p.decoded.data.portnum == "TEXT_MESSAGE_APP": + if p.decoded.portnum == "TEXT_MESSAGE_APP": # We only care a about clear text packets receivedPackets.append(p) From 3bbbead49762a4d3e7d18b98c9848651e1d10daa Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 15:47:52 +0800 Subject: [PATCH 13/48] fix formatting --- README.md | 2 + meshtastic/__init__.py | 93 +++++++++++++++++++++++++++++------------- meshtastic/__main__.py | 81 +++++++++++++++++++++++------------- meshtastic/tunnel.py | 81 +++++++++++++++++++++--------------- 4 files changed, 166 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index af589d3..bcda5e2 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,8 @@ sudo usermod -a -G dialout ## A note to developers of this lib +We use the visual-studio-code default python formatting conventions. So if you use that IDE you should be able to use "Format Document" and not generate unrelated diffs. If you use some other editor, please don't change formatting on lines you haven't changed. + If you need to build a new release you'll need: ``` apt install pandoc diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 2ecb871..6c3e21f 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -55,11 +55,19 @@ interface = meshtastic.SerialInterface() """ -import socket import pygatt import google.protobuf.json_format -import serial, threading, logging, sys, random, traceback, time, base64, platform -from . import mesh_pb2, portnums_pb2, util +import serial +import threading +import logging +import sys +import random +import traceback +import time +import base64 +import platform +import socket +from . import mesh_pb2, portnums_pb2, apponly_pb2, util from pubsub import pub from dotmap import DotMap @@ -79,7 +87,8 @@ MY_CONFIG_ID = 42 format is Mmmss (where M is 1+the numeric major number. i.e. 20120 means 1.1.20 """ -OUR_APP_VERSION = 20200 +OUR_APP_VERSION = 20200 + def catchAndIgnore(reason, closure): """Call a closure but if it throws an excpetion print it and continue""" @@ -88,6 +97,7 @@ def catchAndIgnore(reason, closure): except BaseException as ex: logging.error(f"Exception thrown in {reason}: {ex}") + class MeshInterface: """Interface class for meshtastic devices @@ -108,7 +118,7 @@ class MeshInterface: self.nodes = None # FIXME self.isConnected = threading.Event() self.noProto = noProto - random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it + random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) self._startConfig() @@ -117,7 +127,8 @@ class MeshInterface: def __exit__(self, exc_type, exc_value, traceback): if exc_type is not None and exc_value is not None: - logging.error(f'An exception of type {exc_type} with value {exc_value} has occurred') + logging.error( + f'An exception of type {exc_type} with value {exc_value} has occurred') if traceback is not None: logging.error(f'Traceback: {traceback}') self.close() @@ -265,6 +276,7 @@ class MeshInterface: """Set device owner name""" nChars = 3 minChars = 2 + fixme("update for 1.2") if long_name is not None: long_name = long_name.strip() if short_name is None: @@ -292,27 +304,30 @@ class MeshInterface: def channelURL(self): """The sharable URL that describes the current channel """ - bytes = self.radioConfig.channel_settings.SerializeToString() + channelSet = apponly_pb2.ChannelSet() + fixme("fill channelSet from self.channels") + bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') return f"https://www.meshtastic.org/c/#{s}" - def setURL(self, url, write=True): + def setURL(self, url): """Set mesh network URL""" if self.radioConfig == None: raise Exception("No RadioConfig has been read") - # URLs are of the form https://www.meshtastic.org/c/#{base64_channel_settings} + # URLs are of the form https://www.meshtastic.org/c/#{base64_channel_set} # Split on '/#' to find the base64 encoded channel settings splitURL = url.split("/#") decodedURL = base64.urlsafe_b64decode(splitURL[-1]) - self.radioConfig.channel_settings.ParseFromString(decodedURL) - if write: - self.writeConfig() + channelSet = apponly_pb2.ChannelSet() + channelSet.ParseFromString(decodedURL) + fixme("set self.channels") + self.writeChannels() def _waitConnected(self): """Block until the initial node db download is complete, or timeout and raise an exception""" - if not self.isConnected.wait(5.0): # timeout after 5 seconds + if not self.isConnected.wait(5.0): # timeout after 5 seconds raise Exception("Timed out waiting for connection completion") def _generatePacketId(self): @@ -326,13 +341,15 @@ class MeshInterface: def _disconnected(self): """Called by subclasses to tell clients this interface has disconnected""" self.isConnected.clear() - catchAndIgnore("disconnection publish", lambda: pub.sendMessage("meshtastic.connection.lost", interface=self)) + catchAndIgnore("disconnection publish", lambda: pub.sendMessage( + "meshtastic.connection.lost", interface=self)) def _connected(self): """Called by this class to tell clients we are now fully connected to a node """ self.isConnected.set() - catchAndIgnore("connection publish", lambda: pub.sendMessage("meshtastic.connection.established", interface=self)) + catchAndIgnore("connection publish", lambda: pub.sendMessage( + "meshtastic.connection.established", interface=self)) def _startConfig(self): """Start device packets flowing""" @@ -348,7 +365,8 @@ class MeshInterface: def _sendToRadio(self, toRadio): """Send a ToRadio protobuf to the device""" if self.noProto: - logging.warn(f"Not sending packet because protocol use is disabled by noProto") + logging.warn( + f"Not sending packet because protocol use is disabled by noProto") else: logging.debug(f"Sending toRadio: {toRadio}") self._sendToRadioImpl(toRadio) @@ -357,6 +375,15 @@ class MeshInterface: """Send a ToRadio protobuf to the device""" logging.error(f"Subclass must provide toradio: {toRadio}") + def _handleConfigComplete(self): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings and channels + """ + self._requestSettings() + self._requestChannels() + # FIXME, the following should only be called after we have settings and channels + self._connected() # Tell everone else we are ready to go + def _handleFromRadio(self, fromRadioBytes): """ Handle a packet that arrived from the radio(update model and publish events) @@ -383,10 +410,11 @@ class MeshInterface: self.nodesByNum[node["num"]] = node if "user" in node: # Some nodes might not have user/ids assigned yet self.nodes[node["user"]["id"]] = node - pub.sendMessage("meshtastic.node.updated", node=node, interface=self) + pub.sendMessage("meshtastic.node.updated", + node=node, interface=self) elif fromRadio.config_complete_id == MY_CONFIG_ID: # we ignore the config_complete_id, it is unneeded for our stream API fromRadio.config_complete_id - self._connected() + self._handleConfigComplete() elif fromRadio.HasField("packet"): self._handlePacketFromRadio(fromRadio.packet) elif fromRadio.rebooted: @@ -465,7 +493,8 @@ class MeshInterface: # UNKNOWN_APP is the default protobuf portnum value, and therefore if not set it will not be populated at all # to make API usage easier, set it to prevent confusion if not "portnum" in asDict["decoded"]: - asDict["decoded"]["portnum"] = portnums_pb2.PortNum.Name(portnums_pb2.PortNum.UNKNOWN_APP) + asDict["decoded"]["portnum"] = portnums_pb2.PortNum.Name( + portnums_pb2.PortNum.UNKNOWN_APP) portnum = asDict["decoded"]["portnum"] @@ -482,7 +511,8 @@ class MeshInterface: # Usually btw this problem is caused by apps sending binary data but setting the payload type to # text. try: - asDict["decoded"]["text"] = meshPacket.decoded.payload.decode("utf-8") + asDict["decoded"]["text"] = meshPacket.decoded.payload.decode( + "utf-8") except Exception as ex: logging.error(f"Malformatted utf8 in text message: {ex}") @@ -511,7 +541,8 @@ class MeshInterface: self.nodes[u["id"]] = n logging.debug(f"Publishing topic {topic}") - catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage(topic, packet=asDict, interface=self)) + catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( + topic, packet=asDict, interface=self)) # Our standard BLE characteristics @@ -600,7 +631,7 @@ class StreamInterface(MeshInterface): time.sleep(0.1) # wait 100ms to give device time to start running self._rxThread.start() - if not self.noProto: # Wait for the db download if using the protocol + if not self.noProto: # Wait for the db download if using the protocol self._waitConnected() def _disconnected(self): @@ -686,13 +717,16 @@ class StreamInterface(MeshInterface): # logging.debug(f"timeout") pass except serial.SerialException as ex: - if not self._wantExit: # We might intentionally get an exception during shutdown - logging.warn(f"Meshtastic serial port disconnected, disconnecting... {ex}") + if not self._wantExit: # We might intentionally get an exception during shutdown + logging.warn( + f"Meshtastic serial port disconnected, disconnecting... {ex}") except OSError as ex: - if not self._wantExit: # We might intentionally get an exception during shutdown - logging.error(f"Unexpected OSError, terminating meshtastic reader... {ex}") + if not self._wantExit: # We might intentionally get an exception during shutdown + logging.error( + f"Unexpected OSError, terminating meshtastic reader... {ex}") except Exception as ex: - logging.error(f"Unexpected exception, terminating meshtastic reader... {ex}") + logging.error( + f"Unexpected exception, terminating meshtastic reader... {ex}") finally: logging.debug("reader is exiting") self._disconnected() @@ -740,6 +774,7 @@ class SerialInterface(StreamInterface): StreamInterface.__init__( self, debugOut=debugOut, noProto=noProto, connectNow=connectNow) + class TCPInterface(StreamInterface): """Interface class for meshtastic devices over a TCP link""" @@ -766,9 +801,9 @@ class TCPInterface(StreamInterface): def close(self): """Close a connection to the device""" logging.debug("Closing TCP stream") - # Sometimes the socket read might be blocked in the reader thread. Therefore we force the shutdown by closing + # Sometimes the socket read might be blocked in the reader thread. Therefore we force the shutdown by closing # the socket here - self._wantExit = True + self._wantExit = True if not self.socket is None: self.socket.shutdown(socket.SHUT_RDWR) self.socket.close() diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index dc10406..1a0cc37 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -1,6 +1,11 @@ #!python3 -import argparse, platform, logging, sys, codecs, base64 +import argparse +import platform +import logging +import sys +import codecs +import base64 from . import SerialInterface, TCPInterface, BLEInterface, test, remote_hardware from pubsub import pub from . import mesh_pb2, portnums_pb2 @@ -20,6 +25,7 @@ args = None """The parser for arguments""" parser = argparse.ArgumentParser() + def onReceive(packet, interface): """Callback invoked when a packet arrives""" logging.debug(f"Received: {packet}") @@ -54,6 +60,7 @@ def onConnection(interface, topic=pub.AUTO_TOPIC): trueTerms = {"t", "true", "yes"} falseTerms = {"f", "false", "no"} + def fromStr(valstr): """try to parse as int, float or bool (and fallback to a string as last resort) @@ -63,7 +70,8 @@ def fromStr(valstr): valstr (string): A user provided string """ if(valstr.startswith('0x')): - val = bytes.fromhex(valstr[2:]) # if needed convert to string with asBytes.decode('utf-8') + # if needed convert to string with asBytes.decode('utf-8') + val = bytes.fromhex(valstr[2:]) elif valstr in trueTerms: val = True elif valstr in falseTerms: @@ -94,7 +102,7 @@ def setRouter(interface, on): # FIXME as of 1.1.24 of the device code, the following is all deprecated. After that release # has been out a while, just set is_router and warn the user about deprecation - # + # prefs.is_low_power = True prefs.gps_operation = mesh_pb2.GpsOpMobile @@ -135,17 +143,21 @@ def setRouter(interface, on): prefs.gps_update_interval = 0 -#Returns formatted value +# Returns formatted value def formatFloat(value, formatStr="{:.2f}", unit="", default="N/A"): return formatStr.format(value)+unit if value else default -#Returns Last Heard Time in human readable format +# Returns Last Heard Time in human readable format + + def getLH(ts, default="N/A"): return datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S') if ts else default -#Print Nodes +# Print Nodes + + def printNodes(nodes): - #Create the table and define the structure + # Create the table and define the structure table = EasyTable("Nodes") table.setCorners("/", "\\", "\\", "/") table.setOuterStructure("|", "-") @@ -153,19 +165,20 @@ def printNodes(nodes): tableData = [] for node in nodes: - #aux var to get not defined keys - LH= getLH(node['position'].get("time")) - lat=formatFloat(node['position'].get("latitude"), "{:.4f}", "°") - lon=formatFloat(node['position'].get("longitude"), "{:.4f}", "°") - alt=formatFloat(node['position'].get("altitude"), "{:.0f}", " m") - batt=formatFloat(node['position'].get("batteryLevel"), "{:.2f}", "%") - snr=formatFloat(node.get("snr"), "{:.2f}", " dB") - tableData.append({"User":node['user']['longName'], - "Position":"Lat:"+lat+", Lon:"+lon+", Alt:"+alt, - "Battery":batt, "SNR":snr, "LastHeard":LH}) + # aux var to get not defined keys + LH = getLH(node['position'].get("time")) + lat = formatFloat(node['position'].get("latitude"), "{:.4f}", "°") + lon = formatFloat(node['position'].get("longitude"), "{:.4f}", "°") + alt = formatFloat(node['position'].get("altitude"), "{:.0f}", " m") + batt = formatFloat(node['position'].get("batteryLevel"), "{:.2f}", "%") + snr = formatFloat(node.get("snr"), "{:.2f}", " dB") + tableData.append({"User": node['user']['longName'], + "Position": "Lat:"+lat+", Lon:"+lon+", Alt:"+alt, + "Battery": batt, "SNR": snr, "LastHeard": LH}) table.setData(tableData) table.displayTable() + def onConnected(interface): """Callback invoked when we connect to a radio""" closeNow = False # Should we drop the connection after we finish? @@ -227,7 +240,8 @@ def onConnected(interface): for wrpair in (args.gpiowrb or []): bitmask |= 1 << int(wrpair[0]) bitval |= int(wrpair[1]) << int(wrpair[0]) - print(f"Writing GPIO mask 0x{bitmask:x} with value 0x{bitval:x} to {args.dest}") + print( + f"Writing GPIO mask 0x{bitmask:x} with value 0x{bitval:x} to {args.dest}") rhc.writeGPIOs(args.dest, bitmask, bitval) if args.gpiord: @@ -238,10 +252,10 @@ def onConnected(interface): if args.gpiowatch: bitmask = int(args.gpiowatch) print(f"Watching GPIO mask 0x{bitmask:x} from {args.dest}") - rhc.watchGPIOs(args.dest, bitmask) + rhc.watchGPIOs(args.dest, bitmask) if args.set or args.setstr or args.setchan or args.setch_longslow or args.setch_shortfast \ - or args.seturl or args.router != None: + or args.seturl or args.router != None: closeNow = True def setPref(attributes, name, valStr): @@ -263,7 +277,7 @@ def onConnected(interface): """Set one of the simple modem_config only based channels""" ch = mesh_pb2.ChannelSettings() ch.modem_config = modem_config - ch.psk = bytes([1]) # Use default channel psk 1 + ch.psk = bytes([1]) # Use default channel psk 1 interface.radioConfig.channel_settings.CopyFrom(ch) if args.router != None: @@ -280,10 +294,12 @@ def onConnected(interface): # handle the simple channel set commands if args.setch_longslow: - setSimpleChannel(mesh_pb2.ChannelSettings.ModemConfig.Bw125Cr48Sf4096) + setSimpleChannel( + mesh_pb2.ChannelSettings.ModemConfig.Bw125Cr48Sf4096) if args.setch_shortfast: - setSimpleChannel(mesh_pb2.ChannelSettings.ModemConfig.Bw500Cr45Sf128) + setSimpleChannel( + mesh_pb2.ChannelSettings.ModemConfig.Bw500Cr45Sf128) # Handle the channel settings for pref in (args.setchan or []): @@ -316,9 +332,10 @@ def onConnected(interface): url = pyqrcode.create(interface.channelURL) print(url.terminal()) - if have_tunnel and args.tunnel : + if have_tunnel and args.tunnel: from . import tunnel - closeNow = False # Even if others said we could close, stay open if the user asked for a tunnel + # Even if others said we could close, stay open if the user asked for a tunnel + closeNow = False tunnel.Tunnel(interface, subnet=args.tunnel_net) except Exception as ex: @@ -328,6 +345,7 @@ def onConnected(interface): if (not args.seriallog) and closeNow: interface.close() # after running command then exit + def onNode(node): """Callback invoked when the node DB changes""" print(f"Node changed: {node}") @@ -383,6 +401,7 @@ def common(): client = SerialInterface( args.port, debugOut=logfile, noProto=args.noproto) + def initParser(): global parser, args @@ -403,7 +422,7 @@ def initParser(): parser.add_argument("--info", help="Read and display the radio config information", action="store_true") - parser.add_argument("--nodes", help="Print Node List in a pretty formatted table", + parser.add_argument("--nodes", help="Print Node List in a pretty formatted table", action="store_true") parser.add_argument("--qr", help="Display the QR code that corresponds to the current channel", @@ -439,7 +458,7 @@ def initParser(): parser.add_argument( "--sendping", help="Send a ping message (which requests a reply)", action="store_true") - #parser.add_argument( + # parser.add_argument( # "--repeat", help="Normally the send commands send only one message, use this option to request repeated sends") parser.add_argument( @@ -486,21 +505,24 @@ def initParser(): if have_tunnel: parser.add_argument('--tunnel', - action='store_true', help="Create a TUN tunnel device for forwarding IP packets over the mesh") + action='store_true', help="Create a TUN tunnel device for forwarding IP packets over the mesh") parser.add_argument( "--subnet", dest='tunnel_net', help="Read from a GPIO mask", default=None) parser.set_defaults(router=None) - parser.add_argument('--version', action='version', version=f"{pkg_resources.require('meshtastic')[0].version}") + parser.add_argument('--version', action='version', + version=f"{pkg_resources.require('meshtastic')[0].version}") args = parser.parse_args() + def main(): """Perform command line meshtastic operations""" initParser() common() + def tunnelMain(): """Run a meshtastic IP tunnel""" global args @@ -508,5 +530,6 @@ def tunnelMain(): args.tunnel = True common() + if __name__ == "__main__": main() diff --git a/meshtastic/tunnel.py b/meshtastic/tunnel.py index d897a92..0aa9dc0 100644 --- a/meshtastic/tunnel.py +++ b/meshtastic/tunnel.py @@ -6,7 +6,7 @@ # sudo bin/run.sh --port /dev/ttyUSB0 --setch-shortfast # sudo bin/run.sh --port /dev/ttyUSB0 --tunnel --debug # ssh -Y root@192.168.10.151 (or dietpi), default password p -# ncat -e /bin/cat -k -u -l 1235 +# ncat -e /bin/cat -k -u -l 1235 # ncat -u 10.115.64.152 1235 # ping -c 1 -W 20 10.115.64.152 # ping -i 30 -W 30 10.115.64.152 @@ -15,7 +15,8 @@ from . import portnums_pb2 from pubsub import pub -import logging, threading +import logging +import threading # A new non standard log level that is lower level than DEBUG LOG_TRACE = 5 @@ -26,8 +27,8 @@ tunnelInstance = None """A list of chatty UDP services we should never accidentally forward to our slow network""" udpBlacklist = { - 1900, # SSDP - 5353, # multicast DNS + 1900, # SSDP + 5353, # multicast DNS } """A list of TCP services to block""" @@ -35,31 +36,36 @@ tcpBlacklist = {} """A list of protocols we ignore""" protocolBlacklist = { - 0x02, # IGMP - 0x80, # Service-Specific Connection-Oriented Protocol in a Multilink and Connectionless Environment + 0x02, # IGMP + 0x80, # Service-Specific Connection-Oriented Protocol in a Multilink and Connectionless Environment } + def hexstr(barray): """Print a string of hex digits""" return ":".join('{:02x}'.format(x) for x in barray) + def ipstr(barray): """Print a string of ip digits""" return ".".join('{}'.format(x) for x in barray) + def readnet_u16(p, offset): """Read big endian u16 (network byte order)""" return p[offset] * 256 + p[offset + 1] + def onTunnelReceive(packet, interface): """Callback for received tunneled messages from mesh - + FIXME figure out how to do closures with methods in python""" tunnelInstance.onReceive(packet) + class Tunnel: """A TUN based IP tunnel over meshtastic""" - + def __init__(self, iface, subnet=None, netmask="255.255.0.0"): """ Constructor @@ -77,7 +83,8 @@ class Tunnel: global tunnelInstance tunnelInstance = self - logging.info("Starting IP to mesh tunnel (you must be root for this *pre-alpha* feature to work). Mesh members:") + logging.info( + "Starting IP to mesh tunnel (you must be root for this *pre-alpha* feature to work). Mesh members:") pub.subscribe(onTunnelReceive, "meshtastic.receive.data.IP_TUNNEL_APP") myAddr = self._nodeNumToIp(self.iface.myInfo.my_node_num) @@ -85,24 +92,26 @@ class Tunnel: for node in self.iface.nodes.values(): nodeId = node["user"]["id"] ip = self._nodeNumToIp(node["num"]) - logging.info(f"Node { nodeId } has IP address { ip }") + logging.info(f"Node { nodeId } has IP address { ip }") logging.debug("creating TUN device with MTU=200") # FIXME - figure out real max MTU, it should be 240 - the overhead bytes for SubPacket and Data from pytap2 import TapDevice self.tun = TapDevice(name="mesh") self.tun.up() - self.tun.ifconfig(address=myAddr,netmask=netmask,mtu=200) + self.tun.ifconfig(address=myAddr, netmask=netmask, mtu=200) logging.debug(f"starting TUN reader, our IP address is {myAddr}") - self._rxThread = threading.Thread(target=self.__tunReader, args=(), daemon=True) + self._rxThread = threading.Thread( + target=self.__tunReader, args=(), daemon=True) self._rxThread.start() def onReceive(self, packet): - p = packet["decoded"]["data"]["payload"] + p = packet["decoded"]["payload"] if packet["from"] == self.iface.myInfo.my_node_num: logging.debug("Ignoring message we sent") else: - logging.debug(f"Received mesh tunnel message type={type(p)} len={len(p)}") + logging.debug( + f"Received mesh tunnel message type={type(p)} len={len(p)}") # we don't really need to check for filtering here (sender should have checked), but this provides # useful debug printing on types of packets received if not self._shouldFilterPacket(p): @@ -114,36 +123,43 @@ class Tunnel: srcaddr = p[12:16] destAddr = p[16:20] subheader = 20 - ignore = False # Assume we will be forwarding the packet + ignore = False # Assume we will be forwarding the packet if protocol in protocolBlacklist: ignore = True - logging.log(LOG_TRACE, f"Ignoring blacklisted protocol 0x{protocol:02x}") - elif protocol == 0x01: # ICMP + logging.log( + LOG_TRACE, f"Ignoring blacklisted protocol 0x{protocol:02x}") + elif protocol == 0x01: # ICMP icmpType = p[20] icmpCode = p[21] checksum = p[22:24] - logging.debug(f"forwarding ICMP message src={ipstr(srcaddr)}, dest={ipstr(destAddr)}, type={icmpType}, code={icmpCode}, checksum={checksum}") + logging.debug( + f"forwarding ICMP message src={ipstr(srcaddr)}, dest={ipstr(destAddr)}, type={icmpType}, code={icmpCode}, checksum={checksum}") # reply to pings (swap src and dest but keep rest of packet unchanged) #pingback = p[:12]+p[16:20]+p[12:16]+p[20:] - #tap.write(pingback) - elif protocol == 0x11: # UDP + # tap.write(pingback) + elif protocol == 0x11: # UDP srcport = readnet_u16(p, subheader) destport = readnet_u16(p, subheader + 2) if destport in udpBlacklist: ignore = True - logging.log(LOG_TRACE, f"ignoring blacklisted UDP port {destport}") + logging.log( + LOG_TRACE, f"ignoring blacklisted UDP port {destport}") else: - logging.debug(f"forwarding udp srcport={srcport}, destport={destport}") - elif protocol == 0x06: # TCP + logging.debug( + f"forwarding udp srcport={srcport}, destport={destport}") + elif protocol == 0x06: # TCP srcport = readnet_u16(p, subheader) destport = readnet_u16(p, subheader + 2) if destport in tcpBlacklist: ignore = True - logging.log(LOG_TRACE, f"ignoring blacklisted TCP port {destport}") + logging.log( + LOG_TRACE, f"ignoring blacklisted TCP port {destport}") else: - logging.debug(f"forwarding tcp srcport={srcport}, destport={destport}") + logging.debug( + f"forwarding tcp srcport={srcport}, destport={destport}") else: - logging.warning(f"forwarding unexpected protocol 0x{protocol:02x}, src={ipstr(srcaddr)}, dest={ipstr(destAddr)}") + logging.warning( + f"forwarding unexpected protocol 0x{protocol:02x}, src={ipstr(srcaddr)}, dest={ipstr(destAddr)}") return ignore @@ -179,14 +195,13 @@ class Tunnel: """Forward the provided IP packet into the mesh""" nodeId = self._ipToNodeId(destAddr) if nodeId is not None: - logging.debug(f"Forwarding packet bytelen={len(p)} dest={ipstr(destAddr)}, destNode={nodeId}") - self.iface.sendData(p, nodeId, portnums_pb2.IP_TUNNEL_APP, wantAck = False) + logging.debug( + f"Forwarding packet bytelen={len(p)} dest={ipstr(destAddr)}, destNode={nodeId}") + self.iface.sendData( + p, nodeId, portnums_pb2.IP_TUNNEL_APP, wantAck=False) else: - logging.warning(f"Dropping packet because no node found for destIP={ipstr(destAddr)}") + logging.warning( + f"Dropping packet because no node found for destIP={ipstr(destAddr)}") def close(self): self.tun.close() - - - - From cfe63d17ef69840c81853d95ee9522b9d1ccf7f7 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 15:48:01 +0800 Subject: [PATCH 14/48] protobuf updates --- meshtastic/admin_pb2.py | 146 ++++++++++++++++++++++++++++++++ meshtastic/mesh_pb2.py | 166 +++++++++++++++---------------------- meshtastic/portnums_pb2.py | 12 +-- 3 files changed, 217 insertions(+), 107 deletions(-) create mode 100644 meshtastic/admin_pb2.py diff --git a/meshtastic/admin_pb2.py b/meshtastic/admin_pb2.py new file mode 100644 index 0000000..8c73a5d --- /dev/null +++ b/meshtastic/admin_pb2.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: admin.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from . import mesh_pb2 as mesh__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='admin.proto', + package='', + syntax='proto3', + serialized_options=b'\n\023com.geeksville.meshB\005AdminH\003', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x0b\x61\x64min.proto\x1a\nmesh.proto\"\x8b\x02\n\x0c\x41\x64minMessage\x12!\n\tset_radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x02 \x01(\x0b\x32\x05.UserH\x00\x12\x1f\n\x0bset_channel\x18\x03 \x01(\x0b\x32\x08.ChannelH\x00\x12\x1b\n\x11get_radio_request\x18\x04 \x01(\x08H\x00\x12*\n\x12get_radio_response\x18\x05 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1d\n\x13get_channel_request\x18\x06 \x01(\rH\x00\x12(\n\x14get_channel_response\x18\x07 \x01(\x0b\x32\x08.ChannelH\x00\x42\t\n\x07variantB\x1e\n\x13\x63om.geeksville.meshB\x05\x41\x64minH\x03\x62\x06proto3' + , + dependencies=[mesh__pb2.DESCRIPTOR,]) + + + + +_ADMINMESSAGE = _descriptor.Descriptor( + name='AdminMessage', + full_name='AdminMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='set_radio', full_name='AdminMessage.set_radio', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_owner', full_name='AdminMessage.set_owner', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='set_channel', full_name='AdminMessage.set_channel', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='get_radio_request', full_name='AdminMessage.get_radio_request', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='get_radio_response', full_name='AdminMessage.get_radio_response', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='get_channel_request', full_name='AdminMessage.get_channel_request', index=5, + number=6, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='get_channel_response', full_name='AdminMessage.get_channel_response', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='variant', full_name='AdminMessage.variant', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=28, + serialized_end=295, +) + +_ADMINMESSAGE.fields_by_name['set_radio'].message_type = mesh__pb2._RADIOCONFIG +_ADMINMESSAGE.fields_by_name['set_owner'].message_type = mesh__pb2._USER +_ADMINMESSAGE.fields_by_name['set_channel'].message_type = mesh__pb2._CHANNEL +_ADMINMESSAGE.fields_by_name['get_radio_response'].message_type = mesh__pb2._RADIOCONFIG +_ADMINMESSAGE.fields_by_name['get_channel_response'].message_type = mesh__pb2._CHANNEL +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['set_radio']) +_ADMINMESSAGE.fields_by_name['set_radio'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['set_owner']) +_ADMINMESSAGE.fields_by_name['set_owner'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['set_channel']) +_ADMINMESSAGE.fields_by_name['set_channel'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['get_radio_request']) +_ADMINMESSAGE.fields_by_name['get_radio_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['get_radio_response']) +_ADMINMESSAGE.fields_by_name['get_radio_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['get_channel_request']) +_ADMINMESSAGE.fields_by_name['get_channel_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( + _ADMINMESSAGE.fields_by_name['get_channel_response']) +_ADMINMESSAGE.fields_by_name['get_channel_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] +DESCRIPTOR.message_types_by_name['AdminMessage'] = _ADMINMESSAGE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +AdminMessage = _reflection.GeneratedProtocolMessageType('AdminMessage', (_message.Message,), { + 'DESCRIPTOR' : _ADMINMESSAGE, + '__module__' : 'admin_pb2' + # @@protoc_insertion_point(class_scope:AdminMessage) + }) +_sym_db.RegisterMessage(AdminMessage) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py index 7fbdfa1..38695df 100644 --- a/meshtastic/mesh_pb2.py +++ b/meshtastic/mesh_pb2.py @@ -21,7 +21,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\xcc\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\x12\x14\n\nsuccess_id\x18\x04 \x01(\x07H\x00\x12\x11\n\x07\x66\x61il_id\x18\x05 \x01(\x07H\x00\x12\x13\n\x0boriginal_id\x18\x06 \x01(\x07\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"g\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\t \x01(\r\x12\x10\n\x08want_ack\x18\n \x01(\x08\x12&\n\x08priority\x18\x0b \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\"\xd2\n\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\x9f\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12\x1b\n\x07\x63hannel\x18\n \x01(\x0b\x32\x08.ChannelH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03\"Z\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02\"y\n\x0c\x41\x64minMessage\x12!\n\tset_radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x02 \x01(\x0b\x32\x05.UserH\x00\x12\x1f\n\x0bset_channel\x18\x03 \x01(\x0b\x32\x08.ChannelH\x00\x42\t\n\x07variant*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\xcc\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\x12\x14\n\nsuccess_id\x18\x04 \x01(\x07H\x00\x12\x11\n\x07\x66\x61il_id\x18\x05 \x01(\x07H\x00\x12\x13\n\x0boriginal_id\x18\x06 \x01(\x07\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"g\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\x9f\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12\x1b\n\x07\x63hannel\x18\n \x01(\x0b\x32\x08.ChannelH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03\"Z\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' , dependencies=[portnums__pb2.DESCRIPTOR,]) @@ -45,8 +45,8 @@ _CONSTANTS = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3985, - serialized_end=4031, + serialized_start=4173, + serialized_end=4219, ) _sym_db.RegisterEnumDescriptor(_CONSTANTS) @@ -106,8 +106,8 @@ _REGIONCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4033, - serialized_end=4127, + serialized_start=4221, + serialized_end=4315, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -207,8 +207,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4130, - serialized_end=4339, + serialized_start=4318, + serialized_end=4527, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -248,8 +248,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4341, - serialized_end=4447, + serialized_start=4529, + serialized_end=4635, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -279,8 +279,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4449, - serialized_end=4513, + serialized_start=4637, + serialized_end=4701, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -340,8 +340,8 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4516, - serialized_end=4691, + serialized_start=4704, + serialized_end=4879, ) _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE) @@ -608,8 +608,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3390, - serialized_end=3478, + serialized_start=3701, + serialized_end=3789, ) _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL) @@ -958,21 +958,21 @@ _MESHPACKET = _descriptor.Descriptor( serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hop_limit', full_name='MeshPacket.hop_limit', index=8, - number=9, type=13, cpp_type=3, label=1, + number=10, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='want_ack', full_name='MeshPacket.want_ack', index=9, - number=10, type=8, cpp_type=7, label=1, + number=11, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='priority', full_name='MeshPacket.priority', index=10, - number=11, type=14, cpp_type=8, label=1, + number=12, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1452,6 +1452,41 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_measurement_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_measurement_enabled', index=42, + number=140, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_screen_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_screen_enabled', index=43, + number=141, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_read_error_count_threshold', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_read_error_count_threshold', index=44, + number=142, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_update_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_update_interval', index=45, + number=143, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_recovery_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_recovery_interval', index=46, + number=144, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1465,7 +1500,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( oneofs=[ ], serialized_start=1596, - serialized_end=2891, + serialized_end=3202, ) _RADIOCONFIG = _descriptor.Descriptor( @@ -1496,7 +1531,7 @@ _RADIOCONFIG = _descriptor.Descriptor( oneofs=[ ], serialized_start=1529, - serialized_end=2891, + serialized_end=3202, ) @@ -1555,8 +1590,8 @@ _NODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=2893, - serialized_end=2997, + serialized_start=3204, + serialized_end=3308, ) @@ -1664,8 +1699,8 @@ _MYNODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3000, - serialized_end=3294, + serialized_start=3311, + serialized_end=3605, ) @@ -1718,8 +1753,8 @@ _LOGRECORD = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3297, - serialized_end=3478, + serialized_start=3608, + serialized_end=3789, ) @@ -1811,8 +1846,8 @@ _FROMRADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3481, - serialized_end=3768, + serialized_start=3792, + serialized_end=4079, ) @@ -1855,59 +1890,8 @@ _TORADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3770, - serialized_end=3860, -) - - -_ADMINMESSAGE = _descriptor.Descriptor( - name='AdminMessage', - full_name='AdminMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='set_radio', full_name='AdminMessage.set_radio', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='set_owner', full_name='AdminMessage.set_owner', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='set_channel', full_name='AdminMessage.set_channel', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='variant', full_name='AdminMessage.variant', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=3862, - serialized_end=3983, + serialized_start=4081, + serialized_end=4171, ) _ROUTING.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY @@ -1992,18 +1976,6 @@ _TORADIO.fields_by_name['packet'].containing_oneof = _TORADIO.oneofs_by_name['pa _TORADIO.oneofs_by_name['payloadVariant'].fields.append( _TORADIO.fields_by_name['want_config_id']) _TORADIO.fields_by_name['want_config_id'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] -_ADMINMESSAGE.fields_by_name['set_radio'].message_type = _RADIOCONFIG -_ADMINMESSAGE.fields_by_name['set_owner'].message_type = _USER -_ADMINMESSAGE.fields_by_name['set_channel'].message_type = _CHANNEL -_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( - _ADMINMESSAGE.fields_by_name['set_radio']) -_ADMINMESSAGE.fields_by_name['set_radio'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] -_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( - _ADMINMESSAGE.fields_by_name['set_owner']) -_ADMINMESSAGE.fields_by_name['set_owner'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] -_ADMINMESSAGE.oneofs_by_name['variant'].fields.append( - _ADMINMESSAGE.fields_by_name['set_channel']) -_ADMINMESSAGE.fields_by_name['set_channel'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] DESCRIPTOR.message_types_by_name['Position'] = _POSITION DESCRIPTOR.message_types_by_name['User'] = _USER DESCRIPTOR.message_types_by_name['RouteDiscovery'] = _ROUTEDISCOVERY @@ -2018,7 +1990,6 @@ DESCRIPTOR.message_types_by_name['MyNodeInfo'] = _MYNODEINFO DESCRIPTOR.message_types_by_name['LogRecord'] = _LOGRECORD DESCRIPTOR.message_types_by_name['FromRadio'] = _FROMRADIO DESCRIPTOR.message_types_by_name['ToRadio'] = _TORADIO -DESCRIPTOR.message_types_by_name['AdminMessage'] = _ADMINMESSAGE DESCRIPTOR.enum_types_by_name['Constants'] = _CONSTANTS DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE DESCRIPTOR.enum_types_by_name['ChargeCurrent'] = _CHARGECURRENT @@ -2133,13 +2104,6 @@ ToRadio = _reflection.GeneratedProtocolMessageType('ToRadio', (_message.Message, }) _sym_db.RegisterMessage(ToRadio) -AdminMessage = _reflection.GeneratedProtocolMessageType('AdminMessage', (_message.Message,), { - 'DESCRIPTOR' : _ADMINMESSAGE, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:AdminMessage) - }) -_sym_db.RegisterMessage(AdminMessage) - DESCRIPTOR._options = None _MYNODEINFO.fields_by_name['region']._options = None diff --git a/meshtastic/portnums_pb2.py b/meshtastic/portnums_pb2.py index f677cd1..6194bd6 100644 --- a/meshtastic/portnums_pb2.py +++ b/meshtastic/portnums_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -76,22 +76,22 @@ _PORTNUM = _descriptor.EnumDescriptor( type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='SERIAL_APP', index=9, number=64, + name='ENVIRONMENTAL_MEASUREMENT_APP', index=9, number=34, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='STORE_FORWARD_APP', index=10, number=65, + name='SERIAL_APP', index=10, number=64, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='RANGE_TEST_APP', index=11, number=66, + name='STORE_FORWARD_APP', index=11, number=65, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ENVIRONMENTAL_MEASUREMENT_APP', index=12, number=67, + name='RANGE_TEST_APP', index=12, number=66, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), @@ -128,10 +128,10 @@ ROUTING_APP = 5 ADMIN_APP = 6 REPLY_APP = 32 IP_TUNNEL_APP = 33 +ENVIRONMENTAL_MEASUREMENT_APP = 34 SERIAL_APP = 64 STORE_FORWARD_APP = 65 RANGE_TEST_APP = 66 -ENVIRONMENTAL_MEASUREMENT_APP = 67 PRIVATE_APP = 256 ATAK_FORWARDER = 257 MAX = 511 From 17da6f464d1f07d85d0beeb3bd5beaf8df31d6a6 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 15:55:46 +0800 Subject: [PATCH 15/48] cleanup fixme --- README.md | 4 ++-- meshtastic/__init__.py | 13 +++---------- meshtastic/util.py | 11 +++++++++++ proto | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index bcda5e2..98d667f 100644 --- a/README.md +++ b/README.md @@ -102,10 +102,10 @@ sudo usermod -a -G dialout ## A note to developers of this lib -We use the visual-studio-code default python formatting conventions. So if you use that IDE you should be able to use "Format Document" and not generate unrelated diffs. If you use some other editor, please don't change formatting on lines you haven't changed. +We use the visual-studio-code default python formatting conventions (autopep8). So if you use that IDE you should be able to use "Format Document" and not generate unrelated diffs. If you use some other editor, please don't change formatting on lines you haven't changed. If you need to build a new release you'll need: ``` apt install pandoc -sudo pip3 install markdown pandoc webencodings pyparsing twine +sudo pip3 install markdown pandoc webencodings pyparsing twine autopep8 ``` \ No newline at end of file diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 6c3e21f..2eeb632 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -68,6 +68,7 @@ import base64 import platform import socket from . import mesh_pb2, portnums_pb2, apponly_pb2, util +from .util import fixme, catchAndIgnore from pubsub import pub from dotmap import DotMap @@ -90,14 +91,6 @@ format is Mmmss (where M is 1+the numeric major number. i.e. 20120 means 1.1.20 OUR_APP_VERSION = 20200 -def catchAndIgnore(reason, closure): - """Call a closure but if it throws an excpetion print it and continue""" - try: - closure() - except BaseException as ex: - logging.error(f"Exception thrown in {reason}: {ex}") - - class MeshInterface: """Interface class for meshtastic devices @@ -379,8 +372,8 @@ class MeshInterface: """ Done with initial config messages, now send regular MeshPackets to ask for settings and channels """ - self._requestSettings() - self._requestChannels() + # self._requestSettings() + # self._requestChannels() # FIXME, the following should only be called after we have settings and channels self._connected() # Tell everone else we are ready to go diff --git a/meshtastic/util.py b/meshtastic/util.py index d384897..8a1465a 100644 --- a/meshtastic/util.py +++ b/meshtastic/util.py @@ -7,6 +7,17 @@ import serial.tools.list_ports blacklistVids = dict.fromkeys([0x1366]) +def fixme(message): + raise Exception(f"FIXME: {message}") + + +def catchAndIgnore(reason, closure): + """Call a closure but if it throws an excpetion print it and continue""" + try: + closure() + except BaseException as ex: + logging.error(f"Exception thrown in {reason}: {ex}") + def findPorts(): """Find all ports that might have meshtastic devices diff --git a/proto b/proto index f6ff4cc..6bb139c 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit f6ff4cc0c98b201342c32776eeeb9ace83b450dd +Subproject commit 6bb139c0a43825d868a5e78c07c443f8e9e80b55 From cf0bbaf8aa9fc2c99ec4019b9e018d296ec724fe Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 18:13:25 +0800 Subject: [PATCH 16/48] add concept of protocol decoders, use it for the new AdminMessage --- meshtastic/__init__.py | 90 +++++++++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 22 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 2eeb632..d4ca2bb 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -67,10 +67,11 @@ import time import base64 import platform import socket -from . import mesh_pb2, portnums_pb2, apponly_pb2, util +from . import mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2, util from .util import fixme, catchAndIgnore from pubsub import pub from dotmap import DotMap +from typing import * START1 = 0x94 START2 = 0xc3 @@ -90,6 +91,23 @@ format is Mmmss (where M is 1+the numeric major number. i.e. 20120 means 1.1.20 """ OUR_APP_VERSION = 20200 +class ResponseHandler(NamedTuple): + """A pending response callback, waiting for a response to one of our messages""" + # requestId: int - used only as a key + callback: Callable + # FIXME, add timestamp and age out old requests + +class KnownProtocol(NamedTuple): + """Used to automatically decode known protocol payloads""" + name: str + # portnum: int, now a key + protobufFactory: Callable + +protocols = { + portnums_pb2.PortNum.POSITION_APP: KnownProtocol("position", mesh_pb2.Position), + portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User), + portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage) +} class MeshInterface: """Interface class for meshtastic devices @@ -111,6 +129,7 @@ class MeshInterface: self.nodes = None # FIXME self.isConnected = threading.Event() self.noProto = noProto + self.responseHandlers = {} # A map from request ID to the handler random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) self._startConfig() @@ -125,8 +144,12 @@ class MeshInterface: if traceback is not None: logging.error(f'Traceback: {traceback}') self.close() - - def sendText(self, text, destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False): + + def sendText(self, text: AnyStr, + destinationId=BROADCAST_ADDR, + wantAck=False, + wantResponse=False, + onResponse=None): """Send a utf8 string to some other node, if the node has a display it will also be shown on the device. Arguments: @@ -136,13 +159,20 @@ class MeshInterface: destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR}) portNum -- the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list wantAck -- True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery) + wantResponse -- True if you want the service on the other side to send an application layer response Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ return self.sendData(text.encode("utf-8"), destinationId, - portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, wantAck=wantAck, wantResponse=wantResponse) + portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, + wantAck=wantAck, + wantResponse=wantResponse, + onResponse=onResponse) - def sendData(self, data, destinationId=BROADCAST_ADDR, portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, wantResponse=False): + def sendData(self, data, destinationId=BROADCAST_ADDR, + portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, + wantResponse=False, + onResponse=None): """Send a data packet to some other node Keyword Arguments: @@ -150,6 +180,8 @@ class MeshInterface: destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR}) portNum -- the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list wantAck -- True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery) + wantResponse -- True if you want the service on the other side to send an application layer response + onResponse -- A closure of the form funct(packet), that will be called when a response packet arrives (or the transaction is NAKed due to non receipt) Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ @@ -163,7 +195,11 @@ class MeshInterface: meshPacket.decoded.payload = data meshPacket.decoded.portnum = portNum meshPacket.decoded.want_response = wantResponse - return self.sendPacket(meshPacket, destinationId, wantAck=wantAck) + + p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck) + if onResponse is not None: + self._addResponseHandler(p.id, onResponse) + return p def sendPosition(self, latitude=0.0, longitude=0.0, altitude=0, timeSec=0, destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False): """ @@ -190,13 +226,22 @@ class MeshInterface: timeSec = time.time() # returns unix timestamp in seconds p.time = int(timeSec) - return self.sendData(p, destinationId, portNum=portnums_pb2.PortNum.POSITION_APP, wantAck=wantAck, wantResponse=wantResponse) + return self.sendData(p, destinationId, + portNum=portnums_pb2.PortNum.POSITION_APP, + wantAck=wantAck, + wantResponse=wantResponse) - def sendPacket(self, meshPacket, destinationId=BROADCAST_ADDR, wantAck=False): + def _addResponseHandler(self, requestId, callback): + self.responseHandlers[requestId] = ResponseHandler(callback) + + def _sendPacket(self, meshPacket, + destinationId=BROADCAST_ADDR, + wantAck=False): """Send a MeshPacket to the specified node (or if unspecified, broadcast). You probably don't want this - use sendData instead. - Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. + Returns the sent packet. The id field will be populated in this packet and + can be used to track future message acks/naks. """ self._waitConnected() @@ -510,28 +555,29 @@ class MeshInterface: logging.error(f"Malformatted utf8 in text message: {ex}") # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.POSITION_APP): - topic = "meshtastic.receive.position" - pb = mesh_pb2.Position() + # move the following into a 'decoders' API that clients could register? + portNumInt = meshPacket.decoded.portnum # we want portnum as an int + handler = protocols.get(portNumInt) + p = None # The decoded protobuf as a dictionary (if we understand this message) + if handler is not None: + topic = f"meshtastic.receive.{handler.name}" + pb = handler.protobufFactory() pb.ParseFromString(meshPacket.decoded.payload) p = google.protobuf.json_format.MessageToDict(pb) + asDict["decoded"][handler.name] = p + + if portNumInt == portnums_pb2.PortNum.POSITION_APP: self._fixupPosition(p) - asDict["decoded"]["position"] = p # update node DB as needed self._getOrCreateByNum(asDict["from"])["position"] = p # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.NODEINFO_APP): - topic = "meshtastic.receive.user" - pb = mesh_pb2.User() - pb.ParseFromString(meshPacket.decoded.payload) - u = google.protobuf.json_format.MessageToDict(pb) - asDict["decoded"]["user"] = u + if portNumInt == portnums_pb2.PortNum.NODEINFO_APP: # update node DB as needed n = self._getOrCreateByNum(asDict["from"]) - n["user"] = u + n["user"] = p # We now have a node ID, make sure it is uptodate in that table - self.nodes[u["id"]] = n + self.nodes[p["id"]] = n logging.debug(f"Publishing topic {topic}") catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( @@ -771,7 +817,7 @@ class SerialInterface(StreamInterface): class TCPInterface(StreamInterface): """Interface class for meshtastic devices over a TCP link""" - def __init__(self, hostname, debugOut=None, noProto=False, connectNow=True, portNumber=4403): + def __init__(self, hostname: AnyStr, debugOut=None, noProto=False, connectNow=True, portNumber=4403): """Constructor, opens a connection to a specified IP address/hostname Keyword Arguments: From f30f97d9493b6000530aaace70d500d140511a92 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 18:20:08 +0800 Subject: [PATCH 17/48] use environmental montioring and remotegpio as examples of automatic protobuf parsing --- meshtastic/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index d4ca2bb..59e2e93 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -67,7 +67,7 @@ import time import base64 import platform import socket -from . import mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2, util +from . import mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2, environmental_measurement_pb2, remote_hardware_pb2, util from .util import fixme, catchAndIgnore from pubsub import pub from dotmap import DotMap @@ -103,10 +103,13 @@ class KnownProtocol(NamedTuple): # portnum: int, now a key protobufFactory: Callable +"""Well known message payloads can register decoders for automatic protobuf parsing""" protocols = { portnums_pb2.PortNum.POSITION_APP: KnownProtocol("position", mesh_pb2.Position), portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User), - portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage) + portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage), + portnums_pb2.PortNum.ENVIRONMENTAL_MEASUREMENT_APP: KnownProtocol("environmental", environmental_measurement_pb2.EnvironmentalMeasurement), + portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol("remotehw", remote_hardware_pb2.HardwareMessage) } class MeshInterface: From 59517b4b49292917dd81d1317c9a8b49a87b9404 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 18:44:02 +0800 Subject: [PATCH 18/48] use protocol decoders for all message types (even custom ones) --- meshtastic/__init__.py | 80 ++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 59e2e93..2908413 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -101,12 +101,46 @@ class KnownProtocol(NamedTuple): """Used to automatically decode known protocol payloads""" name: str # portnum: int, now a key - protobufFactory: Callable + protobufFactory: Callable = None # If set, will be called to prase as a protocol buffer + onReceive: Callable = None # If set, invoked as onReceive(interface, packet) + +def _onTextReceive(iface, asDict): + """Special text auto parsing for received messages""" + # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate + # the decoded.data.text and we log an error message. This at least allows some delivery to + # the app and the app can deal with the missing decoded representation. + # + # Usually btw this problem is caused by apps sending binary data but setting the payload type to + # text. + try: + asDict["decoded"]["text"] = meshPacket.decoded.payload.decode( + "utf-8") + except Exception as ex: + logging.error(f"Malformatted utf8 in text message: {ex}") + +def _onPositionReceive(iface, asDict): + """Special auto parsing for received messages""" + p = asDict["decoded"]["position"] + iface._fixupPosition(p) + # update node DB as needed + iface._getOrCreateByNum(asDict["from"])["position"] = p + +def _onNodeInfoReceive(iface, asDict): + """Special auto parsing for received messages""" + p = asDict["decoded"]["user"] + # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg + # update node DB as needed + n = iface._getOrCreateByNum(asDict["from"]) + n["user"] = p + # We now have a node ID, make sure it is uptodate in that table + iface.nodes[p["id"]] = n + """Well known message payloads can register decoders for automatic protobuf parsing""" protocols = { - portnums_pb2.PortNum.POSITION_APP: KnownProtocol("position", mesh_pb2.Position), - portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User), + portnums_pb2.PortNum.TEXT_MESSAGE_APP: KnownProtocol("text", onReceive=_onTextReceive), + portnums_pb2.PortNum.POSITION_APP: KnownProtocol("position", mesh_pb2.Position, _onPositionReceive), + portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User, _onNodeInfoReceive), portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage), portnums_pb2.PortNum.ENVIRONMENTAL_MEASUREMENT_APP: KnownProtocol("environmental", environmental_measurement_pb2.EnvironmentalMeasurement), portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol("remotehw", remote_hardware_pb2.HardwareMessage) @@ -541,22 +575,6 @@ class MeshInterface: topic = f"meshtastic.receive.data.{portnum}" - # For text messages, we go ahead and decode the text to ascii for our users - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.TEXT_MESSAGE_APP): - topic = "meshtastic.receive.text" - - # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate - # the decoded.data.text and we log an error message. This at least allows some delivery to - # the app and the app can deal with the missing decoded representation. - # - # Usually btw this problem is caused by apps sending binary data but setting the payload type to - # text. - try: - asDict["decoded"]["text"] = meshPacket.decoded.payload.decode( - "utf-8") - except Exception as ex: - logging.error(f"Malformatted utf8 in text message: {ex}") - # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg # move the following into a 'decoders' API that clients could register? portNumInt = meshPacket.decoded.portnum # we want portnum as an int @@ -564,23 +582,17 @@ class MeshInterface: p = None # The decoded protobuf as a dictionary (if we understand this message) if handler is not None: topic = f"meshtastic.receive.{handler.name}" - pb = handler.protobufFactory() - pb.ParseFromString(meshPacket.decoded.payload) - p = google.protobuf.json_format.MessageToDict(pb) - asDict["decoded"][handler.name] = p - if portNumInt == portnums_pb2.PortNum.POSITION_APP: - self._fixupPosition(p) - # update node DB as needed - self._getOrCreateByNum(asDict["from"])["position"] = p + # Convert to protobuf if possible + if handler.protobufFactory is not None: + pb = handler.protobufFactory() + pb.ParseFromString(meshPacket.decoded.payload) + p = google.protobuf.json_format.MessageToDict(pb) + asDict["decoded"][handler.name] = p - # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg - if portNumInt == portnums_pb2.PortNum.NODEINFO_APP: - # update node DB as needed - n = self._getOrCreateByNum(asDict["from"]) - n["user"] = p - # We now have a node ID, make sure it is uptodate in that table - self.nodes[p["id"]] = n + # Call specialized onReceive if necessary + if handler.onReceive is not None: + handler.onReceive(self, asDict) logging.debug(f"Publishing topic {topic}") catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( From 25c58604e6491e25b336df709f1c005256309d6c Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 18:57:21 +0800 Subject: [PATCH 19/48] move protocols dict to EOF to avoid confusing new users --- meshtastic/__init__.py | 84 +++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 2908413..5cff7d3 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -104,47 +104,6 @@ class KnownProtocol(NamedTuple): protobufFactory: Callable = None # If set, will be called to prase as a protocol buffer onReceive: Callable = None # If set, invoked as onReceive(interface, packet) -def _onTextReceive(iface, asDict): - """Special text auto parsing for received messages""" - # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate - # the decoded.data.text and we log an error message. This at least allows some delivery to - # the app and the app can deal with the missing decoded representation. - # - # Usually btw this problem is caused by apps sending binary data but setting the payload type to - # text. - try: - asDict["decoded"]["text"] = meshPacket.decoded.payload.decode( - "utf-8") - except Exception as ex: - logging.error(f"Malformatted utf8 in text message: {ex}") - -def _onPositionReceive(iface, asDict): - """Special auto parsing for received messages""" - p = asDict["decoded"]["position"] - iface._fixupPosition(p) - # update node DB as needed - iface._getOrCreateByNum(asDict["from"])["position"] = p - -def _onNodeInfoReceive(iface, asDict): - """Special auto parsing for received messages""" - p = asDict["decoded"]["user"] - # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg - # update node DB as needed - n = iface._getOrCreateByNum(asDict["from"]) - n["user"] = p - # We now have a node ID, make sure it is uptodate in that table - iface.nodes[p["id"]] = n - - -"""Well known message payloads can register decoders for automatic protobuf parsing""" -protocols = { - portnums_pb2.PortNum.TEXT_MESSAGE_APP: KnownProtocol("text", onReceive=_onTextReceive), - portnums_pb2.PortNum.POSITION_APP: KnownProtocol("position", mesh_pb2.Position, _onPositionReceive), - portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User, _onNodeInfoReceive), - portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage), - portnums_pb2.PortNum.ENVIRONMENTAL_MEASUREMENT_APP: KnownProtocol("environmental", environmental_measurement_pb2.EnvironmentalMeasurement), - portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol("remotehw", remote_hardware_pb2.HardwareMessage) -} class MeshInterface: """Interface class for meshtastic devices @@ -870,3 +829,46 @@ class TCPInterface(StreamInterface): def _readBytes(self, len): """Read an array of bytes from our stream""" return self.socket.recv(len) + + +def _onTextReceive(iface, asDict): + """Special text auto parsing for received messages""" + # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate + # the decoded.data.text and we log an error message. This at least allows some delivery to + # the app and the app can deal with the missing decoded representation. + # + # Usually btw this problem is caused by apps sending binary data but setting the payload type to + # text. + try: + asDict["decoded"]["text"] = meshPacket.decoded.payload.decode( + "utf-8") + except Exception as ex: + logging.error(f"Malformatted utf8 in text message: {ex}") + +def _onPositionReceive(iface, asDict): + """Special auto parsing for received messages""" + p = asDict["decoded"]["position"] + iface._fixupPosition(p) + # update node DB as needed + iface._getOrCreateByNum(asDict["from"])["position"] = p + +def _onNodeInfoReceive(iface, asDict): + """Special auto parsing for received messages""" + p = asDict["decoded"]["user"] + # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg + # update node DB as needed + n = iface._getOrCreateByNum(asDict["from"]) + n["user"] = p + # We now have a node ID, make sure it is uptodate in that table + iface.nodes[p["id"]] = n + + +"""Well known message payloads can register decoders for automatic protobuf parsing""" +protocols = { + portnums_pb2.PortNum.TEXT_MESSAGE_APP: KnownProtocol("text", onReceive=_onTextReceive), + portnums_pb2.PortNum.POSITION_APP: KnownProtocol("position", mesh_pb2.Position, _onPositionReceive), + portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User, _onNodeInfoReceive), + portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage), + portnums_pb2.PortNum.ENVIRONMENTAL_MEASUREMENT_APP: KnownProtocol("environmental", environmental_measurement_pb2.EnvironmentalMeasurement), + portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol("remotehw", remote_hardware_pb2.HardwareMessage) +} From f9b466992573321da0f4019ed9004903b34ee35a Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 20:47:56 +0800 Subject: [PATCH 20/48] decode routing packets --- meshtastic/__init__.py | 27 ++++++++- meshtastic/mesh_pb2.py | 126 +++++++++++++++++------------------------ proto | 2 +- 3 files changed, 79 insertions(+), 76 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 5cff7d3..7c21cab 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -125,6 +125,7 @@ class MeshInterface: self.nodes = None # FIXME self.isConnected = threading.Event() self.noProto = noProto + self.myInfo = None # We don't have device info yet self.responseHandlers = {} # A map from request ID to the handler random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) @@ -239,7 +240,10 @@ class MeshInterface: Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ - self._waitConnected() + + # We allow users to talk to the local node before we've completed the full connection flow... + if(self.myInfo is not None and destinationId != self.myInfo.my_node_num): + self._waitConnected() toRadio = mesh_pb2.ToRadio() # FIXME add support for non broadcast addresses @@ -413,11 +417,23 @@ class MeshInterface: """ Done with initial config messages, now send regular MeshPackets to ask for settings and channels """ - # self._requestSettings() + self._requestSettings() # self._requestChannels() # FIXME, the following should only be called after we have settings and channels self._connected() # Tell everone else we are ready to go + def _requestSettings(self): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings + """ + p = admin_pb2.AdminMessage() + p.get_radio_request = True + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True, + wantResponse=True) + def _handleFromRadio(self, fromRadioBytes): """ Handle a packet that arrived from the radio(update model and publish events) @@ -553,6 +569,12 @@ class MeshInterface: if handler.onReceive is not None: handler.onReceive(self, asDict) + # Is this message in response to a request, if so, look for a handler + # We ignore ACK packets, but send NAKs and data responses to the handlers + requestId = asDict["decoded"].get("requestId") + if requestId is not None: + pass + logging.debug(f"Publishing topic {topic}") catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( topic, packet=asDict, interface=self)) @@ -869,6 +891,7 @@ protocols = { portnums_pb2.PortNum.POSITION_APP: KnownProtocol("position", mesh_pb2.Position, _onPositionReceive), portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User, _onNodeInfoReceive), portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage), + portnums_pb2.PortNum.ROUTING_APP: KnownProtocol("routing", mesh_pb2.Routing), portnums_pb2.PortNum.ENVIRONMENTAL_MEASUREMENT_APP: KnownProtocol("environmental", environmental_measurement_pb2.EnvironmentalMeasurement), portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol("remotehw", remote_hardware_pb2.HardwareMessage) } diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py index 38695df..91cb778 100644 --- a/meshtastic/mesh_pb2.py +++ b/meshtastic/mesh_pb2.py @@ -21,7 +21,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\xcc\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\x12\x14\n\nsuccess_id\x18\x04 \x01(\x07H\x00\x12\x11\n\x07\x66\x61il_id\x18\x05 \x01(\x07H\x00\x12\x13\n\x0boriginal_id\x18\x06 \x01(\x07\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"g\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\x9f\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12\x1b\n\x07\x63hannel\x18\n \x01(\x0b\x32\x08.ChannelH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03\"Z\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\x8e\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"{\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\x12\x12\n\nrequest_id\x18\x06 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\x9f\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12\x1b\n\x07\x63hannel\x18\n \x01(\x0b\x32\x08.ChannelH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03\"Z\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' , dependencies=[portnums__pb2.DESCRIPTOR,]) @@ -45,8 +45,8 @@ _CONSTANTS = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4173, - serialized_end=4219, + serialized_start=4131, + serialized_end=4177, ) _sym_db.RegisterEnumDescriptor(_CONSTANTS) @@ -106,8 +106,8 @@ _REGIONCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4221, - serialized_end=4315, + serialized_start=4179, + serialized_end=4273, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -207,8 +207,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4318, - serialized_end=4527, + serialized_start=4276, + serialized_end=4485, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -248,8 +248,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4529, - serialized_end=4635, + serialized_start=4487, + serialized_end=4593, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -279,8 +279,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4637, - serialized_end=4701, + serialized_start=4595, + serialized_end=4659, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -340,8 +340,8 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4704, - serialized_end=4879, + serialized_start=4662, + serialized_end=4837, ) _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE) @@ -443,8 +443,8 @@ _ROUTING_ERROR = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=443, - serialized_end=569, + serialized_start=381, + serialized_end=507, ) _sym_db.RegisterEnumDescriptor(_ROUTING_ERROR) @@ -493,8 +493,8 @@ _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=914, - serialized_end=1005, + serialized_start=872, + serialized_end=963, ) _sym_db.RegisterEnumDescriptor(_MESHPACKET_PRIORITY) @@ -528,8 +528,8 @@ _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=1288, - serialized_end=1384, + serialized_start=1246, + serialized_end=1342, ) _sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG) @@ -558,8 +558,8 @@ _CHANNEL_ROLE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=1478, - serialized_end=1526, + serialized_start=1436, + serialized_end=1484, ) _sym_db.RegisterEnumDescriptor(_CHANNEL_ROLE) @@ -608,8 +608,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3701, - serialized_end=3789, + serialized_start=3659, + serialized_end=3747, ) _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL) @@ -788,27 +788,6 @@ _ROUTING = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='success_id', full_name='Routing.success_id', index=3, - number=4, type=7, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='fail_id', full_name='Routing.fail_id', index=4, - number=5, type=7, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='original_id', full_name='Routing.original_id', index=5, - number=6, type=7, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -828,7 +807,7 @@ _ROUTING = _descriptor.Descriptor( fields=[]), ], serialized_start=248, - serialized_end=580, + serialized_end=518, ) @@ -875,6 +854,13 @@ _DATA = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='request_id', full_name='Data.request_id', index=5, + number=6, type=7, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -887,8 +873,8 @@ _DATA = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=582, - serialized_end=685, + serialized_start=520, + serialized_end=643, ) @@ -995,8 +981,8 @@ _MESHPACKET = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=688, - serialized_end=1023, + serialized_start=646, + serialized_end=981, ) @@ -1098,8 +1084,8 @@ _CHANNELSETTINGS = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1026, - serialized_end=1384, + serialized_start=984, + serialized_end=1342, ) @@ -1145,8 +1131,8 @@ _CHANNEL = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1387, - serialized_end=1526, + serialized_start=1345, + serialized_end=1484, ) @@ -1499,8 +1485,8 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1596, - serialized_end=3202, + serialized_start=1554, + serialized_end=3160, ) _RADIOCONFIG = _descriptor.Descriptor( @@ -1530,8 +1516,8 @@ _RADIOCONFIG = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=1529, - serialized_end=3202, + serialized_start=1487, + serialized_end=3160, ) @@ -1590,8 +1576,8 @@ _NODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3204, - serialized_end=3308, + serialized_start=3162, + serialized_end=3266, ) @@ -1699,8 +1685,8 @@ _MYNODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3311, - serialized_end=3605, + serialized_start=3269, + serialized_end=3563, ) @@ -1753,8 +1739,8 @@ _LOGRECORD = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3608, - serialized_end=3789, + serialized_start=3566, + serialized_end=3747, ) @@ -1846,8 +1832,8 @@ _FROMRADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3792, - serialized_end=4079, + serialized_start=3750, + serialized_end=4037, ) @@ -1890,8 +1876,8 @@ _TORADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=4081, - serialized_end=4171, + serialized_start=4039, + serialized_end=4129, ) _ROUTING.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY @@ -1907,12 +1893,6 @@ _ROUTING.fields_by_name['route_reply'].containing_oneof = _ROUTING.oneofs_by_nam _ROUTING.oneofs_by_name['variant'].fields.append( _ROUTING.fields_by_name['error_reason']) _ROUTING.fields_by_name['error_reason'].containing_oneof = _ROUTING.oneofs_by_name['variant'] -_ROUTING.oneofs_by_name['variant'].fields.append( - _ROUTING.fields_by_name['success_id']) -_ROUTING.fields_by_name['success_id'].containing_oneof = _ROUTING.oneofs_by_name['variant'] -_ROUTING.oneofs_by_name['variant'].fields.append( - _ROUTING.fields_by_name['fail_id']) -_ROUTING.fields_by_name['fail_id'].containing_oneof = _ROUTING.oneofs_by_name['variant'] _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM _MESHPACKET.fields_by_name['decoded'].message_type = _DATA _MESHPACKET.fields_by_name['priority'].enum_type = _MESHPACKET_PRIORITY diff --git a/proto b/proto index 6bb139c..fa40a93 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 6bb139c0a43825d868a5e78c07c443f8e9e80b55 +Subproject commit fa40a9389bc910b6291fabe148260070e393600f From 8653ca71c85700ac92835662afb163013b351cb7 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 26 Feb 2021 21:13:25 +0800 Subject: [PATCH 21/48] format per coding conventions --- meshtastic/__init__.py | 26 +++++++++++++++++--------- meshtastic/test.py | 16 ++++++++++------ meshtastic/util.py | 1 + 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 7c21cab..b4695b0 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -91,18 +91,22 @@ format is Mmmss (where M is 1+the numeric major number. i.e. 20120 means 1.1.20 """ OUR_APP_VERSION = 20200 + class ResponseHandler(NamedTuple): """A pending response callback, waiting for a response to one of our messages""" # requestId: int - used only as a key callback: Callable # FIXME, add timestamp and age out old requests + class KnownProtocol(NamedTuple): """Used to automatically decode known protocol payloads""" name: str # portnum: int, now a key - protobufFactory: Callable = None # If set, will be called to prase as a protocol buffer - onReceive: Callable = None # If set, invoked as onReceive(interface, packet) + # If set, will be called to prase as a protocol buffer + protobufFactory: Callable = None + # If set, invoked as onReceive(interface, packet) + onReceive: Callable = None class MeshInterface: @@ -125,8 +129,8 @@ class MeshInterface: self.nodes = None # FIXME self.isConnected = threading.Event() self.noProto = noProto - self.myInfo = None # We don't have device info yet - self.responseHandlers = {} # A map from request ID to the handler + self.myInfo = None # We don't have device info yet + self.responseHandlers = {} # A map from request ID to the handler random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) self._startConfig() @@ -141,7 +145,7 @@ class MeshInterface: if traceback is not None: logging.error(f'Traceback: {traceback}') self.close() - + def sendText(self, text: AnyStr, destinationId=BROADCAST_ADDR, wantAck=False, @@ -552,9 +556,10 @@ class MeshInterface: # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg # move the following into a 'decoders' API that clients could register? - portNumInt = meshPacket.decoded.portnum # we want portnum as an int + portNumInt = meshPacket.decoded.portnum # we want portnum as an int handler = protocols.get(portNumInt) - p = None # The decoded protobuf as a dictionary (if we understand this message) + # The decoded protobuf as a dictionary (if we understand this message) + p = None if handler is not None: topic = f"meshtastic.receive.{handler.name}" @@ -573,7 +578,7 @@ class MeshInterface: # We ignore ACK packets, but send NAKs and data responses to the handlers requestId = asDict["decoded"].get("requestId") if requestId is not None: - pass + fixme("implment") logging.debug(f"Publishing topic {topic}") catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( @@ -867,6 +872,7 @@ def _onTextReceive(iface, asDict): except Exception as ex: logging.error(f"Malformatted utf8 in text message: {ex}") + def _onPositionReceive(iface, asDict): """Special auto parsing for received messages""" p = asDict["decoded"]["position"] @@ -874,6 +880,7 @@ def _onPositionReceive(iface, asDict): # update node DB as needed iface._getOrCreateByNum(asDict["from"])["position"] = p + def _onNodeInfoReceive(iface, asDict): """Special auto parsing for received messages""" p = asDict["decoded"]["user"] @@ -893,5 +900,6 @@ protocols = { portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage), portnums_pb2.PortNum.ROUTING_APP: KnownProtocol("routing", mesh_pb2.Routing), portnums_pb2.PortNum.ENVIRONMENTAL_MEASUREMENT_APP: KnownProtocol("environmental", environmental_measurement_pb2.EnvironmentalMeasurement), - portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol("remotehw", remote_hardware_pb2.HardwareMessage) + portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol( + "remotehw", remote_hardware_pb2.HardwareMessage) } diff --git a/meshtastic/test.py b/meshtastic/test.py index c81c085..0eb8747 100644 --- a/meshtastic/test.py +++ b/meshtastic/test.py @@ -19,6 +19,7 @@ testNumber = 0 sendingInterface = None + def onReceive(packet, interface): """Callback invoked when a packet arrives""" if sendingInterface == interface: @@ -31,6 +32,7 @@ def onReceive(packet, interface): # We only care a about clear text packets receivedPackets.append(p) + def onNode(node): """Callback invoked when the node DB changes""" print(f"Node changed: {node}") @@ -63,7 +65,7 @@ def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): toNode = toInterface.myInfo.my_node_num logging.info(f"Sending test packet from {fromNode} to {toNode}") - wantAck = False # Don't want any sort of reliaible sending + wantAck = False # Don't want any sort of reliaible sending global sendingInterface sendingInterface = fromInterface if not asBinary: @@ -71,11 +73,11 @@ def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): else: fromInterface.sendData((f"Binary {testNumber}").encode( "utf-8"), toNode, wantAck=wantAck) - for sec in range(45): # max of 45 secs before we timeout + for sec in range(45): # max of 45 secs before we timeout time.sleep(1) if (len(receivedPackets) >= 1): return True - return False # Failed to send + return False # Failed to send def testThread(numTests=50): @@ -88,14 +90,15 @@ def testThread(numTests=50): isBroadcast = True # asBinary=(i % 2 == 0) success = testSend( - interfaces[0], interfaces[1], isBroadcast, asBinary = False) + interfaces[0], interfaces[1], isBroadcast, asBinary=False) if not success: numFail = numFail + 1 logging.error( f"Test failed, expected packet not received ({numFail} failures so far)") else: numSuccess = numSuccess + 1 - logging.info(f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") + logging.info( + f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") if numFail >= 3: for i in interfaces: @@ -109,11 +112,13 @@ def onConnection(topic=pub.AUTO_TOPIC): """Callback invoked when we connect/disconnect from a radio""" print(f"Connection changed: {topic.getName()}") + def openDebugLog(portName): debugname = "log" + portName.replace("/", "_") logging.info(f"Writing serial debugging to {debugname}") return open(debugname, 'w+', buffering=1) + def testAll(): """ Run a series of tests using devices we can find. @@ -136,4 +141,3 @@ def testAll(): for i in interfaces: i.close() - diff --git a/meshtastic/util.py b/meshtastic/util.py index 8a1465a..a20d0ed 100644 --- a/meshtastic/util.py +++ b/meshtastic/util.py @@ -18,6 +18,7 @@ def catchAndIgnore(reason, closure): except BaseException as ex: logging.error(f"Exception thrown in {reason}: {ex}") + def findPorts(): """Find all ports that might have meshtastic devices From d2d8edf61c5c42c76a4e183b398cc8d795863107 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 27 Feb 2021 08:54:26 +0800 Subject: [PATCH 22/48] getting channels and settings from the device now works --- meshtastic/__init__.py | 71 +++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 14 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index b4695b0..b066240 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -273,7 +273,7 @@ class MeshInterface: self._sendToRadio(toRadio) return meshPacket - def waitForConfig(self, sleep=.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig')): + def waitForConfig(self, sleep=.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig', 'channels')): """Block until radio config is received. Returns True if config has been received.""" for _ in range(int(maxsecs/sleep)): if all(map(lambda a: getattr(self, a, None), attrs)): @@ -399,6 +399,8 @@ class MeshInterface: self.nodes = {} # nodes keyed by ID self.nodesByNum = {} # nodes keyed by nodenum self.radioConfig = None + self.channels = None + self.partialChannels = [] # We keep our channels in a temp array until finished startConfig = mesh_pb2.ToRadio() startConfig.want_config_id = MY_CONFIG_ID # we don't use this value @@ -422,9 +424,7 @@ class MeshInterface: Done with initial config messages, now send regular MeshPackets to ask for settings and channels """ self._requestSettings() - # self._requestChannels() - # FIXME, the following should only be called after we have settings and channels - self._connected() # Tell everone else we are ready to go + self._requestChannel(0) def _requestSettings(self): """ @@ -433,10 +433,40 @@ class MeshInterface: p = admin_pb2.AdminMessage() p.get_radio_request = True + def onResponse(p): + """A closure to handle the response packet""" + self.radioConfig = p["decoded"]["admin"]["raw"].get_radio_response + return self.sendData(p, self.myInfo.my_node_num, portNum=portnums_pb2.PortNum.ADMIN_APP, wantAck=True, - wantResponse=True) + wantResponse=True, + onResponse=onResponse) + + def _requestChannel(self, channelNum: int): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings + """ + p = admin_pb2.AdminMessage() + p.get_channel_request = channelNum + 1 + + def onResponse(p): + """A closure to handle the response packet""" + c = p["decoded"]["admin"]["raw"].get_channel_response + self.partialChannels.append(c) + if channelNum >= self.myInfo.max_channels - 1: + # Done with all channels + self.channels = self.partialChannels + # FIXME, the following should only be called after we have settings and channels + self._connected() # Tell everone else we are ready to go + else: + self._requestChannel(channelNum + 1) + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True, + wantResponse=True, + onResponse=onResponse) def _handleFromRadio(self, fromRadioBytes): """ @@ -453,8 +483,6 @@ class MeshInterface: raise Exception( "This device needs a newer python client, please \"pip install --upgrade meshtastic\"") # start assigning our packet IDs from the opposite side of where our local device is assigning them - elif fromRadio.HasField("radio"): - self.radioConfig = fromRadio.radio elif fromRadio.HasField("node_info"): node = asDict["nodeInfo"] try: @@ -531,6 +559,12 @@ class MeshInterface: """ asDict = google.protobuf.json_format.MessageToDict(meshPacket) + + # We normally decompose the payload into a dictionary so that the client + # doesn't need to understand protobufs. But advanced clients might + # want the raw protobuf, so we provide it in "raw" + asDict["raw"] = meshPacket + # /add fromId and toId fields based on the node ID asDict["fromId"] = self._nodeNumToId(asDict["from"]) asDict["toId"] = self._nodeNumToId(asDict["to"]) @@ -539,18 +573,19 @@ class MeshInterface: # asObj = DotMap(asDict) topic = "meshtastic.receive" # Generic unknown packet type + decoded = asDict["decoded"] # The default MessageToDict converts byte arrays into base64 strings. # We don't want that - it messes up data payload. So slam in the correct # byte array. - asDict["decoded"]["payload"] = meshPacket.decoded.payload + decoded["payload"] = meshPacket.decoded.payload # UNKNOWN_APP is the default protobuf portnum value, and therefore if not set it will not be populated at all # to make API usage easier, set it to prevent confusion - if not "portnum" in asDict["decoded"]: - asDict["decoded"]["portnum"] = portnums_pb2.PortNum.Name( + if not "portnum" in decoded: + decoded["portnum"] = portnums_pb2.PortNum.Name( portnums_pb2.PortNum.UNKNOWN_APP) - portnum = asDict["decoded"]["portnum"] + portnum = decoded["portnum"] topic = f"meshtastic.receive.data.{portnum}" @@ -569,16 +604,24 @@ class MeshInterface: pb.ParseFromString(meshPacket.decoded.payload) p = google.protobuf.json_format.MessageToDict(pb) asDict["decoded"][handler.name] = p + # Also provide the protobuf raw + asDict["decoded"][handler.name]["raw"] = pb # Call specialized onReceive if necessary if handler.onReceive is not None: handler.onReceive(self, asDict) # Is this message in response to a request, if so, look for a handler - # We ignore ACK packets, but send NAKs and data responses to the handlers - requestId = asDict["decoded"].get("requestId") + requestId = decoded.get("requestId") if requestId is not None: - fixme("implment") + # We ignore ACK packets, but send NAKs and data responses to the handlers + routing = decoded.get("routing") + isAck = routing is not None and ("errorReason" not in routing) + if not isAck: + # we keep the responseHandler in dict until we get a non ack + handler = self.responseHandlers.pop(requestId, None) + if handler is not None: + handler.callback(asDict) logging.debug(f"Publishing topic {topic}") catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( From a78ddffb3ef10c4f687b900ef335740c916d05f0 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 27 Feb 2021 09:16:50 +0800 Subject: [PATCH 23/48] getting channel url works --- meshtastic/__init__.py | 5 ++++- meshtastic/__main__.py | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index b066240..2f1fd61 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -346,8 +346,11 @@ class MeshInterface: def channelURL(self): """The sharable URL that describes the current channel """ + # Only keep the primary/secondary channels, assume primary is first channelSet = apponly_pb2.ChannelSet() - fixme("fill channelSet from self.channels") + for c in self.channels: + if c.role != mesh_pb2.Channel.Role.DISABLED: + channelSet.settings.append(c.settings) bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') return f"https://www.meshtastic.org/c/#{s}" diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 1a0cc37..e3d1bab 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -15,6 +15,7 @@ import traceback import pkg_resources from datetime import datetime from easy_table import EasyTable +from google.protobuf.json_format import MessageToJson """We only import the tunnel code if we are on a platform that can run it""" have_tunnel = platform.system() == 'Linux' @@ -317,7 +318,12 @@ def onConnected(interface): closeNow = True print(interface.myInfo) print(interface.radioConfig) - print(f"Channel URL {interface.channelURL}") + print("Channels:") + for c in interface.channels: + if c.role != mesh_pb2.Channel.Role.DISABLED: + cStr = MessageToJson(c.settings).replace("\n", "") + print(f" {mesh_pb2.Channel.Role.Name(c.role)} {cStr}") + print(f"\nChannel URL {interface.channelURL}") print("Nodes in mesh:") for n in interface.nodes.values(): print(n) From 4f74fc7c1592c2024fcd3236915ee44dd75b9c13 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 27 Feb 2021 09:24:10 +0800 Subject: [PATCH 24/48] setOwner works again --- meshtastic/__init__.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 2f1fd61..e71c6c1 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -250,7 +250,6 @@ class MeshInterface: self._waitConnected() toRadio = mesh_pb2.ToRadio() - # FIXME add support for non broadcast addresses if destinationId is None: raise Exception("destinationId must not be None") @@ -318,7 +317,6 @@ class MeshInterface: """Set device owner name""" nChars = 3 minChars = 2 - fixme("update for 1.2") if long_name is not None: long_name = long_name.strip() if short_name is None: @@ -332,15 +330,20 @@ class MeshInterface: short_name = long_name[0] + long_name[1:].translate(trans) if len(short_name) < nChars: short_name = long_name[:nChars] - t = mesh_pb2.ToRadio() + + p = admin_pb2.AdminMessage() + if long_name is not None: - t.set_owner.long_name = long_name + p.set_owner.long_name = long_name if short_name is not None: short_name = short_name.strip() if len(short_name) > nChars: short_name = short_name[:nChars] - t.set_owner.short_name = short_name - self._sendToRadio(t) + p.set_owner.short_name = short_name + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) @property def channelURL(self): @@ -349,7 +352,7 @@ class MeshInterface: # Only keep the primary/secondary channels, assume primary is first channelSet = apponly_pb2.ChannelSet() for c in self.channels: - if c.role != mesh_pb2.Channel.Role.DISABLED: + if c.role != mesh_pb2.Channel.Role.DISABLED: channelSet.settings.append(c.settings) bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') @@ -438,7 +441,7 @@ class MeshInterface: def onResponse(p): """A closure to handle the response packet""" - self.radioConfig = p["decoded"]["admin"]["raw"].get_radio_response + self.radioConfig = p["decoded"]["admin"]["raw"].get_radio_response return self.sendData(p, self.myInfo.my_node_num, portNum=portnums_pb2.PortNum.ADMIN_APP, @@ -564,7 +567,7 @@ class MeshInterface: asDict = google.protobuf.json_format.MessageToDict(meshPacket) # We normally decompose the payload into a dictionary so that the client - # doesn't need to understand protobufs. But advanced clients might + # doesn't need to understand protobufs. But advanced clients might # want the raw protobuf, so we provide it in "raw" asDict["raw"] = meshPacket From dfb6fb7548ffbb096a724a4c61f21694f8c1fda5 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 27 Feb 2021 13:21:30 +0800 Subject: [PATCH 25/48] update channel protos --- meshtastic/__init__.py | 12 +- meshtastic/__main__.py | 12 +- meshtastic/admin_pb2.py | 20 +- meshtastic/apponly_pb2.py | 17 +- meshtastic/channel_pb2.py | 267 ++++++++++ meshtastic/deviceonly_pb2.py | 14 +- meshtastic/mesh_pb2.py | 977 +--------------------------------- meshtastic/radioconfig_pb2.py | 711 +++++++++++++++++++++++++ proto | 2 +- 9 files changed, 1039 insertions(+), 993 deletions(-) create mode 100644 meshtastic/channel_pb2.py create mode 100644 meshtastic/radioconfig_pb2.py diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index e71c6c1..62073aa 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -67,7 +67,7 @@ import time import base64 import platform import socket -from . import mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2, environmental_measurement_pb2, remote_hardware_pb2, util +from . import mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2, environmental_measurement_pb2, remote_hardware_pb2, channel_pb2, radioconfig_pb2, util from .util import fixme, catchAndIgnore from pubsub import pub from dotmap import DotMap @@ -352,25 +352,25 @@ class MeshInterface: # Only keep the primary/secondary channels, assume primary is first channelSet = apponly_pb2.ChannelSet() for c in self.channels: - if c.role != mesh_pb2.Channel.Role.DISABLED: + if c.role != channel_pb2.Channel.Role.DISABLED: channelSet.settings.append(c.settings) bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') - return f"https://www.meshtastic.org/c/#{s}" + return f"https://www.meshtastic.org/d/#{s}" def setURL(self, url): """Set mesh network URL""" if self.radioConfig == None: raise Exception("No RadioConfig has been read") - # URLs are of the form https://www.meshtastic.org/c/#{base64_channel_set} + # URLs are of the form https://www.meshtastic.org/d/#{base64_channel_set} # Split on '/#' to find the base64 encoded channel settings splitURL = url.split("/#") decodedURL = base64.urlsafe_b64decode(splitURL[-1]) channelSet = apponly_pb2.ChannelSet() channelSet.ParseFromString(decodedURL) - fixme("set self.channels") - self.writeChannels() + fixme("set self.channels, see https://developers.google.com/protocol-buffers/docs/reference/python-generated?csw=1#repeated-fields") + self._writeChannels() def _waitConnected(self): """Block until the initial node db download is complete, or timeout diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index e3d1bab..6121280 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -8,7 +8,7 @@ import codecs import base64 from . import SerialInterface, TCPInterface, BLEInterface, test, remote_hardware from pubsub import pub -from . import mesh_pb2, portnums_pb2 +from . import mesh_pb2, portnums_pb2, channel_pb2 import google.protobuf.json_format import pyqrcode import traceback @@ -276,7 +276,7 @@ def onConnected(interface): def setSimpleChannel(modem_config): """Set one of the simple modem_config only based channels""" - ch = mesh_pb2.ChannelSettings() + ch = channel_pb2.ChannelSettings() ch.modem_config = modem_config ch.psk = bytes([1]) # Use default channel psk 1 interface.radioConfig.channel_settings.CopyFrom(ch) @@ -296,11 +296,11 @@ def onConnected(interface): # handle the simple channel set commands if args.setch_longslow: setSimpleChannel( - mesh_pb2.ChannelSettings.ModemConfig.Bw125Cr48Sf4096) + channel_pb2.ChannelSettings.ModemConfig.Bw125Cr48Sf4096) if args.setch_shortfast: setSimpleChannel( - mesh_pb2.ChannelSettings.ModemConfig.Bw500Cr45Sf128) + channel_pb2.ChannelSettings.ModemConfig.Bw500Cr45Sf128) # Handle the channel settings for pref in (args.setchan or []): @@ -320,9 +320,9 @@ def onConnected(interface): print(interface.radioConfig) print("Channels:") for c in interface.channels: - if c.role != mesh_pb2.Channel.Role.DISABLED: + if c.role != channel_pb2.Channel.Role.DISABLED: cStr = MessageToJson(c.settings).replace("\n", "") - print(f" {mesh_pb2.Channel.Role.Name(c.role)} {cStr}") + print(f" {channel_pb2.Channel.Role.Name(c.role)} {cStr}") print(f"\nChannel URL {interface.channelURL}") print("Nodes in mesh:") for n in interface.nodes.values(): diff --git a/meshtastic/admin_pb2.py b/meshtastic/admin_pb2.py index 8c73a5d..fe6ca5c 100644 --- a/meshtastic/admin_pb2.py +++ b/meshtastic/admin_pb2.py @@ -12,17 +12,19 @@ _sym_db = _symbol_database.Default() from . import mesh_pb2 as mesh__pb2 +from . import radioconfig_pb2 as radioconfig__pb2 +from . import channel_pb2 as channel__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='admin.proto', package='', syntax='proto3', - serialized_options=b'\n\023com.geeksville.meshB\005AdminH\003', + serialized_options=b'\n\023com.geeksville.meshB\013AdminProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0b\x61\x64min.proto\x1a\nmesh.proto\"\x8b\x02\n\x0c\x41\x64minMessage\x12!\n\tset_radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x02 \x01(\x0b\x32\x05.UserH\x00\x12\x1f\n\x0bset_channel\x18\x03 \x01(\x0b\x32\x08.ChannelH\x00\x12\x1b\n\x11get_radio_request\x18\x04 \x01(\x08H\x00\x12*\n\x12get_radio_response\x18\x05 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1d\n\x13get_channel_request\x18\x06 \x01(\rH\x00\x12(\n\x14get_channel_response\x18\x07 \x01(\x0b\x32\x08.ChannelH\x00\x42\t\n\x07variantB\x1e\n\x13\x63om.geeksville.meshB\x05\x41\x64minH\x03\x62\x06proto3' + serialized_pb=b'\n\x0b\x61\x64min.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\x1a\rchannel.proto\"\x8b\x02\n\x0c\x41\x64minMessage\x12!\n\tset_radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x02 \x01(\x0b\x32\x05.UserH\x00\x12\x1f\n\x0bset_channel\x18\x03 \x01(\x0b\x32\x08.ChannelH\x00\x12\x1b\n\x11get_radio_request\x18\x04 \x01(\x08H\x00\x12*\n\x12get_radio_response\x18\x05 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1d\n\x13get_channel_request\x18\x06 \x01(\rH\x00\x12(\n\x14get_channel_response\x18\x07 \x01(\x0b\x32\x08.ChannelH\x00\x42\t\n\x07variantB$\n\x13\x63om.geeksville.meshB\x0b\x41\x64minProtosH\x03\x62\x06proto3' , - dependencies=[mesh__pb2.DESCRIPTOR,]) + dependencies=[mesh__pb2.DESCRIPTOR,radioconfig__pb2.DESCRIPTOR,channel__pb2.DESCRIPTOR,]) @@ -101,15 +103,15 @@ _ADMINMESSAGE = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28, - serialized_end=295, + serialized_start=62, + serialized_end=329, ) -_ADMINMESSAGE.fields_by_name['set_radio'].message_type = mesh__pb2._RADIOCONFIG +_ADMINMESSAGE.fields_by_name['set_radio'].message_type = radioconfig__pb2._RADIOCONFIG _ADMINMESSAGE.fields_by_name['set_owner'].message_type = mesh__pb2._USER -_ADMINMESSAGE.fields_by_name['set_channel'].message_type = mesh__pb2._CHANNEL -_ADMINMESSAGE.fields_by_name['get_radio_response'].message_type = mesh__pb2._RADIOCONFIG -_ADMINMESSAGE.fields_by_name['get_channel_response'].message_type = mesh__pb2._CHANNEL +_ADMINMESSAGE.fields_by_name['set_channel'].message_type = channel__pb2._CHANNEL +_ADMINMESSAGE.fields_by_name['get_radio_response'].message_type = radioconfig__pb2._RADIOCONFIG +_ADMINMESSAGE.fields_by_name['get_channel_response'].message_type = channel__pb2._CHANNEL _ADMINMESSAGE.oneofs_by_name['variant'].fields.append( _ADMINMESSAGE.fields_by_name['set_radio']) _ADMINMESSAGE.fields_by_name['set_radio'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant'] diff --git a/meshtastic/apponly_pb2.py b/meshtastic/apponly_pb2.py index c0d385c..b4a865f 100644 --- a/meshtastic/apponly_pb2.py +++ b/meshtastic/apponly_pb2.py @@ -12,17 +12,18 @@ _sym_db = _symbol_database.Default() from . import mesh_pb2 as mesh__pb2 +from . import channel_pb2 as channel__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='apponly.proto', package='', syntax='proto3', - serialized_options=b'\n\023com.geeksville.meshB\007AppOnlyH\003', + serialized_options=b'\n\023com.geeksville.meshB\rAppOnlyProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\t\"0\n\nChannelSet\x12\"\n\x08settings\x18\x01 \x03(\x0b\x32\x10.ChannelSettingsB \n\x13\x63om.geeksville.meshB\x07\x41ppOnlyH\x03\x62\x06proto3' + serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\x1a\rchannel.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\t\"0\n\nChannelSet\x12\"\n\x08settings\x18\x01 \x03(\x0b\x32\x10.ChannelSettingsB&\n\x13\x63om.geeksville.meshB\rAppOnlyProtosH\x03\x62\x06proto3' , - dependencies=[mesh__pb2.DESCRIPTOR,]) + dependencies=[mesh__pb2.DESCRIPTOR,channel__pb2.DESCRIPTOR,]) @@ -68,8 +69,8 @@ _SERVICEENVELOPE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=29, - serialized_end=115, + serialized_start=44, + serialized_end=130, ) @@ -100,12 +101,12 @@ _CHANNELSET = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=117, - serialized_end=165, + serialized_start=132, + serialized_end=180, ) _SERVICEENVELOPE.fields_by_name['packet'].message_type = mesh__pb2._MESHPACKET -_CHANNELSET.fields_by_name['settings'].message_type = mesh__pb2._CHANNELSETTINGS +_CHANNELSET.fields_by_name['settings'].message_type = channel__pb2._CHANNELSETTINGS DESCRIPTOR.message_types_by_name['ServiceEnvelope'] = _SERVICEENVELOPE DESCRIPTOR.message_types_by_name['ChannelSet'] = _CHANNELSET _sym_db.RegisterFileDescriptor(DESCRIPTOR) diff --git a/meshtastic/channel_pb2.py b/meshtastic/channel_pb2.py new file mode 100644 index 0000000..2b1d8a6 --- /dev/null +++ b/meshtastic/channel_pb2.py @@ -0,0 +1,267 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: channel.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='channel.proto', + package='', + syntax='proto3', + serialized_options=b'\n\023com.geeksville.meshB\rChannelProtosH\003', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\rchannel.proto\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\x42&\n\x13\x63om.geeksville.meshB\rChannelProtosH\x03\x62\x06proto3' +) + + + +_CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( + name='ModemConfig', + full_name='ChannelSettings.ModemConfig', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='Bw125Cr45Sf128', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='Bw500Cr45Sf128', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='Bw31_25Cr48Sf512', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='Bw125Cr48Sf4096', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=280, + serialized_end=376, +) +_sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG) + +_CHANNEL_ROLE = _descriptor.EnumDescriptor( + name='Role', + full_name='Channel.Role', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='DISABLED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PRIMARY', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SECONDARY', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=470, + serialized_end=518, +) +_sym_db.RegisterEnumDescriptor(_CHANNEL_ROLE) + + +_CHANNELSETTINGS = _descriptor.Descriptor( + name='ChannelSettings', + full_name='ChannelSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='tx_power', full_name='ChannelSettings.tx_power', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='modem_config', full_name='ChannelSettings.modem_config', index=1, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='bandwidth', full_name='ChannelSettings.bandwidth', index=2, + number=6, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='spread_factor', full_name='ChannelSettings.spread_factor', index=3, + number=7, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='coding_rate', full_name='ChannelSettings.coding_rate', index=4, + number=8, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='channel_num', full_name='ChannelSettings.channel_num', index=5, + number=9, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='psk', full_name='ChannelSettings.psk', index=6, + number=4, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='name', full_name='ChannelSettings.name', index=7, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='id', full_name='ChannelSettings.id', index=8, + number=10, type=7, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='uplink_enabled', full_name='ChannelSettings.uplink_enabled', index=9, + number=16, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='downlink_enabled', full_name='ChannelSettings.downlink_enabled', index=10, + number=17, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _CHANNELSETTINGS_MODEMCONFIG, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=18, + serialized_end=376, +) + + +_CHANNEL = _descriptor.Descriptor( + name='Channel', + full_name='Channel', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='index', full_name='Channel.index', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='settings', full_name='Channel.settings', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='role', full_name='Channel.role', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _CHANNEL_ROLE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=379, + serialized_end=518, +) + +_CHANNELSETTINGS.fields_by_name['modem_config'].enum_type = _CHANNELSETTINGS_MODEMCONFIG +_CHANNELSETTINGS_MODEMCONFIG.containing_type = _CHANNELSETTINGS +_CHANNEL.fields_by_name['settings'].message_type = _CHANNELSETTINGS +_CHANNEL.fields_by_name['role'].enum_type = _CHANNEL_ROLE +_CHANNEL_ROLE.containing_type = _CHANNEL +DESCRIPTOR.message_types_by_name['ChannelSettings'] = _CHANNELSETTINGS +DESCRIPTOR.message_types_by_name['Channel'] = _CHANNEL +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +ChannelSettings = _reflection.GeneratedProtocolMessageType('ChannelSettings', (_message.Message,), { + 'DESCRIPTOR' : _CHANNELSETTINGS, + '__module__' : 'channel_pb2' + # @@protoc_insertion_point(class_scope:ChannelSettings) + }) +_sym_db.RegisterMessage(ChannelSettings) + +Channel = _reflection.GeneratedProtocolMessageType('Channel', (_message.Message,), { + 'DESCRIPTOR' : _CHANNEL, + '__module__' : 'channel_pb2' + # @@protoc_insertion_point(class_scope:Channel) + }) +_sym_db.RegisterMessage(Channel) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/meshtastic/deviceonly_pb2.py b/meshtastic/deviceonly_pb2.py index 97bae2a..7a7ba44 100644 --- a/meshtastic/deviceonly_pb2.py +++ b/meshtastic/deviceonly_pb2.py @@ -12,6 +12,8 @@ _sym_db = _symbol_database.Default() from . import mesh_pb2 as mesh__pb2 +from . import radioconfig_pb2 as radioconfig__pb2 +from . import channel_pb2 as channel__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -20,9 +22,9 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nDeviceOnlyH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\"\x99\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12\x1a\n\x08\x63hannels\x18\x0c \x03(\x0b\x32\x08.ChannelB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3' + serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\x1a\rchannel.proto\"\x99\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12\x1a\n\x08\x63hannels\x18\x0c \x03(\x0b\x32\x08.ChannelB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3' , - dependencies=[mesh__pb2.DESCRIPTOR,]) + dependencies=[mesh__pb2.DESCRIPTOR,radioconfig__pb2.DESCRIPTOR,channel__pb2.DESCRIPTOR,]) @@ -117,17 +119,17 @@ _DEVICESTATE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=33, - serialized_end=314, + serialized_start=67, + serialized_end=348, ) -_DEVICESTATE.fields_by_name['radio'].message_type = mesh__pb2._RADIOCONFIG +_DEVICESTATE.fields_by_name['radio'].message_type = radioconfig__pb2._RADIOCONFIG _DEVICESTATE.fields_by_name['my_node'].message_type = mesh__pb2._MYNODEINFO _DEVICESTATE.fields_by_name['owner'].message_type = mesh__pb2._USER _DEVICESTATE.fields_by_name['node_db'].message_type = mesh__pb2._NODEINFO _DEVICESTATE.fields_by_name['receive_queue'].message_type = mesh__pb2._MESHPACKET _DEVICESTATE.fields_by_name['rx_text_message'].message_type = mesh__pb2._MESHPACKET -_DEVICESTATE.fields_by_name['channels'].message_type = mesh__pb2._CHANNEL +_DEVICESTATE.fields_by_name['channels'].message_type = channel__pb2._CHANNEL DESCRIPTOR.message_types_by_name['DeviceState'] = _DEVICESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py index 91cb778..41c23d5 100644 --- a/meshtastic/mesh_pb2.py +++ b/meshtastic/mesh_pb2.py @@ -21,7 +21,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\x8e\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"{\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\x12\x12\n\nrequest_id\x18\x06 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\x9f\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12\x1b\n\x07\x63hannel\x18\n \x01(\x0b\x32\x08.ChannelH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03\"Z\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\x8e\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"{\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\x12\x12\n\nrequest_id\x18\x06 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xe3\x01\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03\"Z\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' , dependencies=[portnums__pb2.DESCRIPTOR,]) @@ -45,246 +45,12 @@ _CONSTANTS = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4131, - serialized_end=4177, + serialized_start=1892, + serialized_end=1938, ) _sym_db.RegisterEnumDescriptor(_CONSTANTS) Constants = enum_type_wrapper.EnumTypeWrapper(_CONSTANTS) -_REGIONCODE = _descriptor.EnumDescriptor( - name='RegionCode', - full_name='RegionCode', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='Unset', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='US', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='EU433', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='EU865', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='CN', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='JP', index=5, number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='ANZ', index=6, number=6, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='KR', index=7, number=7, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='TW', index=8, number=8, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4179, - serialized_end=4273, -) -_sym_db.RegisterEnumDescriptor(_REGIONCODE) - -RegionCode = enum_type_wrapper.EnumTypeWrapper(_REGIONCODE) -_CHARGECURRENT = _descriptor.EnumDescriptor( - name='ChargeCurrent', - full_name='ChargeCurrent', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='MAUnset', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA100', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA190', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA280', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA360', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA450', index=5, number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA550', index=6, number=6, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA630', index=7, number=7, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA700', index=8, number=8, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA780', index=9, number=9, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA880', index=10, number=10, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA960', index=11, number=11, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1000', index=12, number=12, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1080', index=13, number=13, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1160', index=14, number=14, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1240', index=15, number=15, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1320', index=16, number=16, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4276, - serialized_end=4485, -) -_sym_db.RegisterEnumDescriptor(_CHARGECURRENT) - -ChargeCurrent = enum_type_wrapper.EnumTypeWrapper(_CHARGECURRENT) -_GPSOPERATION = _descriptor.EnumDescriptor( - name='GpsOperation', - full_name='GpsOperation', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='GpsOpUnset', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GpsOpStationary', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GpsOpMobile', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GpsOpTimeOnly', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GpsOpDisabled', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4487, - serialized_end=4593, -) -_sym_db.RegisterEnumDescriptor(_GPSOPERATION) - -GpsOperation = enum_type_wrapper.EnumTypeWrapper(_GPSOPERATION) -_LOCATIONSHARING = _descriptor.EnumDescriptor( - name='LocationSharing', - full_name='LocationSharing', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='LocUnset', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='LocEnabled', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='LocDisabled', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4595, - serialized_end=4659, -) -_sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) - -LocationSharing = enum_type_wrapper.EnumTypeWrapper(_LOCATIONSHARING) _CRITICALERRORCODE = _descriptor.EnumDescriptor( name='CriticalErrorCode', full_name='CriticalErrorCode', @@ -340,48 +106,14 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4662, - serialized_end=4837, + serialized_start=1941, + serialized_end=2116, ) _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE) CriticalErrorCode = enum_type_wrapper.EnumTypeWrapper(_CRITICALERRORCODE) Unused = 0 DATA_PAYLOAD_LEN = 240 -Unset = 0 -US = 1 -EU433 = 2 -EU865 = 3 -CN = 4 -JP = 5 -ANZ = 6 -KR = 7 -TW = 8 -MAUnset = 0 -MA100 = 1 -MA190 = 2 -MA280 = 3 -MA360 = 4 -MA450 = 5 -MA550 = 6 -MA630 = 7 -MA700 = 8 -MA780 = 9 -MA880 = 10 -MA960 = 11 -MA1000 = 12 -MA1080 = 13 -MA1160 = 14 -MA1240 = 15 -MA1320 = 16 -GpsOpUnset = 0 -GpsOpStationary = 1 -GpsOpMobile = 2 -GpsOpTimeOnly = 3 -GpsOpDisabled = 4 -LocUnset = 0 -LocEnabled = 1 -LocDisabled = 2 globals()['None'] = 0 TxWatchdog = 1 SleepEnterWait = 2 @@ -498,71 +230,6 @@ _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( ) _sym_db.RegisterEnumDescriptor(_MESHPACKET_PRIORITY) -_CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( - name='ModemConfig', - full_name='ChannelSettings.ModemConfig', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='Bw125Cr45Sf128', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='Bw500Cr45Sf128', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='Bw31_25Cr48Sf512', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='Bw125Cr48Sf4096', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=1246, - serialized_end=1342, -) -_sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG) - -_CHANNEL_ROLE = _descriptor.EnumDescriptor( - name='Role', - full_name='Channel.Role', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='DISABLED', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='PRIMARY', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='SECONDARY', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=1436, - serialized_end=1484, -) -_sym_db.RegisterEnumDescriptor(_CHANNEL_ROLE) - _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( name='Level', full_name='LogRecord.Level', @@ -608,8 +275,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3659, - serialized_end=3747, + serialized_start=1480, + serialized_end=1568, ) _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL) @@ -986,541 +653,6 @@ _MESHPACKET = _descriptor.Descriptor( ) -_CHANNELSETTINGS = _descriptor.Descriptor( - name='ChannelSettings', - full_name='ChannelSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='tx_power', full_name='ChannelSettings.tx_power', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='modem_config', full_name='ChannelSettings.modem_config', index=1, - number=3, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='bandwidth', full_name='ChannelSettings.bandwidth', index=2, - number=6, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='spread_factor', full_name='ChannelSettings.spread_factor', index=3, - number=7, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='coding_rate', full_name='ChannelSettings.coding_rate', index=4, - number=8, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='channel_num', full_name='ChannelSettings.channel_num', index=5, - number=9, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='psk', full_name='ChannelSettings.psk', index=6, - number=4, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='name', full_name='ChannelSettings.name', index=7, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='id', full_name='ChannelSettings.id', index=8, - number=10, type=7, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='uplink_enabled', full_name='ChannelSettings.uplink_enabled', index=9, - number=16, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='downlink_enabled', full_name='ChannelSettings.downlink_enabled', index=10, - number=17, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _CHANNELSETTINGS_MODEMCONFIG, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=984, - serialized_end=1342, -) - - -_CHANNEL = _descriptor.Descriptor( - name='Channel', - full_name='Channel', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='index', full_name='Channel.index', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='settings', full_name='Channel.settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='role', full_name='Channel.role', index=2, - number=3, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _CHANNEL_ROLE, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1345, - serialized_end=1484, -) - - -_RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( - name='UserPreferences', - full_name='RadioConfig.UserPreferences', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='position_broadcast_secs', full_name='RadioConfig.UserPreferences.position_broadcast_secs', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='send_owner_interval', full_name='RadioConfig.UserPreferences.send_owner_interval', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wait_bluetooth_secs', full_name='RadioConfig.UserPreferences.wait_bluetooth_secs', index=2, - number=4, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='screen_on_secs', full_name='RadioConfig.UserPreferences.screen_on_secs', index=3, - number=5, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='phone_timeout_secs', full_name='RadioConfig.UserPreferences.phone_timeout_secs', index=4, - number=6, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='phone_sds_timeout_sec', full_name='RadioConfig.UserPreferences.phone_sds_timeout_sec', index=5, - number=7, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='mesh_sds_timeout_secs', full_name='RadioConfig.UserPreferences.mesh_sds_timeout_secs', index=6, - number=8, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='sds_secs', full_name='RadioConfig.UserPreferences.sds_secs', index=7, - number=9, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ls_secs', full_name='RadioConfig.UserPreferences.ls_secs', index=8, - number=10, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='min_wake_secs', full_name='RadioConfig.UserPreferences.min_wake_secs', index=9, - number=11, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wifi_ssid', full_name='RadioConfig.UserPreferences.wifi_ssid', index=10, - number=12, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wifi_password', full_name='RadioConfig.UserPreferences.wifi_password', index=11, - number=13, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wifi_ap_mode', full_name='RadioConfig.UserPreferences.wifi_ap_mode', index=12, - number=14, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='region', full_name='RadioConfig.UserPreferences.region', index=13, - number=15, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='charge_current', full_name='RadioConfig.UserPreferences.charge_current', index=14, - number=16, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='is_router', full_name='RadioConfig.UserPreferences.is_router', index=15, - number=37, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='is_low_power', full_name='RadioConfig.UserPreferences.is_low_power', index=16, - number=38, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='fixed_position', full_name='RadioConfig.UserPreferences.fixed_position', index=17, - number=39, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='factory_reset', full_name='RadioConfig.UserPreferences.factory_reset', index=18, - number=100, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='debug_log_enabled', full_name='RadioConfig.UserPreferences.debug_log_enabled', index=19, - number=101, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='location_share', full_name='RadioConfig.UserPreferences.location_share', index=20, - number=32, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='gps_operation', full_name='RadioConfig.UserPreferences.gps_operation', index=21, - number=33, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='gps_update_interval', full_name='RadioConfig.UserPreferences.gps_update_interval', index=22, - number=34, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='gps_attempt_time', full_name='RadioConfig.UserPreferences.gps_attempt_time', index=23, - number=36, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ignore_incoming', full_name='RadioConfig.UserPreferences.ignore_incoming', index=24, - number=103, type=13, cpp_type=3, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_enabled', full_name='RadioConfig.UserPreferences.serialplugin_enabled', index=25, - number=120, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_echo', full_name='RadioConfig.UserPreferences.serialplugin_echo', index=26, - number=121, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_rxd', full_name='RadioConfig.UserPreferences.serialplugin_rxd', index=27, - number=122, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_txd', full_name='RadioConfig.UserPreferences.serialplugin_txd', index=28, - number=123, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_timeout', full_name='RadioConfig.UserPreferences.serialplugin_timeout', index=29, - number=124, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_mode', full_name='RadioConfig.UserPreferences.serialplugin_mode', index=30, - number=125, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_enabled', full_name='RadioConfig.UserPreferences.ext_notification_plugin_enabled', index=31, - number=126, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_output_ms', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output_ms', index=32, - number=127, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_output', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output', index=33, - number=128, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_active', full_name='RadioConfig.UserPreferences.ext_notification_plugin_active', index=34, - number=129, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_alert_message', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_message', index=35, - number=130, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_alert_bell', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_bell', index=36, - number=131, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='range_test_plugin_enabled', full_name='RadioConfig.UserPreferences.range_test_plugin_enabled', index=37, - number=132, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='range_test_plugin_sender', full_name='RadioConfig.UserPreferences.range_test_plugin_sender', index=38, - number=133, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='range_test_plugin_save', full_name='RadioConfig.UserPreferences.range_test_plugin_save', index=39, - number=134, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='store_forward_plugin_enabled', full_name='RadioConfig.UserPreferences.store_forward_plugin_enabled', index=40, - number=136, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='store_forward_plugin_records', full_name='RadioConfig.UserPreferences.store_forward_plugin_records', index=41, - number=137, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_measurement_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_measurement_enabled', index=42, - number=140, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_screen_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_screen_enabled', index=43, - number=141, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_read_error_count_threshold', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_read_error_count_threshold', index=44, - number=142, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_update_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_update_interval', index=45, - number=143, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_recovery_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_recovery_interval', index=46, - number=144, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1554, - serialized_end=3160, -) - -_RADIOCONFIG = _descriptor.Descriptor( - name='RadioConfig', - full_name='RadioConfig', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='preferences', full_name='RadioConfig.preferences', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_RADIOCONFIG_USERPREFERENCES, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1487, - serialized_end=3160, -) - - _NODEINFO = _descriptor.Descriptor( name='NodeInfo', full_name='NodeInfo', @@ -1576,8 +708,8 @@ _NODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3162, - serialized_end=3266, + serialized_start=983, + serialized_end=1087, ) @@ -1685,8 +817,8 @@ _MYNODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3269, - serialized_end=3563, + serialized_start=1090, + serialized_end=1384, ) @@ -1739,8 +871,8 @@ _LOGRECORD = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3566, - serialized_end=3747, + serialized_start=1387, + serialized_end=1568, ) @@ -1781,40 +913,26 @@ _FROMRADIO = _descriptor.Descriptor( is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='radio', full_name='FromRadio.radio', index=4, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='log_record', full_name='FromRadio.log_record', index=5, + name='log_record', full_name='FromRadio.log_record', index=4, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='config_complete_id', full_name='FromRadio.config_complete_id', index=6, + name='config_complete_id', full_name='FromRadio.config_complete_id', index=5, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='rebooted', full_name='FromRadio.rebooted', index=7, + name='rebooted', full_name='FromRadio.rebooted', index=6, number=9, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='channel', full_name='FromRadio.channel', index=8, - number=10, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1832,8 +950,8 @@ _FROMRADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3750, - serialized_end=4037, + serialized_start=1571, + serialized_end=1798, ) @@ -1876,8 +994,8 @@ _TORADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=4039, - serialized_end=4129, + serialized_start=1800, + serialized_end=1890, ) _ROUTING.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY @@ -1903,17 +1021,6 @@ _MESHPACKET.fields_by_name['decoded'].containing_oneof = _MESHPACKET.oneofs_by_n _MESHPACKET.oneofs_by_name['payloadVariant'].fields.append( _MESHPACKET.fields_by_name['encrypted']) _MESHPACKET.fields_by_name['encrypted'].containing_oneof = _MESHPACKET.oneofs_by_name['payloadVariant'] -_CHANNELSETTINGS.fields_by_name['modem_config'].enum_type = _CHANNELSETTINGS_MODEMCONFIG -_CHANNELSETTINGS_MODEMCONFIG.containing_type = _CHANNELSETTINGS -_CHANNEL.fields_by_name['settings'].message_type = _CHANNELSETTINGS -_CHANNEL.fields_by_name['role'].enum_type = _CHANNEL_ROLE -_CHANNEL_ROLE.containing_type = _CHANNEL -_RADIOCONFIG_USERPREFERENCES.fields_by_name['region'].enum_type = _REGIONCODE -_RADIOCONFIG_USERPREFERENCES.fields_by_name['charge_current'].enum_type = _CHARGECURRENT -_RADIOCONFIG_USERPREFERENCES.fields_by_name['location_share'].enum_type = _LOCATIONSHARING -_RADIOCONFIG_USERPREFERENCES.fields_by_name['gps_operation'].enum_type = _GPSOPERATION -_RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG -_RADIOCONFIG.fields_by_name['preferences'].message_type = _RADIOCONFIG_USERPREFERENCES _NODEINFO.fields_by_name['user'].message_type = _USER _NODEINFO.fields_by_name['position'].message_type = _POSITION _MYNODEINFO.fields_by_name['error_code'].enum_type = _CRITICALERRORCODE @@ -1922,9 +1029,7 @@ _LOGRECORD_LEVEL.containing_type = _LOGRECORD _FROMRADIO.fields_by_name['packet'].message_type = _MESHPACKET _FROMRADIO.fields_by_name['my_info'].message_type = _MYNODEINFO _FROMRADIO.fields_by_name['node_info'].message_type = _NODEINFO -_FROMRADIO.fields_by_name['radio'].message_type = _RADIOCONFIG _FROMRADIO.fields_by_name['log_record'].message_type = _LOGRECORD -_FROMRADIO.fields_by_name['channel'].message_type = _CHANNEL _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['packet']) _FROMRADIO.fields_by_name['packet'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] @@ -1934,9 +1039,6 @@ _FROMRADIO.fields_by_name['my_info'].containing_oneof = _FROMRADIO.oneofs_by_nam _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['node_info']) _FROMRADIO.fields_by_name['node_info'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] -_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( - _FROMRADIO.fields_by_name['radio']) -_FROMRADIO.fields_by_name['radio'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['log_record']) _FROMRADIO.fields_by_name['log_record'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] @@ -1946,9 +1048,6 @@ _FROMRADIO.fields_by_name['config_complete_id'].containing_oneof = _FROMRADIO.on _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['rebooted']) _FROMRADIO.fields_by_name['rebooted'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] -_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( - _FROMRADIO.fields_by_name['channel']) -_FROMRADIO.fields_by_name['channel'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] _TORADIO.fields_by_name['packet'].message_type = _MESHPACKET _TORADIO.oneofs_by_name['payloadVariant'].fields.append( _TORADIO.fields_by_name['packet']) @@ -1962,19 +1061,12 @@ DESCRIPTOR.message_types_by_name['RouteDiscovery'] = _ROUTEDISCOVERY DESCRIPTOR.message_types_by_name['Routing'] = _ROUTING DESCRIPTOR.message_types_by_name['Data'] = _DATA DESCRIPTOR.message_types_by_name['MeshPacket'] = _MESHPACKET -DESCRIPTOR.message_types_by_name['ChannelSettings'] = _CHANNELSETTINGS -DESCRIPTOR.message_types_by_name['Channel'] = _CHANNEL -DESCRIPTOR.message_types_by_name['RadioConfig'] = _RADIOCONFIG DESCRIPTOR.message_types_by_name['NodeInfo'] = _NODEINFO DESCRIPTOR.message_types_by_name['MyNodeInfo'] = _MYNODEINFO DESCRIPTOR.message_types_by_name['LogRecord'] = _LOGRECORD DESCRIPTOR.message_types_by_name['FromRadio'] = _FROMRADIO DESCRIPTOR.message_types_by_name['ToRadio'] = _TORADIO DESCRIPTOR.enum_types_by_name['Constants'] = _CONSTANTS -DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE -DESCRIPTOR.enum_types_by_name['ChargeCurrent'] = _CHARGECURRENT -DESCRIPTOR.enum_types_by_name['GpsOperation'] = _GPSOPERATION -DESCRIPTOR.enum_types_by_name['LocationSharing'] = _LOCATIONSHARING DESCRIPTOR.enum_types_by_name['CriticalErrorCode'] = _CRITICALERRORCODE _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -2020,35 +1112,6 @@ MeshPacket = _reflection.GeneratedProtocolMessageType('MeshPacket', (_message.Me }) _sym_db.RegisterMessage(MeshPacket) -ChannelSettings = _reflection.GeneratedProtocolMessageType('ChannelSettings', (_message.Message,), { - 'DESCRIPTOR' : _CHANNELSETTINGS, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:ChannelSettings) - }) -_sym_db.RegisterMessage(ChannelSettings) - -Channel = _reflection.GeneratedProtocolMessageType('Channel', (_message.Message,), { - 'DESCRIPTOR' : _CHANNEL, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:Channel) - }) -_sym_db.RegisterMessage(Channel) - -RadioConfig = _reflection.GeneratedProtocolMessageType('RadioConfig', (_message.Message,), { - - 'UserPreferences' : _reflection.GeneratedProtocolMessageType('UserPreferences', (_message.Message,), { - 'DESCRIPTOR' : _RADIOCONFIG_USERPREFERENCES, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:RadioConfig.UserPreferences) - }) - , - 'DESCRIPTOR' : _RADIOCONFIG, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:RadioConfig) - }) -_sym_db.RegisterMessage(RadioConfig) -_sym_db.RegisterMessage(RadioConfig.UserPreferences) - NodeInfo = _reflection.GeneratedProtocolMessageType('NodeInfo', (_message.Message,), { 'DESCRIPTOR' : _NODEINFO, '__module__' : 'mesh_pb2' diff --git a/meshtastic/radioconfig_pb2.py b/meshtastic/radioconfig_pb2.py new file mode 100644 index 0000000..e064a44 --- /dev/null +++ b/meshtastic/radioconfig_pb2.py @@ -0,0 +1,711 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: radioconfig.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='radioconfig.proto', + package='', + syntax='proto3', + serialized_options=b'\n\023com.geeksville.meshB\021RadioConfigProtosH\003', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x11radioconfig.proto\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42*\n\x13\x63om.geeksville.meshB\x11RadioConfigProtosH\x03\x62\x06proto3' +) + +_REGIONCODE = _descriptor.EnumDescriptor( + name='RegionCode', + full_name='RegionCode', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='Unset', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='US', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='EU433', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='EU865', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='CN', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='JP', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ANZ', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='KR', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TW', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1697, + serialized_end=1791, +) +_sym_db.RegisterEnumDescriptor(_REGIONCODE) + +RegionCode = enum_type_wrapper.EnumTypeWrapper(_REGIONCODE) +_CHARGECURRENT = _descriptor.EnumDescriptor( + name='ChargeCurrent', + full_name='ChargeCurrent', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='MAUnset', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA100', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA190', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA280', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA360', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA450', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA550', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA630', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA700', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA780', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA880', index=10, number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA960', index=11, number=11, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA1000', index=12, number=12, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA1080', index=13, number=13, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA1160', index=14, number=14, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA1240', index=15, number=15, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MA1320', index=16, number=16, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1794, + serialized_end=2003, +) +_sym_db.RegisterEnumDescriptor(_CHARGECURRENT) + +ChargeCurrent = enum_type_wrapper.EnumTypeWrapper(_CHARGECURRENT) +_GPSOPERATION = _descriptor.EnumDescriptor( + name='GpsOperation', + full_name='GpsOperation', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='GpsOpUnset', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GpsOpStationary', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GpsOpMobile', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GpsOpTimeOnly', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GpsOpDisabled', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=2005, + serialized_end=2111, +) +_sym_db.RegisterEnumDescriptor(_GPSOPERATION) + +GpsOperation = enum_type_wrapper.EnumTypeWrapper(_GPSOPERATION) +_LOCATIONSHARING = _descriptor.EnumDescriptor( + name='LocationSharing', + full_name='LocationSharing', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='LocUnset', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='LocEnabled', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='LocDisabled', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=2113, + serialized_end=2177, +) +_sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) + +LocationSharing = enum_type_wrapper.EnumTypeWrapper(_LOCATIONSHARING) +Unset = 0 +US = 1 +EU433 = 2 +EU865 = 3 +CN = 4 +JP = 5 +ANZ = 6 +KR = 7 +TW = 8 +MAUnset = 0 +MA100 = 1 +MA190 = 2 +MA280 = 3 +MA360 = 4 +MA450 = 5 +MA550 = 6 +MA630 = 7 +MA700 = 8 +MA780 = 9 +MA880 = 10 +MA960 = 11 +MA1000 = 12 +MA1080 = 13 +MA1160 = 14 +MA1240 = 15 +MA1320 = 16 +GpsOpUnset = 0 +GpsOpStationary = 1 +GpsOpMobile = 2 +GpsOpTimeOnly = 3 +GpsOpDisabled = 4 +LocUnset = 0 +LocEnabled = 1 +LocDisabled = 2 + + + +_RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( + name='UserPreferences', + full_name='RadioConfig.UserPreferences', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='position_broadcast_secs', full_name='RadioConfig.UserPreferences.position_broadcast_secs', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='send_owner_interval', full_name='RadioConfig.UserPreferences.send_owner_interval', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='wait_bluetooth_secs', full_name='RadioConfig.UserPreferences.wait_bluetooth_secs', index=2, + number=4, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='screen_on_secs', full_name='RadioConfig.UserPreferences.screen_on_secs', index=3, + number=5, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='phone_timeout_secs', full_name='RadioConfig.UserPreferences.phone_timeout_secs', index=4, + number=6, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='phone_sds_timeout_sec', full_name='RadioConfig.UserPreferences.phone_sds_timeout_sec', index=5, + number=7, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='mesh_sds_timeout_secs', full_name='RadioConfig.UserPreferences.mesh_sds_timeout_secs', index=6, + number=8, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='sds_secs', full_name='RadioConfig.UserPreferences.sds_secs', index=7, + number=9, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ls_secs', full_name='RadioConfig.UserPreferences.ls_secs', index=8, + number=10, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='min_wake_secs', full_name='RadioConfig.UserPreferences.min_wake_secs', index=9, + number=11, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='wifi_ssid', full_name='RadioConfig.UserPreferences.wifi_ssid', index=10, + number=12, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='wifi_password', full_name='RadioConfig.UserPreferences.wifi_password', index=11, + number=13, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='wifi_ap_mode', full_name='RadioConfig.UserPreferences.wifi_ap_mode', index=12, + number=14, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='region', full_name='RadioConfig.UserPreferences.region', index=13, + number=15, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='charge_current', full_name='RadioConfig.UserPreferences.charge_current', index=14, + number=16, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='is_router', full_name='RadioConfig.UserPreferences.is_router', index=15, + number=37, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='is_low_power', full_name='RadioConfig.UserPreferences.is_low_power', index=16, + number=38, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='fixed_position', full_name='RadioConfig.UserPreferences.fixed_position', index=17, + number=39, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='factory_reset', full_name='RadioConfig.UserPreferences.factory_reset', index=18, + number=100, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='debug_log_enabled', full_name='RadioConfig.UserPreferences.debug_log_enabled', index=19, + number=101, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='location_share', full_name='RadioConfig.UserPreferences.location_share', index=20, + number=32, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='gps_operation', full_name='RadioConfig.UserPreferences.gps_operation', index=21, + number=33, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='gps_update_interval', full_name='RadioConfig.UserPreferences.gps_update_interval', index=22, + number=34, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='gps_attempt_time', full_name='RadioConfig.UserPreferences.gps_attempt_time', index=23, + number=36, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ignore_incoming', full_name='RadioConfig.UserPreferences.ignore_incoming', index=24, + number=103, type=13, cpp_type=3, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='serialplugin_enabled', full_name='RadioConfig.UserPreferences.serialplugin_enabled', index=25, + number=120, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='serialplugin_echo', full_name='RadioConfig.UserPreferences.serialplugin_echo', index=26, + number=121, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='serialplugin_rxd', full_name='RadioConfig.UserPreferences.serialplugin_rxd', index=27, + number=122, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='serialplugin_txd', full_name='RadioConfig.UserPreferences.serialplugin_txd', index=28, + number=123, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='serialplugin_timeout', full_name='RadioConfig.UserPreferences.serialplugin_timeout', index=29, + number=124, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='serialplugin_mode', full_name='RadioConfig.UserPreferences.serialplugin_mode', index=30, + number=125, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ext_notification_plugin_enabled', full_name='RadioConfig.UserPreferences.ext_notification_plugin_enabled', index=31, + number=126, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ext_notification_plugin_output_ms', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output_ms', index=32, + number=127, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ext_notification_plugin_output', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output', index=33, + number=128, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ext_notification_plugin_active', full_name='RadioConfig.UserPreferences.ext_notification_plugin_active', index=34, + number=129, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ext_notification_plugin_alert_message', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_message', index=35, + number=130, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ext_notification_plugin_alert_bell', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_bell', index=36, + number=131, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='range_test_plugin_enabled', full_name='RadioConfig.UserPreferences.range_test_plugin_enabled', index=37, + number=132, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='range_test_plugin_sender', full_name='RadioConfig.UserPreferences.range_test_plugin_sender', index=38, + number=133, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='range_test_plugin_save', full_name='RadioConfig.UserPreferences.range_test_plugin_save', index=39, + number=134, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='store_forward_plugin_enabled', full_name='RadioConfig.UserPreferences.store_forward_plugin_enabled', index=40, + number=136, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='store_forward_plugin_records', full_name='RadioConfig.UserPreferences.store_forward_plugin_records', index=41, + number=137, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_measurement_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_measurement_enabled', index=42, + number=140, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_screen_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_screen_enabled', index=43, + number=141, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_read_error_count_threshold', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_read_error_count_threshold', index=44, + number=142, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_update_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_update_interval', index=45, + number=143, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_recovery_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_recovery_interval', index=46, + number=144, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=89, + serialized_end=1695, +) + +_RADIOCONFIG = _descriptor.Descriptor( + name='RadioConfig', + full_name='RadioConfig', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='preferences', full_name='RadioConfig.preferences', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_RADIOCONFIG_USERPREFERENCES, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=22, + serialized_end=1695, +) + +_RADIOCONFIG_USERPREFERENCES.fields_by_name['region'].enum_type = _REGIONCODE +_RADIOCONFIG_USERPREFERENCES.fields_by_name['charge_current'].enum_type = _CHARGECURRENT +_RADIOCONFIG_USERPREFERENCES.fields_by_name['location_share'].enum_type = _LOCATIONSHARING +_RADIOCONFIG_USERPREFERENCES.fields_by_name['gps_operation'].enum_type = _GPSOPERATION +_RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG +_RADIOCONFIG.fields_by_name['preferences'].message_type = _RADIOCONFIG_USERPREFERENCES +DESCRIPTOR.message_types_by_name['RadioConfig'] = _RADIOCONFIG +DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE +DESCRIPTOR.enum_types_by_name['ChargeCurrent'] = _CHARGECURRENT +DESCRIPTOR.enum_types_by_name['GpsOperation'] = _GPSOPERATION +DESCRIPTOR.enum_types_by_name['LocationSharing'] = _LOCATIONSHARING +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +RadioConfig = _reflection.GeneratedProtocolMessageType('RadioConfig', (_message.Message,), { + + 'UserPreferences' : _reflection.GeneratedProtocolMessageType('UserPreferences', (_message.Message,), { + 'DESCRIPTOR' : _RADIOCONFIG_USERPREFERENCES, + '__module__' : 'radioconfig_pb2' + # @@protoc_insertion_point(class_scope:RadioConfig.UserPreferences) + }) + , + 'DESCRIPTOR' : _RADIOCONFIG, + '__module__' : 'radioconfig_pb2' + # @@protoc_insertion_point(class_scope:RadioConfig) + }) +_sym_db.RegisterMessage(RadioConfig) +_sym_db.RegisterMessage(RadioConfig.UserPreferences) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/proto b/proto index fa40a93..3edb02d 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit fa40a9389bc910b6291fabe148260070e393600f +Subproject commit 3edb02dabb9b8b72d90bbbb7233b557c09391b87 From ba81714d2c8893bd01d81dfdb0bfd6c6a917d38e Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Tue, 2 Mar 2021 15:23:36 +0800 Subject: [PATCH 26/48] 1.1.50 --- docs/meshtastic/apponly_pb2.html | 13 +- docs/meshtastic/deviceonly_pb2.html | 27 +- .../environmental_measurement_pb2.html | 193 ++++++ docs/meshtastic/index.html | 15 +- docs/meshtastic/mesh_pb2.html | 605 +++++++++++------- docs/meshtastic/portnums_pb2.html | 63 +- docs/meshtastic/remote_hardware_pb2.html | 32 +- meshtastic/mesh_pb2.py | 93 ++- meshtastic/portnums_pb2.py | 12 +- proto | 2 +- setup.py | 2 +- 11 files changed, 734 insertions(+), 323 deletions(-) create mode 100644 docs/meshtastic/environmental_measurement_pb2.html diff --git a/docs/meshtastic/apponly_pb2.html b/docs/meshtastic/apponly_pb2.html index 5fd09c6..879f970 100644 --- a/docs/meshtastic/apponly_pb2.html +++ b/docs/meshtastic/apponly_pb2.html @@ -5,7 +5,7 @@ meshtastic.apponly_pb2 API documentation - + @@ -22,6 +22,7 @@

      Module meshtastic.apponly_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: apponly.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
       from google.protobuf import reflection as _reflection
      @@ -47,6 +48,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\007AppOnlyH\003',
      +  create_key=_descriptor._internal_create_key,
         serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\tB \n\x13\x63om.geeksville.meshB\x07\x41ppOnlyH\x03\x62\x06proto3'
         ,
         dependencies=[mesh__pb2.DESCRIPTOR,])
      @@ -60,6 +62,7 @@ _SERVICEENVELOPE = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='packet', full_name='ServiceEnvelope.packet', index=0,
      @@ -67,21 +70,21 @@ _SERVICEENVELOPE = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel_id', full_name='ServiceEnvelope.channel_id', index=1,
             number=2, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gateway_id', full_name='ServiceEnvelope.gateway_id', index=2,
             number=3, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      diff --git a/docs/meshtastic/deviceonly_pb2.html b/docs/meshtastic/deviceonly_pb2.html
      index c2118be..40933a4 100644
      --- a/docs/meshtastic/deviceonly_pb2.html
      +++ b/docs/meshtastic/deviceonly_pb2.html
      @@ -5,7 +5,7 @@
       
       
       meshtastic.deviceonly_pb2 API documentation
      -
      +
       
       
       
      @@ -22,6 +22,7 @@
       

      Module meshtastic.deviceonly_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: deviceonly.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
       from google.protobuf import reflection as _reflection
      @@ -47,6 +48,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\nDeviceOnlyH\003',
      +  create_key=_descriptor._internal_create_key,
         serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\"\xab\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12,\n\x12secondary_channels\x18\x0c \x03(\x0b\x32\x10.ChannelSettingsB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3'
         ,
         dependencies=[mesh__pb2.DESCRIPTOR,])
      @@ -60,6 +62,7 @@ _DEVICESTATE = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='radio', full_name='DeviceState.radio', index=0,
      @@ -67,70 +70,70 @@ _DEVICESTATE = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='my_node', full_name='DeviceState.my_node', index=1,
             number=2, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='owner', full_name='DeviceState.owner', index=2,
             number=3, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='node_db', full_name='DeviceState.node_db', index=3,
             number=4, type=11, cpp_type=10, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='receive_queue', full_name='DeviceState.receive_queue', index=4,
             number=5, type=11, cpp_type=10, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='version', full_name='DeviceState.version', index=5,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='rx_text_message', full_name='DeviceState.rx_text_message', index=6,
             number=7, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='no_save', full_name='DeviceState.no_save', index=7,
             number=9, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='did_gps_reset', full_name='DeviceState.did_gps_reset', index=8,
             number=11, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='secondary_channels', full_name='DeviceState.secondary_channels', index=9,
             number=12, type=11, cpp_type=10, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      diff --git a/docs/meshtastic/environmental_measurement_pb2.html b/docs/meshtastic/environmental_measurement_pb2.html
      new file mode 100644
      index 0000000..919316f
      --- /dev/null
      +++ b/docs/meshtastic/environmental_measurement_pb2.html
      @@ -0,0 +1,193 @@
      +
      +
      +
      +
      +
      +
      +meshtastic.environmental_measurement_pb2 API documentation
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Module meshtastic.environmental_measurement_pb2

      +
      +
      +

      Generated protocol buffer code.

      +
      + +Expand source code + +
      # -*- coding: utf-8 -*-
      +# Generated by the protocol buffer compiler.  DO NOT EDIT!
      +# source: environmental_measurement.proto
      +"""Generated protocol buffer code."""
      +from google.protobuf import descriptor as _descriptor
      +from google.protobuf import message as _message
      +from google.protobuf import reflection as _reflection
      +from google.protobuf import symbol_database as _symbol_database
      +# @@protoc_insertion_point(imports)
      +
      +_sym_db = _symbol_database.Default()
      +
      +
      +
      +
      +DESCRIPTOR = _descriptor.FileDescriptor(
      +  name='environmental_measurement.proto',
      +  package='',
      +  syntax='proto3',
      +  serialized_options=None,
      +  create_key=_descriptor._internal_create_key,
      +  serialized_pb=b'\n\x1f\x65nvironmental_measurement.proto\"g\n\x18\x45nvironmentalMeasurement\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x62\x06proto3'
      +)
      +
      +
      +
      +
      +_ENVIRONMENTALMEASUREMENT = _descriptor.Descriptor(
      +  name='EnvironmentalMeasurement',
      +  full_name='EnvironmentalMeasurement',
      +  filename=None,
      +  file=DESCRIPTOR,
      +  containing_type=None,
      +  create_key=_descriptor._internal_create_key,
      +  fields=[
      +    _descriptor.FieldDescriptor(
      +      name='temperature', full_name='EnvironmentalMeasurement.temperature', index=0,
      +      number=1, type=2, cpp_type=6, label=1,
      +      has_default_value=False, default_value=float(0),
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='relative_humidity', full_name='EnvironmentalMeasurement.relative_humidity', index=1,
      +      number=2, type=2, cpp_type=6, label=1,
      +      has_default_value=False, default_value=float(0),
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='barometric_pressure', full_name='EnvironmentalMeasurement.barometric_pressure', index=2,
      +      number=3, type=2, cpp_type=6, label=1,
      +      has_default_value=False, default_value=float(0),
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +  ],
      +  extensions=[
      +  ],
      +  nested_types=[],
      +  enum_types=[
      +  ],
      +  serialized_options=None,
      +  is_extendable=False,
      +  syntax='proto3',
      +  extension_ranges=[],
      +  oneofs=[
      +  ],
      +  serialized_start=35,
      +  serialized_end=138,
      +)
      +
      +DESCRIPTOR.message_types_by_name['EnvironmentalMeasurement'] = _ENVIRONMENTALMEASUREMENT
      +_sym_db.RegisterFileDescriptor(DESCRIPTOR)
      +
      +EnvironmentalMeasurement = _reflection.GeneratedProtocolMessageType('EnvironmentalMeasurement', (_message.Message,), {
      +  'DESCRIPTOR' : _ENVIRONMENTALMEASUREMENT,
      +  '__module__' : 'environmental_measurement_pb2'
      +  # @@protoc_insertion_point(class_scope:EnvironmentalMeasurement)
      +  })
      +_sym_db.RegisterMessage(EnvironmentalMeasurement)
      +
      +
      +# @@protoc_insertion_point(module_scope)
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Classes

      +
      +
      +class EnvironmentalMeasurement +(*args, **kwargs) +
      +
      +

      A ProtocolMessage

      +

      Ancestors

      +
        +
      • google.protobuf.pyext._message.CMessage
      • +
      • google.protobuf.message.Message
      • +
      +

      Class variables

      +
      +
      var DESCRIPTOR
      +
      +
      +
      +
      +

      Instance variables

      +
      +
      var barometric_pressure
      +
      +

      Field EnvironmentalMeasurement.barometric_pressure

      +
      +
      var relative_humidity
      +
      +

      Field EnvironmentalMeasurement.relative_humidity

      +
      +
      var temperature
      +
      +

      Field EnvironmentalMeasurement.temperature

      +
      +
      +
      +
      +
      +
      + +
      + + + \ No newline at end of file diff --git a/docs/meshtastic/index.html b/docs/meshtastic/index.html index 8a8e58d..55c5cdd 100644 --- a/docs/meshtastic/index.html +++ b/docs/meshtastic/index.html @@ -874,7 +874,7 @@ class TCPInterface(StreamInterface):
      meshtastic.apponly_pb2
      -
      +

      Generated protocol buffer code.

      meshtastic.ble
      @@ -882,15 +882,19 @@ class TCPInterface(StreamInterface):
      meshtastic.deviceonly_pb2
      -
      +

      Generated protocol buffer code.

      +
      +
      meshtastic.environmental_measurement_pb2
      +
      +

      Generated protocol buffer code.

      meshtastic.mesh_pb2
      -
      +

      Generated protocol buffer code.

      meshtastic.portnums_pb2
      -
      +

      Generated protocol buffer code.

      meshtastic.remote_hardware
      @@ -898,7 +902,7 @@ class TCPInterface(StreamInterface):
      meshtastic.remote_hardware_pb2
      -
      +

      Generated protocol buffer code.

      meshtastic.test
      @@ -2222,6 +2226,7 @@ hostname {string} – Hostname/IP address of the device to connect to

      meshtastic.apponly_pb2
    • meshtastic.ble
    • meshtastic.deviceonly_pb2
    • +
    • meshtastic.environmental_measurement_pb2
    • meshtastic.mesh_pb2
    • meshtastic.portnums_pb2
    • meshtastic.remote_hardware
    • diff --git a/docs/meshtastic/mesh_pb2.html b/docs/meshtastic/mesh_pb2.html index 9795504..667721c 100644 --- a/docs/meshtastic/mesh_pb2.html +++ b/docs/meshtastic/mesh_pb2.html @@ -5,7 +5,7 @@ meshtastic.mesh_pb2 API documentation - + @@ -22,6 +22,7 @@

      Module meshtastic.mesh_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: mesh.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf.internal import enum_type_wrapper
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
      @@ -48,7 +49,8 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003',
      -  serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18  \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xdd\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3'
      +  create_key=_descriptor._internal_create_key,
      +  serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\xb9\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18  \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xe1\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3'
         ,
         dependencies=[portnums__pb2.DESCRIPTOR,])
       
      @@ -57,36 +59,43 @@ _ERRORREASON = _descriptor.EnumDescriptor(
         full_name='ErrorReason',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='NONE', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NO_ROUTE', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GOT_NAK', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TIMEOUT', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NO_INTERFACE', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MAX_RETRANSMIT', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=3913,
      -  serialized_end=4014,
      +  serialized_start=4228,
      +  serialized_end=4329,
       )
       _sym_db.RegisterEnumDescriptor(_ERRORREASON)
       
      @@ -96,20 +105,23 @@ _CONSTANTS = _descriptor.EnumDescriptor(
         full_name='Constants',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='Unused', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='DATA_PAYLOAD_LEN', index=1, number=240,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4016,
      -  serialized_end=4062,
      +  serialized_start=4331,
      +  serialized_end=4377,
       )
       _sym_db.RegisterEnumDescriptor(_CONSTANTS)
       
      @@ -119,48 +131,58 @@ _REGIONCODE = _descriptor.EnumDescriptor(
         full_name='RegionCode',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='Unset', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='US', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='EU433', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='EU865', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='CN', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='JP', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='ANZ', index=6, number=6,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='KR', index=7, number=7,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TW', index=8, number=8,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4064,
      -  serialized_end=4158,
      +  serialized_start=4379,
      +  serialized_end=4473,
       )
       _sym_db.RegisterEnumDescriptor(_REGIONCODE)
       
      @@ -170,80 +192,98 @@ _CHARGECURRENT = _descriptor.EnumDescriptor(
         full_name='ChargeCurrent',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='MAUnset', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA100', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA190', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA280', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA360', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA450', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA550', index=6, number=6,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA630', index=7, number=7,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA700', index=8, number=8,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA780', index=9, number=9,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA880', index=10, number=10,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA960', index=11, number=11,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1000', index=12, number=12,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1080', index=13, number=13,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1160', index=14, number=14,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1240', index=15, number=15,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1320', index=16, number=16,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4161,
      -  serialized_end=4370,
      +  serialized_start=4476,
      +  serialized_end=4685,
       )
       _sym_db.RegisterEnumDescriptor(_CHARGECURRENT)
       
      @@ -253,32 +293,38 @@ _GPSOPERATION = _descriptor.EnumDescriptor(
         full_name='GpsOperation',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='GpsOpUnset', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GpsOpStationary', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GpsOpMobile', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GpsOpTimeOnly', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GpsOpDisabled', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4372,
      -  serialized_end=4478,
      +  serialized_start=4687,
      +  serialized_end=4793,
       )
       _sym_db.RegisterEnumDescriptor(_GPSOPERATION)
       
      @@ -288,24 +334,28 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor(
         full_name='LocationSharing',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='LocUnset', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='LocEnabled', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='LocDisabled', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4480,
      -  serialized_end=4544,
      +  serialized_start=4795,
      +  serialized_end=4859,
       )
       _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING)
       
      @@ -315,48 +365,58 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor(
         full_name='CriticalErrorCode',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='None', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TxWatchdog', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='SleepEnterWait', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NoRadio', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='Unspecified', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='UBloxInitFailed', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NoAXP192', index=6, number=6,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='InvalidRadioSetting', index=7, number=7,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TransmitFailed', index=8, number=8,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4547,
      -  serialized_end=4722,
      +  serialized_start=4862,
      +  serialized_end=5037,
       )
       _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE)
       
      @@ -419,35 +479,43 @@ _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor(
         full_name='MeshPacket.Priority',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='UNSET', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MIN', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='BACKGROUND', index=2, number=10,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='DEFAULT', index=3, number=64,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='RELIABLE', index=4, number=70,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='ACK', index=5, number=120,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MAX', index=6, number=127,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      @@ -461,23 +529,28 @@ _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor(
         full_name='ChannelSettings.ModemConfig',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='Bw125Cr45Sf128', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='Bw500Cr45Sf128', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='Bw31_25Cr48Sf512', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='Bw125Cr48Sf4096', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      @@ -491,40 +564,48 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor(
         full_name='LogRecord.Level',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='UNSET', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='CRITICAL', index=1, number=50,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='ERROR', index=2, number=40,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='WARNING', index=3, number=30,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='INFO', index=4, number=20,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='DEBUG', index=5, number=10,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TRACE', index=6, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=3340,
      -  serialized_end=3428,
      +  serialized_start=3655,
      +  serialized_end=3743,
       )
       _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL)
       
      @@ -535,6 +616,7 @@ _POSITION = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='latitude_i', full_name='Position.latitude_i', index=0,
      @@ -542,35 +624,35 @@ _POSITION = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='longitude_i', full_name='Position.longitude_i', index=1,
             number=8, type=17, cpp_type=1, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='altitude', full_name='Position.altitude', index=2,
             number=3, type=5, cpp_type=1, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='battery_level', full_name='Position.battery_level', index=3,
             number=4, type=5, cpp_type=1, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='time', full_name='Position.time', index=4,
             number=9, type=7, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -594,6 +676,7 @@ _DATA = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='portnum', full_name='Data.portnum', index=0,
      @@ -601,14 +684,14 @@ _DATA = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='payload', full_name='Data.payload', index=1,
             number=2, type=12, cpp_type=9, label=1,
             has_default_value=False, default_value=b"",
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -632,6 +715,7 @@ _USER = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='id', full_name='User.id', index=0,
      @@ -639,28 +723,28 @@ _USER = _descriptor.Descriptor(
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='long_name', full_name='User.long_name', index=1,
             number=2, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='short_name', full_name='User.short_name', index=2,
             number=3, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='macaddr', full_name='User.macaddr', index=3,
             number=4, type=12, cpp_type=9, label=1,
             has_default_value=False, default_value=b"",
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -684,6 +768,7 @@ _ROUTEDISCOVERY = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='route', full_name='RouteDiscovery.route', index=0,
      @@ -691,7 +776,7 @@ _ROUTEDISCOVERY = _descriptor.Descriptor(
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -715,6 +800,7 @@ _SUBPACKET = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='data', full_name='SubPacket.data', index=0,
      @@ -722,84 +808,84 @@ _SUBPACKET = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='route_request', full_name='SubPacket.route_request', index=1,
             number=6, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='route_reply', full_name='SubPacket.route_reply', index=2,
             number=7, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='error_reason', full_name='SubPacket.error_reason', index=3,
             number=13, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='position', full_name='SubPacket.position', index=4,
             number=1, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=b'\030\001', file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='user', full_name='SubPacket.user', index=5,
             number=4, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=b'\030\001', file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='want_response', full_name='SubPacket.want_response', index=6,
             number=5, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='success_id', full_name='SubPacket.success_id', index=7,
             number=10, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='fail_id', full_name='SubPacket.fail_id', index=8,
             number=11, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='dest', full_name='SubPacket.dest', index=9,
             number=9, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='source', full_name='SubPacket.source', index=10,
             number=12, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='original_id', full_name='SubPacket.original_id', index=11,
             number=2, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -813,10 +899,14 @@ _SUBPACKET = _descriptor.Descriptor(
         oneofs=[
           _descriptor.OneofDescriptor(
             name='payloadVariant', full_name='SubPacket.payloadVariant',
      -      index=0, containing_type=None, fields=[]),
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
           _descriptor.OneofDescriptor(
             name='ackVariant', full_name='SubPacket.ackVariant',
      -      index=1, containing_type=None, fields=[]),
      +      index=1, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
         ],
         serialized_start=300,
         serialized_end=663,
      @@ -829,6 +919,7 @@ _MESHPACKET = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='from', full_name='MeshPacket.from', index=0,
      @@ -836,77 +927,77 @@ _MESHPACKET = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='to', full_name='MeshPacket.to', index=1,
             number=2, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel_index', full_name='MeshPacket.channel_index', index=2,
             number=4, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='decoded', full_name='MeshPacket.decoded', index=3,
             number=3, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='encrypted', full_name='MeshPacket.encrypted', index=4,
             number=8, type=12, cpp_type=9, label=1,
             has_default_value=False, default_value=b"",
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='id', full_name='MeshPacket.id', index=5,
             number=6, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='rx_time', full_name='MeshPacket.rx_time', index=6,
             number=9, type=7, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='rx_snr', full_name='MeshPacket.rx_snr', index=7,
             number=7, type=2, cpp_type=6, label=1,
             has_default_value=False, default_value=float(0),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='hop_limit', full_name='MeshPacket.hop_limit', index=8,
             number=10, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='want_ack', full_name='MeshPacket.want_ack', index=9,
             number=11, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='priority', full_name='MeshPacket.priority', index=10,
             number=12, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -921,7 +1012,9 @@ _MESHPACKET = _descriptor.Descriptor(
         oneofs=[
           _descriptor.OneofDescriptor(
             name='payloadVariant', full_name='MeshPacket.payloadVariant',
      -      index=0, containing_type=None, fields=[]),
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
         ],
         serialized_start=666,
         serialized_end=1012,
      @@ -934,6 +1027,7 @@ _CHANNELSETTINGS = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='tx_power', full_name='ChannelSettings.tx_power', index=0,
      @@ -941,77 +1035,77 @@ _CHANNELSETTINGS = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='modem_config', full_name='ChannelSettings.modem_config', index=1,
             number=3, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='bandwidth', full_name='ChannelSettings.bandwidth', index=2,
             number=6, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='spread_factor', full_name='ChannelSettings.spread_factor', index=3,
             number=7, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='coding_rate', full_name='ChannelSettings.coding_rate', index=4,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel_num', full_name='ChannelSettings.channel_num', index=5,
             number=9, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='psk', full_name='ChannelSettings.psk', index=6,
             number=4, type=12, cpp_type=9, label=1,
             has_default_value=False, default_value=b"",
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='name', full_name='ChannelSettings.name', index=7,
             number=5, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='id', full_name='ChannelSettings.id', index=8,
             number=10, type=7, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='uplink_enabled', full_name='ChannelSettings.uplink_enabled', index=9,
             number=16, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='downlink_enabled', full_name='ChannelSettings.downlink_enabled', index=10,
             number=17, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1036,6 +1130,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='position_broadcast_secs', full_name='RadioConfig.UserPreferences.position_broadcast_secs', index=0,
      @@ -1043,294 +1138,329 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='send_owner_interval', full_name='RadioConfig.UserPreferences.send_owner_interval', index=1,
             number=2, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='wait_bluetooth_secs', full_name='RadioConfig.UserPreferences.wait_bluetooth_secs', index=2,
             number=4, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='screen_on_secs', full_name='RadioConfig.UserPreferences.screen_on_secs', index=3,
             number=5, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='phone_timeout_secs', full_name='RadioConfig.UserPreferences.phone_timeout_secs', index=4,
             number=6, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='phone_sds_timeout_sec', full_name='RadioConfig.UserPreferences.phone_sds_timeout_sec', index=5,
             number=7, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='mesh_sds_timeout_secs', full_name='RadioConfig.UserPreferences.mesh_sds_timeout_secs', index=6,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='sds_secs', full_name='RadioConfig.UserPreferences.sds_secs', index=7,
             number=9, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ls_secs', full_name='RadioConfig.UserPreferences.ls_secs', index=8,
             number=10, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='min_wake_secs', full_name='RadioConfig.UserPreferences.min_wake_secs', index=9,
             number=11, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='wifi_ssid', full_name='RadioConfig.UserPreferences.wifi_ssid', index=10,
             number=12, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='wifi_password', full_name='RadioConfig.UserPreferences.wifi_password', index=11,
             number=13, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='wifi_ap_mode', full_name='RadioConfig.UserPreferences.wifi_ap_mode', index=12,
             number=14, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='region', full_name='RadioConfig.UserPreferences.region', index=13,
             number=15, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='charge_current', full_name='RadioConfig.UserPreferences.charge_current', index=14,
             number=16, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='is_router', full_name='RadioConfig.UserPreferences.is_router', index=15,
             number=37, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='is_low_power', full_name='RadioConfig.UserPreferences.is_low_power', index=16,
             number=38, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='fixed_position', full_name='RadioConfig.UserPreferences.fixed_position', index=17,
             number=39, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='factory_reset', full_name='RadioConfig.UserPreferences.factory_reset', index=18,
             number=100, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='debug_log_enabled', full_name='RadioConfig.UserPreferences.debug_log_enabled', index=19,
             number=101, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='location_share', full_name='RadioConfig.UserPreferences.location_share', index=20,
             number=32, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gps_operation', full_name='RadioConfig.UserPreferences.gps_operation', index=21,
             number=33, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gps_update_interval', full_name='RadioConfig.UserPreferences.gps_update_interval', index=22,
             number=34, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gps_attempt_time', full_name='RadioConfig.UserPreferences.gps_attempt_time', index=23,
             number=36, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ignore_incoming', full_name='RadioConfig.UserPreferences.ignore_incoming', index=24,
             number=103, type=13, cpp_type=3, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_enabled', full_name='RadioConfig.UserPreferences.serialplugin_enabled', index=25,
             number=120, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_echo', full_name='RadioConfig.UserPreferences.serialplugin_echo', index=26,
             number=121, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_rxd', full_name='RadioConfig.UserPreferences.serialplugin_rxd', index=27,
             number=122, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_txd', full_name='RadioConfig.UserPreferences.serialplugin_txd', index=28,
             number=123, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_timeout', full_name='RadioConfig.UserPreferences.serialplugin_timeout', index=29,
             number=124, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_mode', full_name='RadioConfig.UserPreferences.serialplugin_mode', index=30,
             number=125, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_enabled', full_name='RadioConfig.UserPreferences.ext_notification_plugin_enabled', index=31,
             number=126, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_output_ms', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output_ms', index=32,
             number=127, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_output', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output', index=33,
             number=128, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_active', full_name='RadioConfig.UserPreferences.ext_notification_plugin_active', index=34,
             number=129, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_alert_message', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_message', index=35,
             number=130, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_alert_bell', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_bell', index=36,
             number=131, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='range_test_plugin_enabled', full_name='RadioConfig.UserPreferences.range_test_plugin_enabled', index=37,
             number=132, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='range_test_plugin_sender', full_name='RadioConfig.UserPreferences.range_test_plugin_sender', index=38,
             number=133, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='range_test_plugin_save', full_name='RadioConfig.UserPreferences.range_test_plugin_save', index=39,
             number=134, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='store_forward_plugin_enabled', full_name='RadioConfig.UserPreferences.store_forward_plugin_enabled', index=40,
             number=136, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='store_forward_plugin_records', full_name='RadioConfig.UserPreferences.store_forward_plugin_records', index=41,
             number=137, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_measurement_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_measurement_enabled', index=42,
      +      number=140, type=8, cpp_type=7, label=1,
      +      has_default_value=False, default_value=False,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_screen_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_screen_enabled', index=43,
      +      number=141, type=8, cpp_type=7, label=1,
      +      has_default_value=False, default_value=False,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_read_error_count_threshold', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_read_error_count_threshold', index=44,
      +      number=142, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_update_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_update_interval', index=45,
      +      number=143, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_recovery_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_recovery_interval', index=46,
      +      number=144, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1344,7 +1474,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
         oneofs=[
         ],
         serialized_start=1491,
      -  serialized_end=2786,
      +  serialized_end=3097,
       )
       
       _RADIOCONFIG = _descriptor.Descriptor(
      @@ -1353,6 +1483,7 @@ _RADIOCONFIG = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='preferences', full_name='RadioConfig.preferences', index=0,
      @@ -1360,14 +1491,14 @@ _RADIOCONFIG = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel_settings', full_name='RadioConfig.channel_settings', index=1,
             number=2, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=b'\030\001', file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1381,7 +1512,7 @@ _RADIOCONFIG = _descriptor.Descriptor(
         oneofs=[
         ],
         serialized_start=1376,
      -  serialized_end=2786,
      +  serialized_end=3097,
       )
       
       
      @@ -1391,6 +1522,7 @@ _NODEINFO = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='num', full_name='NodeInfo.num', index=0,
      @@ -1398,35 +1530,35 @@ _NODEINFO = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='user', full_name='NodeInfo.user', index=1,
             number=2, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='position', full_name='NodeInfo.position', index=2,
             number=3, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='snr', full_name='NodeInfo.snr', index=3,
             number=7, type=2, cpp_type=6, label=1,
             has_default_value=False, default_value=float(0),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='next_hop', full_name='NodeInfo.next_hop', index=4,
             number=5, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1439,8 +1571,8 @@ _NODEINFO = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=2788,
      -  serialized_end=2892,
      +  serialized_start=3099,
      +  serialized_end=3203,
       )
       
       
      @@ -1450,6 +1582,7 @@ _MYNODEINFO = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='my_node_num', full_name='MyNodeInfo.my_node_num', index=0,
      @@ -1457,98 +1590,98 @@ _MYNODEINFO = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='has_gps', full_name='MyNodeInfo.has_gps', index=1,
             number=2, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='num_channels', full_name='MyNodeInfo.num_channels', index=2,
             number=3, type=5, cpp_type=1, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='region', full_name='MyNodeInfo.region', index=3,
             number=4, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='hw_model', full_name='MyNodeInfo.hw_model', index=4,
             number=5, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='firmware_version', full_name='MyNodeInfo.firmware_version', index=5,
             number=6, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='error_code', full_name='MyNodeInfo.error_code', index=6,
             number=7, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='error_address', full_name='MyNodeInfo.error_address', index=7,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='error_count', full_name='MyNodeInfo.error_count', index=8,
             number=9, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='packet_id_bits', full_name='MyNodeInfo.packet_id_bits', index=9,
             number=10, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='current_packet_id', full_name='MyNodeInfo.current_packet_id', index=10,
             number=11, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=b'\030\001', file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='node_num_bits', full_name='MyNodeInfo.node_num_bits', index=11,
             number=12, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='message_timeout_msec', full_name='MyNodeInfo.message_timeout_msec', index=12,
             number=13, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='min_app_version', full_name='MyNodeInfo.min_app_version', index=13,
             number=14, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1561,8 +1694,8 @@ _MYNODEINFO = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=2895,
      -  serialized_end=3244,
      +  serialized_start=3206,
      +  serialized_end=3559,
       )
       
       
      @@ -1572,6 +1705,7 @@ _LOGRECORD = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='message', full_name='LogRecord.message', index=0,
      @@ -1579,28 +1713,28 @@ _LOGRECORD = _descriptor.Descriptor(
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='time', full_name='LogRecord.time', index=1,
             number=2, type=7, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='source', full_name='LogRecord.source', index=2,
             number=3, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='level', full_name='LogRecord.level', index=3,
             number=4, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1614,8 +1748,8 @@ _LOGRECORD = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=3247,
      -  serialized_end=3428,
      +  serialized_start=3562,
      +  serialized_end=3743,
       )
       
       
      @@ -1625,6 +1759,7 @@ _FROMRADIO = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='num', full_name='FromRadio.num', index=0,
      @@ -1632,63 +1767,63 @@ _FROMRADIO = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='packet', full_name='FromRadio.packet', index=1,
             number=2, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='my_info', full_name='FromRadio.my_info', index=2,
             number=3, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='node_info', full_name='FromRadio.node_info', index=3,
             number=4, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='radio', full_name='FromRadio.radio', index=4,
             number=6, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='log_record', full_name='FromRadio.log_record', index=5,
             number=7, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='config_complete_id', full_name='FromRadio.config_complete_id', index=6,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='rebooted', full_name='FromRadio.rebooted', index=7,
             number=9, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel', full_name='FromRadio.channel', index=8,
             number=10, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1702,10 +1837,12 @@ _FROMRADIO = _descriptor.Descriptor(
         oneofs=[
           _descriptor.OneofDescriptor(
             name='payloadVariant', full_name='FromRadio.payloadVariant',
      -      index=0, containing_type=None, fields=[]),
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
         ],
      -  serialized_start=3431,
      -  serialized_end=3720,
      +  serialized_start=3746,
      +  serialized_end=4035,
       )
       
       
      @@ -1715,6 +1852,7 @@ _TORADIO = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='packet', full_name='ToRadio.packet', index=0,
      @@ -1722,35 +1860,35 @@ _TORADIO = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='want_config_id', full_name='ToRadio.want_config_id', index=1,
             number=100, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='set_radio', full_name='ToRadio.set_radio', index=2,
             number=101, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='set_owner', full_name='ToRadio.set_owner', index=3,
             number=102, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='set_channel', full_name='ToRadio.set_channel', index=4,
             number=103, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1764,10 +1902,12 @@ _TORADIO = _descriptor.Descriptor(
         oneofs=[
           _descriptor.OneofDescriptor(
             name='payloadVariant', full_name='ToRadio.payloadVariant',
      -      index=0, containing_type=None, fields=[]),
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
         ],
      -  serialized_start=3723,
      -  serialized_end=3911,
      +  serialized_start=4038,
      +  serialized_end=4226,
       )
       
       _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM
      @@ -1999,6 +2139,7 @@ DESCRIPTOR._options = None
       _SUBPACKET.fields_by_name['position']._options = None
       _SUBPACKET.fields_by_name['user']._options = None
       _RADIOCONFIG.fields_by_name['channel_settings']._options = None
      +_MYNODEINFO.fields_by_name['region']._options = None
       _MYNODEINFO.fields_by_name['current_packet_id']._options = None
       # @@protoc_insertion_point(module_scope)
      diff --git a/docs/meshtastic/portnums_pb2.html b/docs/meshtastic/portnums_pb2.html index 62a1449..baaee4d 100644 --- a/docs/meshtastic/portnums_pb2.html +++ b/docs/meshtastic/portnums_pb2.html @@ -5,7 +5,7 @@ meshtastic.portnums_pb2 API documentation - + @@ -22,6 +22,7 @@

      Module meshtastic.portnums_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: portnums.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf.internal import enum_type_wrapper
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
      @@ -47,7 +48,8 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003',
      -  serialized_pb=b'\n\x0eportnums.proto*\xf1\x01\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3'
      +  create_key=_descriptor._internal_create_key,
      +  serialized_pb=b'\n\x0eportnums.proto*\x94\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3'
       )
       
       _PORTNUM = _descriptor.EnumDescriptor(
      @@ -55,60 +57,78 @@ _PORTNUM = _descriptor.EnumDescriptor(
         full_name='PortNum',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='UNKNOWN_APP', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TEXT_MESSAGE_APP', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='REMOTE_HARDWARE_APP', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='POSITION_APP', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NODEINFO_APP', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='REPLY_APP', index=5, number=32,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='IP_TUNNEL_APP', index=6, number=33,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='SERIAL_APP', index=7, number=64,
      +      name='ENVIRONMENTAL_MEASUREMENT_APP', index=7, number=34,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='STORE_FORWARD_APP', index=8, number=65,
      +      name='SERIAL_APP', index=8, number=64,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='RANGE_TEST_APP', index=9, number=66,
      +      name='STORE_FORWARD_APP', index=9, number=65,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='PRIVATE_APP', index=10, number=256,
      +      name='RANGE_TEST_APP', index=10, number=66,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='ATAK_FORWARDER', index=11, number=257,
      +      name='PRIVATE_APP', index=11, number=256,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
      +    _descriptor.EnumValueDescriptor(
      +      name='ATAK_FORWARDER', index=12, number=257,
      +      serialized_options=None,
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
         serialized_start=19,
      -  serialized_end=260,
      +  serialized_end=295,
       )
       _sym_db.RegisterEnumDescriptor(_PORTNUM)
       
      @@ -120,6 +140,7 @@ POSITION_APP = 3
       NODEINFO_APP = 4
       REPLY_APP = 32
       IP_TUNNEL_APP = 33
      +ENVIRONMENTAL_MEASUREMENT_APP = 34
       SERIAL_APP = 64
       STORE_FORWARD_APP = 65
       RANGE_TEST_APP = 66
      diff --git a/docs/meshtastic/remote_hardware_pb2.html b/docs/meshtastic/remote_hardware_pb2.html
      index ccf79da..c591381 100644
      --- a/docs/meshtastic/remote_hardware_pb2.html
      +++ b/docs/meshtastic/remote_hardware_pb2.html
      @@ -5,7 +5,7 @@
       
       
       meshtastic.remote_hardware_pb2 API documentation
      -
      +
       
       
       
      @@ -22,6 +22,7 @@
       

      Module meshtastic.remote_hardware_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: remote_hardware.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
       from google.protobuf import reflection as _reflection
      @@ -46,6 +47,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\016RemoteHardwareH\003',
      +  create_key=_descriptor._internal_create_key,
         serialized_pb=b'\n\x15remote_hardware.proto\"\xca\x01\n\x0fHardwareMessage\x12\"\n\x03typ\x18\x01 \x01(\x0e\x32\x15.HardwareMessage.Type\x12\x11\n\tgpio_mask\x18\x02 \x01(\x04\x12\x12\n\ngpio_value\x18\x03 \x01(\x04\"l\n\x04Type\x12\t\n\x05UNSET\x10\x00\x12\x0f\n\x0bWRITE_GPIOS\x10\x01\x12\x0f\n\x0bWATCH_GPIOS\x10\x02\x12\x11\n\rGPIOS_CHANGED\x10\x03\x12\x0e\n\nREAD_GPIOS\x10\x04\x12\x14\n\x10READ_GPIOS_REPLY\x10\x05\x42\'\n\x13\x63om.geeksville.meshB\x0eRemoteHardwareH\x03\x62\x06proto3'
       )
       
      @@ -56,31 +58,38 @@ _HARDWAREMESSAGE_TYPE = _descriptor.EnumDescriptor(
         full_name='HardwareMessage.Type',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='UNSET', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='WRITE_GPIOS', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='WATCH_GPIOS', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GPIOS_CHANGED', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='READ_GPIOS', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='READ_GPIOS_REPLY', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      @@ -96,6 +105,7 @@ _HARDWAREMESSAGE = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='typ', full_name='HardwareMessage.typ', index=0,
      @@ -103,21 +113,21 @@ _HARDWAREMESSAGE = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gpio_mask', full_name='HardwareMessage.gpio_mask', index=1,
             number=2, type=4, cpp_type=4, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gpio_value', full_name='HardwareMessage.gpio_value', index=2,
             number=3, type=4, cpp_type=4, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py
      index 34c279e..50e51cc 100644
      --- a/meshtastic/mesh_pb2.py
      +++ b/meshtastic/mesh_pb2.py
      @@ -21,7 +21,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003',
         create_key=_descriptor._internal_create_key,
      -  serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18  \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xe1\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3'
      +  serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\xb9\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18  \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xe1\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3'
         ,
         dependencies=[portnums__pb2.DESCRIPTOR,])
       
      @@ -65,8 +65,8 @@ _ERRORREASON = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=3917,
      -  serialized_end=4018,
      +  serialized_start=4228,
      +  serialized_end=4329,
       )
       _sym_db.RegisterEnumDescriptor(_ERRORREASON)
       
      @@ -91,8 +91,8 @@ _CONSTANTS = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4020,
      -  serialized_end=4066,
      +  serialized_start=4331,
      +  serialized_end=4377,
       )
       _sym_db.RegisterEnumDescriptor(_CONSTANTS)
       
      @@ -152,8 +152,8 @@ _REGIONCODE = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4068,
      -  serialized_end=4162,
      +  serialized_start=4379,
      +  serialized_end=4473,
       )
       _sym_db.RegisterEnumDescriptor(_REGIONCODE)
       
      @@ -253,8 +253,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4165,
      -  serialized_end=4374,
      +  serialized_start=4476,
      +  serialized_end=4685,
       )
       _sym_db.RegisterEnumDescriptor(_CHARGECURRENT)
       
      @@ -294,8 +294,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4376,
      -  serialized_end=4482,
      +  serialized_start=4687,
      +  serialized_end=4793,
       )
       _sym_db.RegisterEnumDescriptor(_GPSOPERATION)
       
      @@ -325,8 +325,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4484,
      -  serialized_end=4548,
      +  serialized_start=4795,
      +  serialized_end=4859,
       )
       _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING)
       
      @@ -386,8 +386,8 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4551,
      -  serialized_end=4726,
      +  serialized_start=4862,
      +  serialized_end=5037,
       )
       _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE)
       
      @@ -575,8 +575,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=3344,
      -  serialized_end=3432,
      +  serialized_start=3655,
      +  serialized_end=3743,
       )
       _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL)
       
      @@ -1397,6 +1397,41 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
             serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_measurement_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_measurement_enabled', index=42,
      +      number=140, type=8, cpp_type=7, label=1,
      +      has_default_value=False, default_value=False,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_screen_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_screen_enabled', index=43,
      +      number=141, type=8, cpp_type=7, label=1,
      +      has_default_value=False, default_value=False,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_read_error_count_threshold', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_read_error_count_threshold', index=44,
      +      number=142, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_update_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_update_interval', index=45,
      +      number=143, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_recovery_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_recovery_interval', index=46,
      +      number=144, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1410,7 +1445,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
         oneofs=[
         ],
         serialized_start=1491,
      -  serialized_end=2786,
      +  serialized_end=3097,
       )
       
       _RADIOCONFIG = _descriptor.Descriptor(
      @@ -1448,7 +1483,7 @@ _RADIOCONFIG = _descriptor.Descriptor(
         oneofs=[
         ],
         serialized_start=1376,
      -  serialized_end=2786,
      +  serialized_end=3097,
       )
       
       
      @@ -1507,8 +1542,8 @@ _NODEINFO = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=2788,
      -  serialized_end=2892,
      +  serialized_start=3099,
      +  serialized_end=3203,
       )
       
       
      @@ -1630,8 +1665,8 @@ _MYNODEINFO = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=2895,
      -  serialized_end=3248,
      +  serialized_start=3206,
      +  serialized_end=3559,
       )
       
       
      @@ -1684,8 +1719,8 @@ _LOGRECORD = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=3251,
      -  serialized_end=3432,
      +  serialized_start=3562,
      +  serialized_end=3743,
       )
       
       
      @@ -1777,8 +1812,8 @@ _FROMRADIO = _descriptor.Descriptor(
             create_key=_descriptor._internal_create_key,
           fields=[]),
         ],
      -  serialized_start=3435,
      -  serialized_end=3724,
      +  serialized_start=3746,
      +  serialized_end=4035,
       )
       
       
      @@ -1842,8 +1877,8 @@ _TORADIO = _descriptor.Descriptor(
             create_key=_descriptor._internal_create_key,
           fields=[]),
         ],
      -  serialized_start=3727,
      -  serialized_end=3915,
      +  serialized_start=4038,
      +  serialized_end=4226,
       )
       
       _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM
      diff --git a/meshtastic/portnums_pb2.py b/meshtastic/portnums_pb2.py
      index eee63a2..b593498 100644
      --- a/meshtastic/portnums_pb2.py
      +++ b/meshtastic/portnums_pb2.py
      @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003',
         create_key=_descriptor._internal_create_key,
      -  serialized_pb=b'\n\x0eportnums.proto*\x94\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3'
      +  serialized_pb=b'\n\x0eportnums.proto*\x94\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3'
       )
       
       _PORTNUM = _descriptor.EnumDescriptor(
      @@ -66,22 +66,22 @@ _PORTNUM = _descriptor.EnumDescriptor(
             type=None,
             create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='SERIAL_APP', index=7, number=64,
      +      name='ENVIRONMENTAL_MEASUREMENT_APP', index=7, number=34,
             serialized_options=None,
             type=None,
             create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='STORE_FORWARD_APP', index=8, number=65,
      +      name='SERIAL_APP', index=8, number=64,
             serialized_options=None,
             type=None,
             create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='RANGE_TEST_APP', index=9, number=66,
      +      name='STORE_FORWARD_APP', index=9, number=65,
             serialized_options=None,
             type=None,
             create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='ENVIRONMENTAL_MEASUREMENT_APP', index=10, number=67,
      +      name='RANGE_TEST_APP', index=10, number=66,
             serialized_options=None,
             type=None,
             create_key=_descriptor._internal_create_key),
      @@ -111,10 +111,10 @@ POSITION_APP = 3
       NODEINFO_APP = 4
       REPLY_APP = 32
       IP_TUNNEL_APP = 33
      +ENVIRONMENTAL_MEASUREMENT_APP = 34
       SERIAL_APP = 64
       STORE_FORWARD_APP = 65
       RANGE_TEST_APP = 66
      -ENVIRONMENTAL_MEASUREMENT_APP = 67
       PRIVATE_APP = 256
       ATAK_FORWARDER = 257
       
      diff --git a/proto b/proto
      index 96257b7..512d1ac 160000
      --- a/proto
      +++ b/proto
      @@ -1 +1 @@
      -Subproject commit 96257b7b94b3cb837df2a94899d7503e88ca5fde
      +Subproject commit 512d1aca0a066107de749c0c47397c7f9bf9cb99
      diff --git a/setup.py b/setup.py
      index 1290742..69b370b 100644
      --- a/setup.py
      +++ b/setup.py
      @@ -12,7 +12,7 @@ with open("README.md", "r") as fh:
       # This call to setup() does all the work
       setup(
           name="meshtastic",
      -    version="1.1.49",
      +    version="1.1.50",
           description="Python API & client shell for talking to Meshtastic devices",
           long_description=long_description,
           long_description_content_type="text/markdown",
      
      From 257620e992f1e34da9b2784d49bb7c4f25bded13 Mon Sep 17 00:00:00 2001
      From: Kevin Hester 
      Date: Tue, 2 Mar 2021 15:25:29 +0800
      Subject: [PATCH 27/48] update from master
      
      ---
       docs/meshtastic/apponly_pb2.html              |  13 +-
       docs/meshtastic/deviceonly_pb2.html           |  27 +-
       .../environmental_measurement_pb2.html        | 193 ++++++
       docs/meshtastic/index.html                    |  15 +-
       docs/meshtastic/mesh_pb2.html                 | 605 +++++++++++-------
       docs/meshtastic/portnums_pb2.html             |  63 +-
       docs/meshtastic/remote_hardware_pb2.html      |  32 +-
       meshtastic/mesh_pb2.py                        |  64 +-
       proto                                         |   2 +-
       setup.py                                      |   4 +
       10 files changed, 699 insertions(+), 319 deletions(-)
       create mode 100644 docs/meshtastic/environmental_measurement_pb2.html
      
      diff --git a/docs/meshtastic/apponly_pb2.html b/docs/meshtastic/apponly_pb2.html
      index 5fd09c6..879f970 100644
      --- a/docs/meshtastic/apponly_pb2.html
      +++ b/docs/meshtastic/apponly_pb2.html
      @@ -5,7 +5,7 @@
       
       
       meshtastic.apponly_pb2 API documentation
      -
      +
       
       
       
      @@ -22,6 +22,7 @@
       

      Module meshtastic.apponly_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: apponly.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
       from google.protobuf import reflection as _reflection
      @@ -47,6 +48,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\007AppOnlyH\003',
      +  create_key=_descriptor._internal_create_key,
         serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\tB \n\x13\x63om.geeksville.meshB\x07\x41ppOnlyH\x03\x62\x06proto3'
         ,
         dependencies=[mesh__pb2.DESCRIPTOR,])
      @@ -60,6 +62,7 @@ _SERVICEENVELOPE = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='packet', full_name='ServiceEnvelope.packet', index=0,
      @@ -67,21 +70,21 @@ _SERVICEENVELOPE = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel_id', full_name='ServiceEnvelope.channel_id', index=1,
             number=2, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gateway_id', full_name='ServiceEnvelope.gateway_id', index=2,
             number=3, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      diff --git a/docs/meshtastic/deviceonly_pb2.html b/docs/meshtastic/deviceonly_pb2.html
      index c2118be..40933a4 100644
      --- a/docs/meshtastic/deviceonly_pb2.html
      +++ b/docs/meshtastic/deviceonly_pb2.html
      @@ -5,7 +5,7 @@
       
       
       meshtastic.deviceonly_pb2 API documentation
      -
      +
       
       
       
      @@ -22,6 +22,7 @@
       

      Module meshtastic.deviceonly_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: deviceonly.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
       from google.protobuf import reflection as _reflection
      @@ -47,6 +48,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\nDeviceOnlyH\003',
      +  create_key=_descriptor._internal_create_key,
         serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\"\xab\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12,\n\x12secondary_channels\x18\x0c \x03(\x0b\x32\x10.ChannelSettingsB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3'
         ,
         dependencies=[mesh__pb2.DESCRIPTOR,])
      @@ -60,6 +62,7 @@ _DEVICESTATE = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='radio', full_name='DeviceState.radio', index=0,
      @@ -67,70 +70,70 @@ _DEVICESTATE = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='my_node', full_name='DeviceState.my_node', index=1,
             number=2, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='owner', full_name='DeviceState.owner', index=2,
             number=3, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='node_db', full_name='DeviceState.node_db', index=3,
             number=4, type=11, cpp_type=10, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='receive_queue', full_name='DeviceState.receive_queue', index=4,
             number=5, type=11, cpp_type=10, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='version', full_name='DeviceState.version', index=5,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='rx_text_message', full_name='DeviceState.rx_text_message', index=6,
             number=7, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='no_save', full_name='DeviceState.no_save', index=7,
             number=9, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='did_gps_reset', full_name='DeviceState.did_gps_reset', index=8,
             number=11, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='secondary_channels', full_name='DeviceState.secondary_channels', index=9,
             number=12, type=11, cpp_type=10, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      diff --git a/docs/meshtastic/environmental_measurement_pb2.html b/docs/meshtastic/environmental_measurement_pb2.html
      new file mode 100644
      index 0000000..919316f
      --- /dev/null
      +++ b/docs/meshtastic/environmental_measurement_pb2.html
      @@ -0,0 +1,193 @@
      +
      +
      +
      +
      +
      +
      +meshtastic.environmental_measurement_pb2 API documentation
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Module meshtastic.environmental_measurement_pb2

      +
      +
      +

      Generated protocol buffer code.

      +
      + +Expand source code + +
      # -*- coding: utf-8 -*-
      +# Generated by the protocol buffer compiler.  DO NOT EDIT!
      +# source: environmental_measurement.proto
      +"""Generated protocol buffer code."""
      +from google.protobuf import descriptor as _descriptor
      +from google.protobuf import message as _message
      +from google.protobuf import reflection as _reflection
      +from google.protobuf import symbol_database as _symbol_database
      +# @@protoc_insertion_point(imports)
      +
      +_sym_db = _symbol_database.Default()
      +
      +
      +
      +
      +DESCRIPTOR = _descriptor.FileDescriptor(
      +  name='environmental_measurement.proto',
      +  package='',
      +  syntax='proto3',
      +  serialized_options=None,
      +  create_key=_descriptor._internal_create_key,
      +  serialized_pb=b'\n\x1f\x65nvironmental_measurement.proto\"g\n\x18\x45nvironmentalMeasurement\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x62\x06proto3'
      +)
      +
      +
      +
      +
      +_ENVIRONMENTALMEASUREMENT = _descriptor.Descriptor(
      +  name='EnvironmentalMeasurement',
      +  full_name='EnvironmentalMeasurement',
      +  filename=None,
      +  file=DESCRIPTOR,
      +  containing_type=None,
      +  create_key=_descriptor._internal_create_key,
      +  fields=[
      +    _descriptor.FieldDescriptor(
      +      name='temperature', full_name='EnvironmentalMeasurement.temperature', index=0,
      +      number=1, type=2, cpp_type=6, label=1,
      +      has_default_value=False, default_value=float(0),
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='relative_humidity', full_name='EnvironmentalMeasurement.relative_humidity', index=1,
      +      number=2, type=2, cpp_type=6, label=1,
      +      has_default_value=False, default_value=float(0),
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='barometric_pressure', full_name='EnvironmentalMeasurement.barometric_pressure', index=2,
      +      number=3, type=2, cpp_type=6, label=1,
      +      has_default_value=False, default_value=float(0),
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +  ],
      +  extensions=[
      +  ],
      +  nested_types=[],
      +  enum_types=[
      +  ],
      +  serialized_options=None,
      +  is_extendable=False,
      +  syntax='proto3',
      +  extension_ranges=[],
      +  oneofs=[
      +  ],
      +  serialized_start=35,
      +  serialized_end=138,
      +)
      +
      +DESCRIPTOR.message_types_by_name['EnvironmentalMeasurement'] = _ENVIRONMENTALMEASUREMENT
      +_sym_db.RegisterFileDescriptor(DESCRIPTOR)
      +
      +EnvironmentalMeasurement = _reflection.GeneratedProtocolMessageType('EnvironmentalMeasurement', (_message.Message,), {
      +  'DESCRIPTOR' : _ENVIRONMENTALMEASUREMENT,
      +  '__module__' : 'environmental_measurement_pb2'
      +  # @@protoc_insertion_point(class_scope:EnvironmentalMeasurement)
      +  })
      +_sym_db.RegisterMessage(EnvironmentalMeasurement)
      +
      +
      +# @@protoc_insertion_point(module_scope)
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Classes

      +
      +
      +class EnvironmentalMeasurement +(*args, **kwargs) +
      +
      +

      A ProtocolMessage

      +

      Ancestors

      +
        +
      • google.protobuf.pyext._message.CMessage
      • +
      • google.protobuf.message.Message
      • +
      +

      Class variables

      +
      +
      var DESCRIPTOR
      +
      +
      +
      +
      +

      Instance variables

      +
      +
      var barometric_pressure
      +
      +

      Field EnvironmentalMeasurement.barometric_pressure

      +
      +
      var relative_humidity
      +
      +

      Field EnvironmentalMeasurement.relative_humidity

      +
      +
      var temperature
      +
      +

      Field EnvironmentalMeasurement.temperature

      +
      +
      +
      +
      +
      +
      + +
      + + + \ No newline at end of file diff --git a/docs/meshtastic/index.html b/docs/meshtastic/index.html index 8a8e58d..55c5cdd 100644 --- a/docs/meshtastic/index.html +++ b/docs/meshtastic/index.html @@ -874,7 +874,7 @@ class TCPInterface(StreamInterface):
      meshtastic.apponly_pb2
      -
      +

      Generated protocol buffer code.

      meshtastic.ble
      @@ -882,15 +882,19 @@ class TCPInterface(StreamInterface):
      meshtastic.deviceonly_pb2
      -
      +

      Generated protocol buffer code.

      +
      +
      meshtastic.environmental_measurement_pb2
      +
      +

      Generated protocol buffer code.

      meshtastic.mesh_pb2
      -
      +

      Generated protocol buffer code.

      meshtastic.portnums_pb2
      -
      +

      Generated protocol buffer code.

      meshtastic.remote_hardware
      @@ -898,7 +902,7 @@ class TCPInterface(StreamInterface):
      meshtastic.remote_hardware_pb2
      -
      +

      Generated protocol buffer code.

      meshtastic.test
      @@ -2222,6 +2226,7 @@ hostname {string} – Hostname/IP address of the device to connect to

      meshtastic.apponly_pb2
    • meshtastic.ble
    • meshtastic.deviceonly_pb2
    • +
    • meshtastic.environmental_measurement_pb2
    • meshtastic.mesh_pb2
    • meshtastic.portnums_pb2
    • meshtastic.remote_hardware
    • diff --git a/docs/meshtastic/mesh_pb2.html b/docs/meshtastic/mesh_pb2.html index 9795504..667721c 100644 --- a/docs/meshtastic/mesh_pb2.html +++ b/docs/meshtastic/mesh_pb2.html @@ -5,7 +5,7 @@ meshtastic.mesh_pb2 API documentation - + @@ -22,6 +22,7 @@

      Module meshtastic.mesh_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: mesh.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf.internal import enum_type_wrapper
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
      @@ -48,7 +49,8 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003',
      -  serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x82\x0b\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\x8f\n\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18  \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xdd\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3'
      +  create_key=_descriptor._internal_create_key,
      +  serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\xb9\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18  \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xe1\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3'
         ,
         dependencies=[portnums__pb2.DESCRIPTOR,])
       
      @@ -57,36 +59,43 @@ _ERRORREASON = _descriptor.EnumDescriptor(
         full_name='ErrorReason',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='NONE', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NO_ROUTE', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GOT_NAK', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TIMEOUT', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NO_INTERFACE', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MAX_RETRANSMIT', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=3913,
      -  serialized_end=4014,
      +  serialized_start=4228,
      +  serialized_end=4329,
       )
       _sym_db.RegisterEnumDescriptor(_ERRORREASON)
       
      @@ -96,20 +105,23 @@ _CONSTANTS = _descriptor.EnumDescriptor(
         full_name='Constants',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='Unused', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='DATA_PAYLOAD_LEN', index=1, number=240,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4016,
      -  serialized_end=4062,
      +  serialized_start=4331,
      +  serialized_end=4377,
       )
       _sym_db.RegisterEnumDescriptor(_CONSTANTS)
       
      @@ -119,48 +131,58 @@ _REGIONCODE = _descriptor.EnumDescriptor(
         full_name='RegionCode',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='Unset', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='US', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='EU433', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='EU865', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='CN', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='JP', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='ANZ', index=6, number=6,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='KR', index=7, number=7,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TW', index=8, number=8,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4064,
      -  serialized_end=4158,
      +  serialized_start=4379,
      +  serialized_end=4473,
       )
       _sym_db.RegisterEnumDescriptor(_REGIONCODE)
       
      @@ -170,80 +192,98 @@ _CHARGECURRENT = _descriptor.EnumDescriptor(
         full_name='ChargeCurrent',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='MAUnset', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA100', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA190', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA280', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA360', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA450', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA550', index=6, number=6,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA630', index=7, number=7,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA700', index=8, number=8,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA780', index=9, number=9,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA880', index=10, number=10,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA960', index=11, number=11,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1000', index=12, number=12,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1080', index=13, number=13,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1160', index=14, number=14,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1240', index=15, number=15,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MA1320', index=16, number=16,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4161,
      -  serialized_end=4370,
      +  serialized_start=4476,
      +  serialized_end=4685,
       )
       _sym_db.RegisterEnumDescriptor(_CHARGECURRENT)
       
      @@ -253,32 +293,38 @@ _GPSOPERATION = _descriptor.EnumDescriptor(
         full_name='GpsOperation',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='GpsOpUnset', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GpsOpStationary', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GpsOpMobile', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GpsOpTimeOnly', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GpsOpDisabled', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4372,
      -  serialized_end=4478,
      +  serialized_start=4687,
      +  serialized_end=4793,
       )
       _sym_db.RegisterEnumDescriptor(_GPSOPERATION)
       
      @@ -288,24 +334,28 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor(
         full_name='LocationSharing',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='LocUnset', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='LocEnabled', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='LocDisabled', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4480,
      -  serialized_end=4544,
      +  serialized_start=4795,
      +  serialized_end=4859,
       )
       _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING)
       
      @@ -315,48 +365,58 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor(
         full_name='CriticalErrorCode',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='None', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TxWatchdog', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='SleepEnterWait', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NoRadio', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='Unspecified', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='UBloxInitFailed', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NoAXP192', index=6, number=6,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='InvalidRadioSetting', index=7, number=7,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TransmitFailed', index=8, number=8,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=4547,
      -  serialized_end=4722,
      +  serialized_start=4862,
      +  serialized_end=5037,
       )
       _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE)
       
      @@ -419,35 +479,43 @@ _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor(
         full_name='MeshPacket.Priority',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='UNSET', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MIN', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='BACKGROUND', index=2, number=10,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='DEFAULT', index=3, number=64,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='RELIABLE', index=4, number=70,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='ACK', index=5, number=120,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='MAX', index=6, number=127,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      @@ -461,23 +529,28 @@ _CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor(
         full_name='ChannelSettings.ModemConfig',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='Bw125Cr45Sf128', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='Bw500Cr45Sf128', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='Bw31_25Cr48Sf512', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='Bw125Cr48Sf4096', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      @@ -491,40 +564,48 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor(
         full_name='LogRecord.Level',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='UNSET', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='CRITICAL', index=1, number=50,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='ERROR', index=2, number=40,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='WARNING', index=3, number=30,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='INFO', index=4, number=20,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='DEBUG', index=5, number=10,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TRACE', index=6, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=3340,
      -  serialized_end=3428,
      +  serialized_start=3655,
      +  serialized_end=3743,
       )
       _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL)
       
      @@ -535,6 +616,7 @@ _POSITION = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='latitude_i', full_name='Position.latitude_i', index=0,
      @@ -542,35 +624,35 @@ _POSITION = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='longitude_i', full_name='Position.longitude_i', index=1,
             number=8, type=17, cpp_type=1, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='altitude', full_name='Position.altitude', index=2,
             number=3, type=5, cpp_type=1, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='battery_level', full_name='Position.battery_level', index=3,
             number=4, type=5, cpp_type=1, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='time', full_name='Position.time', index=4,
             number=9, type=7, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -594,6 +676,7 @@ _DATA = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='portnum', full_name='Data.portnum', index=0,
      @@ -601,14 +684,14 @@ _DATA = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='payload', full_name='Data.payload', index=1,
             number=2, type=12, cpp_type=9, label=1,
             has_default_value=False, default_value=b"",
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -632,6 +715,7 @@ _USER = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='id', full_name='User.id', index=0,
      @@ -639,28 +723,28 @@ _USER = _descriptor.Descriptor(
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='long_name', full_name='User.long_name', index=1,
             number=2, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='short_name', full_name='User.short_name', index=2,
             number=3, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='macaddr', full_name='User.macaddr', index=3,
             number=4, type=12, cpp_type=9, label=1,
             has_default_value=False, default_value=b"",
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -684,6 +768,7 @@ _ROUTEDISCOVERY = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='route', full_name='RouteDiscovery.route', index=0,
      @@ -691,7 +776,7 @@ _ROUTEDISCOVERY = _descriptor.Descriptor(
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -715,6 +800,7 @@ _SUBPACKET = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='data', full_name='SubPacket.data', index=0,
      @@ -722,84 +808,84 @@ _SUBPACKET = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='route_request', full_name='SubPacket.route_request', index=1,
             number=6, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='route_reply', full_name='SubPacket.route_reply', index=2,
             number=7, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='error_reason', full_name='SubPacket.error_reason', index=3,
             number=13, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='position', full_name='SubPacket.position', index=4,
             number=1, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=b'\030\001', file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='user', full_name='SubPacket.user', index=5,
             number=4, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=b'\030\001', file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='want_response', full_name='SubPacket.want_response', index=6,
             number=5, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='success_id', full_name='SubPacket.success_id', index=7,
             number=10, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='fail_id', full_name='SubPacket.fail_id', index=8,
             number=11, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='dest', full_name='SubPacket.dest', index=9,
             number=9, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='source', full_name='SubPacket.source', index=10,
             number=12, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='original_id', full_name='SubPacket.original_id', index=11,
             number=2, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -813,10 +899,14 @@ _SUBPACKET = _descriptor.Descriptor(
         oneofs=[
           _descriptor.OneofDescriptor(
             name='payloadVariant', full_name='SubPacket.payloadVariant',
      -      index=0, containing_type=None, fields=[]),
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
           _descriptor.OneofDescriptor(
             name='ackVariant', full_name='SubPacket.ackVariant',
      -      index=1, containing_type=None, fields=[]),
      +      index=1, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
         ],
         serialized_start=300,
         serialized_end=663,
      @@ -829,6 +919,7 @@ _MESHPACKET = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='from', full_name='MeshPacket.from', index=0,
      @@ -836,77 +927,77 @@ _MESHPACKET = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='to', full_name='MeshPacket.to', index=1,
             number=2, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel_index', full_name='MeshPacket.channel_index', index=2,
             number=4, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='decoded', full_name='MeshPacket.decoded', index=3,
             number=3, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='encrypted', full_name='MeshPacket.encrypted', index=4,
             number=8, type=12, cpp_type=9, label=1,
             has_default_value=False, default_value=b"",
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='id', full_name='MeshPacket.id', index=5,
             number=6, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='rx_time', full_name='MeshPacket.rx_time', index=6,
             number=9, type=7, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='rx_snr', full_name='MeshPacket.rx_snr', index=7,
             number=7, type=2, cpp_type=6, label=1,
             has_default_value=False, default_value=float(0),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='hop_limit', full_name='MeshPacket.hop_limit', index=8,
             number=10, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='want_ack', full_name='MeshPacket.want_ack', index=9,
             number=11, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='priority', full_name='MeshPacket.priority', index=10,
             number=12, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -921,7 +1012,9 @@ _MESHPACKET = _descriptor.Descriptor(
         oneofs=[
           _descriptor.OneofDescriptor(
             name='payloadVariant', full_name='MeshPacket.payloadVariant',
      -      index=0, containing_type=None, fields=[]),
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
         ],
         serialized_start=666,
         serialized_end=1012,
      @@ -934,6 +1027,7 @@ _CHANNELSETTINGS = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='tx_power', full_name='ChannelSettings.tx_power', index=0,
      @@ -941,77 +1035,77 @@ _CHANNELSETTINGS = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='modem_config', full_name='ChannelSettings.modem_config', index=1,
             number=3, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='bandwidth', full_name='ChannelSettings.bandwidth', index=2,
             number=6, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='spread_factor', full_name='ChannelSettings.spread_factor', index=3,
             number=7, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='coding_rate', full_name='ChannelSettings.coding_rate', index=4,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel_num', full_name='ChannelSettings.channel_num', index=5,
             number=9, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='psk', full_name='ChannelSettings.psk', index=6,
             number=4, type=12, cpp_type=9, label=1,
             has_default_value=False, default_value=b"",
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='name', full_name='ChannelSettings.name', index=7,
             number=5, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='id', full_name='ChannelSettings.id', index=8,
             number=10, type=7, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='uplink_enabled', full_name='ChannelSettings.uplink_enabled', index=9,
             number=16, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='downlink_enabled', full_name='ChannelSettings.downlink_enabled', index=10,
             number=17, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1036,6 +1130,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='position_broadcast_secs', full_name='RadioConfig.UserPreferences.position_broadcast_secs', index=0,
      @@ -1043,294 +1138,329 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='send_owner_interval', full_name='RadioConfig.UserPreferences.send_owner_interval', index=1,
             number=2, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='wait_bluetooth_secs', full_name='RadioConfig.UserPreferences.wait_bluetooth_secs', index=2,
             number=4, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='screen_on_secs', full_name='RadioConfig.UserPreferences.screen_on_secs', index=3,
             number=5, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='phone_timeout_secs', full_name='RadioConfig.UserPreferences.phone_timeout_secs', index=4,
             number=6, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='phone_sds_timeout_sec', full_name='RadioConfig.UserPreferences.phone_sds_timeout_sec', index=5,
             number=7, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='mesh_sds_timeout_secs', full_name='RadioConfig.UserPreferences.mesh_sds_timeout_secs', index=6,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='sds_secs', full_name='RadioConfig.UserPreferences.sds_secs', index=7,
             number=9, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ls_secs', full_name='RadioConfig.UserPreferences.ls_secs', index=8,
             number=10, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='min_wake_secs', full_name='RadioConfig.UserPreferences.min_wake_secs', index=9,
             number=11, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='wifi_ssid', full_name='RadioConfig.UserPreferences.wifi_ssid', index=10,
             number=12, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='wifi_password', full_name='RadioConfig.UserPreferences.wifi_password', index=11,
             number=13, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='wifi_ap_mode', full_name='RadioConfig.UserPreferences.wifi_ap_mode', index=12,
             number=14, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='region', full_name='RadioConfig.UserPreferences.region', index=13,
             number=15, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='charge_current', full_name='RadioConfig.UserPreferences.charge_current', index=14,
             number=16, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='is_router', full_name='RadioConfig.UserPreferences.is_router', index=15,
             number=37, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='is_low_power', full_name='RadioConfig.UserPreferences.is_low_power', index=16,
             number=38, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='fixed_position', full_name='RadioConfig.UserPreferences.fixed_position', index=17,
             number=39, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='factory_reset', full_name='RadioConfig.UserPreferences.factory_reset', index=18,
             number=100, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='debug_log_enabled', full_name='RadioConfig.UserPreferences.debug_log_enabled', index=19,
             number=101, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='location_share', full_name='RadioConfig.UserPreferences.location_share', index=20,
             number=32, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gps_operation', full_name='RadioConfig.UserPreferences.gps_operation', index=21,
             number=33, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gps_update_interval', full_name='RadioConfig.UserPreferences.gps_update_interval', index=22,
             number=34, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gps_attempt_time', full_name='RadioConfig.UserPreferences.gps_attempt_time', index=23,
             number=36, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ignore_incoming', full_name='RadioConfig.UserPreferences.ignore_incoming', index=24,
             number=103, type=13, cpp_type=3, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_enabled', full_name='RadioConfig.UserPreferences.serialplugin_enabled', index=25,
             number=120, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_echo', full_name='RadioConfig.UserPreferences.serialplugin_echo', index=26,
             number=121, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_rxd', full_name='RadioConfig.UserPreferences.serialplugin_rxd', index=27,
             number=122, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_txd', full_name='RadioConfig.UserPreferences.serialplugin_txd', index=28,
             number=123, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_timeout', full_name='RadioConfig.UserPreferences.serialplugin_timeout', index=29,
             number=124, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='serialplugin_mode', full_name='RadioConfig.UserPreferences.serialplugin_mode', index=30,
             number=125, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_enabled', full_name='RadioConfig.UserPreferences.ext_notification_plugin_enabled', index=31,
             number=126, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_output_ms', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output_ms', index=32,
             number=127, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_output', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output', index=33,
             number=128, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_active', full_name='RadioConfig.UserPreferences.ext_notification_plugin_active', index=34,
             number=129, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_alert_message', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_message', index=35,
             number=130, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='ext_notification_plugin_alert_bell', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_bell', index=36,
             number=131, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='range_test_plugin_enabled', full_name='RadioConfig.UserPreferences.range_test_plugin_enabled', index=37,
             number=132, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='range_test_plugin_sender', full_name='RadioConfig.UserPreferences.range_test_plugin_sender', index=38,
             number=133, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='range_test_plugin_save', full_name='RadioConfig.UserPreferences.range_test_plugin_save', index=39,
             number=134, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='store_forward_plugin_enabled', full_name='RadioConfig.UserPreferences.store_forward_plugin_enabled', index=40,
             number=136, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='store_forward_plugin_records', full_name='RadioConfig.UserPreferences.store_forward_plugin_records', index=41,
             number=137, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_measurement_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_measurement_enabled', index=42,
      +      number=140, type=8, cpp_type=7, label=1,
      +      has_default_value=False, default_value=False,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_screen_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_screen_enabled', index=43,
      +      number=141, type=8, cpp_type=7, label=1,
      +      has_default_value=False, default_value=False,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_read_error_count_threshold', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_read_error_count_threshold', index=44,
      +      number=142, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_update_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_update_interval', index=45,
      +      number=143, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='environmental_measurement_plugin_recovery_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_recovery_interval', index=46,
      +      number=144, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1344,7 +1474,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
         oneofs=[
         ],
         serialized_start=1491,
      -  serialized_end=2786,
      +  serialized_end=3097,
       )
       
       _RADIOCONFIG = _descriptor.Descriptor(
      @@ -1353,6 +1483,7 @@ _RADIOCONFIG = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='preferences', full_name='RadioConfig.preferences', index=0,
      @@ -1360,14 +1491,14 @@ _RADIOCONFIG = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel_settings', full_name='RadioConfig.channel_settings', index=1,
             number=2, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=b'\030\001', file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1381,7 +1512,7 @@ _RADIOCONFIG = _descriptor.Descriptor(
         oneofs=[
         ],
         serialized_start=1376,
      -  serialized_end=2786,
      +  serialized_end=3097,
       )
       
       
      @@ -1391,6 +1522,7 @@ _NODEINFO = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='num', full_name='NodeInfo.num', index=0,
      @@ -1398,35 +1530,35 @@ _NODEINFO = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='user', full_name='NodeInfo.user', index=1,
             number=2, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='position', full_name='NodeInfo.position', index=2,
             number=3, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='snr', full_name='NodeInfo.snr', index=3,
             number=7, type=2, cpp_type=6, label=1,
             has_default_value=False, default_value=float(0),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='next_hop', full_name='NodeInfo.next_hop', index=4,
             number=5, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1439,8 +1571,8 @@ _NODEINFO = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=2788,
      -  serialized_end=2892,
      +  serialized_start=3099,
      +  serialized_end=3203,
       )
       
       
      @@ -1450,6 +1582,7 @@ _MYNODEINFO = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='my_node_num', full_name='MyNodeInfo.my_node_num', index=0,
      @@ -1457,98 +1590,98 @@ _MYNODEINFO = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='has_gps', full_name='MyNodeInfo.has_gps', index=1,
             number=2, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='num_channels', full_name='MyNodeInfo.num_channels', index=2,
             number=3, type=5, cpp_type=1, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='region', full_name='MyNodeInfo.region', index=3,
             number=4, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='hw_model', full_name='MyNodeInfo.hw_model', index=4,
             number=5, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='firmware_version', full_name='MyNodeInfo.firmware_version', index=5,
             number=6, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='error_code', full_name='MyNodeInfo.error_code', index=6,
             number=7, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='error_address', full_name='MyNodeInfo.error_address', index=7,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='error_count', full_name='MyNodeInfo.error_count', index=8,
             number=9, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='packet_id_bits', full_name='MyNodeInfo.packet_id_bits', index=9,
             number=10, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='current_packet_id', full_name='MyNodeInfo.current_packet_id', index=10,
             number=11, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=b'\030\001', file=DESCRIPTOR),
      +      serialized_options=b'\030\001', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='node_num_bits', full_name='MyNodeInfo.node_num_bits', index=11,
             number=12, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='message_timeout_msec', full_name='MyNodeInfo.message_timeout_msec', index=12,
             number=13, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='min_app_version', full_name='MyNodeInfo.min_app_version', index=13,
             number=14, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1561,8 +1694,8 @@ _MYNODEINFO = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=2895,
      -  serialized_end=3244,
      +  serialized_start=3206,
      +  serialized_end=3559,
       )
       
       
      @@ -1572,6 +1705,7 @@ _LOGRECORD = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='message', full_name='LogRecord.message', index=0,
      @@ -1579,28 +1713,28 @@ _LOGRECORD = _descriptor.Descriptor(
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='time', full_name='LogRecord.time', index=1,
             number=2, type=7, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='source', full_name='LogRecord.source', index=2,
             number=3, type=9, cpp_type=9, label=1,
             has_default_value=False, default_value=b"".decode('utf-8'),
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='level', full_name='LogRecord.level', index=3,
             number=4, type=14, cpp_type=8, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1614,8 +1748,8 @@ _LOGRECORD = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=3247,
      -  serialized_end=3428,
      +  serialized_start=3562,
      +  serialized_end=3743,
       )
       
       
      @@ -1625,6 +1759,7 @@ _FROMRADIO = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='num', full_name='FromRadio.num', index=0,
      @@ -1632,63 +1767,63 @@ _FROMRADIO = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='packet', full_name='FromRadio.packet', index=1,
             number=2, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='my_info', full_name='FromRadio.my_info', index=2,
             number=3, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='node_info', full_name='FromRadio.node_info', index=3,
             number=4, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='radio', full_name='FromRadio.radio', index=4,
             number=6, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='log_record', full_name='FromRadio.log_record', index=5,
             number=7, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='config_complete_id', full_name='FromRadio.config_complete_id', index=6,
             number=8, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='rebooted', full_name='FromRadio.rebooted', index=7,
             number=9, type=8, cpp_type=7, label=1,
             has_default_value=False, default_value=False,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channel', full_name='FromRadio.channel', index=8,
             number=10, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1702,10 +1837,12 @@ _FROMRADIO = _descriptor.Descriptor(
         oneofs=[
           _descriptor.OneofDescriptor(
             name='payloadVariant', full_name='FromRadio.payloadVariant',
      -      index=0, containing_type=None, fields=[]),
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
         ],
      -  serialized_start=3431,
      -  serialized_end=3720,
      +  serialized_start=3746,
      +  serialized_end=4035,
       )
       
       
      @@ -1715,6 +1852,7 @@ _TORADIO = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='packet', full_name='ToRadio.packet', index=0,
      @@ -1722,35 +1860,35 @@ _TORADIO = _descriptor.Descriptor(
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='want_config_id', full_name='ToRadio.want_config_id', index=1,
             number=100, type=13, cpp_type=3, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='set_radio', full_name='ToRadio.set_radio', index=2,
             number=101, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='set_owner', full_name='ToRadio.set_owner', index=3,
             number=102, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='set_channel', full_name='ToRadio.set_channel', index=4,
             number=103, type=11, cpp_type=10, label=1,
             has_default_value=False, default_value=None,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      @@ -1764,10 +1902,12 @@ _TORADIO = _descriptor.Descriptor(
         oneofs=[
           _descriptor.OneofDescriptor(
             name='payloadVariant', full_name='ToRadio.payloadVariant',
      -      index=0, containing_type=None, fields=[]),
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
         ],
      -  serialized_start=3723,
      -  serialized_end=3911,
      +  serialized_start=4038,
      +  serialized_end=4226,
       )
       
       _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM
      @@ -1999,6 +2139,7 @@ DESCRIPTOR._options = None
       _SUBPACKET.fields_by_name['position']._options = None
       _SUBPACKET.fields_by_name['user']._options = None
       _RADIOCONFIG.fields_by_name['channel_settings']._options = None
      +_MYNODEINFO.fields_by_name['region']._options = None
       _MYNODEINFO.fields_by_name['current_packet_id']._options = None
       # @@protoc_insertion_point(module_scope)
      diff --git a/docs/meshtastic/portnums_pb2.html b/docs/meshtastic/portnums_pb2.html index 62a1449..baaee4d 100644 --- a/docs/meshtastic/portnums_pb2.html +++ b/docs/meshtastic/portnums_pb2.html @@ -5,7 +5,7 @@ meshtastic.portnums_pb2 API documentation - + @@ -22,6 +22,7 @@

      Module meshtastic.portnums_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: portnums.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf.internal import enum_type_wrapper
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
      @@ -47,7 +48,8 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003',
      -  serialized_pb=b'\n\x0eportnums.proto*\xf1\x01\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3'
      +  create_key=_descriptor._internal_create_key,
      +  serialized_pb=b'\n\x0eportnums.proto*\x94\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3'
       )
       
       _PORTNUM = _descriptor.EnumDescriptor(
      @@ -55,60 +57,78 @@ _PORTNUM = _descriptor.EnumDescriptor(
         full_name='PortNum',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='UNKNOWN_APP', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='TEXT_MESSAGE_APP', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='REMOTE_HARDWARE_APP', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='POSITION_APP', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='NODEINFO_APP', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='REPLY_APP', index=5, number=32,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='IP_TUNNEL_APP', index=6, number=33,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='SERIAL_APP', index=7, number=64,
      +      name='ENVIRONMENTAL_MEASUREMENT_APP', index=7, number=34,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='STORE_FORWARD_APP', index=8, number=65,
      +      name='SERIAL_APP', index=8, number=64,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='RANGE_TEST_APP', index=9, number=66,
      +      name='STORE_FORWARD_APP', index=9, number=65,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='PRIVATE_APP', index=10, number=256,
      +      name='RANGE_TEST_APP', index=10, number=66,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
      -      name='ATAK_FORWARDER', index=11, number=257,
      +      name='PRIVATE_APP', index=11, number=256,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
      +    _descriptor.EnumValueDescriptor(
      +      name='ATAK_FORWARDER', index=12, number=257,
      +      serialized_options=None,
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
         serialized_start=19,
      -  serialized_end=260,
      +  serialized_end=295,
       )
       _sym_db.RegisterEnumDescriptor(_PORTNUM)
       
      @@ -120,6 +140,7 @@ POSITION_APP = 3
       NODEINFO_APP = 4
       REPLY_APP = 32
       IP_TUNNEL_APP = 33
      +ENVIRONMENTAL_MEASUREMENT_APP = 34
       SERIAL_APP = 64
       STORE_FORWARD_APP = 65
       RANGE_TEST_APP = 66
      diff --git a/docs/meshtastic/remote_hardware_pb2.html b/docs/meshtastic/remote_hardware_pb2.html
      index ccf79da..c591381 100644
      --- a/docs/meshtastic/remote_hardware_pb2.html
      +++ b/docs/meshtastic/remote_hardware_pb2.html
      @@ -5,7 +5,7 @@
       
       
       meshtastic.remote_hardware_pb2 API documentation
      -
      +
       
       
       
      @@ -22,6 +22,7 @@
       

      Module meshtastic.remote_hardware_pb2

      +

      Generated protocol buffer code.

      Expand source code @@ -29,7 +30,7 @@
      # -*- coding: utf-8 -*-
       # Generated by the protocol buffer compiler.  DO NOT EDIT!
       # source: remote_hardware.proto
      -
      +"""Generated protocol buffer code."""
       from google.protobuf import descriptor as _descriptor
       from google.protobuf import message as _message
       from google.protobuf import reflection as _reflection
      @@ -46,6 +47,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         package='',
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\016RemoteHardwareH\003',
      +  create_key=_descriptor._internal_create_key,
         serialized_pb=b'\n\x15remote_hardware.proto\"\xca\x01\n\x0fHardwareMessage\x12\"\n\x03typ\x18\x01 \x01(\x0e\x32\x15.HardwareMessage.Type\x12\x11\n\tgpio_mask\x18\x02 \x01(\x04\x12\x12\n\ngpio_value\x18\x03 \x01(\x04\"l\n\x04Type\x12\t\n\x05UNSET\x10\x00\x12\x0f\n\x0bWRITE_GPIOS\x10\x01\x12\x0f\n\x0bWATCH_GPIOS\x10\x02\x12\x11\n\rGPIOS_CHANGED\x10\x03\x12\x0e\n\nREAD_GPIOS\x10\x04\x12\x14\n\x10READ_GPIOS_REPLY\x10\x05\x42\'\n\x13\x63om.geeksville.meshB\x0eRemoteHardwareH\x03\x62\x06proto3'
       )
       
      @@ -56,31 +58,38 @@ _HARDWAREMESSAGE_TYPE = _descriptor.EnumDescriptor(
         full_name='HardwareMessage.Type',
         filename=None,
         file=DESCRIPTOR,
      +  create_key=_descriptor._internal_create_key,
         values=[
           _descriptor.EnumValueDescriptor(
             name='UNSET', index=0, number=0,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='WRITE_GPIOS', index=1, number=1,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='WATCH_GPIOS', index=2, number=2,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='GPIOS_CHANGED', index=3, number=3,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='READ_GPIOS', index=4, number=4,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
           _descriptor.EnumValueDescriptor(
             name='READ_GPIOS_REPLY', index=5, number=5,
             serialized_options=None,
      -      type=None),
      +      type=None,
      +      create_key=_descriptor._internal_create_key),
         ],
         containing_type=None,
         serialized_options=None,
      @@ -96,6 +105,7 @@ _HARDWAREMESSAGE = _descriptor.Descriptor(
         filename=None,
         file=DESCRIPTOR,
         containing_type=None,
      +  create_key=_descriptor._internal_create_key,
         fields=[
           _descriptor.FieldDescriptor(
             name='typ', full_name='HardwareMessage.typ', index=0,
      @@ -103,21 +113,21 @@ _HARDWAREMESSAGE = _descriptor.Descriptor(
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gpio_mask', full_name='HardwareMessage.gpio_mask', index=1,
             number=2, type=4, cpp_type=4, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='gpio_value', full_name='HardwareMessage.gpio_value', index=2,
             number=3, type=4, cpp_type=4, label=1,
             has_default_value=False, default_value=0,
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      -      serialized_options=None, file=DESCRIPTOR),
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
         ],
         extensions=[
         ],
      diff --git a/meshtastic/mesh_pb2.py b/meshtastic/mesh_pb2.py
      index 41c23d5..488f536 100644
      --- a/meshtastic/mesh_pb2.py
      +++ b/meshtastic/mesh_pb2.py
      @@ -21,7 +21,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003',
         create_key=_descriptor._internal_create_key,
      -  serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\x8e\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"{\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\x12\x12\n\nrequest_id\x18\x06 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xe3\x01\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03\"Z\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3'
      +  serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"v\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\t\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\x8e\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"{\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\x12\x12\n\nrequest_id\x18\x06 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xe9\x01\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03J\x04\x08\x06\x10\x07\"l\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02J\x04\x08\x65\x10\x66J\x04\x08\x66\x10gJ\x04\x08g\x10h*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3'
         ,
         dependencies=[portnums__pb2.DESCRIPTOR,])
       
      @@ -45,8 +45,8 @@ _CONSTANTS = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=1892,
      -  serialized_end=1938,
      +  serialized_start=1928,
      +  serialized_end=1974,
       )
       _sym_db.RegisterEnumDescriptor(_CONSTANTS)
       
      @@ -106,8 +106,8 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=1941,
      -  serialized_end=2116,
      +  serialized_start=1977,
      +  serialized_end=2152,
       )
       _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE)
       
      @@ -175,8 +175,8 @@ _ROUTING_ERROR = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=381,
      -  serialized_end=507,
      +  serialized_start=393,
      +  serialized_end=519,
       )
       _sym_db.RegisterEnumDescriptor(_ROUTING_ERROR)
       
      @@ -225,8 +225,8 @@ _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=872,
      -  serialized_end=963,
      +  serialized_start=884,
      +  serialized_end=975,
       )
       _sym_db.RegisterEnumDescriptor(_MESHPACKET_PRIORITY)
       
      @@ -275,8 +275,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor(
         ],
         containing_type=None,
         serialized_options=None,
      -  serialized_start=1480,
      -  serialized_end=1568,
      +  serialized_start=1492,
      +  serialized_end=1580,
       )
       _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL)
       
      @@ -337,7 +337,7 @@ _POSITION = _descriptor.Descriptor(
         oneofs=[
         ],
         serialized_start=30,
      -  serialized_end=136,
      +  serialized_end=148,
       )
       
       
      @@ -389,8 +389,8 @@ _USER = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=138,
      -  serialized_end=212,
      +  serialized_start=150,
      +  serialized_end=224,
       )
       
       
      @@ -421,8 +421,8 @@ _ROUTEDISCOVERY = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=214,
      -  serialized_end=245,
      +  serialized_start=226,
      +  serialized_end=257,
       )
       
       
      @@ -473,8 +473,8 @@ _ROUTING = _descriptor.Descriptor(
             create_key=_descriptor._internal_create_key,
           fields=[]),
         ],
      -  serialized_start=248,
      -  serialized_end=518,
      +  serialized_start=260,
      +  serialized_end=530,
       )
       
       
      @@ -540,8 +540,8 @@ _DATA = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=520,
      -  serialized_end=643,
      +  serialized_start=532,
      +  serialized_end=655,
       )
       
       
      @@ -648,8 +648,8 @@ _MESHPACKET = _descriptor.Descriptor(
             create_key=_descriptor._internal_create_key,
           fields=[]),
         ],
      -  serialized_start=646,
      -  serialized_end=981,
      +  serialized_start=658,
      +  serialized_end=993,
       )
       
       
      @@ -708,8 +708,8 @@ _NODEINFO = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=983,
      -  serialized_end=1087,
      +  serialized_start=995,
      +  serialized_end=1099,
       )
       
       
      @@ -817,8 +817,8 @@ _MYNODEINFO = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=1090,
      -  serialized_end=1384,
      +  serialized_start=1102,
      +  serialized_end=1396,
       )
       
       
      @@ -871,8 +871,8 @@ _LOGRECORD = _descriptor.Descriptor(
         extension_ranges=[],
         oneofs=[
         ],
      -  serialized_start=1387,
      -  serialized_end=1568,
      +  serialized_start=1399,
      +  serialized_end=1580,
       )
       
       
      @@ -950,8 +950,8 @@ _FROMRADIO = _descriptor.Descriptor(
             create_key=_descriptor._internal_create_key,
           fields=[]),
         ],
      -  serialized_start=1571,
      -  serialized_end=1798,
      +  serialized_start=1583,
      +  serialized_end=1816,
       )
       
       
      @@ -994,8 +994,8 @@ _TORADIO = _descriptor.Descriptor(
             create_key=_descriptor._internal_create_key,
           fields=[]),
         ],
      -  serialized_start=1800,
      -  serialized_end=1890,
      +  serialized_start=1818,
      +  serialized_end=1926,
       )
       
       _ROUTING.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY
      diff --git a/proto b/proto
      index 3edb02d..7de496f 160000
      --- a/proto
      +++ b/proto
      @@ -1 +1 @@
      -Subproject commit 3edb02dabb9b8b72d90bbbb7233b557c09391b87
      +Subproject commit 7de496ffe941f88e9d99c2ef2c7bc01f79efe11e
      diff --git a/setup.py b/setup.py
      index 0307dd5..1f9c74d 100644
      --- a/setup.py
      +++ b/setup.py
      @@ -12,7 +12,11 @@ with open("README.md", "r") as fh:
       # This call to setup() does all the work
       setup(
           name="meshtastic",
      +<<<<<<< HEAD
           version="1.2.00",
      +=======
      +    version="1.1.50",
      +>>>>>>> dev
           description="Python API & client shell for talking to Meshtastic devices",
           long_description=long_description,
           long_description_content_type="text/markdown",
      
      From cc2c9af221d7825e1c59d1c41e55cac95e2d0167 Mon Sep 17 00:00:00 2001
      From: Kevin Hester 
      Date: Wed, 3 Mar 2021 09:14:48 +0800
      Subject: [PATCH 28/48] stop fetching channels once we reach disabled
      
      ---
       meshtastic/__init__.py | 8 ++++++--
       setup.py               | 4 ----
       2 files changed, 6 insertions(+), 6 deletions(-)
      
      diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py
      index 62073aa..c48c56f 100644
      --- a/meshtastic/__init__.py
      +++ b/meshtastic/__init__.py
      @@ -455,13 +455,17 @@ class MeshInterface:
               """
               p = admin_pb2.AdminMessage()
               p.get_channel_request = channelNum + 1
      +        logging.debug(f"Requesting channel {channelNum}")
       
               def onResponse(p):
                   """A closure to handle the response packet"""
                   c = p["decoded"]["admin"]["raw"].get_channel_response
                   self.partialChannels.append(c)
      -            if channelNum >= self.myInfo.max_channels - 1:
      -                # Done with all channels
      +            logging.debug(f"Received channel {c}")
      +            # for stress testing, download all channels
      +            # if channelNum >= self.myInfo.max_channels - 1:
      +            if c.role == channel_pb2.Channel.Role.DISABLED or channelNum >= self.myInfo.max_channels - 1:
      +                # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching
                       self.channels = self.partialChannels
                       # FIXME, the following should only be called after we have settings and channels
                       self._connected()  # Tell everone else we are ready to go
      diff --git a/setup.py b/setup.py
      index 1f9c74d..0307dd5 100644
      --- a/setup.py
      +++ b/setup.py
      @@ -12,11 +12,7 @@ with open("README.md", "r") as fh:
       # This call to setup() does all the work
       setup(
           name="meshtastic",
      -<<<<<<< HEAD
           version="1.2.00",
      -=======
      -    version="1.1.50",
      ->>>>>>> dev
           description="Python API & client shell for talking to Meshtastic devices",
           long_description=long_description,
           long_description_content_type="text/markdown",
      
      From ff47056689da5e68a4ee24b64c946c152296c013 Mon Sep 17 00:00:00 2001
      From: Kevin Hester 
      Date: Wed, 3 Mar 2021 10:12:28 +0800
      Subject: [PATCH 29/48] remove --set-router
      
      ---
       meshtastic/__main__.py | 65 ++++--------------------------------------
       1 file changed, 6 insertions(+), 59 deletions(-)
      
      diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py
      index 6121280..7a26321 100644
      --- a/meshtastic/__main__.py
      +++ b/meshtastic/__main__.py
      @@ -92,58 +92,6 @@ def fromStr(valstr):
       never = 0xffffffff
       oneday = 24 * 60 * 60
       
      -
      -def setRouter(interface, on):
      -    """Turn router mode on or off"""
      -    prefs = interface.radioConfig.preferences
      -    if on:
      -        print("Setting router mode")
      -
      -        prefs.is_router = True
      -
      -        # FIXME as of 1.1.24 of the device code, the following is all deprecated. After that release
      -        # has been out a while, just set is_router and warn the user about deprecation
      -        #
      -        prefs.is_low_power = True
      -        prefs.gps_operation = mesh_pb2.GpsOpMobile
      -
      -        # FIXME - after tuning, move these params into the on-device defaults based on is_router and is_low_power
      -
      -        # prefs.position_broadcast_secs = FIXME possibly broadcast only once an hr
      -        prefs.wait_bluetooth_secs = 1  # Don't stay in bluetooth mode
      -        prefs.screen_on_secs = 60  # default to only keep screen & bluetooth on for one minute
      -        prefs.mesh_sds_timeout_secs = never
      -        prefs.phone_sds_timeout_sec = never
      -        # try to stay in light sleep one full day, then briefly wake and sleep again
      -
      -        prefs.ls_secs = oneday
      -
      -        # if a message wakes us from light sleep, stay awake for 10 secs in hopes of other processing
      -        prefs.min_wake_secs = 10
      -
      -        # allow up to five minutes for each new GPS lock attempt
      -        prefs.gps_attempt_time = 300
      -
      -        # get a new GPS position once per day
      -        prefs.gps_update_interval = oneday
      -
      -    else:
      -        print("Unsetting router mode")
      -        prefs.is_router = False
      -        prefs.is_low_power = False
      -        prefs.gps_operation = mesh_pb2.GpsOpUnset
      -
      -        # Set defaults
      -        prefs.wait_bluetooth_secs = 0
      -        prefs.screen_on_secs = 0
      -        prefs.mesh_sds_timeout_secs = 0
      -        prefs.phone_sds_timeout_sec = 0
      -        prefs.ls_secs = 0
      -        prefs.min_wake_secs = 0
      -        prefs.gps_attempt_time = 0
      -        prefs.gps_update_interval = 0
      -
      -
       # Returns formatted value
       def formatFloat(value, formatStr="{:.2f}", unit="", default="N/A"):
           return formatStr.format(value)+unit if value else default
      @@ -281,9 +229,6 @@ def onConnected(interface):
                       ch.psk = bytes([1])  # Use default channel psk 1
                       interface.radioConfig.channel_settings.CopyFrom(ch)
       
      -            if args.router != None:
      -                setRouter(interface, args.router)
      -
                   # Handle the int/float/bool arguments
                   for pref in (args.set or []):
                       setPref(
      @@ -379,12 +324,14 @@ def common():
               if args.info or args.nodes or args.set or args.seturl or args.setowner or args.setlat or args.setlon or \
                       args.settime or \
                       args.setch_longslow or args.setch_shortfast or args.setstr or args.setchan or args.sendtext or \
      -                args.router != None or args.qr:
      +                args.qr:
                   args.seriallog = "none"  # assume no debug output in this case
               else:
                   args.seriallog = "stdout"  # default to stdout
       
      -    if args.test:
      +    if args.router != None:
      +        logging.error('--set-router has been deprecated. Use "--set router true" or "--set router false" instead')
      +    elif args.test:
               test.testAll()
           else:
               if args.seriallog == "stdout":
      @@ -505,9 +452,9 @@ def initParser():
                               action="store_true")
       
           parser.add_argument('--set-router', dest='router',
      -                        action='store_true', help="Turns on router mode")
      +                        action='store_true', help="Deprecated, use --set router true instead")
           parser.add_argument('--unset-router', dest='router',
      -                        action='store_false', help="Turns off router mode")
      +                        action='store_false', help="Deprecated, use --set router false instead")
       
           if have_tunnel:
               parser.add_argument('--tunnel',
      
      From 2f7403f3b4d736e1c8c295f1b508eba5125f530d Mon Sep 17 00:00:00 2001
      From: Kevin Hester 
      Date: Wed, 3 Mar 2021 10:22:19 +0800
      Subject: [PATCH 30/48] make setting work
      
      ---
       meshtastic/__init__.py | 9 ++++++---
       1 file changed, 6 insertions(+), 3 deletions(-)
      
      diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py
      index c48c56f..ea3efd2 100644
      --- a/meshtastic/__init__.py
      +++ b/meshtastic/__init__.py
      @@ -285,9 +285,12 @@ class MeshInterface:
               if self.radioConfig == None:
                   raise Exception("No RadioConfig has been read")
       
      -        t = mesh_pb2.ToRadio()
      -        t.set_radio.CopyFrom(self.radioConfig)
      -        self._sendToRadio(t)
      +        p = admin_pb2.AdminMessage()
      +        p.set_radio.CopyFrom(self.radioConfig)
      +
      +        self.sendData(p, self.myInfo.my_node_num,
      +                             portNum=portnums_pb2.PortNum.ADMIN_APP,
      +                             wantAck=True)
               logging.debug("Wrote config")
       
           def getMyNodeInfo(self):
      
      From a37a6815721cd19d2f2aec3e4e1fcdcdc56a4e5b Mon Sep 17 00:00:00 2001
      From: Kevin Hester 
      Date: Wed, 3 Mar 2021 10:57:51 +0800
      Subject: [PATCH 31/48] link to forum for problems
      
      ---
       meshtastic/__init__.py | 22 +++++++++++++++++++---
       1 file changed, 19 insertions(+), 3 deletions(-)
      
      diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py
      index ea3efd2..5e74af0 100644
      --- a/meshtastic/__init__.py
      +++ b/meshtastic/__init__.py
      @@ -131,6 +131,7 @@ class MeshInterface:
               self.noProto = noProto
               self.myInfo = None  # We don't have device info yet
               self.responseHandlers = {}  # A map from request ID to the handler
      +        self.failure = None # If we've encountered a fatal exception it will be kept here
               random.seed()  # FIXME, we should not clobber the random seedval here, instead tell user they must call it
               self.currentPacketId = random.randint(0, 0xffffffff)
               self._startConfig()
      @@ -381,6 +382,10 @@ class MeshInterface:
               if not self.isConnected.wait(5.0):  # timeout after 5 seconds
                   raise Exception("Timed out waiting for connection completion")
       
      +        # If we failed while connecting, raise the connection to the client
      +        if self.failure:
      +            raise self.failure
      +
           def _generatePacketId(self):
               """Get a new unique packet ID"""
               if self.currentPacketId is None:
      @@ -492,10 +497,21 @@ class MeshInterface:
               logging.debug(f"Received: {asDict}")
               if fromRadio.HasField("my_info"):
                   self.myInfo = fromRadio.my_info
      +
      +            failmsg = None
      +            # Check for app too old
                   if self.myInfo.min_app_version > OUR_APP_VERSION:
      -                raise Exception(
      -                    "This device needs a newer python client, please \"pip install --upgrade meshtastic\"")
      -            # start assigning our packet IDs from the opposite side of where our local device is assigning them
      +                failmsg = "This device needs a newer python client, please \"pip install --upgrade meshtastic\".  For more information see https://tinyurl.com/5bjsxu32"
      +
      +            # check for firmware too old
      +            if self.myInfo.max_channels == 0:
      +                failmsg = "This version of meshtastic-python requires device firmware version 1.2 or later. For more information see https://tinyurl.com/5bjsxu32"
      +
      +            if failmsg:
      +                self.failure = Exception(failmsg)
      +                self.isConnected.set() # let waitConnected return this exception
      +                self.close()
      +
               elif fromRadio.HasField("node_info"):
                   node = asDict["nodeInfo"]
                   try:
      
      From f763e168d9055dabe46cadb4880a5901fd524b2b Mon Sep 17 00:00:00 2001
      From: Kevin Hester 
      Date: Wed, 3 Mar 2021 11:06:41 +0800
      Subject: [PATCH 32/48] update protos
      
      ---
       meshtastic/deviceonly_pb2.py | 6 +++---
       proto                        | 2 +-
       2 files changed, 4 insertions(+), 4 deletions(-)
      
      diff --git a/meshtastic/deviceonly_pb2.py b/meshtastic/deviceonly_pb2.py
      index 7a7ba44..d5c34ec 100644
      --- a/meshtastic/deviceonly_pb2.py
      +++ b/meshtastic/deviceonly_pb2.py
      @@ -22,7 +22,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
         syntax='proto3',
         serialized_options=b'\n\023com.geeksville.meshB\nDeviceOnlyH\003',
         create_key=_descriptor._internal_create_key,
      -  serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\x1a\rchannel.proto\"\x99\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12\x1a\n\x08\x63hannels\x18\x0c \x03(\x0b\x32\x08.ChannelB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3'
      +  serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\x1a\rchannel.proto\"\x9f\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12\x1a\n\x08\x63hannels\x18\r \x03(\x0b\x32\x08.ChannelJ\x04\x08\x0c\x10\rB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3'
         ,
         dependencies=[mesh__pb2.DESCRIPTOR,radioconfig__pb2.DESCRIPTOR,channel__pb2.DESCRIPTOR,])
       
      @@ -102,7 +102,7 @@ _DEVICESTATE = _descriptor.Descriptor(
             serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
           _descriptor.FieldDescriptor(
             name='channels', full_name='DeviceState.channels', index=9,
      -      number=12, type=11, cpp_type=10, label=3,
      +      number=13, type=11, cpp_type=10, label=3,
             has_default_value=False, default_value=[],
             message_type=None, enum_type=None, containing_type=None,
             is_extension=False, extension_scope=None,
      @@ -120,7 +120,7 @@ _DEVICESTATE = _descriptor.Descriptor(
         oneofs=[
         ],
         serialized_start=67,
      -  serialized_end=348,
      +  serialized_end=354,
       )
       
       _DEVICESTATE.fields_by_name['radio'].message_type = radioconfig__pb2._RADIOCONFIG
      diff --git a/proto b/proto
      index 7de496f..741d59f 160000
      --- a/proto
      +++ b/proto
      @@ -1 +1 @@
      -Subproject commit 7de496ffe941f88e9d99c2ef2c7bc01f79efe11e
      +Subproject commit 741d59faea1909606cd50907fa347998eaeda032
      
      From 171c79b414fa8adb7d80c5f68abd18699530743c Mon Sep 17 00:00:00 2001
      From: Kevin Hester 
      Date: Wed, 3 Mar 2021 11:21:37 +0800
      Subject: [PATCH 33/48] 1.2.0 release to pypi
      
      ---
       docs/meshtastic/admin_pb2.html       |  277 +++++
       docs/meshtastic/apponly_pb2.html     |   85 +-
       docs/meshtastic/channel_pb2.html     |  504 ++++++++
       docs/meshtastic/deviceonly_pb2.html  |   28 +-
       docs/meshtastic/index.html           |  967 ++++++++++-----
       docs/meshtastic/mesh_pb2.html        | 1710 +++++---------------------
       docs/meshtastic/portnums_pb2.html    |   38 +-
       docs/meshtastic/radioconfig_pb2.html |  815 ++++++++++++
       docs/meshtastic/test.html            |   33 +-
       docs/meshtastic/tunnel.html          |  150 ++-
       docs/meshtastic/util.html            |   44 +
       11 files changed, 2848 insertions(+), 1803 deletions(-)
       create mode 100644 docs/meshtastic/admin_pb2.html
       create mode 100644 docs/meshtastic/channel_pb2.html
       create mode 100644 docs/meshtastic/radioconfig_pb2.html
      
      diff --git a/docs/meshtastic/admin_pb2.html b/docs/meshtastic/admin_pb2.html
      new file mode 100644
      index 0000000..46d9221
      --- /dev/null
      +++ b/docs/meshtastic/admin_pb2.html
      @@ -0,0 +1,277 @@
      +
      +
      +
      +
      +
      +
      +meshtastic.admin_pb2 API documentation
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Module meshtastic.admin_pb2

      +
      +
      +

      Generated protocol buffer code.

      +
      + +Expand source code + +
      # -*- coding: utf-8 -*-
      +# Generated by the protocol buffer compiler.  DO NOT EDIT!
      +# source: admin.proto
      +"""Generated protocol buffer code."""
      +from google.protobuf import descriptor as _descriptor
      +from google.protobuf import message as _message
      +from google.protobuf import reflection as _reflection
      +from google.protobuf import symbol_database as _symbol_database
      +# @@protoc_insertion_point(imports)
      +
      +_sym_db = _symbol_database.Default()
      +
      +
      +from . import mesh_pb2 as mesh__pb2
      +from . import radioconfig_pb2 as radioconfig__pb2
      +from . import channel_pb2 as channel__pb2
      +
      +
      +DESCRIPTOR = _descriptor.FileDescriptor(
      +  name='admin.proto',
      +  package='',
      +  syntax='proto3',
      +  serialized_options=b'\n\023com.geeksville.meshB\013AdminProtosH\003',
      +  create_key=_descriptor._internal_create_key,
      +  serialized_pb=b'\n\x0b\x61\x64min.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\x1a\rchannel.proto\"\x8b\x02\n\x0c\x41\x64minMessage\x12!\n\tset_radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x02 \x01(\x0b\x32\x05.UserH\x00\x12\x1f\n\x0bset_channel\x18\x03 \x01(\x0b\x32\x08.ChannelH\x00\x12\x1b\n\x11get_radio_request\x18\x04 \x01(\x08H\x00\x12*\n\x12get_radio_response\x18\x05 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1d\n\x13get_channel_request\x18\x06 \x01(\rH\x00\x12(\n\x14get_channel_response\x18\x07 \x01(\x0b\x32\x08.ChannelH\x00\x42\t\n\x07variantB$\n\x13\x63om.geeksville.meshB\x0b\x41\x64minProtosH\x03\x62\x06proto3'
      +  ,
      +  dependencies=[mesh__pb2.DESCRIPTOR,radioconfig__pb2.DESCRIPTOR,channel__pb2.DESCRIPTOR,])
      +
      +
      +
      +
      +_ADMINMESSAGE = _descriptor.Descriptor(
      +  name='AdminMessage',
      +  full_name='AdminMessage',
      +  filename=None,
      +  file=DESCRIPTOR,
      +  containing_type=None,
      +  create_key=_descriptor._internal_create_key,
      +  fields=[
      +    _descriptor.FieldDescriptor(
      +      name='set_radio', full_name='AdminMessage.set_radio', index=0,
      +      number=1, type=11, cpp_type=10, label=1,
      +      has_default_value=False, default_value=None,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='set_owner', full_name='AdminMessage.set_owner', index=1,
      +      number=2, type=11, cpp_type=10, label=1,
      +      has_default_value=False, default_value=None,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='set_channel', full_name='AdminMessage.set_channel', index=2,
      +      number=3, type=11, cpp_type=10, label=1,
      +      has_default_value=False, default_value=None,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='get_radio_request', full_name='AdminMessage.get_radio_request', index=3,
      +      number=4, type=8, cpp_type=7, label=1,
      +      has_default_value=False, default_value=False,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='get_radio_response', full_name='AdminMessage.get_radio_response', index=4,
      +      number=5, type=11, cpp_type=10, label=1,
      +      has_default_value=False, default_value=None,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='get_channel_request', full_name='AdminMessage.get_channel_request', index=5,
      +      number=6, type=13, cpp_type=3, label=1,
      +      has_default_value=False, default_value=0,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +    _descriptor.FieldDescriptor(
      +      name='get_channel_response', full_name='AdminMessage.get_channel_response', index=6,
      +      number=7, type=11, cpp_type=10, label=1,
      +      has_default_value=False, default_value=None,
      +      message_type=None, enum_type=None, containing_type=None,
      +      is_extension=False, extension_scope=None,
      +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
      +  ],
      +  extensions=[
      +  ],
      +  nested_types=[],
      +  enum_types=[
      +  ],
      +  serialized_options=None,
      +  is_extendable=False,
      +  syntax='proto3',
      +  extension_ranges=[],
      +  oneofs=[
      +    _descriptor.OneofDescriptor(
      +      name='variant', full_name='AdminMessage.variant',
      +      index=0, containing_type=None,
      +      create_key=_descriptor._internal_create_key,
      +    fields=[]),
      +  ],
      +  serialized_start=62,
      +  serialized_end=329,
      +)
      +
      +_ADMINMESSAGE.fields_by_name['set_radio'].message_type = radioconfig__pb2._RADIOCONFIG
      +_ADMINMESSAGE.fields_by_name['set_owner'].message_type = mesh__pb2._USER
      +_ADMINMESSAGE.fields_by_name['set_channel'].message_type = channel__pb2._CHANNEL
      +_ADMINMESSAGE.fields_by_name['get_radio_response'].message_type = radioconfig__pb2._RADIOCONFIG
      +_ADMINMESSAGE.fields_by_name['get_channel_response'].message_type = channel__pb2._CHANNEL
      +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
      +  _ADMINMESSAGE.fields_by_name['set_radio'])
      +_ADMINMESSAGE.fields_by_name['set_radio'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
      +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
      +  _ADMINMESSAGE.fields_by_name['set_owner'])
      +_ADMINMESSAGE.fields_by_name['set_owner'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
      +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
      +  _ADMINMESSAGE.fields_by_name['set_channel'])
      +_ADMINMESSAGE.fields_by_name['set_channel'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
      +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
      +  _ADMINMESSAGE.fields_by_name['get_radio_request'])
      +_ADMINMESSAGE.fields_by_name['get_radio_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
      +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
      +  _ADMINMESSAGE.fields_by_name['get_radio_response'])
      +_ADMINMESSAGE.fields_by_name['get_radio_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
      +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
      +  _ADMINMESSAGE.fields_by_name['get_channel_request'])
      +_ADMINMESSAGE.fields_by_name['get_channel_request'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
      +_ADMINMESSAGE.oneofs_by_name['variant'].fields.append(
      +  _ADMINMESSAGE.fields_by_name['get_channel_response'])
      +_ADMINMESSAGE.fields_by_name['get_channel_response'].containing_oneof = _ADMINMESSAGE.oneofs_by_name['variant']
      +DESCRIPTOR.message_types_by_name['AdminMessage'] = _ADMINMESSAGE
      +_sym_db.RegisterFileDescriptor(DESCRIPTOR)
      +
      +AdminMessage = _reflection.GeneratedProtocolMessageType('AdminMessage', (_message.Message,), {
      +  'DESCRIPTOR' : _ADMINMESSAGE,
      +  '__module__' : 'admin_pb2'
      +  # @@protoc_insertion_point(class_scope:AdminMessage)
      +  })
      +_sym_db.RegisterMessage(AdminMessage)
      +
      +
      +DESCRIPTOR._options = None
      +# @@protoc_insertion_point(module_scope)
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Classes

      +
      +
      +class AdminMessage +(*args, **kwargs) +
      +
      +

      A ProtocolMessage

      +

      Ancestors

      +
        +
      • google.protobuf.pyext._message.CMessage
      • +
      • google.protobuf.message.Message
      • +
      +

      Class variables

      +
      +
      var DESCRIPTOR
      +
      +
      +
      +
      +

      Instance variables

      +
      +
      var get_channel_request
      +
      +

      Field AdminMessage.get_channel_request

      +
      +
      var get_channel_response
      +
      +

      Field AdminMessage.get_channel_response

      +
      +
      var get_radio_request
      +
      +

      Field AdminMessage.get_radio_request

      +
      +
      var get_radio_response
      +
      +

      Field AdminMessage.get_radio_response

      +
      +
      var set_channel
      +
      +

      Field AdminMessage.set_channel

      +
      +
      var set_owner
      +
      +

      Field AdminMessage.set_owner

      +
      +
      var set_radio
      +
      +

      Field AdminMessage.set_radio

      +
      +
      +
      +
      +
      +
      + +
      + + + \ No newline at end of file diff --git a/docs/meshtastic/apponly_pb2.html b/docs/meshtastic/apponly_pb2.html index 879f970..ba968d5 100644 --- a/docs/meshtastic/apponly_pb2.html +++ b/docs/meshtastic/apponly_pb2.html @@ -41,17 +41,18 @@ _sym_db = _symbol_database.Default() from . import mesh_pb2 as mesh__pb2 +from . import channel_pb2 as channel__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='apponly.proto', package='', syntax='proto3', - serialized_options=b'\n\023com.geeksville.meshB\007AppOnlyH\003', + serialized_options=b'\n\023com.geeksville.meshB\rAppOnlyProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\tB \n\x13\x63om.geeksville.meshB\x07\x41ppOnlyH\x03\x62\x06proto3' + serialized_pb=b'\n\rapponly.proto\x1a\nmesh.proto\x1a\rchannel.proto\"V\n\x0fServiceEnvelope\x12\x1b\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacket\x12\x12\n\nchannel_id\x18\x02 \x01(\t\x12\x12\n\ngateway_id\x18\x03 \x01(\t\"0\n\nChannelSet\x12\"\n\x08settings\x18\x01 \x03(\x0b\x32\x10.ChannelSettingsB&\n\x13\x63om.geeksville.meshB\rAppOnlyProtosH\x03\x62\x06proto3' , - dependencies=[mesh__pb2.DESCRIPTOR,]) + dependencies=[mesh__pb2.DESCRIPTOR,channel__pb2.DESCRIPTOR,]) @@ -97,12 +98,46 @@ _SERVICEENVELOPE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=29, - serialized_end=115, + serialized_start=44, + serialized_end=130, +) + + +_CHANNELSET = _descriptor.Descriptor( + name='ChannelSet', + full_name='ChannelSet', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='settings', full_name='ChannelSet.settings', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=132, + serialized_end=180, ) _SERVICEENVELOPE.fields_by_name['packet'].message_type = mesh__pb2._MESHPACKET +_CHANNELSET.fields_by_name['settings'].message_type = channel__pb2._CHANNELSETTINGS DESCRIPTOR.message_types_by_name['ServiceEnvelope'] = _SERVICEENVELOPE +DESCRIPTOR.message_types_by_name['ChannelSet'] = _CHANNELSET _sym_db.RegisterFileDescriptor(DESCRIPTOR) ServiceEnvelope = _reflection.GeneratedProtocolMessageType('ServiceEnvelope', (_message.Message,), { @@ -112,6 +147,13 @@ ServiceEnvelope = _reflection.GeneratedProtocolMessageType('ServiceEnvelope& }) _sym_db.RegisterMessage(ServiceEnvelope) +ChannelSet = _reflection.GeneratedProtocolMessageType('ChannelSet', (_message.Message,), { + 'DESCRIPTOR' : _CHANNELSET, + '__module__' : 'apponly_pb2' + # @@protoc_insertion_point(class_scope:ChannelSet) + }) +_sym_db.RegisterMessage(ChannelSet) + DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope)
      @@ -126,6 +168,32 @@ DESCRIPTOR._options = None

      Classes

      +
      +class ChannelSet +(*args, **kwargs) +
      +
      +

      A ProtocolMessage

      +

      Ancestors

      +
        +
      • google.protobuf.pyext._message.CMessage
      • +
      • google.protobuf.message.Message
      • +
      +

      Class variables

      +
      +
      var DESCRIPTOR
      +
      +
      +
      +
      +

      Instance variables

      +
      +
      var settings
      +
      +

      Field ChannelSet.settings

      +
      +
      +
      class ServiceEnvelope (*args, **kwargs) @@ -177,6 +245,13 @@ DESCRIPTOR._options = None
    • Classes

      • +

        ChannelSet

        + +
      • +
      • ServiceEnvelope

        • DESCRIPTOR
        • diff --git a/docs/meshtastic/channel_pb2.html b/docs/meshtastic/channel_pb2.html new file mode 100644 index 0000000..cd9b0b7 --- /dev/null +++ b/docs/meshtastic/channel_pb2.html @@ -0,0 +1,504 @@ + + + + + + +meshtastic.channel_pb2 API documentation + + + + + + + + + + + +
          +
          +
          +

          Module meshtastic.channel_pb2

          +
          +
          +

          Generated protocol buffer code.

          +
          + +Expand source code + +
          # -*- coding: utf-8 -*-
          +# Generated by the protocol buffer compiler.  DO NOT EDIT!
          +# source: channel.proto
          +"""Generated protocol buffer code."""
          +from google.protobuf import descriptor as _descriptor
          +from google.protobuf import message as _message
          +from google.protobuf import reflection as _reflection
          +from google.protobuf import symbol_database as _symbol_database
          +# @@protoc_insertion_point(imports)
          +
          +_sym_db = _symbol_database.Default()
          +
          +
          +
          +
          +DESCRIPTOR = _descriptor.FileDescriptor(
          +  name='channel.proto',
          +  package='',
          +  syntax='proto3',
          +  serialized_options=b'\n\023com.geeksville.meshB\rChannelProtosH\003',
          +  create_key=_descriptor._internal_create_key,
          +  serialized_pb=b'\n\rchannel.proto\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\x8b\x01\n\x07\x43hannel\x12\r\n\x05index\x18\x01 \x01(\r\x12\"\n\x08settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettings\x12\x1b\n\x04role\x18\x03 \x01(\x0e\x32\r.Channel.Role\"0\n\x04Role\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01\x12\r\n\tSECONDARY\x10\x02\x42&\n\x13\x63om.geeksville.meshB\rChannelProtosH\x03\x62\x06proto3'
          +)
          +
          +
          +
          +_CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor(
          +  name='ModemConfig',
          +  full_name='ChannelSettings.ModemConfig',
          +  filename=None,
          +  file=DESCRIPTOR,
          +  create_key=_descriptor._internal_create_key,
          +  values=[
          +    _descriptor.EnumValueDescriptor(
          +      name='Bw125Cr45Sf128', index=0, number=0,
          +      serialized_options=None,
          +      type=None,
          +      create_key=_descriptor._internal_create_key),
          +    _descriptor.EnumValueDescriptor(
          +      name='Bw500Cr45Sf128', index=1, number=1,
          +      serialized_options=None,
          +      type=None,
          +      create_key=_descriptor._internal_create_key),
          +    _descriptor.EnumValueDescriptor(
          +      name='Bw31_25Cr48Sf512', index=2, number=2,
          +      serialized_options=None,
          +      type=None,
          +      create_key=_descriptor._internal_create_key),
          +    _descriptor.EnumValueDescriptor(
          +      name='Bw125Cr48Sf4096', index=3, number=3,
          +      serialized_options=None,
          +      type=None,
          +      create_key=_descriptor._internal_create_key),
          +  ],
          +  containing_type=None,
          +  serialized_options=None,
          +  serialized_start=280,
          +  serialized_end=376,
          +)
          +_sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG)
          +
          +_CHANNEL_ROLE = _descriptor.EnumDescriptor(
          +  name='Role',
          +  full_name='Channel.Role',
          +  filename=None,
          +  file=DESCRIPTOR,
          +  create_key=_descriptor._internal_create_key,
          +  values=[
          +    _descriptor.EnumValueDescriptor(
          +      name='DISABLED', index=0, number=0,
          +      serialized_options=None,
          +      type=None,
          +      create_key=_descriptor._internal_create_key),
          +    _descriptor.EnumValueDescriptor(
          +      name='PRIMARY', index=1, number=1,
          +      serialized_options=None,
          +      type=None,
          +      create_key=_descriptor._internal_create_key),
          +    _descriptor.EnumValueDescriptor(
          +      name='SECONDARY', index=2, number=2,
          +      serialized_options=None,
          +      type=None,
          +      create_key=_descriptor._internal_create_key),
          +  ],
          +  containing_type=None,
          +  serialized_options=None,
          +  serialized_start=470,
          +  serialized_end=518,
          +)
          +_sym_db.RegisterEnumDescriptor(_CHANNEL_ROLE)
          +
          +
          +_CHANNELSETTINGS = _descriptor.Descriptor(
          +  name='ChannelSettings',
          +  full_name='ChannelSettings',
          +  filename=None,
          +  file=DESCRIPTOR,
          +  containing_type=None,
          +  create_key=_descriptor._internal_create_key,
          +  fields=[
          +    _descriptor.FieldDescriptor(
          +      name='tx_power', full_name='ChannelSettings.tx_power', index=0,
          +      number=1, type=5, cpp_type=1, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='modem_config', full_name='ChannelSettings.modem_config', index=1,
          +      number=3, type=14, cpp_type=8, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='bandwidth', full_name='ChannelSettings.bandwidth', index=2,
          +      number=6, type=13, cpp_type=3, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='spread_factor', full_name='ChannelSettings.spread_factor', index=3,
          +      number=7, type=13, cpp_type=3, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='coding_rate', full_name='ChannelSettings.coding_rate', index=4,
          +      number=8, type=13, cpp_type=3, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='channel_num', full_name='ChannelSettings.channel_num', index=5,
          +      number=9, type=13, cpp_type=3, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='psk', full_name='ChannelSettings.psk', index=6,
          +      number=4, type=12, cpp_type=9, label=1,
          +      has_default_value=False, default_value=b"",
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='name', full_name='ChannelSettings.name', index=7,
          +      number=5, type=9, cpp_type=9, label=1,
          +      has_default_value=False, default_value=b"".decode('utf-8'),
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='id', full_name='ChannelSettings.id', index=8,
          +      number=10, type=7, cpp_type=3, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='uplink_enabled', full_name='ChannelSettings.uplink_enabled', index=9,
          +      number=16, type=8, cpp_type=7, label=1,
          +      has_default_value=False, default_value=False,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='downlink_enabled', full_name='ChannelSettings.downlink_enabled', index=10,
          +      number=17, type=8, cpp_type=7, label=1,
          +      has_default_value=False, default_value=False,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +  ],
          +  extensions=[
          +  ],
          +  nested_types=[],
          +  enum_types=[
          +    _CHANNELSETTINGS_MODEMCONFIG,
          +  ],
          +  serialized_options=None,
          +  is_extendable=False,
          +  syntax='proto3',
          +  extension_ranges=[],
          +  oneofs=[
          +  ],
          +  serialized_start=18,
          +  serialized_end=376,
          +)
          +
          +
          +_CHANNEL = _descriptor.Descriptor(
          +  name='Channel',
          +  full_name='Channel',
          +  filename=None,
          +  file=DESCRIPTOR,
          +  containing_type=None,
          +  create_key=_descriptor._internal_create_key,
          +  fields=[
          +    _descriptor.FieldDescriptor(
          +      name='index', full_name='Channel.index', index=0,
          +      number=1, type=13, cpp_type=3, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='settings', full_name='Channel.settings', index=1,
          +      number=2, type=11, cpp_type=10, label=1,
          +      has_default_value=False, default_value=None,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +    _descriptor.FieldDescriptor(
          +      name='role', full_name='Channel.role', index=2,
          +      number=3, type=14, cpp_type=8, label=1,
          +      has_default_value=False, default_value=0,
          +      message_type=None, enum_type=None, containing_type=None,
          +      is_extension=False, extension_scope=None,
          +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
          +  ],
          +  extensions=[
          +  ],
          +  nested_types=[],
          +  enum_types=[
          +    _CHANNEL_ROLE,
          +  ],
          +  serialized_options=None,
          +  is_extendable=False,
          +  syntax='proto3',
          +  extension_ranges=[],
          +  oneofs=[
          +  ],
          +  serialized_start=379,
          +  serialized_end=518,
          +)
          +
          +_CHANNELSETTINGS.fields_by_name['modem_config'].enum_type = _CHANNELSETTINGS_MODEMCONFIG
          +_CHANNELSETTINGS_MODEMCONFIG.containing_type = _CHANNELSETTINGS
          +_CHANNEL.fields_by_name['settings'].message_type = _CHANNELSETTINGS
          +_CHANNEL.fields_by_name['role'].enum_type = _CHANNEL_ROLE
          +_CHANNEL_ROLE.containing_type = _CHANNEL
          +DESCRIPTOR.message_types_by_name['ChannelSettings'] = _CHANNELSETTINGS
          +DESCRIPTOR.message_types_by_name['Channel'] = _CHANNEL
          +_sym_db.RegisterFileDescriptor(DESCRIPTOR)
          +
          +ChannelSettings = _reflection.GeneratedProtocolMessageType('ChannelSettings', (_message.Message,), {
          +  'DESCRIPTOR' : _CHANNELSETTINGS,
          +  '__module__' : 'channel_pb2'
          +  # @@protoc_insertion_point(class_scope:ChannelSettings)
          +  })
          +_sym_db.RegisterMessage(ChannelSettings)
          +
          +Channel = _reflection.GeneratedProtocolMessageType('Channel', (_message.Message,), {
          +  'DESCRIPTOR' : _CHANNEL,
          +  '__module__' : 'channel_pb2'
          +  # @@protoc_insertion_point(class_scope:Channel)
          +  })
          +_sym_db.RegisterMessage(Channel)
          +
          +
          +DESCRIPTOR._options = None
          +# @@protoc_insertion_point(module_scope)
          +
          +
          +
          +
          +
          +
          +
          +
          +
          +

          Classes

          +
          +
          +class Channel +(*args, **kwargs) +
          +
          +

          A ProtocolMessage

          +

          Ancestors

          +
            +
          • google.protobuf.pyext._message.CMessage
          • +
          • google.protobuf.message.Message
          • +
          +

          Class variables

          +
          +
          var DESCRIPTOR
          +
          +
          +
          +
          var DISABLED
          +
          +
          +
          +
          var PRIMARY
          +
          +
          +
          +
          var Role
          +
          +
          +
          +
          var SECONDARY
          +
          +
          +
          +
          +

          Instance variables

          +
          +
          var index
          +
          +

          Field Channel.index

          +
          +
          var role
          +
          +

          Field Channel.role

          +
          +
          var settings
          +
          +

          Field Channel.settings

          +
          +
          +
          +
          +class ChannelSettings +(*args, **kwargs) +
          +
          +

          A ProtocolMessage

          +

          Ancestors

          +
            +
          • google.protobuf.pyext._message.CMessage
          • +
          • google.protobuf.message.Message
          • +
          +

          Class variables

          +
          +
          var Bw125Cr45Sf128
          +
          +
          +
          +
          var Bw125Cr48Sf4096
          +
          +
          +
          +
          var Bw31_25Cr48Sf512
          +
          +
          +
          +
          var Bw500Cr45Sf128
          +
          +
          +
          +
          var DESCRIPTOR
          +
          +
          +
          +
          var ModemConfig
          +
          +
          +
          +
          +

          Instance variables

          +
          +
          var bandwidth
          +
          +

          Field ChannelSettings.bandwidth

          +
          +
          var channel_num
          +
          +

          Field ChannelSettings.channel_num

          +
          +
          var coding_rate
          +
          +

          Field ChannelSettings.coding_rate

          +
          + +
          +

          Field ChannelSettings.downlink_enabled

          +
          +
          var id
          +
          +

          Field ChannelSettings.id

          +
          +
          var modem_config
          +
          +

          Field ChannelSettings.modem_config

          +
          +
          var name
          +
          +

          Field ChannelSettings.name

          +
          +
          var psk
          +
          +

          Field ChannelSettings.psk

          +
          +
          var spread_factor
          +
          +

          Field ChannelSettings.spread_factor

          +
          +
          var tx_power
          +
          +

          Field ChannelSettings.tx_power

          +
          + +
          +

          Field ChannelSettings.uplink_enabled

          +
          +
          +
          +
          +
          +
          + +
          + + + \ No newline at end of file diff --git a/docs/meshtastic/deviceonly_pb2.html b/docs/meshtastic/deviceonly_pb2.html index 40933a4..e9b1ec6 100644 --- a/docs/meshtastic/deviceonly_pb2.html +++ b/docs/meshtastic/deviceonly_pb2.html @@ -41,6 +41,8 @@ _sym_db = _symbol_database.Default() from . import mesh_pb2 as mesh__pb2 +from . import radioconfig_pb2 as radioconfig__pb2 +from . import channel_pb2 as channel__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -49,9 +51,9 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nDeviceOnlyH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\"\xab\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12,\n\x12secondary_channels\x18\x0c \x03(\x0b\x32\x10.ChannelSettingsB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3' + serialized_pb=b'\n\x10\x64\x65viceonly.proto\x1a\nmesh.proto\x1a\x11radioconfig.proto\x1a\rchannel.proto\"\x9f\x02\n\x0b\x44\x65viceState\x12\x1b\n\x05radio\x18\x01 \x01(\x0b\x32\x0c.RadioConfig\x12\x1c\n\x07my_node\x18\x02 \x01(\x0b\x32\x0b.MyNodeInfo\x12\x14\n\x05owner\x18\x03 \x01(\x0b\x32\x05.User\x12\x1a\n\x07node_db\x18\x04 \x03(\x0b\x32\t.NodeInfo\x12\"\n\rreceive_queue\x18\x05 \x03(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07version\x18\x08 \x01(\r\x12$\n\x0frx_text_message\x18\x07 \x01(\x0b\x32\x0b.MeshPacket\x12\x0f\n\x07no_save\x18\t \x01(\x08\x12\x15\n\rdid_gps_reset\x18\x0b \x01(\x08\x12\x1a\n\x08\x63hannels\x18\r \x03(\x0b\x32\x08.ChannelJ\x04\x08\x0c\x10\rB#\n\x13\x63om.geeksville.meshB\nDeviceOnlyH\x03\x62\x06proto3' , - dependencies=[mesh__pb2.DESCRIPTOR,]) + dependencies=[mesh__pb2.DESCRIPTOR,radioconfig__pb2.DESCRIPTOR,channel__pb2.DESCRIPTOR,]) @@ -128,8 +130,8 @@ _DEVICESTATE = _descriptor.Descriptor( is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='secondary_channels', full_name='DeviceState.secondary_channels', index=9, - number=12, type=11, cpp_type=10, label=3, + name='channels', full_name='DeviceState.channels', index=9, + number=13, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -146,17 +148,17 @@ _DEVICESTATE = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=33, - serialized_end=332, + serialized_start=67, + serialized_end=354, ) -_DEVICESTATE.fields_by_name['radio'].message_type = mesh__pb2._RADIOCONFIG +_DEVICESTATE.fields_by_name['radio'].message_type = radioconfig__pb2._RADIOCONFIG _DEVICESTATE.fields_by_name['my_node'].message_type = mesh__pb2._MYNODEINFO _DEVICESTATE.fields_by_name['owner'].message_type = mesh__pb2._USER _DEVICESTATE.fields_by_name['node_db'].message_type = mesh__pb2._NODEINFO _DEVICESTATE.fields_by_name['receive_queue'].message_type = mesh__pb2._MESHPACKET _DEVICESTATE.fields_by_name['rx_text_message'].message_type = mesh__pb2._MESHPACKET -_DEVICESTATE.fields_by_name['secondary_channels'].message_type = mesh__pb2._CHANNELSETTINGS +_DEVICESTATE.fields_by_name['channels'].message_type = channel__pb2._CHANNEL DESCRIPTOR.message_types_by_name['DeviceState'] = _DEVICESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -201,6 +203,10 @@ DESCRIPTOR._options = None
    • Instance variables

      +
      var channels
      +
      +

      Field DeviceState.channels

      +
      var did_gps_reset

      Field DeviceState.did_gps_reset

      @@ -233,10 +239,6 @@ DESCRIPTOR._options = None

      Field DeviceState.rx_text_message

      -
      var secondary_channels
      -
      -

      Field DeviceState.secondary_channels

      -
      var version

      Field DeviceState.version

      @@ -263,6 +265,7 @@ DESCRIPTOR._options = None

      DeviceState

      diff --git a/docs/meshtastic/index.html b/docs/meshtastic/index.html index 55c5cdd..485594d 100644 --- a/docs/meshtastic/index.html +++ b/docs/meshtastic/index.html @@ -142,13 +142,23 @@ interface = meshtastic.SerialInterface() """ -import socket import pygatt import google.protobuf.json_format -import serial, threading, logging, sys, random, traceback, time, base64, platform -from . import mesh_pb2, portnums_pb2, util +import serial +import threading +import logging +import sys +import random +import traceback +import time +import base64 +import platform +import socket +from . import mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2, environmental_measurement_pb2, remote_hardware_pb2, channel_pb2, radioconfig_pb2, util +from .util import fixme, catchAndIgnore from pubsub import pub from dotmap import DotMap +from typing import * START1 = 0x94 START2 = 0xc3 @@ -166,7 +176,25 @@ MY_CONFIG_ID = 42 format is Mmmss (where M is 1+the numeric major number. i.e. 20120 means 1.1.20 """ -OUR_APP_VERSION = 20120 +OUR_APP_VERSION = 20200 + + +class ResponseHandler(NamedTuple): + """A pending response callback, waiting for a response to one of our messages""" + # requestId: int - used only as a key + callback: Callable + # FIXME, add timestamp and age out old requests + + +class KnownProtocol(NamedTuple): + """Used to automatically decode known protocol payloads""" + name: str + # portnum: int, now a key + # If set, will be called to prase as a protocol buffer + protobufFactory: Callable = None + # If set, invoked as onReceive(interface, packet) + onReceive: Callable = None + class MeshInterface: """Interface class for meshtastic devices @@ -188,7 +216,10 @@ class MeshInterface: self.nodes = None # FIXME self.isConnected = threading.Event() self.noProto = noProto - random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it + self.myInfo = None # We don't have device info yet + self.responseHandlers = {} # A map from request ID to the handler + self.failure = None # If we've encountered a fatal exception it will be kept here + random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) self._startConfig() @@ -197,12 +228,17 @@ class MeshInterface: def __exit__(self, exc_type, exc_value, traceback): if exc_type is not None and exc_value is not None: - logging.error(f'An exception of type {exc_type} with value {exc_value} has occurred') + logging.error( + f'An exception of type {exc_type} with value {exc_value} has occurred') if traceback is not None: logging.error(f'Traceback: {traceback}') self.close() - def sendText(self, text, destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False): + def sendText(self, text: AnyStr, + destinationId=BROADCAST_ADDR, + wantAck=False, + wantResponse=False, + onResponse=None): """Send a utf8 string to some other node, if the node has a display it will also be shown on the device. Arguments: @@ -212,13 +248,20 @@ class MeshInterface: destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR}) portNum -- the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list wantAck -- True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery) + wantResponse -- True if you want the service on the other side to send an application layer response Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ return self.sendData(text.encode("utf-8"), destinationId, - portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, wantAck=wantAck, wantResponse=wantResponse) + portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, + wantAck=wantAck, + wantResponse=wantResponse, + onResponse=onResponse) - def sendData(self, data, destinationId=BROADCAST_ADDR, portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, wantResponse=False): + def sendData(self, data, destinationId=BROADCAST_ADDR, + portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, + wantResponse=False, + onResponse=None): """Send a data packet to some other node Keyword Arguments: @@ -226,6 +269,8 @@ class MeshInterface: destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR}) portNum -- the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list wantAck -- True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery) + wantResponse -- True if you want the service on the other side to send an application layer response + onResponse -- A closure of the form funct(packet), that will be called when a response packet arrives (or the transaction is NAKed due to non receipt) Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ @@ -236,10 +281,14 @@ class MeshInterface: if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: raise Exception("Data payload too big") meshPacket = mesh_pb2.MeshPacket() - meshPacket.decoded.data.payload = data - meshPacket.decoded.data.portnum = portNum + meshPacket.decoded.payload = data + meshPacket.decoded.portnum = portNum meshPacket.decoded.want_response = wantResponse - return self.sendPacket(meshPacket, destinationId, wantAck=wantAck) + + p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck) + if onResponse is not None: + self._addResponseHandler(p.id, onResponse) + return p def sendPosition(self, latitude=0.0, longitude=0.0, altitude=0, timeSec=0, destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False): """ @@ -266,18 +315,29 @@ class MeshInterface: timeSec = time.time() # returns unix timestamp in seconds p.time = int(timeSec) - return self.sendData(p, destinationId, portNum=portnums_pb2.PortNum.POSITION_APP, wantAck=wantAck, wantResponse=wantResponse) + return self.sendData(p, destinationId, + portNum=portnums_pb2.PortNum.POSITION_APP, + wantAck=wantAck, + wantResponse=wantResponse) - def sendPacket(self, meshPacket, destinationId=BROADCAST_ADDR, wantAck=False): + def _addResponseHandler(self, requestId, callback): + self.responseHandlers[requestId] = ResponseHandler(callback) + + def _sendPacket(self, meshPacket, + destinationId=BROADCAST_ADDR, + wantAck=False): """Send a MeshPacket to the specified node (or if unspecified, broadcast). You probably don't want this - use sendData instead. - Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. + Returns the sent packet. The id field will be populated in this packet and + can be used to track future message acks/naks. """ - self._waitConnected() + + # We allow users to talk to the local node before we've completed the full connection flow... + if(self.myInfo is not None and destinationId != self.myInfo.my_node_num): + self._waitConnected() toRadio = mesh_pb2.ToRadio() - # FIXME add support for non broadcast addresses if destinationId is None: raise Exception("destinationId must not be None") @@ -300,7 +360,7 @@ class MeshInterface: self._sendToRadio(toRadio) return meshPacket - def waitForConfig(self, sleep=.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig')): + def waitForConfig(self, sleep=.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig', 'channels')): """Block until radio config is received. Returns True if config has been received.""" for _ in range(int(maxsecs/sleep)): if all(map(lambda a: getattr(self, a, None), attrs)): @@ -313,9 +373,12 @@ class MeshInterface: if self.radioConfig == None: raise Exception("No RadioConfig has been read") - t = mesh_pb2.ToRadio() - t.set_radio.CopyFrom(self.radioConfig) - self._sendToRadio(t) + p = admin_pb2.AdminMessage() + p.set_radio.CopyFrom(self.radioConfig) + + self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) logging.debug("Wrote config") def getMyNodeInfo(self): @@ -358,43 +421,58 @@ class MeshInterface: short_name = long_name[0] + long_name[1:].translate(trans) if len(short_name) < nChars: short_name = long_name[:nChars] - t = mesh_pb2.ToRadio() + + p = admin_pb2.AdminMessage() + if long_name is not None: - t.set_owner.long_name = long_name + p.set_owner.long_name = long_name if short_name is not None: short_name = short_name.strip() if len(short_name) > nChars: short_name = short_name[:nChars] - t.set_owner.short_name = short_name - self._sendToRadio(t) + p.set_owner.short_name = short_name + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) @property def channelURL(self): """The sharable URL that describes the current channel """ - bytes = self.radioConfig.channel_settings.SerializeToString() + # Only keep the primary/secondary channels, assume primary is first + channelSet = apponly_pb2.ChannelSet() + for c in self.channels: + if c.role != channel_pb2.Channel.Role.DISABLED: + channelSet.settings.append(c.settings) + bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') - return f"https://www.meshtastic.org/c/#{s}" + return f"https://www.meshtastic.org/d/#{s}" - def setURL(self, url, write=True): + def setURL(self, url): """Set mesh network URL""" if self.radioConfig == None: raise Exception("No RadioConfig has been read") - # URLs are of the form https://www.meshtastic.org/c/#{base64_channel_settings} + # URLs are of the form https://www.meshtastic.org/d/#{base64_channel_set} # Split on '/#' to find the base64 encoded channel settings splitURL = url.split("/#") decodedURL = base64.urlsafe_b64decode(splitURL[-1]) - self.radioConfig.channel_settings.ParseFromString(decodedURL) - if write: - self.writeConfig() + channelSet = apponly_pb2.ChannelSet() + channelSet.ParseFromString(decodedURL) + fixme("set self.channels, see https://developers.google.com/protocol-buffers/docs/reference/python-generated?csw=1#repeated-fields") + self._writeChannels() def _waitConnected(self): """Block until the initial node db download is complete, or timeout and raise an exception""" - if not self.isConnected.wait(5.0): # timeout after 5 seconds + if not self.isConnected.wait(5.0): # timeout after 5 seconds raise Exception("Timed out waiting for connection completion") + # If we failed while connecting, raise the connection to the client + if self.failure: + raise self.failure + def _generatePacketId(self): """Get a new unique packet ID""" if self.currentPacketId is None: @@ -406,13 +484,15 @@ class MeshInterface: def _disconnected(self): """Called by subclasses to tell clients this interface has disconnected""" self.isConnected.clear() - pub.sendMessage("meshtastic.connection.lost", interface=self) + catchAndIgnore("disconnection publish", lambda: pub.sendMessage( + "meshtastic.connection.lost", interface=self)) def _connected(self): """Called by this class to tell clients we are now fully connected to a node """ self.isConnected.set() - pub.sendMessage("meshtastic.connection.established", interface=self) + catchAndIgnore("connection publish", lambda: pub.sendMessage( + "meshtastic.connection.established", interface=self)) def _startConfig(self): """Start device packets flowing""" @@ -420,6 +500,8 @@ class MeshInterface: self.nodes = {} # nodes keyed by ID self.nodesByNum = {} # nodes keyed by nodenum self.radioConfig = None + self.channels = None + self.partialChannels = [] # We keep our channels in a temp array until finished startConfig = mesh_pb2.ToRadio() startConfig.want_config_id = MY_CONFIG_ID # we don't use this value @@ -428,14 +510,69 @@ class MeshInterface: def _sendToRadio(self, toRadio): """Send a ToRadio protobuf to the device""" if self.noProto: - logging.warn(f"Not sending packet because protocol use is disabled by noProto") + logging.warn( + f"Not sending packet because protocol use is disabled by noProto") else: + logging.debug(f"Sending toRadio: {toRadio}") self._sendToRadioImpl(toRadio) def _sendToRadioImpl(self, toRadio): """Send a ToRadio protobuf to the device""" logging.error(f"Subclass must provide toradio: {toRadio}") + def _handleConfigComplete(self): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings and channels + """ + self._requestSettings() + self._requestChannel(0) + + def _requestSettings(self): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings + """ + p = admin_pb2.AdminMessage() + p.get_radio_request = True + + def onResponse(p): + """A closure to handle the response packet""" + self.radioConfig = p["decoded"]["admin"]["raw"].get_radio_response + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True, + wantResponse=True, + onResponse=onResponse) + + def _requestChannel(self, channelNum: int): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings + """ + p = admin_pb2.AdminMessage() + p.get_channel_request = channelNum + 1 + logging.debug(f"Requesting channel {channelNum}") + + def onResponse(p): + """A closure to handle the response packet""" + c = p["decoded"]["admin"]["raw"].get_channel_response + self.partialChannels.append(c) + logging.debug(f"Received channel {c}") + # for stress testing, download all channels + # if channelNum >= self.myInfo.max_channels - 1: + if c.role == channel_pb2.Channel.Role.DISABLED or channelNum >= self.myInfo.max_channels - 1: + # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching + self.channels = self.partialChannels + # FIXME, the following should only be called after we have settings and channels + self._connected() # Tell everone else we are ready to go + else: + self._requestChannel(channelNum + 1) + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True, + wantResponse=True, + onResponse=onResponse) + def _handleFromRadio(self, fromRadioBytes): """ Handle a packet that arrived from the radio(update model and publish events) @@ -447,12 +584,21 @@ class MeshInterface: logging.debug(f"Received: {asDict}") if fromRadio.HasField("my_info"): self.myInfo = fromRadio.my_info + + failmsg = None + # Check for app too old if self.myInfo.min_app_version > OUR_APP_VERSION: - raise Exception( - "This device needs a newer python client, please \"pip install --upgrade meshtastic\"") - # start assigning our packet IDs from the opposite side of where our local device is assigning them - elif fromRadio.HasField("radio"): - self.radioConfig = fromRadio.radio + failmsg = "This device needs a newer python client, please \"pip install --upgrade meshtastic\". For more information see https://tinyurl.com/5bjsxu32" + + # check for firmware too old + if self.myInfo.max_channels == 0: + failmsg = "This version of meshtastic-python requires device firmware version 1.2 or later. For more information see https://tinyurl.com/5bjsxu32" + + if failmsg: + self.failure = Exception(failmsg) + self.isConnected.set() # let waitConnected return this exception + self.close() + elif fromRadio.HasField("node_info"): node = asDict["nodeInfo"] try: @@ -462,10 +608,11 @@ class MeshInterface: self.nodesByNum[node["num"]] = node if "user" in node: # Some nodes might not have user/ids assigned yet self.nodes[node["user"]["id"]] = node - pub.sendMessage("meshtastic.node.updated", node=node, interface=self) + pub.sendMessage("meshtastic.node.updated", + node=node, interface=self) elif fromRadio.config_complete_id == MY_CONFIG_ID: # we ignore the config_complete_id, it is unneeded for our stream API fromRadio.config_complete_id - self._connected() + self._handleConfigComplete() elif fromRadio.HasField("packet"): self._handlePacketFromRadio(fromRadio.packet) elif fromRadio.rebooted: @@ -528,6 +675,12 @@ class MeshInterface: """ asDict = google.protobuf.json_format.MessageToDict(meshPacket) + + # We normally decompose the payload into a dictionary so that the client + # doesn't need to understand protobufs. But advanced clients might + # want the raw protobuf, so we provide it in "raw" + asDict["raw"] = meshPacket + # /add fromId and toId fields based on the node ID asDict["fromId"] = self._nodeNumToId(asDict["from"]) asDict["toId"] = self._nodeNumToId(asDict["to"]) @@ -536,68 +689,59 @@ class MeshInterface: # asObj = DotMap(asDict) topic = "meshtastic.receive" # Generic unknown packet type - # Warn users if firmware doesn't use new portnum based data encodings - # But do not crash, because the lib will still basically work and ignore those packet types - if meshPacket.decoded.HasField("user") or meshPacket.decoded.HasField("position"): - logging.warn("Ignoring old position/user message. Recommend you update firmware to 1.1.20 or later") + decoded = asDict["decoded"] + # The default MessageToDict converts byte arrays into base64 strings. + # We don't want that - it messes up data payload. So slam in the correct + # byte array. + decoded["payload"] = meshPacket.decoded.payload - if meshPacket.decoded.HasField("data"): + # UNKNOWN_APP is the default protobuf portnum value, and therefore if not set it will not be populated at all + # to make API usage easier, set it to prevent confusion + if not "portnum" in decoded: + decoded["portnum"] = portnums_pb2.PortNum.Name( + portnums_pb2.PortNum.UNKNOWN_APP) - # The default MessageToDict converts byte arrays into base64 strings. - # We don't want that - it messes up data payload. So slam in the correct - # byte array. - asDict["decoded"]["data"]["payload"] = meshPacket.decoded.data.payload + portnum = decoded["portnum"] - # UNKNOWN_APP is the default protobuf portnum value, and therefore if not set it will not be populated at all - # to make API usage easier, set it to prevent confusion - if not "portnum" in asDict["decoded"]["data"]: - asDict["decoded"]["data"]["portnum"] = portnums_pb2.PortNum.Name(portnums_pb2.PortNum.UNKNOWN_APP) + topic = f"meshtastic.receive.data.{portnum}" - portnum = asDict["decoded"]["data"]["portnum"] + # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg + # move the following into a 'decoders' API that clients could register? + portNumInt = meshPacket.decoded.portnum # we want portnum as an int + handler = protocols.get(portNumInt) + # The decoded protobuf as a dictionary (if we understand this message) + p = None + if handler is not None: + topic = f"meshtastic.receive.{handler.name}" - topic = f"meshtastic.receive.data.{portnum}" - - # For text messages, we go ahead and decode the text to ascii for our users - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.TEXT_MESSAGE_APP): - topic = "meshtastic.receive.text" - - # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate - # the decoded.data.text and we log an error message. This at least allows some delivery to - # the app and the app can deal with the missing decoded representation. - # - # Usually btw this problem is caused by apps sending binary data but setting the payload type to - # text. - try: - asDict["decoded"]["data"]["text"] = meshPacket.decoded.data.payload.decode("utf-8") - except Exception as ex: - logging.error(f"Malformatted utf8 in text message: {ex}") - - # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.POSITION_APP): - topic = "meshtastic.receive.position" - pb = mesh_pb2.Position() - pb.ParseFromString(meshPacket.decoded.data.payload) + # Convert to protobuf if possible + if handler.protobufFactory is not None: + pb = handler.protobufFactory() + pb.ParseFromString(meshPacket.decoded.payload) p = google.protobuf.json_format.MessageToDict(pb) - self._fixupPosition(p) - asDict["decoded"]["data"]["position"] = p - # update node DB as needed - self._getOrCreateByNum(asDict["from"])["position"] = p + asDict["decoded"][handler.name] = p + # Also provide the protobuf raw + asDict["decoded"][handler.name]["raw"] = pb - # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.NODEINFO_APP): - topic = "meshtastic.receive.user" - pb = mesh_pb2.User() - pb.ParseFromString(meshPacket.decoded.data.payload) - u = google.protobuf.json_format.MessageToDict(pb) - asDict["decoded"]["data"]["user"] = u - # update node DB as needed - n = self._getOrCreateByNum(asDict["from"]) - n["user"] = u - # We now have a node ID, make sure it is uptodate in that table - self.nodes[u["id"]] = n + # Call specialized onReceive if necessary + if handler.onReceive is not None: + handler.onReceive(self, asDict) + + # Is this message in response to a request, if so, look for a handler + requestId = decoded.get("requestId") + if requestId is not None: + # We ignore ACK packets, but send NAKs and data responses to the handlers + routing = decoded.get("routing") + isAck = routing is not None and ("errorReason" not in routing) + if not isAck: + # we keep the responseHandler in dict until we get a non ack + handler = self.responseHandlers.pop(requestId, None) + if handler is not None: + handler.callback(asDict) logging.debug(f"Publishing topic {topic}") - pub.sendMessage(topic, packet=asDict, interface=self) + catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( + topic, packet=asDict, interface=self)) # Our standard BLE characteristics @@ -686,7 +830,7 @@ class StreamInterface(MeshInterface): time.sleep(0.1) # wait 100ms to give device time to start running self._rxThread.start() - if not self.noProto: # Wait for the db download if using the protocol + if not self.noProto: # Wait for the db download if using the protocol self._waitConnected() def _disconnected(self): @@ -772,13 +916,16 @@ class StreamInterface(MeshInterface): # logging.debug(f"timeout") pass except serial.SerialException as ex: - if not self._wantExit: # We might intentionally get an exception during shutdown - logging.warn(f"Meshtastic serial port disconnected, disconnecting... {ex}") + if not self._wantExit: # We might intentionally get an exception during shutdown + logging.warn( + f"Meshtastic serial port disconnected, disconnecting... {ex}") except OSError as ex: - if not self._wantExit: # We might intentionally get an exception during shutdown - logging.error(f"Unexpected OSError, terminating meshtastic reader... {ex}") + if not self._wantExit: # We might intentionally get an exception during shutdown + logging.error( + f"Unexpected OSError, terminating meshtastic reader... {ex}") except Exception as ex: - logging.error(f"Unexpected exception, terminating meshtastic reader... {ex}") + logging.error( + f"Unexpected exception, terminating meshtastic reader... {ex}") finally: logging.debug("reader is exiting") self._disconnected() @@ -826,10 +973,11 @@ class SerialInterface(StreamInterface): StreamInterface.__init__( self, debugOut=debugOut, noProto=noProto, connectNow=connectNow) + class TCPInterface(StreamInterface): """Interface class for meshtastic devices over a TCP link""" - def __init__(self, hostname, debugOut=None, noProto=False, connectNow=True, portNumber=4403): + def __init__(self, hostname: AnyStr, debugOut=None, noProto=False, connectNow=True, portNumber=4403): """Constructor, opens a connection to a specified IP address/hostname Keyword Arguments: @@ -852,9 +1000,9 @@ class TCPInterface(StreamInterface): def close(self): """Close a connection to the device""" logging.debug("Closing TCP stream") - # Sometimes the socket read might be blocked in the reader thread. Therefore we force the shutdown by closing + # Sometimes the socket read might be blocked in the reader thread. Therefore we force the shutdown by closing # the socket here - self._wantExit = True + self._wantExit = True if not self.socket is None: self.socket.shutdown(socket.SHUT_RDWR) self.socket.close() @@ -866,12 +1014,63 @@ class TCPInterface(StreamInterface): def _readBytes(self, len): """Read an array of bytes from our stream""" - return self.socket.recv(len)
      + return self.socket.recv(len) + + +def _onTextReceive(iface, asDict): + """Special text auto parsing for received messages""" + # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate + # the decoded.data.text and we log an error message. This at least allows some delivery to + # the app and the app can deal with the missing decoded representation. + # + # Usually btw this problem is caused by apps sending binary data but setting the payload type to + # text. + try: + asDict["decoded"]["text"] = meshPacket.decoded.payload.decode( + "utf-8") + except Exception as ex: + logging.error(f"Malformatted utf8 in text message: {ex}") + + +def _onPositionReceive(iface, asDict): + """Special auto parsing for received messages""" + p = asDict["decoded"]["position"] + iface._fixupPosition(p) + # update node DB as needed + iface._getOrCreateByNum(asDict["from"])["position"] = p + + +def _onNodeInfoReceive(iface, asDict): + """Special auto parsing for received messages""" + p = asDict["decoded"]["user"] + # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg + # update node DB as needed + n = iface._getOrCreateByNum(asDict["from"]) + n["user"] = p + # We now have a node ID, make sure it is uptodate in that table + iface.nodes[p["id"]] = n + + +"""Well known message payloads can register decoders for automatic protobuf parsing""" +protocols = { + portnums_pb2.PortNum.TEXT_MESSAGE_APP: KnownProtocol("text", onReceive=_onTextReceive), + portnums_pb2.PortNum.POSITION_APP: KnownProtocol("position", mesh_pb2.Position, _onPositionReceive), + portnums_pb2.PortNum.NODEINFO_APP: KnownProtocol("user", mesh_pb2.User, _onNodeInfoReceive), + portnums_pb2.PortNum.ADMIN_APP: KnownProtocol("admin", admin_pb2.AdminMessage), + portnums_pb2.PortNum.ROUTING_APP: KnownProtocol("routing", mesh_pb2.Routing), + portnums_pb2.PortNum.ENVIRONMENTAL_MEASUREMENT_APP: KnownProtocol("environmental", environmental_measurement_pb2.EnvironmentalMeasurement), + portnums_pb2.PortNum.REMOTE_HARDWARE_APP: KnownProtocol( + "remotehw", remote_hardware_pb2.HardwareMessage) +}

      Sub-modules

      +
      meshtastic.admin_pb2
      +
      +

      Generated protocol buffer code.

      +
      meshtastic.apponly_pb2

      Generated protocol buffer code.

      @@ -880,6 +1079,10 @@ class TCPInterface(StreamInterface):
      +
      meshtastic.channel_pb2
      +
      +

      Generated protocol buffer code.

      +
      meshtastic.deviceonly_pb2

      Generated protocol buffer code.

      @@ -896,6 +1099,10 @@ class TCPInterface(StreamInterface):

      Generated protocol buffer code.

      +
      meshtastic.radioconfig_pb2
      +
      +

      Generated protocol buffer code.

      +
      meshtastic.remote_hardware
      @@ -1009,7 +1216,6 @@ noProto – If True, don't try to run our protocol on the link - just be a d
      +
      +class KnownProtocol +(name: str, protobufFactory: Callable = None, onReceive: Callable = None) +
      +
      +

      Used to automatically decode known protocol payloads

      +
      + +Expand source code + +
      class KnownProtocol(NamedTuple):
      +    """Used to automatically decode known protocol payloads"""
      +    name: str
      +    # portnum: int, now a key
      +    # If set, will be called to prase as a protocol buffer
      +    protobufFactory: Callable = None
      +    # If set, invoked as onReceive(interface, packet)
      +    onReceive: Callable = None
      +
      +

      Ancestors

      +
        +
      • builtins.tuple
      • +
      +

      Instance variables

      +
      +
      var name : str
      +
      +

      Alias for field number 0

      +
      +
      var onReceive : Callable
      +
      +

      Alias for field number 2

      +
      +
      var protobufFactory : Callable
      +
      +

      Alias for field number 1

      +
      +
      +
      class MeshInterface (debugOut=None, noProto=False) @@ -1057,7 +1302,10 @@ noProto – If True, don't try to run our protocol on the link - just be a d self.nodes = None # FIXME self.isConnected = threading.Event() self.noProto = noProto - random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it + self.myInfo = None # We don't have device info yet + self.responseHandlers = {} # A map from request ID to the handler + self.failure = None # If we've encountered a fatal exception it will be kept here + random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) self._startConfig() @@ -1066,12 +1314,17 @@ noProto – If True, don't try to run our protocol on the link - just be a d def __exit__(self, exc_type, exc_value, traceback): if exc_type is not None and exc_value is not None: - logging.error(f'An exception of type {exc_type} with value {exc_value} has occurred') + logging.error( + f'An exception of type {exc_type} with value {exc_value} has occurred') if traceback is not None: logging.error(f'Traceback: {traceback}') self.close() - def sendText(self, text, destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False): + def sendText(self, text: AnyStr, + destinationId=BROADCAST_ADDR, + wantAck=False, + wantResponse=False, + onResponse=None): """Send a utf8 string to some other node, if the node has a display it will also be shown on the device. Arguments: @@ -1081,13 +1334,20 @@ noProto – If True, don't try to run our protocol on the link - just be a d destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR}) portNum -- the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list wantAck -- True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery) + wantResponse -- True if you want the service on the other side to send an application layer response Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ return self.sendData(text.encode("utf-8"), destinationId, - portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, wantAck=wantAck, wantResponse=wantResponse) + portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, + wantAck=wantAck, + wantResponse=wantResponse, + onResponse=onResponse) - def sendData(self, data, destinationId=BROADCAST_ADDR, portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, wantResponse=False): + def sendData(self, data, destinationId=BROADCAST_ADDR, + portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, + wantResponse=False, + onResponse=None): """Send a data packet to some other node Keyword Arguments: @@ -1095,6 +1355,8 @@ noProto – If True, don't try to run our protocol on the link - just be a d destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR}) portNum -- the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list wantAck -- True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery) + wantResponse -- True if you want the service on the other side to send an application layer response + onResponse -- A closure of the form funct(packet), that will be called when a response packet arrives (or the transaction is NAKed due to non receipt) Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ @@ -1105,10 +1367,14 @@ noProto – If True, don't try to run our protocol on the link - just be a d if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: raise Exception("Data payload too big") meshPacket = mesh_pb2.MeshPacket() - meshPacket.decoded.data.payload = data - meshPacket.decoded.data.portnum = portNum + meshPacket.decoded.payload = data + meshPacket.decoded.portnum = portNum meshPacket.decoded.want_response = wantResponse - return self.sendPacket(meshPacket, destinationId, wantAck=wantAck) + + p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck) + if onResponse is not None: + self._addResponseHandler(p.id, onResponse) + return p def sendPosition(self, latitude=0.0, longitude=0.0, altitude=0, timeSec=0, destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False): """ @@ -1135,18 +1401,29 @@ noProto – If True, don't try to run our protocol on the link - just be a d timeSec = time.time() # returns unix timestamp in seconds p.time = int(timeSec) - return self.sendData(p, destinationId, portNum=portnums_pb2.PortNum.POSITION_APP, wantAck=wantAck, wantResponse=wantResponse) + return self.sendData(p, destinationId, + portNum=portnums_pb2.PortNum.POSITION_APP, + wantAck=wantAck, + wantResponse=wantResponse) - def sendPacket(self, meshPacket, destinationId=BROADCAST_ADDR, wantAck=False): + def _addResponseHandler(self, requestId, callback): + self.responseHandlers[requestId] = ResponseHandler(callback) + + def _sendPacket(self, meshPacket, + destinationId=BROADCAST_ADDR, + wantAck=False): """Send a MeshPacket to the specified node (or if unspecified, broadcast). You probably don't want this - use sendData instead. - Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. + Returns the sent packet. The id field will be populated in this packet and + can be used to track future message acks/naks. """ - self._waitConnected() + + # We allow users to talk to the local node before we've completed the full connection flow... + if(self.myInfo is not None and destinationId != self.myInfo.my_node_num): + self._waitConnected() toRadio = mesh_pb2.ToRadio() - # FIXME add support for non broadcast addresses if destinationId is None: raise Exception("destinationId must not be None") @@ -1169,7 +1446,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d self._sendToRadio(toRadio) return meshPacket - def waitForConfig(self, sleep=.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig')): + def waitForConfig(self, sleep=.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig', 'channels')): """Block until radio config is received. Returns True if config has been received.""" for _ in range(int(maxsecs/sleep)): if all(map(lambda a: getattr(self, a, None), attrs)): @@ -1182,9 +1459,12 @@ noProto – If True, don't try to run our protocol on the link - just be a d if self.radioConfig == None: raise Exception("No RadioConfig has been read") - t = mesh_pb2.ToRadio() - t.set_radio.CopyFrom(self.radioConfig) - self._sendToRadio(t) + p = admin_pb2.AdminMessage() + p.set_radio.CopyFrom(self.radioConfig) + + self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) logging.debug("Wrote config") def getMyNodeInfo(self): @@ -1227,43 +1507,58 @@ noProto – If True, don't try to run our protocol on the link - just be a d short_name = long_name[0] + long_name[1:].translate(trans) if len(short_name) < nChars: short_name = long_name[:nChars] - t = mesh_pb2.ToRadio() + + p = admin_pb2.AdminMessage() + if long_name is not None: - t.set_owner.long_name = long_name + p.set_owner.long_name = long_name if short_name is not None: short_name = short_name.strip() if len(short_name) > nChars: short_name = short_name[:nChars] - t.set_owner.short_name = short_name - self._sendToRadio(t) + p.set_owner.short_name = short_name + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) @property def channelURL(self): """The sharable URL that describes the current channel """ - bytes = self.radioConfig.channel_settings.SerializeToString() + # Only keep the primary/secondary channels, assume primary is first + channelSet = apponly_pb2.ChannelSet() + for c in self.channels: + if c.role != channel_pb2.Channel.Role.DISABLED: + channelSet.settings.append(c.settings) + bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') - return f"https://www.meshtastic.org/c/#{s}" + return f"https://www.meshtastic.org/d/#{s}" - def setURL(self, url, write=True): + def setURL(self, url): """Set mesh network URL""" if self.radioConfig == None: raise Exception("No RadioConfig has been read") - # URLs are of the form https://www.meshtastic.org/c/#{base64_channel_settings} + # URLs are of the form https://www.meshtastic.org/d/#{base64_channel_set} # Split on '/#' to find the base64 encoded channel settings splitURL = url.split("/#") decodedURL = base64.urlsafe_b64decode(splitURL[-1]) - self.radioConfig.channel_settings.ParseFromString(decodedURL) - if write: - self.writeConfig() + channelSet = apponly_pb2.ChannelSet() + channelSet.ParseFromString(decodedURL) + fixme("set self.channels, see https://developers.google.com/protocol-buffers/docs/reference/python-generated?csw=1#repeated-fields") + self._writeChannels() def _waitConnected(self): """Block until the initial node db download is complete, or timeout and raise an exception""" - if not self.isConnected.wait(5.0): # timeout after 5 seconds + if not self.isConnected.wait(5.0): # timeout after 5 seconds raise Exception("Timed out waiting for connection completion") + # If we failed while connecting, raise the connection to the client + if self.failure: + raise self.failure + def _generatePacketId(self): """Get a new unique packet ID""" if self.currentPacketId is None: @@ -1275,13 +1570,15 @@ noProto – If True, don't try to run our protocol on the link - just be a d def _disconnected(self): """Called by subclasses to tell clients this interface has disconnected""" self.isConnected.clear() - pub.sendMessage("meshtastic.connection.lost", interface=self) + catchAndIgnore("disconnection publish", lambda: pub.sendMessage( + "meshtastic.connection.lost", interface=self)) def _connected(self): """Called by this class to tell clients we are now fully connected to a node """ self.isConnected.set() - pub.sendMessage("meshtastic.connection.established", interface=self) + catchAndIgnore("connection publish", lambda: pub.sendMessage( + "meshtastic.connection.established", interface=self)) def _startConfig(self): """Start device packets flowing""" @@ -1289,6 +1586,8 @@ noProto – If True, don't try to run our protocol on the link - just be a d self.nodes = {} # nodes keyed by ID self.nodesByNum = {} # nodes keyed by nodenum self.radioConfig = None + self.channels = None + self.partialChannels = [] # We keep our channels in a temp array until finished startConfig = mesh_pb2.ToRadio() startConfig.want_config_id = MY_CONFIG_ID # we don't use this value @@ -1297,14 +1596,69 @@ noProto – If True, don't try to run our protocol on the link - just be a d def _sendToRadio(self, toRadio): """Send a ToRadio protobuf to the device""" if self.noProto: - logging.warn(f"Not sending packet because protocol use is disabled by noProto") + logging.warn( + f"Not sending packet because protocol use is disabled by noProto") else: + logging.debug(f"Sending toRadio: {toRadio}") self._sendToRadioImpl(toRadio) def _sendToRadioImpl(self, toRadio): """Send a ToRadio protobuf to the device""" logging.error(f"Subclass must provide toradio: {toRadio}") + def _handleConfigComplete(self): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings and channels + """ + self._requestSettings() + self._requestChannel(0) + + def _requestSettings(self): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings + """ + p = admin_pb2.AdminMessage() + p.get_radio_request = True + + def onResponse(p): + """A closure to handle the response packet""" + self.radioConfig = p["decoded"]["admin"]["raw"].get_radio_response + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True, + wantResponse=True, + onResponse=onResponse) + + def _requestChannel(self, channelNum: int): + """ + Done with initial config messages, now send regular MeshPackets to ask for settings + """ + p = admin_pb2.AdminMessage() + p.get_channel_request = channelNum + 1 + logging.debug(f"Requesting channel {channelNum}") + + def onResponse(p): + """A closure to handle the response packet""" + c = p["decoded"]["admin"]["raw"].get_channel_response + self.partialChannels.append(c) + logging.debug(f"Received channel {c}") + # for stress testing, download all channels + # if channelNum >= self.myInfo.max_channels - 1: + if c.role == channel_pb2.Channel.Role.DISABLED or channelNum >= self.myInfo.max_channels - 1: + # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching + self.channels = self.partialChannels + # FIXME, the following should only be called after we have settings and channels + self._connected() # Tell everone else we are ready to go + else: + self._requestChannel(channelNum + 1) + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True, + wantResponse=True, + onResponse=onResponse) + def _handleFromRadio(self, fromRadioBytes): """ Handle a packet that arrived from the radio(update model and publish events) @@ -1316,12 +1670,21 @@ noProto – If True, don't try to run our protocol on the link - just be a d logging.debug(f"Received: {asDict}") if fromRadio.HasField("my_info"): self.myInfo = fromRadio.my_info + + failmsg = None + # Check for app too old if self.myInfo.min_app_version > OUR_APP_VERSION: - raise Exception( - "This device needs a newer python client, please \"pip install --upgrade meshtastic\"") - # start assigning our packet IDs from the opposite side of where our local device is assigning them - elif fromRadio.HasField("radio"): - self.radioConfig = fromRadio.radio + failmsg = "This device needs a newer python client, please \"pip install --upgrade meshtastic\". For more information see https://tinyurl.com/5bjsxu32" + + # check for firmware too old + if self.myInfo.max_channels == 0: + failmsg = "This version of meshtastic-python requires device firmware version 1.2 or later. For more information see https://tinyurl.com/5bjsxu32" + + if failmsg: + self.failure = Exception(failmsg) + self.isConnected.set() # let waitConnected return this exception + self.close() + elif fromRadio.HasField("node_info"): node = asDict["nodeInfo"] try: @@ -1331,10 +1694,11 @@ noProto – If True, don't try to run our protocol on the link - just be a d self.nodesByNum[node["num"]] = node if "user" in node: # Some nodes might not have user/ids assigned yet self.nodes[node["user"]["id"]] = node - pub.sendMessage("meshtastic.node.updated", node=node, interface=self) + pub.sendMessage("meshtastic.node.updated", + node=node, interface=self) elif fromRadio.config_complete_id == MY_CONFIG_ID: # we ignore the config_complete_id, it is unneeded for our stream API fromRadio.config_complete_id - self._connected() + self._handleConfigComplete() elif fromRadio.HasField("packet"): self._handlePacketFromRadio(fromRadio.packet) elif fromRadio.rebooted: @@ -1397,6 +1761,12 @@ noProto – If True, don't try to run our protocol on the link - just be a d """ asDict = google.protobuf.json_format.MessageToDict(meshPacket) + + # We normally decompose the payload into a dictionary so that the client + # doesn't need to understand protobufs. But advanced clients might + # want the raw protobuf, so we provide it in "raw" + asDict["raw"] = meshPacket + # /add fromId and toId fields based on the node ID asDict["fromId"] = self._nodeNumToId(asDict["from"]) asDict["toId"] = self._nodeNumToId(asDict["to"]) @@ -1405,68 +1775,59 @@ noProto – If True, don't try to run our protocol on the link - just be a d # asObj = DotMap(asDict) topic = "meshtastic.receive" # Generic unknown packet type - # Warn users if firmware doesn't use new portnum based data encodings - # But do not crash, because the lib will still basically work and ignore those packet types - if meshPacket.decoded.HasField("user") or meshPacket.decoded.HasField("position"): - logging.warn("Ignoring old position/user message. Recommend you update firmware to 1.1.20 or later") + decoded = asDict["decoded"] + # The default MessageToDict converts byte arrays into base64 strings. + # We don't want that - it messes up data payload. So slam in the correct + # byte array. + decoded["payload"] = meshPacket.decoded.payload - if meshPacket.decoded.HasField("data"): + # UNKNOWN_APP is the default protobuf portnum value, and therefore if not set it will not be populated at all + # to make API usage easier, set it to prevent confusion + if not "portnum" in decoded: + decoded["portnum"] = portnums_pb2.PortNum.Name( + portnums_pb2.PortNum.UNKNOWN_APP) - # The default MessageToDict converts byte arrays into base64 strings. - # We don't want that - it messes up data payload. So slam in the correct - # byte array. - asDict["decoded"]["data"]["payload"] = meshPacket.decoded.data.payload + portnum = decoded["portnum"] - # UNKNOWN_APP is the default protobuf portnum value, and therefore if not set it will not be populated at all - # to make API usage easier, set it to prevent confusion - if not "portnum" in asDict["decoded"]["data"]: - asDict["decoded"]["data"]["portnum"] = portnums_pb2.PortNum.Name(portnums_pb2.PortNum.UNKNOWN_APP) + topic = f"meshtastic.receive.data.{portnum}" - portnum = asDict["decoded"]["data"]["portnum"] + # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg + # move the following into a 'decoders' API that clients could register? + portNumInt = meshPacket.decoded.portnum # we want portnum as an int + handler = protocols.get(portNumInt) + # The decoded protobuf as a dictionary (if we understand this message) + p = None + if handler is not None: + topic = f"meshtastic.receive.{handler.name}" - topic = f"meshtastic.receive.data.{portnum}" - - # For text messages, we go ahead and decode the text to ascii for our users - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.TEXT_MESSAGE_APP): - topic = "meshtastic.receive.text" - - # We don't throw if the utf8 is invalid in the text message. Instead we just don't populate - # the decoded.data.text and we log an error message. This at least allows some delivery to - # the app and the app can deal with the missing decoded representation. - # - # Usually btw this problem is caused by apps sending binary data but setting the payload type to - # text. - try: - asDict["decoded"]["data"]["text"] = meshPacket.decoded.data.payload.decode("utf-8") - except Exception as ex: - logging.error(f"Malformatted utf8 in text message: {ex}") - - # decode position protobufs and update nodedb, provide decoded version as "position" in the published msg - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.POSITION_APP): - topic = "meshtastic.receive.position" - pb = mesh_pb2.Position() - pb.ParseFromString(meshPacket.decoded.data.payload) + # Convert to protobuf if possible + if handler.protobufFactory is not None: + pb = handler.protobufFactory() + pb.ParseFromString(meshPacket.decoded.payload) p = google.protobuf.json_format.MessageToDict(pb) - self._fixupPosition(p) - asDict["decoded"]["data"]["position"] = p - # update node DB as needed - self._getOrCreateByNum(asDict["from"])["position"] = p + asDict["decoded"][handler.name] = p + # Also provide the protobuf raw + asDict["decoded"][handler.name]["raw"] = pb - # decode user protobufs and update nodedb, provide decoded version as "position" in the published msg - if portnum == portnums_pb2.PortNum.Name(portnums_pb2.PortNum.NODEINFO_APP): - topic = "meshtastic.receive.user" - pb = mesh_pb2.User() - pb.ParseFromString(meshPacket.decoded.data.payload) - u = google.protobuf.json_format.MessageToDict(pb) - asDict["decoded"]["data"]["user"] = u - # update node DB as needed - n = self._getOrCreateByNum(asDict["from"]) - n["user"] = u - # We now have a node ID, make sure it is uptodate in that table - self.nodes[u["id"]] = n + # Call specialized onReceive if necessary + if handler.onReceive is not None: + handler.onReceive(self, asDict) + + # Is this message in response to a request, if so, look for a handler + requestId = decoded.get("requestId") + if requestId is not None: + # We ignore ACK packets, but send NAKs and data responses to the handlers + routing = decoded.get("routing") + isAck = routing is not None and ("errorReason" not in routing) + if not isAck: + # we keep the responseHandler in dict until we get a non ack + handler = self.responseHandlers.pop(requestId, None) + if handler is not None: + handler.callback(asDict) logging.debug(f"Publishing topic {topic}") - pub.sendMessage(topic, packet=asDict, interface=self)
      + catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( + topic, packet=asDict, interface=self))

      Subclasses

        @@ -1486,9 +1847,14 @@ noProto – If True, don't try to run our protocol on the link - just be a d def channelURL(self): """The sharable URL that describes the current channel """ - bytes = self.radioConfig.channel_settings.SerializeToString() + # Only keep the primary/secondary channels, assume primary is first + channelSet = apponly_pb2.ChannelSet() + for c in self.channels: + if c.role != channel_pb2.Channel.Role.DISABLED: + channelSet.settings.append(c.settings) + bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') - return f"https://www.meshtastic.org/c/#{s}"
      + return f"https://www.meshtastic.org/d/#{s}"
  • @@ -1558,7 +1924,7 @@ def channelURL(self):
    -def sendData(self, data, destinationId='^all', portNum=256, wantAck=False, wantResponse=False) +def sendData(self, data, destinationId='^all', portNum=256, wantAck=False, wantResponse=False, onResponse=None)

    Send a data packet to some other node

    @@ -1566,13 +1932,18 @@ def channelURL(self): data – the data to send, either as an array of bytes or as a protobuf (which will be automatically serialized to bytes) destinationId {nodeId or nodeNum} – where to send this message (default: {BROADCAST_ADDR}) portNum – the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list -wantAck – True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery)

    +wantAck – True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery) +wantResponse – True if you want the service on the other side to send an application layer response +onResponse – A closure of the form funct(packet), that will be called when a response packet arrives (or the transaction is NAKed due to non receipt)

    Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks.

    Expand source code -
    def sendData(self, data, destinationId=BROADCAST_ADDR, portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, wantResponse=False):
    +
    def sendData(self, data, destinationId=BROADCAST_ADDR,
    +             portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False,
    +             wantResponse=False,
    +             onResponse=None):
         """Send a data packet to some other node
     
         Keyword Arguments:
    @@ -1580,6 +1951,8 @@ wantAck – True if you want the message sent in a reliable manner (with ret
             destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR})
             portNum -- the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list
             wantAck -- True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery)
    +        wantResponse -- True if you want the service on the other side to send an application layer response
    +        onResponse -- A closure of the form funct(packet), that will be called when a response packet arrives (or the transaction is NAKed due to non receipt)
     
         Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks.
         """
    @@ -1590,54 +1963,14 @@ wantAck – True if you want the message sent in a reliable manner (with ret
         if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN:
             raise Exception("Data payload too big")
         meshPacket = mesh_pb2.MeshPacket()
    -    meshPacket.decoded.data.payload = data
    -    meshPacket.decoded.data.portnum = portNum
    +    meshPacket.decoded.payload = data
    +    meshPacket.decoded.portnum = portNum
         meshPacket.decoded.want_response = wantResponse
    -    return self.sendPacket(meshPacket, destinationId, wantAck=wantAck)
    -
    -
    -
    -def sendPacket(self, meshPacket, destinationId='^all', wantAck=False) -
    -
    -

    Send a MeshPacket to the specified node (or if unspecified, broadcast). -You probably don't want this - use sendData instead.

    -

    Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks.

    -
    - -Expand source code - -
    def sendPacket(self, meshPacket, destinationId=BROADCAST_ADDR, wantAck=False):
    -    """Send a MeshPacket to the specified node (or if unspecified, broadcast).
    -    You probably don't want this - use sendData instead.
     
    -    Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks.
    -    """
    -    self._waitConnected()
    -
    -    toRadio = mesh_pb2.ToRadio()
    -    # FIXME add support for non broadcast addresses
    -
    -    if destinationId is None:
    -        raise Exception("destinationId must not be None")
    -    elif isinstance(destinationId, int):
    -        nodeNum = destinationId
    -    elif destinationId == BROADCAST_ADDR:
    -        nodeNum = BROADCAST_NUM
    -    else:
    -        nodeNum = self.nodes[destinationId]['num']
    -
    -    meshPacket.to = nodeNum
    -    meshPacket.want_ack = wantAck
    -
    -    # if the user hasn't set an ID for this packet (likely and recommended), we should pick a new unique ID
    -    # so the message can be tracked.
    -    if meshPacket.id == 0:
    -        meshPacket.id = self._generatePacketId()
    -
    -    toRadio.packet.CopyFrom(meshPacket)
    -    self._sendToRadio(toRadio)
    -    return meshPacket
    + p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck) + if onResponse is not None: + self._addResponseHandler(p.id, onResponse) + return p
    @@ -1678,11 +2011,14 @@ the local position.

    timeSec = time.time() # returns unix timestamp in seconds p.time = int(timeSec) - return self.sendData(p, destinationId, portNum=portnums_pb2.PortNum.POSITION_APP, wantAck=wantAck, wantResponse=wantResponse)
    + return self.sendData(p, destinationId, + portNum=portnums_pb2.PortNum.POSITION_APP, + wantAck=wantAck, + wantResponse=wantResponse)
    -def sendText(self, text, destinationId='^all', wantAck=False, wantResponse=False) +def sendText(self, text: ~AnyStr, destinationId='^all', wantAck=False, wantResponse=False, onResponse=None)

    Send a utf8 string to some other node, if the node has a display it will also be shown on the device.

    @@ -1691,13 +2027,18 @@ the local position.

    Keyword Arguments: destinationId {nodeId or nodeNum} – where to send this message (default: {BROADCAST_ADDR}) portNum – the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list -wantAck – True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery)

    +wantAck – True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery) +wantResponse – True if you want the service on the other side to send an application layer response

    Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks.

    Expand source code -
    def sendText(self, text, destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False):
    +
    def sendText(self, text: AnyStr,
    +             destinationId=BROADCAST_ADDR,
    +             wantAck=False,
    +             wantResponse=False,
    +             onResponse=None):
         """Send a utf8 string to some other node, if the node has a display it will also be shown on the device.
     
         Arguments:
    @@ -1707,11 +2048,15 @@ wantAck – True if you want the message sent in a reliable manner (with ret
             destinationId {nodeId or nodeNum} -- where to send this message (default: {BROADCAST_ADDR})
             portNum -- the application portnum (similar to IP port numbers) of the destination, see portnums.proto for a list
             wantAck -- True if you want the message sent in a reliable manner (with retries and ack/nak provided for delivery)
    +        wantResponse -- True if you want the service on the other side to send an application layer response
     
         Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks.
         """
         return self.sendData(text.encode("utf-8"), destinationId,
    -                         portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, wantAck=wantAck, wantResponse=wantResponse)
    + portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, + wantAck=wantAck, + wantResponse=wantResponse, + onResponse=onResponse)
    @@ -1740,19 +2085,24 @@ wantAck – True if you want the message sent in a reliable manner (with ret short_name = long_name[0] + long_name[1:].translate(trans) if len(short_name) < nChars: short_name = long_name[:nChars] - t = mesh_pb2.ToRadio() + + p = admin_pb2.AdminMessage() + if long_name is not None: - t.set_owner.long_name = long_name + p.set_owner.long_name = long_name if short_name is not None: short_name = short_name.strip() if len(short_name) > nChars: short_name = short_name[:nChars] - t.set_owner.short_name = short_name - self._sendToRadio(t) + p.set_owner.short_name = short_name + + return self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True)
    -def setURL(self, url, write=True) +def setURL(self, url)

    Set mesh network URL

    @@ -1760,22 +2110,23 @@ wantAck – True if you want the message sent in a reliable manner (with ret Expand source code -
    def setURL(self, url, write=True):
    +
    def setURL(self, url):
         """Set mesh network URL"""
         if self.radioConfig == None:
             raise Exception("No RadioConfig has been read")
     
    -    # URLs are of the form https://www.meshtastic.org/c/#{base64_channel_settings}
    +    # URLs are of the form https://www.meshtastic.org/d/#{base64_channel_set}
         # Split on '/#' to find the base64 encoded channel settings
         splitURL = url.split("/#")
         decodedURL = base64.urlsafe_b64decode(splitURL[-1])
    -    self.radioConfig.channel_settings.ParseFromString(decodedURL)
    -    if write:
    -        self.writeConfig()
    + channelSet = apponly_pb2.ChannelSet() + channelSet.ParseFromString(decodedURL) + fixme("set self.channels, see https://developers.google.com/protocol-buffers/docs/reference/python-generated?csw=1#repeated-fields") + self._writeChannels()
    -def waitForConfig(self, sleep=0.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig')) +def waitForConfig(self, sleep=0.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig', 'channels'))

    Block until radio config is received. Returns True if config has been received.

    @@ -1783,7 +2134,7 @@ wantAck – True if you want the message sent in a reliable manner (with ret Expand source code -
    def waitForConfig(self, sleep=.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig')):
    +
    def waitForConfig(self, sleep=.1, maxsecs=20, attrs=('myInfo', 'nodes', 'radioConfig', 'channels')):
         """Block until radio config is received. Returns True if config has been received."""
         for _ in range(int(maxsecs/sleep)):
             if all(map(lambda a: getattr(self, a, None), attrs)):
    @@ -1806,14 +2157,44 @@ wantAck – True if you want the message sent in a reliable manner (with ret
         if self.radioConfig == None:
             raise Exception("No RadioConfig has been read")
     
    -    t = mesh_pb2.ToRadio()
    -    t.set_radio.CopyFrom(self.radioConfig)
    -    self._sendToRadio(t)
    +    p = admin_pb2.AdminMessage()
    +    p.set_radio.CopyFrom(self.radioConfig)
    +
    +    self.sendData(p, self.myInfo.my_node_num,
    +                         portNum=portnums_pb2.PortNum.ADMIN_APP,
    +                         wantAck=True)
         logging.debug("Wrote config")
    +
    +class ResponseHandler +(callback: Callable) +
    +
    +

    A pending response callback, waiting for a response to one of our messages

    +
    + +Expand source code + +
    class ResponseHandler(NamedTuple):
    +    """A pending response callback, waiting for a response to one of our messages"""
    +    # requestId: int - used only as a key
    +    callback: Callable
    +
    +

    Ancestors

    +
      +
    • builtins.tuple
    • +
    +

    Instance variables

    +
    +
    var callback : Callable
    +
    +

    Alias for field number 0

    +
    +
    +
    class SerialInterface (devPath=None, debugOut=None, noProto=False, connectNow=True) @@ -1884,7 +2265,6 @@ debugOut {stream} – If a stream is provided, any debug serial output from
  • close
  • connect
  • sendData
  • -
  • sendPacket
  • sendPosition
  • sendText
  • setOwner
  • @@ -1958,7 +2338,7 @@ debugOut {stream} – If a stream is provided, any debug serial output from time.sleep(0.1) # wait 100ms to give device time to start running self._rxThread.start() - if not self.noProto: # Wait for the db download if using the protocol + if not self.noProto: # Wait for the db download if using the protocol self._waitConnected() def _disconnected(self): @@ -2044,13 +2424,16 @@ debugOut {stream} – If a stream is provided, any debug serial output from # logging.debug(f"timeout") pass except serial.SerialException as ex: - if not self._wantExit: # We might intentionally get an exception during shutdown - logging.warn(f"Meshtastic serial port disconnected, disconnecting... {ex}") + if not self._wantExit: # We might intentionally get an exception during shutdown + logging.warn( + f"Meshtastic serial port disconnected, disconnecting... {ex}") except OSError as ex: - if not self._wantExit: # We might intentionally get an exception during shutdown - logging.error(f"Unexpected OSError, terminating meshtastic reader... {ex}") + if not self._wantExit: # We might intentionally get an exception during shutdown + logging.error( + f"Unexpected OSError, terminating meshtastic reader... {ex}") except Exception as ex: - logging.error(f"Unexpected exception, terminating meshtastic reader... {ex}") + logging.error( + f"Unexpected exception, terminating meshtastic reader... {ex}") finally: logging.debug("reader is exiting") self._disconnected()
    @@ -2107,7 +2490,7 @@ start the reading thread later.

    time.sleep(0.1) # wait 100ms to give device time to start running self._rxThread.start() - if not self.noProto: # Wait for the db download if using the protocol + if not self.noProto: # Wait for the db download if using the protocol self._waitConnected()
    @@ -2118,7 +2501,6 @@ start the reading thread later.

    • channelURL
    • sendData
    • -
    • sendPacket
    • sendPosition
    • sendText
    • setOwner
    • @@ -2131,7 +2513,7 @@ start the reading thread later.

      class TCPInterface -(hostname, debugOut=None, noProto=False, connectNow=True, portNumber=4403) +(hostname: ~AnyStr, debugOut=None, noProto=False, connectNow=True, portNumber=4403)

      Interface class for meshtastic devices over a TCP link

      @@ -2145,7 +2527,7 @@ hostname {string} – Hostname/IP address of the device to connect to

      class TCPInterface(StreamInterface): """Interface class for meshtastic devices over a TCP link""" - def __init__(self, hostname, debugOut=None, noProto=False, connectNow=True, portNumber=4403): + def __init__(self, hostname: AnyStr, debugOut=None, noProto=False, connectNow=True, portNumber=4403): """Constructor, opens a connection to a specified IP address/hostname Keyword Arguments: @@ -2168,9 +2550,9 @@ hostname {string} – Hostname/IP address of the device to connect to

      close
    • connect
    • sendData
    • -
    • sendPacket
    • sendPosition
    • sendText
    • setOwner
    • @@ -2223,12 +2604,15 @@ hostname {string} – Hostname/IP address of the device to connect to

    • Sub-modules

        +
      • meshtastic.admin_pb2
      • meshtastic.apponly_pb2
      • meshtastic.ble
      • +
      • meshtastic.channel_pb2
      • meshtastic.deviceonly_pb2
      • meshtastic.environmental_measurement_pb2
      • meshtastic.mesh_pb2
      • meshtastic.portnums_pb2
      • +
      • meshtastic.radioconfig_pb2
      • meshtastic.remote_hardware
      • meshtastic.remote_hardware_pb2
      • meshtastic.test
      • @@ -2250,6 +2634,14 @@ hostname {string} – Hostname/IP address of the device to connect to

      • +

        KnownProtocol

        + +
      • +
      • MeshInterface

        • channelURL
        • @@ -2258,7 +2650,6 @@ hostname {string} – Hostname/IP address of the device to connect to

          getMyUser
        • getShortName
        • sendData
        • -
        • sendPacket
        • sendPosition
        • sendText
        • setOwner
        • @@ -2268,6 +2659,12 @@ hostname {string} – Hostname/IP address of the device to connect to

        • +

          ResponseHandler

          + +
        • +
        • SerialInterface

        • diff --git a/docs/meshtastic/mesh_pb2.html b/docs/meshtastic/mesh_pb2.html index 667721c..7e4b856 100644 --- a/docs/meshtastic/mesh_pb2.html +++ b/docs/meshtastic/mesh_pb2.html @@ -50,56 +50,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\nMeshProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"j\n\x08Position\x12\x12\n\nlatitude_i\x18\x07 \x01(\x11\x12\x13\n\x0blongitude_i\x18\x08 \x01(\x11\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07\"2\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x05\"\xeb\x02\n\tSubPacket\x12\x15\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x05.DataH\x00\x12(\n\rroute_request\x18\x06 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x07 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12$\n\x0c\x65rror_reason\x18\r \x01(\x0e\x32\x0c.ErrorReasonH\x00\x12!\n\x08position\x18\x01 \x01(\x0b\x32\t.PositionB\x02\x18\x01H\x00\x12\x19\n\x04user\x18\x04 \x01(\x0b\x32\x05.UserB\x02\x18\x01H\x00\x12\x15\n\rwant_response\x18\x05 \x01(\x08\x12\x14\n\nsuccess_id\x18\n \x01(\rH\x01\x12\x11\n\x07\x66\x61il_id\x18\x0b \x01(\rH\x01\x12\x0c\n\x04\x64\x65st\x18\t \x01(\r\x12\x0e\n\x06source\x18\x0c \x01(\r\x12\x13\n\x0boriginal_id\x18\x02 \x01(\rB\x10\n\x0epayloadVariantB\x0c\n\nackVariant\"\xda\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\r\x12\n\n\x02to\x18\x02 \x01(\r\x12\x15\n\rchannel_index\x18\x04 \x01(\r\x12\x1d\n\x07\x64\x65\x63oded\x18\x03 \x01(\x0b\x32\n.SubPacketH\x00\x12\x13\n\tencrypted\x18\x08 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\r\x12\x0f\n\x07rx_time\x18\t \x01(\x07\x12\x0e\n\x06rx_snr\x18\x07 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"\xe6\x02\n\x0f\x43hannelSettings\x12\x10\n\x08tx_power\x18\x01 \x01(\x05\x12\x32\n\x0cmodem_config\x18\x03 \x01(\x0e\x32\x1c.ChannelSettings.ModemConfig\x12\x11\n\tbandwidth\x18\x06 \x01(\r\x12\x15\n\rspread_factor\x18\x07 \x01(\r\x12\x13\n\x0b\x63oding_rate\x18\x08 \x01(\r\x12\x13\n\x0b\x63hannel_num\x18\t \x01(\r\x12\x0b\n\x03psk\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\n\n\x02id\x18\n \x01(\x07\x12\x16\n\x0euplink_enabled\x18\x10 \x01(\x08\x12\x18\n\x10\x64ownlink_enabled\x18\x11 \x01(\x08\"`\n\x0bModemConfig\x12\x12\n\x0e\x42w125Cr45Sf128\x10\x00\x12\x12\n\x0e\x42w500Cr45Sf128\x10\x01\x12\x14\n\x10\x42w31_25Cr48Sf512\x10\x02\x12\x13\n\x0f\x42w125Cr48Sf4096\x10\x03\"\xb9\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x12.\n\x10\x63hannel_settings\x18\x02 \x01(\x0b\x32\x10.ChannelSettingsB\x02\x18\x01\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xe1\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x14\n\x0cnum_channels\x18\x03 \x01(\x05\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x16\n\x0epacket_id_bits\x18\n \x01(\r\x12\x1d\n\x11\x63urrent_packet_id\x18\x0b \x01(\rB\x02\x18\x01\x12\x15\n\rnode_num_bits\x18\x0c \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xa1\x02\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12\x1d\n\x05radio\x18\x06 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x12#\n\x07\x63hannel\x18\n \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant\"\xbc\x01\n\x07ToRadio\x12\x1d\n\x06packet\x18\x01 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x12!\n\tset_radio\x18\x65 \x01(\x0b\x32\x0c.RadioConfigH\x00\x12\x1a\n\tset_owner\x18\x66 \x01(\x0b\x32\x05.UserH\x00\x12\'\n\x0bset_channel\x18g \x01(\x0b\x32\x10.ChannelSettingsH\x00\x42\x10\n\x0epayloadVariant*e\n\x0b\x45rrorReason\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\nmesh.proto\x1a\x0eportnums.proto\"v\n\x08Position\x12\x12\n\nlatitude_i\x18\x01 \x01(\x0f\x12\x13\n\x0blongitude_i\x18\x02 \x01(\x0f\x12\x10\n\x08\x61ltitude\x18\x03 \x01(\x05\x12\x15\n\rbattery_level\x18\x04 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x07J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\t\"J\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tlong_name\x18\x02 \x01(\t\x12\x12\n\nshort_name\x18\x03 \x01(\t\x12\x0f\n\x07macaddr\x18\x04 \x01(\x0c\"\x1f\n\x0eRouteDiscovery\x12\r\n\x05route\x18\x02 \x03(\x07\"\x8e\x02\n\x07Routing\x12(\n\rroute_request\x18\x01 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0broute_reply\x18\x02 \x01(\x0b\x32\x0f.RouteDiscoveryH\x00\x12&\n\x0c\x65rror_reason\x18\x03 \x01(\x0e\x32\x0e.Routing.ErrorH\x00\"~\n\x05\x45rror\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08NO_ROUTE\x10\x01\x12\x0b\n\x07GOT_NAK\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\x10\n\x0cNO_INTERFACE\x10\x04\x12\x12\n\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n\nNO_CHANNEL\x10\x06\x12\r\n\tTOO_LARGE\x10\x07\x42\t\n\x07variant\"{\n\x04\x44\x61ta\x12\x19\n\x07portnum\x18\x01 \x01(\x0e\x32\x08.PortNum\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x15\n\rwant_response\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x65st\x18\x04 \x01(\x07\x12\x0e\n\x06source\x18\x05 \x01(\x07\x12\x12\n\nrequest_id\x18\x06 \x01(\x07\"\xcf\x02\n\nMeshPacket\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x07\x12\n\n\x02to\x18\x02 \x01(\x07\x12\x0f\n\x07\x63hannel\x18\x03 \x01(\r\x12\x18\n\x07\x64\x65\x63oded\x18\x04 \x01(\x0b\x32\x05.DataH\x00\x12\x13\n\tencrypted\x18\x05 \x01(\x0cH\x00\x12\n\n\x02id\x18\x06 \x01(\x07\x12\x0f\n\x07rx_time\x18\x07 \x01(\x07\x12\x0e\n\x06rx_snr\x18\x08 \x01(\x02\x12\x11\n\thop_limit\x18\n \x01(\r\x12\x10\n\x08want_ack\x18\x0b \x01(\x08\x12&\n\x08priority\x18\x0c \x01(\x0e\x32\x14.MeshPacket.Priority\"[\n\x08Priority\x12\t\n\x05UNSET\x10\x00\x12\x07\n\x03MIN\x10\x01\x12\x0e\n\nBACKGROUND\x10\n\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10@\x12\x0c\n\x08RELIABLE\x10\x46\x12\x07\n\x03\x41\x43K\x10x\x12\x07\n\x03MAX\x10\x7f\x42\x10\n\x0epayloadVariant\"h\n\x08NodeInfo\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x13\n\x04user\x18\x02 \x01(\x0b\x32\x05.User\x12\x1b\n\x08position\x18\x03 \x01(\x0b\x32\t.Position\x12\x0b\n\x03snr\x18\x07 \x01(\x02\x12\x10\n\x08next_hop\x18\x05 \x01(\r\"\xa6\x02\n\nMyNodeInfo\x12\x13\n\x0bmy_node_num\x18\x01 \x01(\r\x12\x0f\n\x07has_gps\x18\x02 \x01(\x08\x12\x11\n\tnum_bands\x18\x03 \x01(\r\x12\x14\n\x0cmax_channels\x18\x0f \x01(\r\x12\x12\n\x06region\x18\x04 \x01(\tB\x02\x18\x01\x12\x10\n\x08hw_model\x18\x05 \x01(\t\x12\x18\n\x10\x66irmware_version\x18\x06 \x01(\t\x12&\n\nerror_code\x18\x07 \x01(\x0e\x32\x12.CriticalErrorCode\x12\x15\n\rerror_address\x18\x08 \x01(\r\x12\x13\n\x0b\x65rror_count\x18\t \x01(\r\x12\x1c\n\x14message_timeout_msec\x18\r \x01(\r\x12\x17\n\x0fmin_app_version\x18\x0e \x01(\r\"\xb5\x01\n\tLogRecord\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04time\x18\x02 \x01(\x07\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x1f\n\x05level\x18\x04 \x01(\x0e\x32\x10.LogRecord.Level\"X\n\x05Level\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x32\x12\t\n\x05\x45RROR\x10(\x12\x0b\n\x07WARNING\x10\x1e\x12\x08\n\x04INFO\x10\x14\x12\t\n\x05\x44\x45\x42UG\x10\n\x12\t\n\x05TRACE\x10\x05\"\xe9\x01\n\tFromRadio\x12\x0b\n\x03num\x18\x01 \x01(\r\x12\x1d\n\x06packet\x18\x0b \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x1e\n\x07my_info\x18\x03 \x01(\x0b\x32\x0b.MyNodeInfoH\x00\x12\x1e\n\tnode_info\x18\x04 \x01(\x0b\x32\t.NodeInfoH\x00\x12 \n\nlog_record\x18\x07 \x01(\x0b\x32\n.LogRecordH\x00\x12\x1c\n\x12\x63onfig_complete_id\x18\x08 \x01(\rH\x00\x12\x12\n\x08rebooted\x18\t \x01(\x08H\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x02\x10\x03J\x04\x08\x06\x10\x07\"l\n\x07ToRadio\x12\x1d\n\x06packet\x18\x02 \x01(\x0b\x32\x0b.MeshPacketH\x00\x12\x18\n\x0ewant_config_id\x18\x64 \x01(\rH\x00\x42\x10\n\x0epayloadVariantJ\x04\x08\x01\x10\x02J\x04\x08\x65\x10\x66J\x04\x08\x66\x10gJ\x04\x08g\x10h*.\n\tConstants\x12\n\n\x06Unused\x10\x00\x12\x15\n\x10\x44\x41TA_PAYLOAD_LEN\x10\xf0\x01*\xaf\x01\n\x11\x43riticalErrorCode\x12\x08\n\x04None\x10\x00\x12\x0e\n\nTxWatchdog\x10\x01\x12\x12\n\x0eSleepEnterWait\x10\x02\x12\x0b\n\x07NoRadio\x10\x03\x12\x0f\n\x0bUnspecified\x10\x04\x12\x13\n\x0fUBloxInitFailed\x10\x05\x12\x0c\n\x08NoAXP192\x10\x06\x12\x17\n\x13InvalidRadioSetting\x10\x07\x12\x12\n\x0eTransmitFailed\x10\x08\x42#\n\x13\x63om.geeksville.meshB\nMeshProtosH\x03\x62\x06proto3' , dependencies=[portnums__pb2.DESCRIPTOR,]) -_ERRORREASON = _descriptor.EnumDescriptor( - name='ErrorReason', - full_name='ErrorReason', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='NONE', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='NO_ROUTE', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GOT_NAK', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='TIMEOUT', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='NO_INTERFACE', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MAX_RETRANSMIT', index=5, number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4228, - serialized_end=4329, -) -_sym_db.RegisterEnumDescriptor(_ERRORREASON) - -ErrorReason = enum_type_wrapper.EnumTypeWrapper(_ERRORREASON) _CONSTANTS = _descriptor.EnumDescriptor( name='Constants', full_name='Constants', @@ -120,246 +74,12 @@ _CONSTANTS = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4331, - serialized_end=4377, + serialized_start=1928, + serialized_end=1974, ) _sym_db.RegisterEnumDescriptor(_CONSTANTS) Constants = enum_type_wrapper.EnumTypeWrapper(_CONSTANTS) -_REGIONCODE = _descriptor.EnumDescriptor( - name='RegionCode', - full_name='RegionCode', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='Unset', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='US', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='EU433', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='EU865', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='CN', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='JP', index=5, number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='ANZ', index=6, number=6, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='KR', index=7, number=7, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='TW', index=8, number=8, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4379, - serialized_end=4473, -) -_sym_db.RegisterEnumDescriptor(_REGIONCODE) - -RegionCode = enum_type_wrapper.EnumTypeWrapper(_REGIONCODE) -_CHARGECURRENT = _descriptor.EnumDescriptor( - name='ChargeCurrent', - full_name='ChargeCurrent', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='MAUnset', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA100', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA190', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA280', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA360', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA450', index=5, number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA550', index=6, number=6, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA630', index=7, number=7, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA700', index=8, number=8, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA780', index=9, number=9, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA880', index=10, number=10, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA960', index=11, number=11, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1000', index=12, number=12, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1080', index=13, number=13, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1160', index=14, number=14, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1240', index=15, number=15, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MA1320', index=16, number=16, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4476, - serialized_end=4685, -) -_sym_db.RegisterEnumDescriptor(_CHARGECURRENT) - -ChargeCurrent = enum_type_wrapper.EnumTypeWrapper(_CHARGECURRENT) -_GPSOPERATION = _descriptor.EnumDescriptor( - name='GpsOperation', - full_name='GpsOperation', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='GpsOpUnset', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GpsOpStationary', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GpsOpMobile', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GpsOpTimeOnly', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='GpsOpDisabled', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4687, - serialized_end=4793, -) -_sym_db.RegisterEnumDescriptor(_GPSOPERATION) - -GpsOperation = enum_type_wrapper.EnumTypeWrapper(_GPSOPERATION) -_LOCATIONSHARING = _descriptor.EnumDescriptor( - name='LocationSharing', - full_name='LocationSharing', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='LocUnset', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='LocEnabled', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='LocDisabled', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4795, - serialized_end=4859, -) -_sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) - -LocationSharing = enum_type_wrapper.EnumTypeWrapper(_LOCATIONSHARING) _CRITICALERRORCODE = _descriptor.EnumDescriptor( name='CriticalErrorCode', full_name='CriticalErrorCode', @@ -415,54 +135,14 @@ _CRITICALERRORCODE = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=4862, - serialized_end=5037, + serialized_start=1977, + serialized_end=2152, ) _sym_db.RegisterEnumDescriptor(_CRITICALERRORCODE) CriticalErrorCode = enum_type_wrapper.EnumTypeWrapper(_CRITICALERRORCODE) -NONE = 0 -NO_ROUTE = 1 -GOT_NAK = 2 -TIMEOUT = 3 -NO_INTERFACE = 4 -MAX_RETRANSMIT = 5 Unused = 0 DATA_PAYLOAD_LEN = 240 -Unset = 0 -US = 1 -EU433 = 2 -EU865 = 3 -CN = 4 -JP = 5 -ANZ = 6 -KR = 7 -TW = 8 -MAUnset = 0 -MA100 = 1 -MA190 = 2 -MA280 = 3 -MA360 = 4 -MA450 = 5 -MA550 = 6 -MA630 = 7 -MA700 = 8 -MA780 = 9 -MA880 = 10 -MA960 = 11 -MA1000 = 12 -MA1080 = 13 -MA1160 = 14 -MA1240 = 15 -MA1320 = 16 -GpsOpUnset = 0 -GpsOpStationary = 1 -GpsOpMobile = 2 -GpsOpTimeOnly = 3 -GpsOpDisabled = 4 -LocUnset = 0 -LocEnabled = 1 -LocDisabled = 2 globals()['None'] = 0 TxWatchdog = 1 SleepEnterWait = 2 @@ -474,6 +154,61 @@ InvalidRadioSetting = 7 TransmitFailed = 8 +_ROUTING_ERROR = _descriptor.EnumDescriptor( + name='Error', + full_name='Routing.Error', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='NONE', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NO_ROUTE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GOT_NAK', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TIMEOUT', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NO_INTERFACE', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MAX_RETRANSMIT', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NO_CHANNEL', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TOO_LARGE', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=393, + serialized_end=519, +) +_sym_db.RegisterEnumDescriptor(_ROUTING_ERROR) + _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( name='Priority', full_name='MeshPacket.Priority', @@ -519,46 +254,11 @@ _MESHPACKET_PRIORITY = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=903, - serialized_end=994, + serialized_start=884, + serialized_end=975, ) _sym_db.RegisterEnumDescriptor(_MESHPACKET_PRIORITY) -_CHANNELSETTINGS_MODEMCONFIG = _descriptor.EnumDescriptor( - name='ModemConfig', - full_name='ChannelSettings.ModemConfig', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='Bw125Cr45Sf128', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='Bw500Cr45Sf128', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='Bw31_25Cr48Sf512', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='Bw125Cr48Sf4096', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=1277, - serialized_end=1373, -) -_sym_db.RegisterEnumDescriptor(_CHANNELSETTINGS_MODEMCONFIG) - _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( name='Level', full_name='LogRecord.Level', @@ -604,8 +304,8 @@ _LOGRECORD_LEVEL = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=3655, - serialized_end=3743, + serialized_start=1492, + serialized_end=1580, ) _sym_db.RegisterEnumDescriptor(_LOGRECORD_LEVEL) @@ -620,14 +320,14 @@ _POSITION = _descriptor.Descriptor( fields=[ _descriptor.FieldDescriptor( name='latitude_i', full_name='Position.latitude_i', index=0, - number=7, type=17, cpp_type=1, label=1, + number=1, type=15, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='longitude_i', full_name='Position.longitude_i', index=1, - number=8, type=17, cpp_type=1, label=1, + number=2, type=15, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -666,46 +366,7 @@ _POSITION = _descriptor.Descriptor( oneofs=[ ], serialized_start=30, - serialized_end=136, -) - - -_DATA = _descriptor.Descriptor( - name='Data', - full_name='Data', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='portnum', full_name='Data.portnum', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='payload', full_name='Data.payload', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=138, - serialized_end=188, + serialized_end=148, ) @@ -757,8 +418,8 @@ _USER = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=190, - serialized_end=264, + serialized_start=150, + serialized_end=224, ) @@ -772,7 +433,7 @@ _ROUTEDISCOVERY = _descriptor.Descriptor( fields=[ _descriptor.FieldDescriptor( name='route', full_name='RouteDiscovery.route', index=0, - number=2, type=5, cpp_type=1, label=3, + number=2, type=7, cpp_type=3, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -789,99 +450,109 @@ _ROUTEDISCOVERY = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=266, - serialized_end=297, + serialized_start=226, + serialized_end=257, ) -_SUBPACKET = _descriptor.Descriptor( - name='SubPacket', - full_name='SubPacket', +_ROUTING = _descriptor.Descriptor( + name='Routing', + full_name='Routing', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='data', full_name='SubPacket.data', index=0, - number=3, type=11, cpp_type=10, label=1, + name='route_request', full_name='Routing.route_request', index=0, + number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='route_request', full_name='SubPacket.route_request', index=1, - number=6, type=11, cpp_type=10, label=1, + name='route_reply', full_name='Routing.route_reply', index=1, + number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='route_reply', full_name='SubPacket.route_reply', index=2, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='error_reason', full_name='Routing.error_reason', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _ROUTING_ERROR, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='variant', full_name='Routing.variant', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=260, + serialized_end=530, +) + + +_DATA = _descriptor.Descriptor( + name='Data', + full_name='Data', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ _descriptor.FieldDescriptor( - name='error_reason', full_name='SubPacket.error_reason', index=3, - number=13, type=14, cpp_type=8, label=1, + name='portnum', full_name='Data.portnum', index=0, + number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='position', full_name='SubPacket.position', index=4, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='payload', full_name='Data.payload', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='user', full_name='SubPacket.user', index=5, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='want_response', full_name='SubPacket.want_response', index=6, - number=5, type=8, cpp_type=7, label=1, + name='want_response', full_name='Data.want_response', index=2, + number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='success_id', full_name='SubPacket.success_id', index=7, - number=10, type=13, cpp_type=3, label=1, + name='dest', full_name='Data.dest', index=3, + number=4, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='fail_id', full_name='SubPacket.fail_id', index=8, - number=11, type=13, cpp_type=3, label=1, + name='source', full_name='Data.source', index=4, + number=5, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='dest', full_name='SubPacket.dest', index=9, - number=9, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='source', full_name='SubPacket.source', index=10, - number=12, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='original_id', full_name='SubPacket.original_id', index=11, - number=2, type=13, cpp_type=3, label=1, + name='request_id', full_name='Data.request_id', index=5, + number=6, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -897,19 +568,9 @@ _SUBPACKET = _descriptor.Descriptor( syntax='proto3', extension_ranges=[], oneofs=[ - _descriptor.OneofDescriptor( - name='payloadVariant', full_name='SubPacket.payloadVariant', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - _descriptor.OneofDescriptor( - name='ackVariant', full_name='SubPacket.ackVariant', - index=1, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), ], - serialized_start=300, - serialized_end=663, + serialized_start=532, + serialized_end=655, ) @@ -923,56 +584,56 @@ _MESHPACKET = _descriptor.Descriptor( fields=[ _descriptor.FieldDescriptor( name='from', full_name='MeshPacket.from', index=0, - number=1, type=13, cpp_type=3, label=1, + number=1, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='to', full_name='MeshPacket.to', index=1, - number=2, type=13, cpp_type=3, label=1, + number=2, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='channel_index', full_name='MeshPacket.channel_index', index=2, - number=4, type=13, cpp_type=3, label=1, + name='channel', full_name='MeshPacket.channel', index=2, + number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='decoded', full_name='MeshPacket.decoded', index=3, - number=3, type=11, cpp_type=10, label=1, + number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='encrypted', full_name='MeshPacket.encrypted', index=4, - number=8, type=12, cpp_type=9, label=1, + number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='id', full_name='MeshPacket.id', index=5, - number=6, type=13, cpp_type=3, label=1, + number=6, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rx_time', full_name='MeshPacket.rx_time', index=6, - number=9, type=7, cpp_type=3, label=1, + number=7, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rx_snr', full_name='MeshPacket.rx_snr', index=7, - number=7, type=2, cpp_type=6, label=1, + number=8, type=2, cpp_type=6, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1016,503 +677,8 @@ _MESHPACKET = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=666, - serialized_end=1012, -) - - -_CHANNELSETTINGS = _descriptor.Descriptor( - name='ChannelSettings', - full_name='ChannelSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='tx_power', full_name='ChannelSettings.tx_power', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='modem_config', full_name='ChannelSettings.modem_config', index=1, - number=3, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='bandwidth', full_name='ChannelSettings.bandwidth', index=2, - number=6, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='spread_factor', full_name='ChannelSettings.spread_factor', index=3, - number=7, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='coding_rate', full_name='ChannelSettings.coding_rate', index=4, - number=8, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='channel_num', full_name='ChannelSettings.channel_num', index=5, - number=9, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='psk', full_name='ChannelSettings.psk', index=6, - number=4, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='name', full_name='ChannelSettings.name', index=7, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='id', full_name='ChannelSettings.id', index=8, - number=10, type=7, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='uplink_enabled', full_name='ChannelSettings.uplink_enabled', index=9, - number=16, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='downlink_enabled', full_name='ChannelSettings.downlink_enabled', index=10, - number=17, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _CHANNELSETTINGS_MODEMCONFIG, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1015, - serialized_end=1373, -) - - -_RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( - name='UserPreferences', - full_name='RadioConfig.UserPreferences', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='position_broadcast_secs', full_name='RadioConfig.UserPreferences.position_broadcast_secs', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='send_owner_interval', full_name='RadioConfig.UserPreferences.send_owner_interval', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wait_bluetooth_secs', full_name='RadioConfig.UserPreferences.wait_bluetooth_secs', index=2, - number=4, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='screen_on_secs', full_name='RadioConfig.UserPreferences.screen_on_secs', index=3, - number=5, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='phone_timeout_secs', full_name='RadioConfig.UserPreferences.phone_timeout_secs', index=4, - number=6, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='phone_sds_timeout_sec', full_name='RadioConfig.UserPreferences.phone_sds_timeout_sec', index=5, - number=7, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='mesh_sds_timeout_secs', full_name='RadioConfig.UserPreferences.mesh_sds_timeout_secs', index=6, - number=8, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='sds_secs', full_name='RadioConfig.UserPreferences.sds_secs', index=7, - number=9, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ls_secs', full_name='RadioConfig.UserPreferences.ls_secs', index=8, - number=10, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='min_wake_secs', full_name='RadioConfig.UserPreferences.min_wake_secs', index=9, - number=11, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wifi_ssid', full_name='RadioConfig.UserPreferences.wifi_ssid', index=10, - number=12, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wifi_password', full_name='RadioConfig.UserPreferences.wifi_password', index=11, - number=13, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wifi_ap_mode', full_name='RadioConfig.UserPreferences.wifi_ap_mode', index=12, - number=14, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='region', full_name='RadioConfig.UserPreferences.region', index=13, - number=15, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='charge_current', full_name='RadioConfig.UserPreferences.charge_current', index=14, - number=16, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='is_router', full_name='RadioConfig.UserPreferences.is_router', index=15, - number=37, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='is_low_power', full_name='RadioConfig.UserPreferences.is_low_power', index=16, - number=38, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='fixed_position', full_name='RadioConfig.UserPreferences.fixed_position', index=17, - number=39, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='factory_reset', full_name='RadioConfig.UserPreferences.factory_reset', index=18, - number=100, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='debug_log_enabled', full_name='RadioConfig.UserPreferences.debug_log_enabled', index=19, - number=101, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='location_share', full_name='RadioConfig.UserPreferences.location_share', index=20, - number=32, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='gps_operation', full_name='RadioConfig.UserPreferences.gps_operation', index=21, - number=33, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='gps_update_interval', full_name='RadioConfig.UserPreferences.gps_update_interval', index=22, - number=34, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='gps_attempt_time', full_name='RadioConfig.UserPreferences.gps_attempt_time', index=23, - number=36, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ignore_incoming', full_name='RadioConfig.UserPreferences.ignore_incoming', index=24, - number=103, type=13, cpp_type=3, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_enabled', full_name='RadioConfig.UserPreferences.serialplugin_enabled', index=25, - number=120, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_echo', full_name='RadioConfig.UserPreferences.serialplugin_echo', index=26, - number=121, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_rxd', full_name='RadioConfig.UserPreferences.serialplugin_rxd', index=27, - number=122, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_txd', full_name='RadioConfig.UserPreferences.serialplugin_txd', index=28, - number=123, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_timeout', full_name='RadioConfig.UserPreferences.serialplugin_timeout', index=29, - number=124, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='serialplugin_mode', full_name='RadioConfig.UserPreferences.serialplugin_mode', index=30, - number=125, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_enabled', full_name='RadioConfig.UserPreferences.ext_notification_plugin_enabled', index=31, - number=126, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_output_ms', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output_ms', index=32, - number=127, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_output', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output', index=33, - number=128, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_active', full_name='RadioConfig.UserPreferences.ext_notification_plugin_active', index=34, - number=129, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_alert_message', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_message', index=35, - number=130, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ext_notification_plugin_alert_bell', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_bell', index=36, - number=131, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='range_test_plugin_enabled', full_name='RadioConfig.UserPreferences.range_test_plugin_enabled', index=37, - number=132, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='range_test_plugin_sender', full_name='RadioConfig.UserPreferences.range_test_plugin_sender', index=38, - number=133, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='range_test_plugin_save', full_name='RadioConfig.UserPreferences.range_test_plugin_save', index=39, - number=134, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='store_forward_plugin_enabled', full_name='RadioConfig.UserPreferences.store_forward_plugin_enabled', index=40, - number=136, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='store_forward_plugin_records', full_name='RadioConfig.UserPreferences.store_forward_plugin_records', index=41, - number=137, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_measurement_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_measurement_enabled', index=42, - number=140, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_screen_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_screen_enabled', index=43, - number=141, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_read_error_count_threshold', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_read_error_count_threshold', index=44, - number=142, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_update_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_update_interval', index=45, - number=143, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='environmental_measurement_plugin_recovery_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_recovery_interval', index=46, - number=144, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1491, - serialized_end=3097, -) - -_RADIOCONFIG = _descriptor.Descriptor( - name='RadioConfig', - full_name='RadioConfig', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='preferences', full_name='RadioConfig.preferences', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='channel_settings', full_name='RadioConfig.channel_settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_RADIOCONFIG_USERPREFERENCES, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1376, - serialized_end=3097, + serialized_start=658, + serialized_end=993, ) @@ -1571,8 +737,8 @@ _NODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3099, - serialized_end=3203, + serialized_start=995, + serialized_end=1099, ) @@ -1599,84 +765,70 @@ _MYNODEINFO = _descriptor.Descriptor( is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='num_channels', full_name='MyNodeInfo.num_channels', index=2, - number=3, type=5, cpp_type=1, label=1, + name='num_bands', full_name='MyNodeInfo.num_bands', index=2, + number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='region', full_name='MyNodeInfo.region', index=3, + name='max_channels', full_name='MyNodeInfo.max_channels', index=3, + number=15, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='region', full_name='MyNodeInfo.region', index=4, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='hw_model', full_name='MyNodeInfo.hw_model', index=4, + name='hw_model', full_name='MyNodeInfo.hw_model', index=5, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='firmware_version', full_name='MyNodeInfo.firmware_version', index=5, + name='firmware_version', full_name='MyNodeInfo.firmware_version', index=6, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='error_code', full_name='MyNodeInfo.error_code', index=6, + name='error_code', full_name='MyNodeInfo.error_code', index=7, number=7, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='error_address', full_name='MyNodeInfo.error_address', index=7, + name='error_address', full_name='MyNodeInfo.error_address', index=8, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='error_count', full_name='MyNodeInfo.error_count', index=8, + name='error_count', full_name='MyNodeInfo.error_count', index=9, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='packet_id_bits', full_name='MyNodeInfo.packet_id_bits', index=9, - number=10, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='current_packet_id', full_name='MyNodeInfo.current_packet_id', index=10, - number=11, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='node_num_bits', full_name='MyNodeInfo.node_num_bits', index=11, - number=12, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='message_timeout_msec', full_name='MyNodeInfo.message_timeout_msec', index=12, + name='message_timeout_msec', full_name='MyNodeInfo.message_timeout_msec', index=10, number=13, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='min_app_version', full_name='MyNodeInfo.min_app_version', index=13, + name='min_app_version', full_name='MyNodeInfo.min_app_version', index=11, number=14, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -1694,8 +846,8 @@ _MYNODEINFO = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3206, - serialized_end=3559, + serialized_start=1102, + serialized_end=1396, ) @@ -1748,8 +900,8 @@ _LOGRECORD = _descriptor.Descriptor( extension_ranges=[], oneofs=[ ], - serialized_start=3562, - serialized_end=3743, + serialized_start=1399, + serialized_end=1580, ) @@ -1770,7 +922,7 @@ _FROMRADIO = _descriptor.Descriptor( serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='packet', full_name='FromRadio.packet', index=1, - number=2, type=11, cpp_type=10, label=1, + number=11, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1790,40 +942,26 @@ _FROMRADIO = _descriptor.Descriptor( is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='radio', full_name='FromRadio.radio', index=4, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='log_record', full_name='FromRadio.log_record', index=5, + name='log_record', full_name='FromRadio.log_record', index=4, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='config_complete_id', full_name='FromRadio.config_complete_id', index=6, + name='config_complete_id', full_name='FromRadio.config_complete_id', index=5, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='rebooted', full_name='FromRadio.rebooted', index=7, + name='rebooted', full_name='FromRadio.rebooted', index=6, number=9, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='channel', full_name='FromRadio.channel', index=8, - number=10, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1841,8 +979,8 @@ _FROMRADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3746, - serialized_end=4035, + serialized_start=1583, + serialized_end=1816, ) @@ -1856,7 +994,7 @@ _TORADIO = _descriptor.Descriptor( fields=[ _descriptor.FieldDescriptor( name='packet', full_name='ToRadio.packet', index=0, - number=1, type=11, cpp_type=10, label=1, + number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -1868,27 +1006,6 @@ _TORADIO = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='set_radio', full_name='ToRadio.set_radio', index=2, - number=101, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='set_owner', full_name='ToRadio.set_owner', index=3, - number=102, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='set_channel', full_name='ToRadio.set_channel', index=4, - number=103, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -1906,42 +1023,25 @@ _TORADIO = _descriptor.Descriptor( create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=4038, - serialized_end=4226, + serialized_start=1818, + serialized_end=1926, ) +_ROUTING.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY +_ROUTING.fields_by_name['route_reply'].message_type = _ROUTEDISCOVERY +_ROUTING.fields_by_name['error_reason'].enum_type = _ROUTING_ERROR +_ROUTING_ERROR.containing_type = _ROUTING +_ROUTING.oneofs_by_name['variant'].fields.append( + _ROUTING.fields_by_name['route_request']) +_ROUTING.fields_by_name['route_request'].containing_oneof = _ROUTING.oneofs_by_name['variant'] +_ROUTING.oneofs_by_name['variant'].fields.append( + _ROUTING.fields_by_name['route_reply']) +_ROUTING.fields_by_name['route_reply'].containing_oneof = _ROUTING.oneofs_by_name['variant'] +_ROUTING.oneofs_by_name['variant'].fields.append( + _ROUTING.fields_by_name['error_reason']) +_ROUTING.fields_by_name['error_reason'].containing_oneof = _ROUTING.oneofs_by_name['variant'] _DATA.fields_by_name['portnum'].enum_type = portnums__pb2._PORTNUM -_SUBPACKET.fields_by_name['data'].message_type = _DATA -_SUBPACKET.fields_by_name['route_request'].message_type = _ROUTEDISCOVERY -_SUBPACKET.fields_by_name['route_reply'].message_type = _ROUTEDISCOVERY -_SUBPACKET.fields_by_name['error_reason'].enum_type = _ERRORREASON -_SUBPACKET.fields_by_name['position'].message_type = _POSITION -_SUBPACKET.fields_by_name['user'].message_type = _USER -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['data']) -_SUBPACKET.fields_by_name['data'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['route_request']) -_SUBPACKET.fields_by_name['route_request'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['route_reply']) -_SUBPACKET.fields_by_name['route_reply'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['error_reason']) -_SUBPACKET.fields_by_name['error_reason'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['position']) -_SUBPACKET.fields_by_name['position'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['payloadVariant'].fields.append( - _SUBPACKET.fields_by_name['user']) -_SUBPACKET.fields_by_name['user'].containing_oneof = _SUBPACKET.oneofs_by_name['payloadVariant'] -_SUBPACKET.oneofs_by_name['ackVariant'].fields.append( - _SUBPACKET.fields_by_name['success_id']) -_SUBPACKET.fields_by_name['success_id'].containing_oneof = _SUBPACKET.oneofs_by_name['ackVariant'] -_SUBPACKET.oneofs_by_name['ackVariant'].fields.append( - _SUBPACKET.fields_by_name['fail_id']) -_SUBPACKET.fields_by_name['fail_id'].containing_oneof = _SUBPACKET.oneofs_by_name['ackVariant'] -_MESHPACKET.fields_by_name['decoded'].message_type = _SUBPACKET +_MESHPACKET.fields_by_name['decoded'].message_type = _DATA _MESHPACKET.fields_by_name['priority'].enum_type = _MESHPACKET_PRIORITY _MESHPACKET_PRIORITY.containing_type = _MESHPACKET _MESHPACKET.oneofs_by_name['payloadVariant'].fields.append( @@ -1950,15 +1050,6 @@ _MESHPACKET.fields_by_name['decoded'].containing_oneof = _MESHPACKET.one _MESHPACKET.oneofs_by_name['payloadVariant'].fields.append( _MESHPACKET.fields_by_name['encrypted']) _MESHPACKET.fields_by_name['encrypted'].containing_oneof = _MESHPACKET.oneofs_by_name['payloadVariant'] -_CHANNELSETTINGS.fields_by_name['modem_config'].enum_type = _CHANNELSETTINGS_MODEMCONFIG -_CHANNELSETTINGS_MODEMCONFIG.containing_type = _CHANNELSETTINGS -_RADIOCONFIG_USERPREFERENCES.fields_by_name['region'].enum_type = _REGIONCODE -_RADIOCONFIG_USERPREFERENCES.fields_by_name['charge_current'].enum_type = _CHARGECURRENT -_RADIOCONFIG_USERPREFERENCES.fields_by_name['location_share'].enum_type = _LOCATIONSHARING -_RADIOCONFIG_USERPREFERENCES.fields_by_name['gps_operation'].enum_type = _GPSOPERATION -_RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG -_RADIOCONFIG.fields_by_name['preferences'].message_type = _RADIOCONFIG_USERPREFERENCES -_RADIOCONFIG.fields_by_name['channel_settings'].message_type = _CHANNELSETTINGS _NODEINFO.fields_by_name['user'].message_type = _USER _NODEINFO.fields_by_name['position'].message_type = _POSITION _MYNODEINFO.fields_by_name['error_code'].enum_type = _CRITICALERRORCODE @@ -1967,9 +1058,7 @@ _LOGRECORD_LEVEL.containing_type = _LOGRECORD _FROMRADIO.fields_by_name['packet'].message_type = _MESHPACKET _FROMRADIO.fields_by_name['my_info'].message_type = _MYNODEINFO _FROMRADIO.fields_by_name['node_info'].message_type = _NODEINFO -_FROMRADIO.fields_by_name['radio'].message_type = _RADIOCONFIG _FROMRADIO.fields_by_name['log_record'].message_type = _LOGRECORD -_FROMRADIO.fields_by_name['channel'].message_type = _CHANNELSETTINGS _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['packet']) _FROMRADIO.fields_by_name['packet'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] @@ -1979,9 +1068,6 @@ _FROMRADIO.fields_by_name['my_info'].containing_oneof = _FROMRADIO.oneof _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['node_info']) _FROMRADIO.fields_by_name['node_info'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] -_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( - _FROMRADIO.fields_by_name['radio']) -_FROMRADIO.fields_by_name['radio'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['log_record']) _FROMRADIO.fields_by_name['log_record'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] @@ -1991,47 +1077,25 @@ _FROMRADIO.fields_by_name['config_complete_id'].containing_oneof = _FROM _FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( _FROMRADIO.fields_by_name['rebooted']) _FROMRADIO.fields_by_name['rebooted'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] -_FROMRADIO.oneofs_by_name['payloadVariant'].fields.append( - _FROMRADIO.fields_by_name['channel']) -_FROMRADIO.fields_by_name['channel'].containing_oneof = _FROMRADIO.oneofs_by_name['payloadVariant'] _TORADIO.fields_by_name['packet'].message_type = _MESHPACKET -_TORADIO.fields_by_name['set_radio'].message_type = _RADIOCONFIG -_TORADIO.fields_by_name['set_owner'].message_type = _USER -_TORADIO.fields_by_name['set_channel'].message_type = _CHANNELSETTINGS _TORADIO.oneofs_by_name['payloadVariant'].fields.append( _TORADIO.fields_by_name['packet']) _TORADIO.fields_by_name['packet'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] _TORADIO.oneofs_by_name['payloadVariant'].fields.append( _TORADIO.fields_by_name['want_config_id']) _TORADIO.fields_by_name['want_config_id'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] -_TORADIO.oneofs_by_name['payloadVariant'].fields.append( - _TORADIO.fields_by_name['set_radio']) -_TORADIO.fields_by_name['set_radio'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] -_TORADIO.oneofs_by_name['payloadVariant'].fields.append( - _TORADIO.fields_by_name['set_owner']) -_TORADIO.fields_by_name['set_owner'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] -_TORADIO.oneofs_by_name['payloadVariant'].fields.append( - _TORADIO.fields_by_name['set_channel']) -_TORADIO.fields_by_name['set_channel'].containing_oneof = _TORADIO.oneofs_by_name['payloadVariant'] DESCRIPTOR.message_types_by_name['Position'] = _POSITION -DESCRIPTOR.message_types_by_name['Data'] = _DATA DESCRIPTOR.message_types_by_name['User'] = _USER DESCRIPTOR.message_types_by_name['RouteDiscovery'] = _ROUTEDISCOVERY -DESCRIPTOR.message_types_by_name['SubPacket'] = _SUBPACKET +DESCRIPTOR.message_types_by_name['Routing'] = _ROUTING +DESCRIPTOR.message_types_by_name['Data'] = _DATA DESCRIPTOR.message_types_by_name['MeshPacket'] = _MESHPACKET -DESCRIPTOR.message_types_by_name['ChannelSettings'] = _CHANNELSETTINGS -DESCRIPTOR.message_types_by_name['RadioConfig'] = _RADIOCONFIG DESCRIPTOR.message_types_by_name['NodeInfo'] = _NODEINFO DESCRIPTOR.message_types_by_name['MyNodeInfo'] = _MYNODEINFO DESCRIPTOR.message_types_by_name['LogRecord'] = _LOGRECORD DESCRIPTOR.message_types_by_name['FromRadio'] = _FROMRADIO DESCRIPTOR.message_types_by_name['ToRadio'] = _TORADIO -DESCRIPTOR.enum_types_by_name['ErrorReason'] = _ERRORREASON DESCRIPTOR.enum_types_by_name['Constants'] = _CONSTANTS -DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE -DESCRIPTOR.enum_types_by_name['ChargeCurrent'] = _CHARGECURRENT -DESCRIPTOR.enum_types_by_name['GpsOperation'] = _GPSOPERATION -DESCRIPTOR.enum_types_by_name['LocationSharing'] = _LOCATIONSHARING DESCRIPTOR.enum_types_by_name['CriticalErrorCode'] = _CRITICALERRORCODE _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -2042,13 +1106,6 @@ Position = _reflection.GeneratedProtocolMessageType('Position', (_messag }) _sym_db.RegisterMessage(Position) -Data = _reflection.GeneratedProtocolMessageType('Data', (_message.Message,), { - 'DESCRIPTOR' : _DATA, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:Data) - }) -_sym_db.RegisterMessage(Data) - User = _reflection.GeneratedProtocolMessageType('User', (_message.Message,), { 'DESCRIPTOR' : _USER, '__module__' : 'mesh_pb2' @@ -2063,12 +1120,19 @@ RouteDiscovery = _reflection.GeneratedProtocolMessageType('RouteDiscovery }) _sym_db.RegisterMessage(RouteDiscovery) -SubPacket = _reflection.GeneratedProtocolMessageType('SubPacket', (_message.Message,), { - 'DESCRIPTOR' : _SUBPACKET, +Routing = _reflection.GeneratedProtocolMessageType('Routing', (_message.Message,), { + 'DESCRIPTOR' : _ROUTING, '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:SubPacket) + # @@protoc_insertion_point(class_scope:Routing) }) -_sym_db.RegisterMessage(SubPacket) +_sym_db.RegisterMessage(Routing) + +Data = _reflection.GeneratedProtocolMessageType('Data', (_message.Message,), { + 'DESCRIPTOR' : _DATA, + '__module__' : 'mesh_pb2' + # @@protoc_insertion_point(class_scope:Data) + }) +_sym_db.RegisterMessage(Data) MeshPacket = _reflection.GeneratedProtocolMessageType('MeshPacket', (_message.Message,), { 'DESCRIPTOR' : _MESHPACKET, @@ -2077,28 +1141,6 @@ MeshPacket = _reflection.GeneratedProtocolMessageType('MeshPacket', (_me }) _sym_db.RegisterMessage(MeshPacket) -ChannelSettings = _reflection.GeneratedProtocolMessageType('ChannelSettings', (_message.Message,), { - 'DESCRIPTOR' : _CHANNELSETTINGS, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:ChannelSettings) - }) -_sym_db.RegisterMessage(ChannelSettings) - -RadioConfig = _reflection.GeneratedProtocolMessageType('RadioConfig', (_message.Message,), { - - 'UserPreferences' : _reflection.GeneratedProtocolMessageType('UserPreferences', (_message.Message,), { - 'DESCRIPTOR' : _RADIOCONFIG_USERPREFERENCES, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:RadioConfig.UserPreferences) - }) - , - 'DESCRIPTOR' : _RADIOCONFIG, - '__module__' : 'mesh_pb2' - # @@protoc_insertion_point(class_scope:RadioConfig) - }) -_sym_db.RegisterMessage(RadioConfig) -_sym_db.RegisterMessage(RadioConfig.UserPreferences) - NodeInfo = _reflection.GeneratedProtocolMessageType('NodeInfo', (_message.Message,), { 'DESCRIPTOR' : _NODEINFO, '__module__' : 'mesh_pb2' @@ -2136,11 +1178,7 @@ _sym_db.RegisterMessage(ToRadio) DESCRIPTOR._options = None -_SUBPACKET.fields_by_name['position']._options = None -_SUBPACKET.fields_by_name['user']._options = None -_RADIOCONFIG.fields_by_name['channel_settings']._options = None _MYNODEINFO.fields_by_name['region']._options = None -_MYNODEINFO.fields_by_name['current_packet_id']._options = None # @@protoc_insertion_point(module_scope) @@ -2153,92 +1191,6 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

          Classes

          -
          -class ChannelSettings -(*args, **kwargs) -
          -
          -

          A ProtocolMessage

          -

          Ancestors

          -
            -
          • google.protobuf.pyext._message.CMessage
          • -
          • google.protobuf.message.Message
          • -
          -

          Class variables

          -
          -
          var Bw125Cr45Sf128
          -
          -
          -
          -
          var Bw125Cr48Sf4096
          -
          -
          -
          -
          var Bw31_25Cr48Sf512
          -
          -
          -
          -
          var Bw500Cr45Sf128
          -
          -
          -
          -
          var DESCRIPTOR
          -
          -
          -
          -
          var ModemConfig
          -
          -
          -
          -
          -

          Instance variables

          -
          -
          var bandwidth
          -
          -

          Field ChannelSettings.bandwidth

          -
          -
          var channel_num
          -
          -

          Field ChannelSettings.channel_num

          -
          -
          var coding_rate
          -
          -

          Field ChannelSettings.coding_rate

          -
          - -
          -

          Field ChannelSettings.downlink_enabled

          -
          -
          var id
          -
          -

          Field ChannelSettings.id

          -
          -
          var modem_config
          -
          -

          Field ChannelSettings.modem_config

          -
          -
          var name
          -
          -

          Field ChannelSettings.name

          -
          -
          var psk
          -
          -

          Field ChannelSettings.psk

          -
          -
          var spread_factor
          -
          -

          Field ChannelSettings.spread_factor

          -
          -
          var tx_power
          -
          -

          Field ChannelSettings.tx_power

          -
          - -
          -

          Field ChannelSettings.uplink_enabled

          -
          -
          -
          class Data (*args, **kwargs) @@ -2259,6 +1211,10 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

          Instance variables

          +
          var dest
          +
          +

          Field Data.dest

          +
          var payload

          Field Data.payload

          @@ -2267,6 +1223,18 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

          Field Data.portnum

          +
          var request_id
          +
          +

          Field Data.request_id

          +
          +
          var source
          +
          +

          Field Data.source

          +
          +
          var want_response
          +
          +

          Field Data.want_response

          +
    • @@ -2289,10 +1257,6 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

      Instance variables

      -
      var channel
      -
      -

      Field FromRadio.channel

      -
      var config_complete_id

      Field FromRadio.config_complete_id

      @@ -2317,10 +1281,6 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

      Field FromRadio.packet

      -
      var radio
      -
      -

      Field FromRadio.radio

      -
      var rebooted

      Field FromRadio.rebooted

      @@ -2449,9 +1409,9 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

      Instance variables

      -
      var channel_index
      +
      var channel
      -

      Field MeshPacket.channel_index

      +

      Field MeshPacket.channel

      var decoded
      @@ -2515,10 +1475,6 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

      Instance variables

      -
      var current_packet_id
      -
      -

      Field MyNodeInfo.current_packet_id

      -
      var error_address

      Field MyNodeInfo.error_address

      @@ -2543,6 +1499,10 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

      Field MyNodeInfo.hw_model

      +
      var max_channels
      +
      +

      Field MyNodeInfo.max_channels

      +
      var message_timeout_msec

      Field MyNodeInfo.message_timeout_msec

      @@ -2555,17 +1515,9 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

      Field MyNodeInfo.my_node_num

      -
      var node_num_bits
      +
      var num_bands
      -

      Field MyNodeInfo.node_num_bits

      -
      -
      var num_channels
      -
      -

      Field MyNodeInfo.num_channels

      -
      -
      var packet_id_bits
      -
      -

      Field MyNodeInfo.packet_id_bits

      +

      Field MyNodeInfo.num_bands

      var region
      @@ -2657,40 +1609,6 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None
      -
      -class RadioConfig -(*args, **kwargs) -
      -
      -

      A ProtocolMessage

      -

      Ancestors

      -
        -
      • google.protobuf.pyext._message.CMessage
      • -
      • google.protobuf.message.Message
      • -
      -

      Class variables

      -
      -
      var DESCRIPTOR
      -
      -
      -
      -
      var UserPreferences
      -
      -

      A ProtocolMessage

      -
      -
      -

      Instance variables

      -
      -
      var channel_settings
      -
      -

      Field RadioConfig.channel_settings

      -
      -
      var preferences
      -
      -

      Field RadioConfig.preferences

      -
      -
      -
      class RouteDiscovery (*args, **kwargs) @@ -2717,8 +1635,8 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None -
      -class SubPacket +
      +class Routing (*args, **kwargs)
      @@ -2730,60 +1648,60 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

    Class variables

    -
    var DESCRIPTOR
    +
    var DESCRIPTOR
    +
    +
    +
    +
    var Error
    +
    +
    +
    +
    var GOT_NAK
    +
    +
    +
    +
    var MAX_RETRANSMIT
    +
    +
    +
    +
    var NONE
    +
    +
    +
    +
    var NO_CHANNEL
    +
    +
    +
    +
    var NO_INTERFACE
    +
    +
    +
    +
    var NO_ROUTE
    +
    +
    +
    +
    var TIMEOUT
    +
    +
    +
    +
    var TOO_LARGE

    Instance variables

    -
    var data
    +
    var error_reason
    -

    Field SubPacket.data

    +

    Field Routing.error_reason

    -
    var dest
    +
    var route_reply
    -

    Field SubPacket.dest

    +

    Field Routing.route_reply

    -
    var error_reason
    +
    var route_request
    -

    Field SubPacket.error_reason

    -
    -
    var fail_id
    -
    -

    Field SubPacket.fail_id

    -
    -
    var original_id
    -
    -

    Field SubPacket.original_id

    -
    -
    var position
    -
    -

    Field SubPacket.position

    -
    -
    var route_reply
    -
    -

    Field SubPacket.route_reply

    -
    -
    var route_request
    -
    -

    Field SubPacket.route_request

    -
    -
    var source
    -
    -

    Field SubPacket.source

    -
    -
    var success_id
    -
    -

    Field SubPacket.success_id

    -
    -
    var user
    -
    -

    Field SubPacket.user

    -
    -
    var want_response
    -
    -

    Field SubPacket.want_response

    +

    Field Routing.route_request

    @@ -2811,18 +1729,6 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None

    Field ToRadio.packet

    -
    var set_channel
    -
    -

    Field ToRadio.set_channel

    -
    -
    var set_owner
    -
    -

    Field ToRadio.set_owner

    -
    -
    var set_radio
    -
    -

    Field ToRadio.set_radio

    -
    var want_config_id

    Field ToRadio.want_config_id

    @@ -2884,47 +1790,27 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None
  • Classes

    • -

      ChannelSettings

      - -
    • -
    • Data

      -
    • -

      RadioConfig

      - -
    • -
    • RouteDiscovery

      • DESCRIPTOR
      • @@ -3030,31 +1905,28 @@ _MYNODEINFO.fields_by_name['current_packet_id']._options = None
    • -

      SubPacket

      +

      Routing

    • ToRadio

      -
        + diff --git a/docs/meshtastic/portnums_pb2.html b/docs/meshtastic/portnums_pb2.html index baaee4d..9b5b0e9 100644 --- a/docs/meshtastic/portnums_pb2.html +++ b/docs/meshtastic/portnums_pb2.html @@ -49,7 +49,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eportnums.proto*\x94\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -85,42 +85,57 @@ _PORTNUM = _descriptor.EnumDescriptor( type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='REPLY_APP', index=5, number=32, + name='ROUTING_APP', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='IP_TUNNEL_APP', index=6, number=33, + name='ADMIN_APP', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ENVIRONMENTAL_MEASUREMENT_APP', index=7, number=34, + name='REPLY_APP', index=7, number=32, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='SERIAL_APP', index=8, number=64, + name='IP_TUNNEL_APP', index=8, number=33, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='STORE_FORWARD_APP', index=9, number=65, + name='ENVIRONMENTAL_MEASUREMENT_APP', index=9, number=34, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='RANGE_TEST_APP', index=10, number=66, + name='SERIAL_APP', index=10, number=64, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='PRIVATE_APP', index=11, number=256, + name='STORE_FORWARD_APP', index=11, number=65, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ATAK_FORWARDER', index=12, number=257, + name='RANGE_TEST_APP', index=12, number=66, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PRIVATE_APP', index=13, number=256, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ATAK_FORWARDER', index=14, number=257, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MAX', index=15, number=511, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), @@ -128,7 +143,7 @@ _PORTNUM = _descriptor.EnumDescriptor( containing_type=None, serialized_options=None, serialized_start=19, - serialized_end=295, + serialized_end=337, ) _sym_db.RegisterEnumDescriptor(_PORTNUM) @@ -138,6 +153,8 @@ TEXT_MESSAGE_APP = 1 REMOTE_HARDWARE_APP = 2 POSITION_APP = 3 NODEINFO_APP = 4 +ROUTING_APP = 5 +ADMIN_APP = 6 REPLY_APP = 32 IP_TUNNEL_APP = 33 ENVIRONMENTAL_MEASUREMENT_APP = 34 @@ -146,6 +163,7 @@ STORE_FORWARD_APP = 65 RANGE_TEST_APP = 66 PRIVATE_APP = 256 ATAK_FORWARDER = 257 +MAX = 511 DESCRIPTOR.enum_types_by_name['PortNum'] = _PORTNUM diff --git a/docs/meshtastic/radioconfig_pb2.html b/docs/meshtastic/radioconfig_pb2.html new file mode 100644 index 0000000..f914689 --- /dev/null +++ b/docs/meshtastic/radioconfig_pb2.html @@ -0,0 +1,815 @@ + + + + + + +meshtastic.radioconfig_pb2 API documentation + + + + + + + + + + + +
        +
        +
        +

        Module meshtastic.radioconfig_pb2

        +
        +
        +

        Generated protocol buffer code.

        +
        + +Expand source code + +
        # -*- coding: utf-8 -*-
        +# Generated by the protocol buffer compiler.  DO NOT EDIT!
        +# source: radioconfig.proto
        +"""Generated protocol buffer code."""
        +from google.protobuf.internal import enum_type_wrapper
        +from google.protobuf import descriptor as _descriptor
        +from google.protobuf import message as _message
        +from google.protobuf import reflection as _reflection
        +from google.protobuf import symbol_database as _symbol_database
        +# @@protoc_insertion_point(imports)
        +
        +_sym_db = _symbol_database.Default()
        +
        +
        +
        +
        +DESCRIPTOR = _descriptor.FileDescriptor(
        +  name='radioconfig.proto',
        +  package='',
        +  syntax='proto3',
        +  serialized_options=b'\n\023com.geeksville.meshB\021RadioConfigProtosH\003',
        +  create_key=_descriptor._internal_create_key,
        +  serialized_pb=b'\n\x11radioconfig.proto\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18  \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42*\n\x13\x63om.geeksville.meshB\x11RadioConfigProtosH\x03\x62\x06proto3'
        +)
        +
        +_REGIONCODE = _descriptor.EnumDescriptor(
        +  name='RegionCode',
        +  full_name='RegionCode',
        +  filename=None,
        +  file=DESCRIPTOR,
        +  create_key=_descriptor._internal_create_key,
        +  values=[
        +    _descriptor.EnumValueDescriptor(
        +      name='Unset', index=0, number=0,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='US', index=1, number=1,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='EU433', index=2, number=2,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='EU865', index=3, number=3,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='CN', index=4, number=4,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='JP', index=5, number=5,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='ANZ', index=6, number=6,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='KR', index=7, number=7,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='TW', index=8, number=8,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +  ],
        +  containing_type=None,
        +  serialized_options=None,
        +  serialized_start=1697,
        +  serialized_end=1791,
        +)
        +_sym_db.RegisterEnumDescriptor(_REGIONCODE)
        +
        +RegionCode = enum_type_wrapper.EnumTypeWrapper(_REGIONCODE)
        +_CHARGECURRENT = _descriptor.EnumDescriptor(
        +  name='ChargeCurrent',
        +  full_name='ChargeCurrent',
        +  filename=None,
        +  file=DESCRIPTOR,
        +  create_key=_descriptor._internal_create_key,
        +  values=[
        +    _descriptor.EnumValueDescriptor(
        +      name='MAUnset', index=0, number=0,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA100', index=1, number=1,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA190', index=2, number=2,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA280', index=3, number=3,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA360', index=4, number=4,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA450', index=5, number=5,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA550', index=6, number=6,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA630', index=7, number=7,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA700', index=8, number=8,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA780', index=9, number=9,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA880', index=10, number=10,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA960', index=11, number=11,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA1000', index=12, number=12,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA1080', index=13, number=13,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA1160', index=14, number=14,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA1240', index=15, number=15,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='MA1320', index=16, number=16,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +  ],
        +  containing_type=None,
        +  serialized_options=None,
        +  serialized_start=1794,
        +  serialized_end=2003,
        +)
        +_sym_db.RegisterEnumDescriptor(_CHARGECURRENT)
        +
        +ChargeCurrent = enum_type_wrapper.EnumTypeWrapper(_CHARGECURRENT)
        +_GPSOPERATION = _descriptor.EnumDescriptor(
        +  name='GpsOperation',
        +  full_name='GpsOperation',
        +  filename=None,
        +  file=DESCRIPTOR,
        +  create_key=_descriptor._internal_create_key,
        +  values=[
        +    _descriptor.EnumValueDescriptor(
        +      name='GpsOpUnset', index=0, number=0,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='GpsOpStationary', index=1, number=1,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='GpsOpMobile', index=2, number=2,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='GpsOpTimeOnly', index=3, number=3,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='GpsOpDisabled', index=4, number=4,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +  ],
        +  containing_type=None,
        +  serialized_options=None,
        +  serialized_start=2005,
        +  serialized_end=2111,
        +)
        +_sym_db.RegisterEnumDescriptor(_GPSOPERATION)
        +
        +GpsOperation = enum_type_wrapper.EnumTypeWrapper(_GPSOPERATION)
        +_LOCATIONSHARING = _descriptor.EnumDescriptor(
        +  name='LocationSharing',
        +  full_name='LocationSharing',
        +  filename=None,
        +  file=DESCRIPTOR,
        +  create_key=_descriptor._internal_create_key,
        +  values=[
        +    _descriptor.EnumValueDescriptor(
        +      name='LocUnset', index=0, number=0,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='LocEnabled', index=1, number=1,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +    _descriptor.EnumValueDescriptor(
        +      name='LocDisabled', index=2, number=2,
        +      serialized_options=None,
        +      type=None,
        +      create_key=_descriptor._internal_create_key),
        +  ],
        +  containing_type=None,
        +  serialized_options=None,
        +  serialized_start=2113,
        +  serialized_end=2177,
        +)
        +_sym_db.RegisterEnumDescriptor(_LOCATIONSHARING)
        +
        +LocationSharing = enum_type_wrapper.EnumTypeWrapper(_LOCATIONSHARING)
        +Unset = 0
        +US = 1
        +EU433 = 2
        +EU865 = 3
        +CN = 4
        +JP = 5
        +ANZ = 6
        +KR = 7
        +TW = 8
        +MAUnset = 0
        +MA100 = 1
        +MA190 = 2
        +MA280 = 3
        +MA360 = 4
        +MA450 = 5
        +MA550 = 6
        +MA630 = 7
        +MA700 = 8
        +MA780 = 9
        +MA880 = 10
        +MA960 = 11
        +MA1000 = 12
        +MA1080 = 13
        +MA1160 = 14
        +MA1240 = 15
        +MA1320 = 16
        +GpsOpUnset = 0
        +GpsOpStationary = 1
        +GpsOpMobile = 2
        +GpsOpTimeOnly = 3
        +GpsOpDisabled = 4
        +LocUnset = 0
        +LocEnabled = 1
        +LocDisabled = 2
        +
        +
        +
        +_RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor(
        +  name='UserPreferences',
        +  full_name='RadioConfig.UserPreferences',
        +  filename=None,
        +  file=DESCRIPTOR,
        +  containing_type=None,
        +  create_key=_descriptor._internal_create_key,
        +  fields=[
        +    _descriptor.FieldDescriptor(
        +      name='position_broadcast_secs', full_name='RadioConfig.UserPreferences.position_broadcast_secs', index=0,
        +      number=1, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='send_owner_interval', full_name='RadioConfig.UserPreferences.send_owner_interval', index=1,
        +      number=2, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='wait_bluetooth_secs', full_name='RadioConfig.UserPreferences.wait_bluetooth_secs', index=2,
        +      number=4, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='screen_on_secs', full_name='RadioConfig.UserPreferences.screen_on_secs', index=3,
        +      number=5, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='phone_timeout_secs', full_name='RadioConfig.UserPreferences.phone_timeout_secs', index=4,
        +      number=6, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='phone_sds_timeout_sec', full_name='RadioConfig.UserPreferences.phone_sds_timeout_sec', index=5,
        +      number=7, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='mesh_sds_timeout_secs', full_name='RadioConfig.UserPreferences.mesh_sds_timeout_secs', index=6,
        +      number=8, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='sds_secs', full_name='RadioConfig.UserPreferences.sds_secs', index=7,
        +      number=9, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='ls_secs', full_name='RadioConfig.UserPreferences.ls_secs', index=8,
        +      number=10, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='min_wake_secs', full_name='RadioConfig.UserPreferences.min_wake_secs', index=9,
        +      number=11, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='wifi_ssid', full_name='RadioConfig.UserPreferences.wifi_ssid', index=10,
        +      number=12, type=9, cpp_type=9, label=1,
        +      has_default_value=False, default_value=b"".decode('utf-8'),
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='wifi_password', full_name='RadioConfig.UserPreferences.wifi_password', index=11,
        +      number=13, type=9, cpp_type=9, label=1,
        +      has_default_value=False, default_value=b"".decode('utf-8'),
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='wifi_ap_mode', full_name='RadioConfig.UserPreferences.wifi_ap_mode', index=12,
        +      number=14, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='region', full_name='RadioConfig.UserPreferences.region', index=13,
        +      number=15, type=14, cpp_type=8, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='charge_current', full_name='RadioConfig.UserPreferences.charge_current', index=14,
        +      number=16, type=14, cpp_type=8, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='is_router', full_name='RadioConfig.UserPreferences.is_router', index=15,
        +      number=37, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='is_low_power', full_name='RadioConfig.UserPreferences.is_low_power', index=16,
        +      number=38, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='fixed_position', full_name='RadioConfig.UserPreferences.fixed_position', index=17,
        +      number=39, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='factory_reset', full_name='RadioConfig.UserPreferences.factory_reset', index=18,
        +      number=100, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='debug_log_enabled', full_name='RadioConfig.UserPreferences.debug_log_enabled', index=19,
        +      number=101, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='location_share', full_name='RadioConfig.UserPreferences.location_share', index=20,
        +      number=32, type=14, cpp_type=8, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='gps_operation', full_name='RadioConfig.UserPreferences.gps_operation', index=21,
        +      number=33, type=14, cpp_type=8, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='gps_update_interval', full_name='RadioConfig.UserPreferences.gps_update_interval', index=22,
        +      number=34, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='gps_attempt_time', full_name='RadioConfig.UserPreferences.gps_attempt_time', index=23,
        +      number=36, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='ignore_incoming', full_name='RadioConfig.UserPreferences.ignore_incoming', index=24,
        +      number=103, type=13, cpp_type=3, label=3,
        +      has_default_value=False, default_value=[],
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='serialplugin_enabled', full_name='RadioConfig.UserPreferences.serialplugin_enabled', index=25,
        +      number=120, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='serialplugin_echo', full_name='RadioConfig.UserPreferences.serialplugin_echo', index=26,
        +      number=121, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='serialplugin_rxd', full_name='RadioConfig.UserPreferences.serialplugin_rxd', index=27,
        +      number=122, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='serialplugin_txd', full_name='RadioConfig.UserPreferences.serialplugin_txd', index=28,
        +      number=123, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='serialplugin_timeout', full_name='RadioConfig.UserPreferences.serialplugin_timeout', index=29,
        +      number=124, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='serialplugin_mode', full_name='RadioConfig.UserPreferences.serialplugin_mode', index=30,
        +      number=125, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='ext_notification_plugin_enabled', full_name='RadioConfig.UserPreferences.ext_notification_plugin_enabled', index=31,
        +      number=126, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='ext_notification_plugin_output_ms', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output_ms', index=32,
        +      number=127, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='ext_notification_plugin_output', full_name='RadioConfig.UserPreferences.ext_notification_plugin_output', index=33,
        +      number=128, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='ext_notification_plugin_active', full_name='RadioConfig.UserPreferences.ext_notification_plugin_active', index=34,
        +      number=129, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='ext_notification_plugin_alert_message', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_message', index=35,
        +      number=130, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='ext_notification_plugin_alert_bell', full_name='RadioConfig.UserPreferences.ext_notification_plugin_alert_bell', index=36,
        +      number=131, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='range_test_plugin_enabled', full_name='RadioConfig.UserPreferences.range_test_plugin_enabled', index=37,
        +      number=132, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='range_test_plugin_sender', full_name='RadioConfig.UserPreferences.range_test_plugin_sender', index=38,
        +      number=133, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='range_test_plugin_save', full_name='RadioConfig.UserPreferences.range_test_plugin_save', index=39,
        +      number=134, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='store_forward_plugin_enabled', full_name='RadioConfig.UserPreferences.store_forward_plugin_enabled', index=40,
        +      number=136, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='store_forward_plugin_records', full_name='RadioConfig.UserPreferences.store_forward_plugin_records', index=41,
        +      number=137, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='environmental_measurement_plugin_measurement_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_measurement_enabled', index=42,
        +      number=140, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='environmental_measurement_plugin_screen_enabled', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_screen_enabled', index=43,
        +      number=141, type=8, cpp_type=7, label=1,
        +      has_default_value=False, default_value=False,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='environmental_measurement_plugin_read_error_count_threshold', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_read_error_count_threshold', index=44,
        +      number=142, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='environmental_measurement_plugin_update_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_update_interval', index=45,
        +      number=143, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +    _descriptor.FieldDescriptor(
        +      name='environmental_measurement_plugin_recovery_interval', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_recovery_interval', index=46,
        +      number=144, type=13, cpp_type=3, label=1,
        +      has_default_value=False, default_value=0,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +  ],
        +  extensions=[
        +  ],
        +  nested_types=[],
        +  enum_types=[
        +  ],
        +  serialized_options=None,
        +  is_extendable=False,
        +  syntax='proto3',
        +  extension_ranges=[],
        +  oneofs=[
        +  ],
        +  serialized_start=89,
        +  serialized_end=1695,
        +)
        +
        +_RADIOCONFIG = _descriptor.Descriptor(
        +  name='RadioConfig',
        +  full_name='RadioConfig',
        +  filename=None,
        +  file=DESCRIPTOR,
        +  containing_type=None,
        +  create_key=_descriptor._internal_create_key,
        +  fields=[
        +    _descriptor.FieldDescriptor(
        +      name='preferences', full_name='RadioConfig.preferences', index=0,
        +      number=1, type=11, cpp_type=10, label=1,
        +      has_default_value=False, default_value=None,
        +      message_type=None, enum_type=None, containing_type=None,
        +      is_extension=False, extension_scope=None,
        +      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
        +  ],
        +  extensions=[
        +  ],
        +  nested_types=[_RADIOCONFIG_USERPREFERENCES, ],
        +  enum_types=[
        +  ],
        +  serialized_options=None,
        +  is_extendable=False,
        +  syntax='proto3',
        +  extension_ranges=[],
        +  oneofs=[
        +  ],
        +  serialized_start=22,
        +  serialized_end=1695,
        +)
        +
        +_RADIOCONFIG_USERPREFERENCES.fields_by_name['region'].enum_type = _REGIONCODE
        +_RADIOCONFIG_USERPREFERENCES.fields_by_name['charge_current'].enum_type = _CHARGECURRENT
        +_RADIOCONFIG_USERPREFERENCES.fields_by_name['location_share'].enum_type = _LOCATIONSHARING
        +_RADIOCONFIG_USERPREFERENCES.fields_by_name['gps_operation'].enum_type = _GPSOPERATION
        +_RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG
        +_RADIOCONFIG.fields_by_name['preferences'].message_type = _RADIOCONFIG_USERPREFERENCES
        +DESCRIPTOR.message_types_by_name['RadioConfig'] = _RADIOCONFIG
        +DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE
        +DESCRIPTOR.enum_types_by_name['ChargeCurrent'] = _CHARGECURRENT
        +DESCRIPTOR.enum_types_by_name['GpsOperation'] = _GPSOPERATION
        +DESCRIPTOR.enum_types_by_name['LocationSharing'] = _LOCATIONSHARING
        +_sym_db.RegisterFileDescriptor(DESCRIPTOR)
        +
        +RadioConfig = _reflection.GeneratedProtocolMessageType('RadioConfig', (_message.Message,), {
        +
        +  'UserPreferences' : _reflection.GeneratedProtocolMessageType('UserPreferences', (_message.Message,), {
        +    'DESCRIPTOR' : _RADIOCONFIG_USERPREFERENCES,
        +    '__module__' : 'radioconfig_pb2'
        +    # @@protoc_insertion_point(class_scope:RadioConfig.UserPreferences)
        +    })
        +  ,
        +  'DESCRIPTOR' : _RADIOCONFIG,
        +  '__module__' : 'radioconfig_pb2'
        +  # @@protoc_insertion_point(class_scope:RadioConfig)
        +  })
        +_sym_db.RegisterMessage(RadioConfig)
        +_sym_db.RegisterMessage(RadioConfig.UserPreferences)
        +
        +
        +DESCRIPTOR._options = None
        +# @@protoc_insertion_point(module_scope)
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +

        Classes

        +
        +
        +class RadioConfig +(*args, **kwargs) +
        +
        +

        A ProtocolMessage

        +

        Ancestors

        +
          +
        • google.protobuf.pyext._message.CMessage
        • +
        • google.protobuf.message.Message
        • +
        +

        Class variables

        +
        +
        var DESCRIPTOR
        +
        +
        +
        +
        var UserPreferences
        +
        +

        A ProtocolMessage

        +
        +
        +

        Instance variables

        +
        +
        var preferences
        +
        +

        Field RadioConfig.preferences

        +
        +
        +
        +
        +
        +
        + +
        + + + \ No newline at end of file diff --git a/docs/meshtastic/test.html b/docs/meshtastic/test.html index ccd2028..12327be 100644 --- a/docs/meshtastic/test.html +++ b/docs/meshtastic/test.html @@ -47,6 +47,7 @@ testNumber = 0 sendingInterface = None + def onReceive(packet, interface): """Callback invoked when a packet arrives""" if sendingInterface == interface: @@ -55,10 +56,11 @@ def onReceive(packet, interface): print(f"From {interface.stream.port}: {packet}") p = DotMap(packet) - if p.decoded.data.portnum == "TEXT_MESSAGE_APP": + if p.decoded.portnum == "TEXT_MESSAGE_APP": # We only care a about clear text packets receivedPackets.append(p) + def onNode(node): """Callback invoked when the node DB changes""" print(f"Node changed: {node}") @@ -91,7 +93,7 @@ def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): toNode = toInterface.myInfo.my_node_num logging.info(f"Sending test packet from {fromNode} to {toNode}") - wantAck = False # Don't want any sort of reliaible sending + wantAck = False # Don't want any sort of reliaible sending global sendingInterface sendingInterface = fromInterface if not asBinary: @@ -99,11 +101,11 @@ def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): else: fromInterface.sendData((f"Binary {testNumber}").encode( "utf-8"), toNode, wantAck=wantAck) - for sec in range(45): # max of 45 secs before we timeout + for sec in range(45): # max of 45 secs before we timeout time.sleep(1) if (len(receivedPackets) >= 1): return True - return False # Failed to send + return False # Failed to send def testThread(numTests=50): @@ -116,14 +118,15 @@ def testThread(numTests=50): isBroadcast = True # asBinary=(i % 2 == 0) success = testSend( - interfaces[0], interfaces[1], isBroadcast, asBinary = False) + interfaces[0], interfaces[1], isBroadcast, asBinary=False) if not success: numFail = numFail + 1 logging.error( f"Test failed, expected packet not received ({numFail} failures so far)") else: numSuccess = numSuccess + 1 - logging.info(f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") + logging.info( + f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") if numFail >= 3: for i in interfaces: @@ -137,11 +140,13 @@ def onConnection(topic=pub.AUTO_TOPIC): """Callback invoked when we connect/disconnect from a radio""" print(f"Connection changed: {topic.getName()}") + def openDebugLog(portName): debugname = "log" + portName.replace("/", "_") logging.info(f"Writing serial debugging to {debugname}") return open(debugname, 'w+', buffering=1) + def testAll(): """ Run a series of tests using devices we can find. @@ -163,8 +168,7 @@ def testAll(): testThread() for i in interfaces: - i.close() -
        + i.close()
        @@ -226,7 +230,7 @@ def testAll(): print(f"From {interface.stream.port}: {packet}") p = DotMap(packet) - if p.decoded.data.portnum == "TEXT_MESSAGE_APP": + if p.decoded.portnum == "TEXT_MESSAGE_APP": # We only care a about clear text packets receivedPackets.append(p) @@ -334,7 +338,7 @@ toInterface {[type]} – [description]

        toNode = toInterface.myInfo.my_node_num logging.info(f"Sending test packet from {fromNode} to {toNode}") - wantAck = False # Don't want any sort of reliaible sending + wantAck = False # Don't want any sort of reliaible sending global sendingInterface sendingInterface = fromInterface if not asBinary: @@ -342,11 +346,11 @@ toInterface {[type]} – [description]

        else: fromInterface.sendData((f"Binary {testNumber}").encode( "utf-8"), toNode, wantAck=wantAck) - for sec in range(45): # max of 45 secs before we timeout + for sec in range(45): # max of 45 secs before we timeout time.sleep(1) if (len(receivedPackets) >= 1): return True - return False # Failed to send + return False # Failed to send
  • @@ -368,14 +372,15 @@ toInterface {[type]} – [description]

    isBroadcast = True # asBinary=(i % 2 == 0) success = testSend( - interfaces[0], interfaces[1], isBroadcast, asBinary = False) + interfaces[0], interfaces[1], isBroadcast, asBinary=False) if not success: numFail = numFail + 1 logging.error( f"Test failed, expected packet not received ({numFail} failures so far)") else: numSuccess = numSuccess + 1 - logging.info(f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") + logging.info( + f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") if numFail >= 3: for i in interfaces: diff --git a/docs/meshtastic/tunnel.html b/docs/meshtastic/tunnel.html index 1952857..015a5e7 100644 --- a/docs/meshtastic/tunnel.html +++ b/docs/meshtastic/tunnel.html @@ -34,7 +34,7 @@ # sudo bin/run.sh --port /dev/ttyUSB0 --setch-shortfast # sudo bin/run.sh --port /dev/ttyUSB0 --tunnel --debug # ssh -Y root@192.168.10.151 (or dietpi), default password p -# ncat -e /bin/cat -k -u -l 1235 +# ncat -e /bin/cat -k -u -l 1235 # ncat -u 10.115.64.152 1235 # ping -c 1 -W 20 10.115.64.152 # ping -i 30 -W 30 10.115.64.152 @@ -43,7 +43,8 @@ from . import portnums_pb2 from pubsub import pub -import logging, threading +import logging +import threading # A new non standard log level that is lower level than DEBUG LOG_TRACE = 5 @@ -54,8 +55,8 @@ tunnelInstance = None """A list of chatty UDP services we should never accidentally forward to our slow network""" udpBlacklist = { - 1900, # SSDP - 5353, # multicast DNS + 1900, # SSDP + 5353, # multicast DNS } """A list of TCP services to block""" @@ -63,31 +64,36 @@ tcpBlacklist = {} """A list of protocols we ignore""" protocolBlacklist = { - 0x02, # IGMP - 0x80, # Service-Specific Connection-Oriented Protocol in a Multilink and Connectionless Environment + 0x02, # IGMP + 0x80, # Service-Specific Connection-Oriented Protocol in a Multilink and Connectionless Environment } + def hexstr(barray): """Print a string of hex digits""" return ":".join('{:02x}'.format(x) for x in barray) + def ipstr(barray): """Print a string of ip digits""" return ".".join('{}'.format(x) for x in barray) + def readnet_u16(p, offset): """Read big endian u16 (network byte order)""" return p[offset] * 256 + p[offset + 1] + def onTunnelReceive(packet, interface): """Callback for received tunneled messages from mesh - + FIXME figure out how to do closures with methods in python""" tunnelInstance.onReceive(packet) + class Tunnel: """A TUN based IP tunnel over meshtastic""" - + def __init__(self, iface, subnet=None, netmask="255.255.0.0"): """ Constructor @@ -105,7 +111,8 @@ class Tunnel: global tunnelInstance tunnelInstance = self - logging.info("Starting IP to mesh tunnel (you must be root for this *pre-alpha* feature to work). Mesh members:") + logging.info( + "Starting IP to mesh tunnel (you must be root for this *pre-alpha* feature to work). Mesh members:") pub.subscribe(onTunnelReceive, "meshtastic.receive.data.IP_TUNNEL_APP") myAddr = self._nodeNumToIp(self.iface.myInfo.my_node_num) @@ -113,24 +120,26 @@ class Tunnel: for node in self.iface.nodes.values(): nodeId = node["user"]["id"] ip = self._nodeNumToIp(node["num"]) - logging.info(f"Node { nodeId } has IP address { ip }") + logging.info(f"Node { nodeId } has IP address { ip }") logging.debug("creating TUN device with MTU=200") # FIXME - figure out real max MTU, it should be 240 - the overhead bytes for SubPacket and Data from pytap2 import TapDevice self.tun = TapDevice(name="mesh") self.tun.up() - self.tun.ifconfig(address=myAddr,netmask=netmask,mtu=200) + self.tun.ifconfig(address=myAddr, netmask=netmask, mtu=200) logging.debug(f"starting TUN reader, our IP address is {myAddr}") - self._rxThread = threading.Thread(target=self.__tunReader, args=(), daemon=True) + self._rxThread = threading.Thread( + target=self.__tunReader, args=(), daemon=True) self._rxThread.start() def onReceive(self, packet): - p = packet["decoded"]["data"]["payload"] + p = packet["decoded"]["payload"] if packet["from"] == self.iface.myInfo.my_node_num: logging.debug("Ignoring message we sent") else: - logging.debug(f"Received mesh tunnel message type={type(p)} len={len(p)}") + logging.debug( + f"Received mesh tunnel message type={type(p)} len={len(p)}") # we don't really need to check for filtering here (sender should have checked), but this provides # useful debug printing on types of packets received if not self._shouldFilterPacket(p): @@ -142,36 +151,43 @@ class Tunnel: srcaddr = p[12:16] destAddr = p[16:20] subheader = 20 - ignore = False # Assume we will be forwarding the packet + ignore = False # Assume we will be forwarding the packet if protocol in protocolBlacklist: ignore = True - logging.log(LOG_TRACE, f"Ignoring blacklisted protocol 0x{protocol:02x}") - elif protocol == 0x01: # ICMP + logging.log( + LOG_TRACE, f"Ignoring blacklisted protocol 0x{protocol:02x}") + elif protocol == 0x01: # ICMP icmpType = p[20] icmpCode = p[21] checksum = p[22:24] - logging.debug(f"forwarding ICMP message src={ipstr(srcaddr)}, dest={ipstr(destAddr)}, type={icmpType}, code={icmpCode}, checksum={checksum}") + logging.debug( + f"forwarding ICMP message src={ipstr(srcaddr)}, dest={ipstr(destAddr)}, type={icmpType}, code={icmpCode}, checksum={checksum}") # reply to pings (swap src and dest but keep rest of packet unchanged) #pingback = p[:12]+p[16:20]+p[12:16]+p[20:] - #tap.write(pingback) - elif protocol == 0x11: # UDP + # tap.write(pingback) + elif protocol == 0x11: # UDP srcport = readnet_u16(p, subheader) destport = readnet_u16(p, subheader + 2) if destport in udpBlacklist: ignore = True - logging.log(LOG_TRACE, f"ignoring blacklisted UDP port {destport}") + logging.log( + LOG_TRACE, f"ignoring blacklisted UDP port {destport}") else: - logging.debug(f"forwarding udp srcport={srcport}, destport={destport}") - elif protocol == 0x06: # TCP + logging.debug( + f"forwarding udp srcport={srcport}, destport={destport}") + elif protocol == 0x06: # TCP srcport = readnet_u16(p, subheader) destport = readnet_u16(p, subheader + 2) if destport in tcpBlacklist: ignore = True - logging.log(LOG_TRACE, f"ignoring blacklisted TCP port {destport}") + logging.log( + LOG_TRACE, f"ignoring blacklisted TCP port {destport}") else: - logging.debug(f"forwarding tcp srcport={srcport}, destport={destport}") + logging.debug( + f"forwarding tcp srcport={srcport}, destport={destport}") else: - logging.warning(f"forwarding unexpected protocol 0x{protocol:02x}, src={ipstr(srcaddr)}, dest={ipstr(destAddr)}") + logging.warning( + f"forwarding unexpected protocol 0x{protocol:02x}, src={ipstr(srcaddr)}, dest={ipstr(destAddr)}") return ignore @@ -207,10 +223,13 @@ class Tunnel: """Forward the provided IP packet into the mesh""" nodeId = self._ipToNodeId(destAddr) if nodeId is not None: - logging.debug(f"Forwarding packet bytelen={len(p)} dest={ipstr(destAddr)}, destNode={nodeId}") - self.iface.sendData(p, nodeId, portnums_pb2.IP_TUNNEL_APP, wantAck = False) + logging.debug( + f"Forwarding packet bytelen={len(p)} dest={ipstr(destAddr)}, destNode={nodeId}") + self.iface.sendData( + p, nodeId, portnums_pb2.IP_TUNNEL_APP, wantAck=False) else: - logging.warning(f"Dropping packet because no node found for destIP={ipstr(destAddr)}") + logging.warning( + f"Dropping packet because no node found for destIP={ipstr(destAddr)}") def close(self): self.tun.close()
    @@ -279,7 +298,7 @@ forward to our slow network

    def onTunnelReceive(packet, interface):
         """Callback for received tunneled messages from mesh
    -    
    +
         FIXME figure out how to do closures with methods in python"""
         tunnelInstance.onReceive(packet)
    @@ -318,7 +337,7 @@ subnet is used to construct our network number (normally 10.115.x.x)

    class Tunnel:
         """A TUN based IP tunnel over meshtastic"""
    -    
    +
         def __init__(self, iface, subnet=None, netmask="255.255.0.0"):
             """
             Constructor
    @@ -336,7 +355,8 @@ subnet is used to construct our network number (normally 10.115.x.x)

    global tunnelInstance tunnelInstance = self - logging.info("Starting IP to mesh tunnel (you must be root for this *pre-alpha* feature to work). Mesh members:") + logging.info( + "Starting IP to mesh tunnel (you must be root for this *pre-alpha* feature to work). Mesh members:") pub.subscribe(onTunnelReceive, "meshtastic.receive.data.IP_TUNNEL_APP") myAddr = self._nodeNumToIp(self.iface.myInfo.my_node_num) @@ -344,24 +364,26 @@ subnet is used to construct our network number (normally 10.115.x.x)

    for node in self.iface.nodes.values(): nodeId = node["user"]["id"] ip = self._nodeNumToIp(node["num"]) - logging.info(f"Node { nodeId } has IP address { ip }") + logging.info(f"Node { nodeId } has IP address { ip }") logging.debug("creating TUN device with MTU=200") # FIXME - figure out real max MTU, it should be 240 - the overhead bytes for SubPacket and Data from pytap2 import TapDevice self.tun = TapDevice(name="mesh") self.tun.up() - self.tun.ifconfig(address=myAddr,netmask=netmask,mtu=200) + self.tun.ifconfig(address=myAddr, netmask=netmask, mtu=200) logging.debug(f"starting TUN reader, our IP address is {myAddr}") - self._rxThread = threading.Thread(target=self.__tunReader, args=(), daemon=True) + self._rxThread = threading.Thread( + target=self.__tunReader, args=(), daemon=True) self._rxThread.start() def onReceive(self, packet): - p = packet["decoded"]["data"]["payload"] + p = packet["decoded"]["payload"] if packet["from"] == self.iface.myInfo.my_node_num: logging.debug("Ignoring message we sent") else: - logging.debug(f"Received mesh tunnel message type={type(p)} len={len(p)}") + logging.debug( + f"Received mesh tunnel message type={type(p)} len={len(p)}") # we don't really need to check for filtering here (sender should have checked), but this provides # useful debug printing on types of packets received if not self._shouldFilterPacket(p): @@ -373,36 +395,43 @@ subnet is used to construct our network number (normally 10.115.x.x)

    srcaddr = p[12:16] destAddr = p[16:20] subheader = 20 - ignore = False # Assume we will be forwarding the packet + ignore = False # Assume we will be forwarding the packet if protocol in protocolBlacklist: ignore = True - logging.log(LOG_TRACE, f"Ignoring blacklisted protocol 0x{protocol:02x}") - elif protocol == 0x01: # ICMP + logging.log( + LOG_TRACE, f"Ignoring blacklisted protocol 0x{protocol:02x}") + elif protocol == 0x01: # ICMP icmpType = p[20] icmpCode = p[21] checksum = p[22:24] - logging.debug(f"forwarding ICMP message src={ipstr(srcaddr)}, dest={ipstr(destAddr)}, type={icmpType}, code={icmpCode}, checksum={checksum}") + logging.debug( + f"forwarding ICMP message src={ipstr(srcaddr)}, dest={ipstr(destAddr)}, type={icmpType}, code={icmpCode}, checksum={checksum}") # reply to pings (swap src and dest but keep rest of packet unchanged) #pingback = p[:12]+p[16:20]+p[12:16]+p[20:] - #tap.write(pingback) - elif protocol == 0x11: # UDP + # tap.write(pingback) + elif protocol == 0x11: # UDP srcport = readnet_u16(p, subheader) destport = readnet_u16(p, subheader + 2) if destport in udpBlacklist: ignore = True - logging.log(LOG_TRACE, f"ignoring blacklisted UDP port {destport}") + logging.log( + LOG_TRACE, f"ignoring blacklisted UDP port {destport}") else: - logging.debug(f"forwarding udp srcport={srcport}, destport={destport}") - elif protocol == 0x06: # TCP + logging.debug( + f"forwarding udp srcport={srcport}, destport={destport}") + elif protocol == 0x06: # TCP srcport = readnet_u16(p, subheader) destport = readnet_u16(p, subheader + 2) if destport in tcpBlacklist: ignore = True - logging.log(LOG_TRACE, f"ignoring blacklisted TCP port {destport}") + logging.log( + LOG_TRACE, f"ignoring blacklisted TCP port {destport}") else: - logging.debug(f"forwarding tcp srcport={srcport}, destport={destport}") + logging.debug( + f"forwarding tcp srcport={srcport}, destport={destport}") else: - logging.warning(f"forwarding unexpected protocol 0x{protocol:02x}, src={ipstr(srcaddr)}, dest={ipstr(destAddr)}") + logging.warning( + f"forwarding unexpected protocol 0x{protocol:02x}, src={ipstr(srcaddr)}, dest={ipstr(destAddr)}") return ignore @@ -438,10 +467,13 @@ subnet is used to construct our network number (normally 10.115.x.x)

    """Forward the provided IP packet into the mesh""" nodeId = self._ipToNodeId(destAddr) if nodeId is not None: - logging.debug(f"Forwarding packet bytelen={len(p)} dest={ipstr(destAddr)}, destNode={nodeId}") - self.iface.sendData(p, nodeId, portnums_pb2.IP_TUNNEL_APP, wantAck = False) + logging.debug( + f"Forwarding packet bytelen={len(p)} dest={ipstr(destAddr)}, destNode={nodeId}") + self.iface.sendData( + p, nodeId, portnums_pb2.IP_TUNNEL_APP, wantAck=False) else: - logging.warning(f"Dropping packet because no node found for destIP={ipstr(destAddr)}") + logging.warning( + f"Dropping packet because no node found for destIP={ipstr(destAddr)}") def close(self): self.tun.close()
    @@ -471,11 +503,12 @@ subnet is used to construct our network number (normally 10.115.x.x)

    Expand source code
    def onReceive(self, packet):
    -    p = packet["decoded"]["data"]["payload"]
    +    p = packet["decoded"]["payload"]
         if packet["from"] == self.iface.myInfo.my_node_num:
             logging.debug("Ignoring message we sent")
         else:
    -        logging.debug(f"Received mesh tunnel message type={type(p)} len={len(p)}")
    +        logging.debug(
    +            f"Received mesh tunnel message type={type(p)} len={len(p)}")
             # we don't really need to check for filtering here (sender should have checked), but this provides
             # useful debug printing on types of packets received
             if not self._shouldFilterPacket(p):
    @@ -495,10 +528,13 @@ subnet is used to construct our network number (normally 10.115.x.x)

    """Forward the provided IP packet into the mesh""" nodeId = self._ipToNodeId(destAddr) if nodeId is not None: - logging.debug(f"Forwarding packet bytelen={len(p)} dest={ipstr(destAddr)}, destNode={nodeId}") - self.iface.sendData(p, nodeId, portnums_pb2.IP_TUNNEL_APP, wantAck = False) + logging.debug( + f"Forwarding packet bytelen={len(p)} dest={ipstr(destAddr)}, destNode={nodeId}") + self.iface.sendData( + p, nodeId, portnums_pb2.IP_TUNNEL_APP, wantAck=False) else: - logging.warning(f"Dropping packet because no node found for destIP={ipstr(destAddr)}")
    + logging.warning( + f"Dropping packet because no node found for destIP={ipstr(destAddr)}") diff --git a/docs/meshtastic/util.html b/docs/meshtastic/util.html index efc4a67..973bd30 100644 --- a/docs/meshtastic/util.html +++ b/docs/meshtastic/util.html @@ -34,6 +34,18 @@ import serial.tools.list_ports blacklistVids = dict.fromkeys([0x1366]) +def fixme(message): + raise Exception(f"FIXME: {message}") + + +def catchAndIgnore(reason, closure): + """Call a closure but if it throws an excpetion print it and continue""" + try: + closure() + except BaseException as ex: + logging.error(f"Exception thrown in {reason}: {ex}") + + def findPorts(): """Find all ports that might have meshtastic devices @@ -61,6 +73,23 @@ class dotdict(dict):

    Functions

    +
    +def catchAndIgnore(reason, closure) +
    +
    +

    Call a closure but if it throws an excpetion print it and continue

    +
    + +Expand source code + +
    def catchAndIgnore(reason, closure):
    +    """Call a closure but if it throws an excpetion print it and continue"""
    +    try:
    +        closure()
    +    except BaseException as ex:
    +        logging.error(f"Exception thrown in {reason}: {ex}")
    +
    +
    def findPorts()
    @@ -85,6 +114,19 @@ class dotdict(dict): return l +
    +def fixme(message) +
    +
    +
    +
    + +Expand source code + +
    def fixme(message):
    +    raise Exception(f"FIXME: {message}")
    +
    +
    @@ -127,7 +169,9 @@ class dotdict(dict):
  • Functions

  • Classes

    From a8c2e9f2dd1181bb0b669cec4c810e5f8bc64bbd Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Thu, 4 Mar 2021 20:41:57 +0800 Subject: [PATCH 34/48] fix channel writing from python --- meshtastic/__init__.py | 11 ++++++ meshtastic/__main__.py | 83 +++++++++++++++++++++--------------------- setup.py | 2 +- 3 files changed, 54 insertions(+), 42 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 5e74af0..743698c 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -294,6 +294,17 @@ class MeshInterface: wantAck=True) logging.debug("Wrote config") + def writeChannel(self, channelIndex): + """Write the current (edited) channel to the device""" + + p = admin_pb2.AdminMessage() + p.set_channel.CopyFrom(self.channels[channelIndex]) + + self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) + logging.debug("Wrote channel {channelIndex}") + def getMyNodeInfo(self): if self.myInfo is None: return None diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 7a26321..de54ef6 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -26,6 +26,7 @@ args = None """The parser for arguments""" parser = argparse.ArgumentParser() +channelIndex = 0 def onReceive(packet, interface): """Callback invoked when a packet arrives""" @@ -127,6 +128,20 @@ def printNodes(nodes): table.setData(tableData) table.displayTable() +def setPref(attributes, name, valStr): + """Set a channel or preferences value""" + val = fromStr(valStr) + try: + try: + setattr(attributes, name, val) + except TypeError as ex: + # The setter didn't like our arg type guess try again as a string + setattr(attributes, name, valStr) + + # succeeded! + print(f"Set {name} to {valStr}") + except Exception as ex: + print(f"Can't set {name} due to {ex}") def onConnected(interface): """Callback invoked when we connect to a radio""" @@ -203,40 +218,34 @@ def onConnected(interface): print(f"Watching GPIO mask 0x{bitmask:x} from {args.dest}") rhc.watchGPIOs(args.dest, bitmask) - if args.set or args.setstr or args.setchan or args.setch_longslow or args.setch_shortfast \ - or args.seturl or args.router != None: + # handle settings + if args.set: closeNow = True - def setPref(attributes, name, valStr): - """Set a preferences value""" - val = fromStr(valStr) - try: - try: - setattr(attributes, name, val) - except TypeError as ex: - # The setter didn't like our arg type guess try again as a string - setattr(attributes, name, valStr) - - # succeeded! - print(f"Set {name} to {valStr}") - except Exception as ex: - print(f"Can't set {name} due to {ex}") - - def setSimpleChannel(modem_config): - """Set one of the simple modem_config only based channels""" - ch = channel_pb2.ChannelSettings() - ch.modem_config = modem_config - ch.psk = bytes([1]) # Use default channel psk 1 - interface.radioConfig.channel_settings.CopyFrom(ch) - # Handle the int/float/bool arguments - for pref in (args.set or []): + for pref in args.set: setPref( prefs, pref[0], pref[1]) - # Handle the string arguments - for pref in (args.setstr or []): - setPref(prefs, pref[0], pref[1]) + print("Writing modified preferences to device") + interface.writeConfig() + + # handle changing channels + if args.setchan or args.setch_longslow or args.setch_shortfast \ + or args.seturl != None: + closeNow = True + + ch = interface.channels[channelIndex] + + def setSimpleChannel(modem_config): + """Set one of the simple modem_config only based channels""" + + # Completely new channel settings + chs = channel_pb2.ChannelSettings() + chs.modem_config = modem_config + chs.psk = bytes([1]) # Use default channel psk 1 + + ch.settings.CopyFrom(chs) # handle the simple channel set commands if args.setch_longslow: @@ -249,15 +258,10 @@ def onConnected(interface): # Handle the channel settings for pref in (args.setchan or []): - setPref(interface.radioConfig.channel_settings, - pref[0], pref[1]) + setPref(ch.settings, pref[0], pref[1]) - # Handle set URL - if args.seturl: - interface.setURL(args.seturl, False) - - print("Writing modified preferences to device") - interface.writeConfig() + print("Writing modified channels to device") + interface.writeChannel(channelIndex) if args.info: closeNow = True @@ -323,7 +327,7 @@ def common(): if not args.seriallog: if args.info or args.nodes or args.set or args.seturl or args.setowner or args.setlat or args.setlon or \ args.settime or \ - args.setch_longslow or args.setch_shortfast or args.setstr or args.setchan or args.sendtext or \ + args.setch_longslow or args.setch_shortfast or args.setchan or args.sendtext or \ args.qr: args.seriallog = "none" # assume no debug output in this case else: @@ -382,10 +386,7 @@ def initParser(): action="store_true") parser.add_argument( - "--set", help="Set a numeric preferences field", nargs=2, action='append') - - parser.add_argument( - "--setstr", help="Set a string preferences field", nargs=2, action='append') + "--set", help="Set a preferences field", nargs=2, action='append') parser.add_argument( "--setchan", help="Set a channel parameter", nargs=2, action='append') diff --git a/setup.py b/setup.py index 0307dd5..3524f46 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.2.00", + version="1.2.2", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown", From c63665650f8e30ae4b454bd8f8d1d5f4b2eb8328 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Thu, 4 Mar 2021 21:10:06 +0800 Subject: [PATCH 35/48] fix set url --- meshtastic/__init__.py | 26 +++++++++++++++++--------- meshtastic/__main__.py | 12 +++++++++++- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 743698c..e444401 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -131,7 +131,7 @@ class MeshInterface: self.noProto = noProto self.myInfo = None # We don't have device info yet self.responseHandlers = {} # A map from request ID to the handler - self.failure = None # If we've encountered a fatal exception it will be kept here + self.failure = None # If we've encountered a fatal exception it will be kept here random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) self._startConfig() @@ -290,8 +290,8 @@ class MeshInterface: p.set_radio.CopyFrom(self.radioConfig) self.sendData(p, self.myInfo.my_node_num, - portNum=portnums_pb2.PortNum.ADMIN_APP, - wantAck=True) + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) logging.debug("Wrote config") def writeChannel(self, channelIndex): @@ -301,9 +301,9 @@ class MeshInterface: p.set_channel.CopyFrom(self.channels[channelIndex]) self.sendData(p, self.myInfo.my_node_num, - portNum=portnums_pb2.PortNum.ADMIN_APP, - wantAck=True) - logging.debug("Wrote channel {channelIndex}") + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) + logging.debug("Wrote channel {channelIndex}") def getMyNodeInfo(self): if self.myInfo is None: @@ -384,8 +384,16 @@ class MeshInterface: decodedURL = base64.urlsafe_b64decode(splitURL[-1]) channelSet = apponly_pb2.ChannelSet() channelSet.ParseFromString(decodedURL) - fixme("set self.channels, see https://developers.google.com/protocol-buffers/docs/reference/python-generated?csw=1#repeated-fields") - self._writeChannels() + + i = 0 + for chs in channelSet.settings: + ch = channel_pb2.Channel() + ch.role = channel_pb2.Channel.Role.PRIMARY if i == 0 else channel_pb2.Channel.Role.SECONDARY + ch.index = i + ch.settings.CopyFrom(chs) + self.channels[ch.index] = ch + self.writeChannel(ch.index) + i = i + 1 def _waitConnected(self): """Block until the initial node db download is complete, or timeout @@ -520,7 +528,7 @@ class MeshInterface: if failmsg: self.failure = Exception(failmsg) - self.isConnected.set() # let waitConnected return this exception + self.isConnected.set() # let waitConnected return this exception self.close() elif fromRadio.HasField("node_info"): diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index de54ef6..4a29f13 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -28,6 +28,7 @@ parser = argparse.ArgumentParser() channelIndex = 0 + def onReceive(packet, interface): """Callback invoked when a packet arrives""" logging.debug(f"Received: {packet}") @@ -94,6 +95,8 @@ never = 0xffffffff oneday = 24 * 60 * 60 # Returns formatted value + + def formatFloat(value, formatStr="{:.2f}", unit="", default="N/A"): return formatStr.format(value)+unit if value else default @@ -128,6 +131,7 @@ def printNodes(nodes): table.setData(tableData) table.displayTable() + def setPref(attributes, name, valStr): """Set a channel or preferences value""" val = fromStr(valStr) @@ -143,6 +147,7 @@ def setPref(attributes, name, valStr): except Exception as ex: print(f"Can't set {name} due to {ex}") + def onConnected(interface): """Callback invoked when we connect to a radio""" closeNow = False # Should we drop the connection after we finish? @@ -230,6 +235,10 @@ def onConnected(interface): print("Writing modified preferences to device") interface.writeConfig() + if args.seturl: + closeNow = True + interface.setURL(args.seturl) + # handle changing channels if args.setchan or args.setch_longslow or args.setch_shortfast \ or args.seturl != None: @@ -334,7 +343,8 @@ def common(): args.seriallog = "stdout" # default to stdout if args.router != None: - logging.error('--set-router has been deprecated. Use "--set router true" or "--set router false" instead') + logging.error( + '--set-router has been deprecated. Use "--set router true" or "--set router false" instead') elif args.test: test.testAll() else: From f96520bb97f31879181dab056603d8f7932d4c5b Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 5 Mar 2021 08:27:13 +0800 Subject: [PATCH 36/48] 1.2.3 fix sendtext --- docs/meshtastic/index.html | 104 +++++++++++++++++++++++++++++++------ meshtastic/__main__.py | 8 +-- setup.py | 2 +- 3 files changed, 94 insertions(+), 20 deletions(-) diff --git a/docs/meshtastic/index.html b/docs/meshtastic/index.html index 485594d..d2c4151 100644 --- a/docs/meshtastic/index.html +++ b/docs/meshtastic/index.html @@ -218,7 +218,7 @@ class MeshInterface: self.noProto = noProto self.myInfo = None # We don't have device info yet self.responseHandlers = {} # A map from request ID to the handler - self.failure = None # If we've encountered a fatal exception it will be kept here + self.failure = None # If we've encountered a fatal exception it will be kept here random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) self._startConfig() @@ -377,10 +377,21 @@ class MeshInterface: p.set_radio.CopyFrom(self.radioConfig) self.sendData(p, self.myInfo.my_node_num, - portNum=portnums_pb2.PortNum.ADMIN_APP, - wantAck=True) + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) logging.debug("Wrote config") + def writeChannel(self, channelIndex): + """Write the current (edited) channel to the device""" + + p = admin_pb2.AdminMessage() + p.set_channel.CopyFrom(self.channels[channelIndex]) + + self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) + logging.debug("Wrote channel {channelIndex}") + def getMyNodeInfo(self): if self.myInfo is None: return None @@ -460,8 +471,16 @@ class MeshInterface: decodedURL = base64.urlsafe_b64decode(splitURL[-1]) channelSet = apponly_pb2.ChannelSet() channelSet.ParseFromString(decodedURL) - fixme("set self.channels, see https://developers.google.com/protocol-buffers/docs/reference/python-generated?csw=1#repeated-fields") - self._writeChannels() + + i = 0 + for chs in channelSet.settings: + ch = channel_pb2.Channel() + ch.role = channel_pb2.Channel.Role.PRIMARY if i == 0 else channel_pb2.Channel.Role.SECONDARY + ch.index = i + ch.settings.CopyFrom(chs) + self.channels[ch.index] = ch + self.writeChannel(ch.index) + i = i + 1 def _waitConnected(self): """Block until the initial node db download is complete, or timeout @@ -596,7 +615,7 @@ class MeshInterface: if failmsg: self.failure = Exception(failmsg) - self.isConnected.set() # let waitConnected return this exception + self.isConnected.set() # let waitConnected return this exception self.close() elif fromRadio.HasField("node_info"): @@ -1221,6 +1240,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d
  • setOwner
  • setURL
  • waitForConfig
  • +
  • writeChannel
  • writeConfig
  • @@ -1304,7 +1324,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d self.noProto = noProto self.myInfo = None # We don't have device info yet self.responseHandlers = {} # A map from request ID to the handler - self.failure = None # If we've encountered a fatal exception it will be kept here + self.failure = None # If we've encountered a fatal exception it will be kept here random.seed() # FIXME, we should not clobber the random seedval here, instead tell user they must call it self.currentPacketId = random.randint(0, 0xffffffff) self._startConfig() @@ -1463,10 +1483,21 @@ noProto – If True, don't try to run our protocol on the link - just be a d p.set_radio.CopyFrom(self.radioConfig) self.sendData(p, self.myInfo.my_node_num, - portNum=portnums_pb2.PortNum.ADMIN_APP, - wantAck=True) + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) logging.debug("Wrote config") + def writeChannel(self, channelIndex): + """Write the current (edited) channel to the device""" + + p = admin_pb2.AdminMessage() + p.set_channel.CopyFrom(self.channels[channelIndex]) + + self.sendData(p, self.myInfo.my_node_num, + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) + logging.debug("Wrote channel {channelIndex}") + def getMyNodeInfo(self): if self.myInfo is None: return None @@ -1546,8 +1577,16 @@ noProto – If True, don't try to run our protocol on the link - just be a d decodedURL = base64.urlsafe_b64decode(splitURL[-1]) channelSet = apponly_pb2.ChannelSet() channelSet.ParseFromString(decodedURL) - fixme("set self.channels, see https://developers.google.com/protocol-buffers/docs/reference/python-generated?csw=1#repeated-fields") - self._writeChannels() + + i = 0 + for chs in channelSet.settings: + ch = channel_pb2.Channel() + ch.role = channel_pb2.Channel.Role.PRIMARY if i == 0 else channel_pb2.Channel.Role.SECONDARY + ch.index = i + ch.settings.CopyFrom(chs) + self.channels[ch.index] = ch + self.writeChannel(ch.index) + i = i + 1 def _waitConnected(self): """Block until the initial node db download is complete, or timeout @@ -1682,7 +1721,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d if failmsg: self.failure = Exception(failmsg) - self.isConnected.set() # let waitConnected return this exception + self.isConnected.set() # let waitConnected return this exception self.close() elif fromRadio.HasField("node_info"): @@ -2121,8 +2160,16 @@ wantResponse – True if you want the service on the other side to send an a decodedURL = base64.urlsafe_b64decode(splitURL[-1]) channelSet = apponly_pb2.ChannelSet() channelSet.ParseFromString(decodedURL) - fixme("set self.channels, see https://developers.google.com/protocol-buffers/docs/reference/python-generated?csw=1#repeated-fields") - self._writeChannels() + + i = 0 + for chs in channelSet.settings: + ch = channel_pb2.Channel() + ch.role = channel_pb2.Channel.Role.PRIMARY if i == 0 else channel_pb2.Channel.Role.SECONDARY + ch.index = i + ch.settings.CopyFrom(chs) + self.channels[ch.index] = ch + self.writeChannel(ch.index) + i = i + 1
    @@ -2143,6 +2190,27 @@ wantResponse – True if you want the service on the other side to send an a return False +
    +def writeChannel(self, channelIndex) +
    +
    +

    Write the current (edited) channel to the device

    +
    + +Expand source code + +
    def writeChannel(self, channelIndex):
    +    """Write the current (edited) channel to the device"""
    +
    +    p = admin_pb2.AdminMessage()
    +    p.set_channel.CopyFrom(self.channels[channelIndex])
    +
    +    self.sendData(p, self.myInfo.my_node_num,
    +                  portNum=portnums_pb2.PortNum.ADMIN_APP,
    +                  wantAck=True)
    +    logging.debug("Wrote channel {channelIndex}")
    +
    +
    def writeConfig(self)
    @@ -2161,8 +2229,8 @@ wantResponse – True if you want the service on the other side to send an a p.set_radio.CopyFrom(self.radioConfig) self.sendData(p, self.myInfo.my_node_num, - portNum=portnums_pb2.PortNum.ADMIN_APP, - wantAck=True) + portNum=portnums_pb2.PortNum.ADMIN_APP, + wantAck=True) logging.debug("Wrote config") @@ -2270,6 +2338,7 @@ debugOut {stream} – If a stream is provided, any debug serial output from
  • setOwner
  • setURL
  • waitForConfig
  • +
  • writeChannel
  • writeConfig
  • @@ -2506,6 +2575,7 @@ start the reading thread later.

  • setOwner
  • setURL
  • waitForConfig
  • +
  • writeChannel
  • writeConfig
  • @@ -2584,6 +2654,7 @@ hostname {string} – Hostname/IP address of the device to connect to

    setOwner
  • setURL
  • waitForConfig
  • +
  • writeChannel
  • writeConfig
  • @@ -2655,6 +2726,7 @@ hostname {string} – Hostname/IP address of the device to connect to

    setOwner
  • setURL
  • waitForConfig
  • +
  • writeChannel
  • writeConfig
  • diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 4a29f13..bc27ca5 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -34,14 +34,16 @@ def onReceive(packet, interface): logging.debug(f"Received: {packet}") try: + d = packet.get('decoded') + # Exit once we receive a reply - if args.sendtext and packet["to"] == interface.myInfo.my_node_num: + if args.sendtext and packet["to"] == interface.myInfo.my_node_num and d["portnum"] == portnums_pb2.PortNum.TEXT_MESSAGE_APP: interface.close() # after running command then exit # Reply to every received message with some stats if args.reply: - if packet['decoded']['data'] is not None: - msg = packet['decoded']['data']['text'] + msg = d.get('text') + if msg: #shortName = packet['decoded']['data']['shortName'] rxSnr = packet['rxSnr'] hopLimit = packet['hopLimit'] diff --git a/setup.py b/setup.py index 3524f46..44e9f98 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.2.2", + version="1.2.3", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown", From 4c5aa7386b7a6f356ce13790ffed2764b1dfe1a8 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 5 Mar 2021 08:54:52 +0800 Subject: [PATCH 37/48] improve debug output formatting --- meshtastic/__init__.py | 27 +++++++++++++++++---------- meshtastic/__main__.py | 2 -- meshtastic/util.py | 5 +++++ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index e444401..29a8220 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -68,7 +68,7 @@ import base64 import platform import socket from . import mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2, environmental_measurement_pb2, remote_hardware_pb2, channel_pb2, radioconfig_pb2, util -from .util import fixme, catchAndIgnore +from .util import fixme, catchAndIgnore, stripnl from pubsub import pub from dotmap import DotMap from typing import * @@ -188,7 +188,7 @@ class MeshInterface: Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ if getattr(data, "SerializeToString", None): - logging.debug(f"Serializing protobuf as data: {data}") + logging.debug(f"Serializing protobuf as data: {stripnl(data)}") data = data.SerializeToString() if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: @@ -445,7 +445,7 @@ class MeshInterface: logging.warn( f"Not sending packet because protocol use is disabled by noProto") else: - logging.debug(f"Sending toRadio: {toRadio}") + logging.debug(f"Sending toRadio: {stripnl(toRadio)}") self._sendToRadioImpl(toRadio) def _sendToRadioImpl(self, toRadio): @@ -488,11 +488,15 @@ class MeshInterface: """A closure to handle the response packet""" c = p["decoded"]["admin"]["raw"].get_channel_response self.partialChannels.append(c) - logging.debug(f"Received channel {c}") - # for stress testing, download all channels - # if channelNum >= self.myInfo.max_channels - 1: - if c.role == channel_pb2.Channel.Role.DISABLED or channelNum >= self.myInfo.max_channels - 1: - # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching + logging.debug(f"Received channel {stripnl(c)}") + + # for stress testing, we can always download all channels + fastChannelDownload = False + + # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching + quitEarly = (c.role == channel_pb2.Channel.Role.DISABLED) and fastChannelDownload + + if quitEarly or channelNum >= self.myInfo.max_channels - 1: self.channels = self.partialChannels # FIXME, the following should only be called after we have settings and channels self._connected() # Tell everone else we are ready to go @@ -513,9 +517,9 @@ class MeshInterface: fromRadio = mesh_pb2.FromRadio() fromRadio.ParseFromString(fromRadioBytes) asDict = google.protobuf.json_format.MessageToDict(fromRadio) - logging.debug(f"Received: {asDict}") if fromRadio.HasField("my_info"): self.myInfo = fromRadio.my_info + logging.debug(f"Received myinfo: {fromRadio.my_info}") failmsg = None # Check for app too old @@ -537,6 +541,9 @@ class MeshInterface: self._fixupPosition(node["position"]) except: logging.debug("Node without position") + + logging.debug(f"Received nodeinfo: {node}") + self.nodesByNum[node["num"]] = node if "user" in node: # Some nodes might not have user/ids assigned yet self.nodes[node["user"]["id"]] = node @@ -671,7 +678,7 @@ class MeshInterface: if handler is not None: handler.callback(asDict) - logging.debug(f"Publishing topic {topic}") + logging.debug(f"Publishing {topic}: packet={stripnl(asDict)} ") catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( topic, packet=asDict, interface=self)) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index bc27ca5..dea4708 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -31,8 +31,6 @@ channelIndex = 0 def onReceive(packet, interface): """Callback invoked when a packet arrives""" - logging.debug(f"Received: {packet}") - try: d = packet.get('decoded') diff --git a/meshtastic/util.py b/meshtastic/util.py index a20d0ed..1b062e3 100644 --- a/meshtastic/util.py +++ b/meshtastic/util.py @@ -7,6 +7,11 @@ import serial.tools.list_ports blacklistVids = dict.fromkeys([0x1366]) +def stripnl(s): + """remove newlines from a string""" + return str(s).replace("\n", " ") + + def fixme(message): raise Exception(f"FIXME: {message}") From 6bb7766861f070dd9e26e4bddd14bd258b3321f6 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 5 Mar 2021 09:15:49 +0800 Subject: [PATCH 38/48] more debug formatting fixes --- meshtastic/__init__.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 29a8220..2dffb06 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -270,6 +270,7 @@ class MeshInterface: meshPacket.id = self._generatePacketId() toRadio.packet.CopyFrom(meshPacket) + logging.debug(f"Sending packet: {stripnl(meshPacket)}") self._sendToRadio(toRadio) return meshPacket @@ -445,7 +446,7 @@ class MeshInterface: logging.warn( f"Not sending packet because protocol use is disabled by noProto") else: - logging.debug(f"Sending toRadio: {stripnl(toRadio)}") + #logging.debug(f"Sending toRadio: {stripnl(toRadio)}") self._sendToRadioImpl(toRadio) def _sendToRadioImpl(self, toRadio): @@ -489,6 +490,7 @@ class MeshInterface: c = p["decoded"]["admin"]["raw"].get_channel_response self.partialChannels.append(c) logging.debug(f"Received channel {stripnl(c)}") + index = c.index # for stress testing, we can always download all channels fastChannelDownload = False @@ -496,12 +498,12 @@ class MeshInterface: # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching quitEarly = (c.role == channel_pb2.Channel.Role.DISABLED) and fastChannelDownload - if quitEarly or channelNum >= self.myInfo.max_channels - 1: + if quitEarly or index >= self.myInfo.max_channels - 1: self.channels = self.partialChannels # FIXME, the following should only be called after we have settings and channels self._connected() # Tell everone else we are ready to go else: - self._requestChannel(channelNum + 1) + self._requestChannel(index + 1) return self.sendData(p, self.myInfo.my_node_num, portNum=portnums_pb2.PortNum.ADMIN_APP, @@ -711,7 +713,7 @@ class BLEInterface(MeshInterface): def _sendToRadioImpl(self, toRadio): """Send a ToRadio protobuf to the device""" - logging.debug(f"Sending: {toRadio}") + # logging.debug(f"Sending: {stripnl(toRadio)}") b = toRadio.SerializeToString() self.device.char_write(TORADIO_UUID, b) @@ -791,7 +793,7 @@ class StreamInterface(MeshInterface): def _sendToRadioImpl(self, toRadio): """Send a ToRadio protobuf to the device""" - logging.debug(f"Sending: {toRadio}") + logging.debug(f"Sending: {stripnl(toRadio)}") b = toRadio.SerializeToString() bufLen = len(b) # We convert into a string, because the TCP code doesn't work with byte arrays From 3187874c481b88edc7d126fe44457bcf34510f47 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 5 Mar 2021 10:18:49 +0800 Subject: [PATCH 39/48] properly ignore messages we sent --- meshtastic/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 2dffb06..90641c0 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -521,7 +521,7 @@ class MeshInterface: asDict = google.protobuf.json_format.MessageToDict(fromRadio) if fromRadio.HasField("my_info"): self.myInfo = fromRadio.my_info - logging.debug(f"Received myinfo: {fromRadio.my_info}") + logging.debug(f"Received myinfo: {stripnl(fromRadio.my_info)}") failmsg = None # Check for app too old @@ -622,6 +622,14 @@ class MeshInterface: # want the raw protobuf, so we provide it in "raw" asDict["raw"] = meshPacket + # from might be missing if the nodenum was zero. + if not "from" in asDict: + asDict["from"] = 0 + logging.error(f"Device returned a packet we sent, ignoring: {stripnl(asDict)}") + return + if not "to" in asDict: + asDict["to"] = 0 + # /add fromId and toId fields based on the node ID asDict["fromId"] = self._nodeNumToId(asDict["from"]) asDict["toId"] = self._nodeNumToId(asDict["to"]) From 54e95999819c8221800441a57bd1bebadf26a4f7 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 5 Mar 2021 11:43:00 +0800 Subject: [PATCH 40/48] less logspam --- meshtastic/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 90641c0..211374b 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -270,7 +270,7 @@ class MeshInterface: meshPacket.id = self._generatePacketId() toRadio.packet.CopyFrom(meshPacket) - logging.debug(f"Sending packet: {stripnl(meshPacket)}") + #logging.debug(f"Sending packet: {stripnl(meshPacket)}") self._sendToRadio(toRadio) return meshPacket @@ -493,7 +493,7 @@ class MeshInterface: index = c.index # for stress testing, we can always download all channels - fastChannelDownload = False + fastChannelDownload = True # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching quitEarly = (c.role == channel_pb2.Channel.Role.DISABLED) and fastChannelDownload From fcb4d3ec5b46bb1c6d09129318a04dd7632bd90f Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 5 Mar 2021 11:50:30 +0800 Subject: [PATCH 41/48] 1.2.4 --- docs/meshtastic/index.html | 86 ++++++++++++++++++++++++++------------ docs/meshtastic/util.html | 20 +++++++++ setup.py | 2 +- 3 files changed, 81 insertions(+), 27 deletions(-) diff --git a/docs/meshtastic/index.html b/docs/meshtastic/index.html index d2c4151..59188cf 100644 --- a/docs/meshtastic/index.html +++ b/docs/meshtastic/index.html @@ -155,7 +155,7 @@ import base64 import platform import socket from . import mesh_pb2, portnums_pb2, apponly_pb2, admin_pb2, environmental_measurement_pb2, remote_hardware_pb2, channel_pb2, radioconfig_pb2, util -from .util import fixme, catchAndIgnore +from .util import fixme, catchAndIgnore, stripnl from pubsub import pub from dotmap import DotMap from typing import * @@ -275,7 +275,7 @@ class MeshInterface: Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ if getattr(data, "SerializeToString", None): - logging.debug(f"Serializing protobuf as data: {data}") + logging.debug(f"Serializing protobuf as data: {stripnl(data)}") data = data.SerializeToString() if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: @@ -357,6 +357,7 @@ class MeshInterface: meshPacket.id = self._generatePacketId() toRadio.packet.CopyFrom(meshPacket) + #logging.debug(f"Sending packet: {stripnl(meshPacket)}") self._sendToRadio(toRadio) return meshPacket @@ -532,7 +533,7 @@ class MeshInterface: logging.warn( f"Not sending packet because protocol use is disabled by noProto") else: - logging.debug(f"Sending toRadio: {toRadio}") + #logging.debug(f"Sending toRadio: {stripnl(toRadio)}") self._sendToRadioImpl(toRadio) def _sendToRadioImpl(self, toRadio): @@ -575,16 +576,21 @@ class MeshInterface: """A closure to handle the response packet""" c = p["decoded"]["admin"]["raw"].get_channel_response self.partialChannels.append(c) - logging.debug(f"Received channel {c}") - # for stress testing, download all channels - # if channelNum >= self.myInfo.max_channels - 1: - if c.role == channel_pb2.Channel.Role.DISABLED or channelNum >= self.myInfo.max_channels - 1: - # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching + logging.debug(f"Received channel {stripnl(c)}") + index = c.index + + # for stress testing, we can always download all channels + fastChannelDownload = True + + # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching + quitEarly = (c.role == channel_pb2.Channel.Role.DISABLED) and fastChannelDownload + + if quitEarly or index >= self.myInfo.max_channels - 1: self.channels = self.partialChannels # FIXME, the following should only be called after we have settings and channels self._connected() # Tell everone else we are ready to go else: - self._requestChannel(channelNum + 1) + self._requestChannel(index + 1) return self.sendData(p, self.myInfo.my_node_num, portNum=portnums_pb2.PortNum.ADMIN_APP, @@ -600,9 +606,9 @@ class MeshInterface: fromRadio = mesh_pb2.FromRadio() fromRadio.ParseFromString(fromRadioBytes) asDict = google.protobuf.json_format.MessageToDict(fromRadio) - logging.debug(f"Received: {asDict}") if fromRadio.HasField("my_info"): self.myInfo = fromRadio.my_info + logging.debug(f"Received myinfo: {stripnl(fromRadio.my_info)}") failmsg = None # Check for app too old @@ -624,6 +630,9 @@ class MeshInterface: self._fixupPosition(node["position"]) except: logging.debug("Node without position") + + logging.debug(f"Received nodeinfo: {node}") + self.nodesByNum[node["num"]] = node if "user" in node: # Some nodes might not have user/ids assigned yet self.nodes[node["user"]["id"]] = node @@ -700,6 +709,14 @@ class MeshInterface: # want the raw protobuf, so we provide it in "raw" asDict["raw"] = meshPacket + # from might be missing if the nodenum was zero. + if not "from" in asDict: + asDict["from"] = 0 + logging.error(f"Device returned a packet we sent, ignoring: {stripnl(asDict)}") + return + if not "to" in asDict: + asDict["to"] = 0 + # /add fromId and toId fields based on the node ID asDict["fromId"] = self._nodeNumToId(asDict["from"]) asDict["toId"] = self._nodeNumToId(asDict["to"]) @@ -758,7 +775,7 @@ class MeshInterface: if handler is not None: handler.callback(asDict) - logging.debug(f"Publishing topic {topic}") + logging.debug(f"Publishing {topic}: packet={stripnl(asDict)} ") catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( topic, packet=asDict, interface=self)) @@ -791,7 +808,7 @@ class BLEInterface(MeshInterface): def _sendToRadioImpl(self, toRadio): """Send a ToRadio protobuf to the device""" - logging.debug(f"Sending: {toRadio}") + # logging.debug(f"Sending: {stripnl(toRadio)}") b = toRadio.SerializeToString() self.device.char_write(TORADIO_UUID, b) @@ -871,7 +888,7 @@ class StreamInterface(MeshInterface): def _sendToRadioImpl(self, toRadio): """Send a ToRadio protobuf to the device""" - logging.debug(f"Sending: {toRadio}") + logging.debug(f"Sending: {stripnl(toRadio)}") b = toRadio.SerializeToString() bufLen = len(b) # We convert into a string, because the TCP code doesn't work with byte arrays @@ -1194,7 +1211,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d def _sendToRadioImpl(self, toRadio): """Send a ToRadio protobuf to the device""" - logging.debug(f"Sending: {toRadio}") + # logging.debug(f"Sending: {stripnl(toRadio)}") b = toRadio.SerializeToString() self.device.char_write(TORADIO_UUID, b) @@ -1381,7 +1398,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ if getattr(data, "SerializeToString", None): - logging.debug(f"Serializing protobuf as data: {data}") + logging.debug(f"Serializing protobuf as data: {stripnl(data)}") data = data.SerializeToString() if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: @@ -1463,6 +1480,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d meshPacket.id = self._generatePacketId() toRadio.packet.CopyFrom(meshPacket) + #logging.debug(f"Sending packet: {stripnl(meshPacket)}") self._sendToRadio(toRadio) return meshPacket @@ -1638,7 +1656,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d logging.warn( f"Not sending packet because protocol use is disabled by noProto") else: - logging.debug(f"Sending toRadio: {toRadio}") + #logging.debug(f"Sending toRadio: {stripnl(toRadio)}") self._sendToRadioImpl(toRadio) def _sendToRadioImpl(self, toRadio): @@ -1681,16 +1699,21 @@ noProto – If True, don't try to run our protocol on the link - just be a d """A closure to handle the response packet""" c = p["decoded"]["admin"]["raw"].get_channel_response self.partialChannels.append(c) - logging.debug(f"Received channel {c}") - # for stress testing, download all channels - # if channelNum >= self.myInfo.max_channels - 1: - if c.role == channel_pb2.Channel.Role.DISABLED or channelNum >= self.myInfo.max_channels - 1: - # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching + logging.debug(f"Received channel {stripnl(c)}") + index = c.index + + # for stress testing, we can always download all channels + fastChannelDownload = True + + # Once we see a response that has NO settings, assume we are at the end of channels and stop fetching + quitEarly = (c.role == channel_pb2.Channel.Role.DISABLED) and fastChannelDownload + + if quitEarly or index >= self.myInfo.max_channels - 1: self.channels = self.partialChannels # FIXME, the following should only be called after we have settings and channels self._connected() # Tell everone else we are ready to go else: - self._requestChannel(channelNum + 1) + self._requestChannel(index + 1) return self.sendData(p, self.myInfo.my_node_num, portNum=portnums_pb2.PortNum.ADMIN_APP, @@ -1706,9 +1729,9 @@ noProto – If True, don't try to run our protocol on the link - just be a d fromRadio = mesh_pb2.FromRadio() fromRadio.ParseFromString(fromRadioBytes) asDict = google.protobuf.json_format.MessageToDict(fromRadio) - logging.debug(f"Received: {asDict}") if fromRadio.HasField("my_info"): self.myInfo = fromRadio.my_info + logging.debug(f"Received myinfo: {stripnl(fromRadio.my_info)}") failmsg = None # Check for app too old @@ -1730,6 +1753,9 @@ noProto – If True, don't try to run our protocol on the link - just be a d self._fixupPosition(node["position"]) except: logging.debug("Node without position") + + logging.debug(f"Received nodeinfo: {node}") + self.nodesByNum[node["num"]] = node if "user" in node: # Some nodes might not have user/ids assigned yet self.nodes[node["user"]["id"]] = node @@ -1806,6 +1832,14 @@ noProto – If True, don't try to run our protocol on the link - just be a d # want the raw protobuf, so we provide it in "raw" asDict["raw"] = meshPacket + # from might be missing if the nodenum was zero. + if not "from" in asDict: + asDict["from"] = 0 + logging.error(f"Device returned a packet we sent, ignoring: {stripnl(asDict)}") + return + if not "to" in asDict: + asDict["to"] = 0 + # /add fromId and toId fields based on the node ID asDict["fromId"] = self._nodeNumToId(asDict["from"]) asDict["toId"] = self._nodeNumToId(asDict["to"]) @@ -1864,7 +1898,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d if handler is not None: handler.callback(asDict) - logging.debug(f"Publishing topic {topic}") + logging.debug(f"Publishing {topic}: packet={stripnl(asDict)} ") catchAndIgnore(f"publishing {topic}", lambda: pub.sendMessage( topic, packet=asDict, interface=self)) @@ -1996,7 +2030,7 @@ onResponse – A closure of the form funct(packet), that will be called when Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ if getattr(data, "SerializeToString", None): - logging.debug(f"Serializing protobuf as data: {data}") + logging.debug(f"Serializing protobuf as data: {stripnl(data)}") data = data.SerializeToString() if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: @@ -2429,7 +2463,7 @@ debugOut {stream} – If a stream is provided, any debug serial output from def _sendToRadioImpl(self, toRadio): """Send a ToRadio protobuf to the device""" - logging.debug(f"Sending: {toRadio}") + logging.debug(f"Sending: {stripnl(toRadio)}") b = toRadio.SerializeToString() bufLen = len(b) # We convert into a string, because the TCP code doesn't work with byte arrays diff --git a/docs/meshtastic/util.html b/docs/meshtastic/util.html index 973bd30..cec8525 100644 --- a/docs/meshtastic/util.html +++ b/docs/meshtastic/util.html @@ -34,6 +34,11 @@ import serial.tools.list_ports blacklistVids = dict.fromkeys([0x1366]) +def stripnl(s): + """remove newlines from a string""" + return str(s).replace("\n", " ") + + def fixme(message): raise Exception(f"FIXME: {message}") @@ -127,6 +132,20 @@ class dotdict(dict): raise Exception(f"FIXME: {message}") +
    +def stripnl(s) +
    +
    +

    remove newlines from a string

    +
    + +Expand source code + +
    def stripnl(s):
    +    """remove newlines from a string"""
    +    return str(s).replace("\n", " ")
    +
    +
    @@ -172,6 +191,7 @@ class dotdict(dict):
  • catchAndIgnore
  • findPorts
  • fixme
  • +
  • stripnl
  • Classes

    diff --git a/setup.py b/setup.py index 44e9f98..1c586fb 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.2.3", + version="1.2.4", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown", From 9e5a5a0c74cbea57954216dc0b15d2be46b3ae4e Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 5 Mar 2021 13:44:25 +0800 Subject: [PATCH 42/48] remove unneeded base64 padding --- meshtastic/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 211374b..141fcac 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -372,7 +372,7 @@ class MeshInterface: channelSet.settings.append(c.settings) bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') - return f"https://www.meshtastic.org/d/#{s}" + return f"https://www.meshtastic.org/d/#{s}".replace("=", "") def setURL(self, url): """Set mesh network URL""" From 087b7563e7a8ff1a04c3d7271de7ef53e4ed9d67 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sat, 6 Mar 2021 14:27:49 +0800 Subject: [PATCH 43/48] 1.2.5 add hopLimit support and fix automatic text decoding --- docs/meshtastic/index.html | 48 ++++++++++++++++++++++++++++---------- docs/meshtastic/test.html | 4 ++-- meshtastic/__init__.py | 17 ++++++++++---- meshtastic/test.py | 2 +- setup.py | 2 +- 5 files changed, 53 insertions(+), 20 deletions(-) diff --git a/docs/meshtastic/index.html b/docs/meshtastic/index.html index 59188cf..7943728 100644 --- a/docs/meshtastic/index.html +++ b/docs/meshtastic/index.html @@ -164,6 +164,7 @@ START1 = 0x94 START2 = 0xc3 HEADER_LEN = 4 MAX_TO_FROM_RADIO_SIZE = 512 +defaultHopLimit = 3 BROADCAST_ADDR = "^all" # A special ID that means broadcast @@ -238,6 +239,7 @@ class MeshInterface: destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False, + hopLimit=defaultHopLimit, onResponse=None): """Send a utf8 string to some other node, if the node has a display it will also be shown on the device. @@ -256,11 +258,13 @@ class MeshInterface: portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, wantAck=wantAck, wantResponse=wantResponse, + hopLimit=hopLimit, onResponse=onResponse) def sendData(self, data, destinationId=BROADCAST_ADDR, portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, wantResponse=False, + hopLimit=defaultHopLimit, onResponse=None): """Send a data packet to some other node @@ -280,12 +284,16 @@ class MeshInterface: if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: raise Exception("Data payload too big") + + if portNum == portnums_pb2.PortNum.UNKNOWN_APP: # we are now more strict wrt port numbers + raise Exception("A non-zero port number must be specified") + meshPacket = mesh_pb2.MeshPacket() meshPacket.decoded.payload = data meshPacket.decoded.portnum = portNum meshPacket.decoded.want_response = wantResponse - p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck) + p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck, hopLimit=hopLimit) if onResponse is not None: self._addResponseHandler(p.id, onResponse) return p @@ -325,7 +333,7 @@ class MeshInterface: def _sendPacket(self, meshPacket, destinationId=BROADCAST_ADDR, - wantAck=False): + wantAck=False, hopLimit=defaultHopLimit): """Send a MeshPacket to the specified node (or if unspecified, broadcast). You probably don't want this - use sendData instead. @@ -350,6 +358,7 @@ class MeshInterface: meshPacket.to = nodeNum meshPacket.want_ack = wantAck + meshPacket.hop_limit = hopLimit # if the user hasn't set an ID for this packet (likely and recommended), we should pick a new unique ID # so the message can be tracked. @@ -459,7 +468,7 @@ class MeshInterface: channelSet.settings.append(c.settings) bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') - return f"https://www.meshtastic.org/d/#{s}" + return f"https://www.meshtastic.org/d/#{s}".replace("=", "") def setURL(self, url): """Set mesh network URL""" @@ -1062,8 +1071,8 @@ def _onTextReceive(iface, asDict): # Usually btw this problem is caused by apps sending binary data but setting the payload type to # text. try: - asDict["decoded"]["text"] = meshPacket.decoded.payload.decode( - "utf-8") + asBytes = asDict["decoded"]["payload"] + asDict["decoded"]["text"] = asBytes.decode("utf-8") except Exception as ex: logging.error(f"Malformatted utf8 in text message: {ex}") @@ -1361,6 +1370,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False, + hopLimit=defaultHopLimit, onResponse=None): """Send a utf8 string to some other node, if the node has a display it will also be shown on the device. @@ -1379,11 +1389,13 @@ noProto – If True, don't try to run our protocol on the link - just be a d portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, wantAck=wantAck, wantResponse=wantResponse, + hopLimit=hopLimit, onResponse=onResponse) def sendData(self, data, destinationId=BROADCAST_ADDR, portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, wantResponse=False, + hopLimit=defaultHopLimit, onResponse=None): """Send a data packet to some other node @@ -1403,12 +1415,16 @@ noProto – If True, don't try to run our protocol on the link - just be a d if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: raise Exception("Data payload too big") + + if portNum == portnums_pb2.PortNum.UNKNOWN_APP: # we are now more strict wrt port numbers + raise Exception("A non-zero port number must be specified") + meshPacket = mesh_pb2.MeshPacket() meshPacket.decoded.payload = data meshPacket.decoded.portnum = portNum meshPacket.decoded.want_response = wantResponse - p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck) + p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck, hopLimit=hopLimit) if onResponse is not None: self._addResponseHandler(p.id, onResponse) return p @@ -1448,7 +1464,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d def _sendPacket(self, meshPacket, destinationId=BROADCAST_ADDR, - wantAck=False): + wantAck=False, hopLimit=defaultHopLimit): """Send a MeshPacket to the specified node (or if unspecified, broadcast). You probably don't want this - use sendData instead. @@ -1473,6 +1489,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d meshPacket.to = nodeNum meshPacket.want_ack = wantAck + meshPacket.hop_limit = hopLimit # if the user hasn't set an ID for this packet (likely and recommended), we should pick a new unique ID # so the message can be tracked. @@ -1582,7 +1599,7 @@ noProto – If True, don't try to run our protocol on the link - just be a d channelSet.settings.append(c.settings) bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') - return f"https://www.meshtastic.org/d/#{s}" + return f"https://www.meshtastic.org/d/#{s}".replace("=", "") def setURL(self, url): """Set mesh network URL""" @@ -1927,7 +1944,7 @@ def channelURL(self): channelSet.settings.append(c.settings) bytes = channelSet.SerializeToString() s = base64.urlsafe_b64encode(bytes).decode('ascii') - return f"https://www.meshtastic.org/d/#{s}" + return f"https://www.meshtastic.org/d/#{s}".replace("=", "") @@ -1997,7 +2014,7 @@ def channelURL(self):
    -def sendData(self, data, destinationId='^all', portNum=256, wantAck=False, wantResponse=False, onResponse=None) +def sendData(self, data, destinationId='^all', portNum=256, wantAck=False, wantResponse=False, hopLimit=3, onResponse=None)

    Send a data packet to some other node

    @@ -2016,6 +2033,7 @@ onResponse – A closure of the form funct(packet), that will be called when
    def sendData(self, data, destinationId=BROADCAST_ADDR,
                  portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False,
                  wantResponse=False,
    +             hopLimit=defaultHopLimit,
                  onResponse=None):
         """Send a data packet to some other node
     
    @@ -2035,12 +2053,16 @@ onResponse – A closure of the form funct(packet), that will be called when
     
         if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN:
             raise Exception("Data payload too big")
    +
    +    if portNum == portnums_pb2.PortNum.UNKNOWN_APP: # we are now more strict wrt port numbers
    +        raise Exception("A non-zero port number must be specified")
    +
         meshPacket = mesh_pb2.MeshPacket()
         meshPacket.decoded.payload = data
         meshPacket.decoded.portnum = portNum
         meshPacket.decoded.want_response = wantResponse
     
    -    p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck)
    +    p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck, hopLimit=hopLimit)
         if onResponse is not None:
             self._addResponseHandler(p.id, onResponse)
         return p
    @@ -2091,7 +2113,7 @@ the local position.

    -def sendText(self, text: ~AnyStr, destinationId='^all', wantAck=False, wantResponse=False, onResponse=None) +def sendText(self, text: ~AnyStr, destinationId='^all', wantAck=False, wantResponse=False, hopLimit=3, onResponse=None)

    Send a utf8 string to some other node, if the node has a display it will also be shown on the device.

    @@ -2111,6 +2133,7 @@ wantResponse – True if you want the service on the other side to send an a destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False, + hopLimit=defaultHopLimit, onResponse=None): """Send a utf8 string to some other node, if the node has a display it will also be shown on the device. @@ -2129,6 +2152,7 @@ wantResponse – True if you want the service on the other side to send an a portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, wantAck=wantAck, wantResponse=wantResponse, + hopLimit=hopLimit, onResponse=onResponse)
    diff --git a/docs/meshtastic/test.html b/docs/meshtastic/test.html index 12327be..73bc6b4 100644 --- a/docs/meshtastic/test.html +++ b/docs/meshtastic/test.html @@ -53,7 +53,7 @@ def onReceive(packet, interface): if sendingInterface == interface: print("Ignoring sending interface") else: - print(f"From {interface.stream.port}: {packet}") + # print(f"From {interface.stream.port}: {packet}") p = DotMap(packet) if p.decoded.portnum == "TEXT_MESSAGE_APP": @@ -227,7 +227,7 @@ def testAll(): if sendingInterface == interface: print("Ignoring sending interface") else: - print(f"From {interface.stream.port}: {packet}") + # print(f"From {interface.stream.port}: {packet}") p = DotMap(packet) if p.decoded.portnum == "TEXT_MESSAGE_APP": diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 141fcac..dd69d99 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -77,6 +77,7 @@ START1 = 0x94 START2 = 0xc3 HEADER_LEN = 4 MAX_TO_FROM_RADIO_SIZE = 512 +defaultHopLimit = 3 BROADCAST_ADDR = "^all" # A special ID that means broadcast @@ -151,6 +152,7 @@ class MeshInterface: destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False, + hopLimit=defaultHopLimit, onResponse=None): """Send a utf8 string to some other node, if the node has a display it will also be shown on the device. @@ -169,11 +171,13 @@ class MeshInterface: portNum=portnums_pb2.PortNum.TEXT_MESSAGE_APP, wantAck=wantAck, wantResponse=wantResponse, + hopLimit=hopLimit, onResponse=onResponse) def sendData(self, data, destinationId=BROADCAST_ADDR, portNum=portnums_pb2.PortNum.PRIVATE_APP, wantAck=False, wantResponse=False, + hopLimit=defaultHopLimit, onResponse=None): """Send a data packet to some other node @@ -193,12 +197,16 @@ class MeshInterface: if len(data) > mesh_pb2.Constants.DATA_PAYLOAD_LEN: raise Exception("Data payload too big") + + if portNum == portnums_pb2.PortNum.UNKNOWN_APP: # we are now more strict wrt port numbers + raise Exception("A non-zero port number must be specified") + meshPacket = mesh_pb2.MeshPacket() meshPacket.decoded.payload = data meshPacket.decoded.portnum = portNum meshPacket.decoded.want_response = wantResponse - p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck) + p = self._sendPacket(meshPacket, destinationId, wantAck=wantAck, hopLimit=hopLimit) if onResponse is not None: self._addResponseHandler(p.id, onResponse) return p @@ -238,7 +246,7 @@ class MeshInterface: def _sendPacket(self, meshPacket, destinationId=BROADCAST_ADDR, - wantAck=False): + wantAck=False, hopLimit=defaultHopLimit): """Send a MeshPacket to the specified node (or if unspecified, broadcast). You probably don't want this - use sendData instead. @@ -263,6 +271,7 @@ class MeshInterface: meshPacket.to = nodeNum meshPacket.want_ack = wantAck + meshPacket.hop_limit = hopLimit # if the user hasn't set an ID for this packet (likely and recommended), we should pick a new unique ID # so the message can be tracked. @@ -975,8 +984,8 @@ def _onTextReceive(iface, asDict): # Usually btw this problem is caused by apps sending binary data but setting the payload type to # text. try: - asDict["decoded"]["text"] = meshPacket.decoded.payload.decode( - "utf-8") + asBytes = asDict["decoded"]["payload"] + asDict["decoded"]["text"] = asBytes.decode("utf-8") except Exception as ex: logging.error(f"Malformatted utf8 in text message: {ex}") diff --git a/meshtastic/test.py b/meshtastic/test.py index 0eb8747..4147ae4 100644 --- a/meshtastic/test.py +++ b/meshtastic/test.py @@ -25,7 +25,7 @@ def onReceive(packet, interface): if sendingInterface == interface: print("Ignoring sending interface") else: - print(f"From {interface.stream.port}: {packet}") + # print(f"From {interface.stream.port}: {packet}") p = DotMap(packet) if p.decoded.portnum == "TEXT_MESSAGE_APP": diff --git a/setup.py b/setup.py index 1c586fb..442525d 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.2.4", + version="1.2.5", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown", From 61621702cf155392db539aa2b772a87d56d80c28 Mon Sep 17 00:00:00 2001 From: Charles Crossan Date: Sat, 6 Mar 2021 10:51:56 -0500 Subject: [PATCH 44/48] Closes #61 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98d667f..b7a6911 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Installation is easily done through the Python package installer pip (note, you - check that your computer has the required serial drivers installed, if not download them from [here](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers). - check that your computer has Python 3 installed. -- check that your computer has “pip3” installed, if not follow [this guide](https://www.makeuseof.com/tag/install-pip-for-python/). +- check that your computer has "pip3" installed, if not follow [this guide](https://www.makeuseof.com/tag/install-pip-for-python/). - check that pytap2 is installed by pip3. If not, install it: ``` sudo pip3 install --upgrade pytap2 From 27c827cf3d42aec9834600b1b61a1681b0c714a9 Mon Sep 17 00:00:00 2001 From: Charles Crossan Date: Sat, 6 Mar 2021 10:55:06 -0500 Subject: [PATCH 45/48] update protobufs and bump to 1.2.6 --- meshtastic/portnums_pb2.py | 12 +++--- meshtastic/radioconfig_pb2.py | 72 +++++++++++++++++++++++++++++------ proto | 2 +- setup.py | 2 +- 4 files changed, 69 insertions(+), 19 deletions(-) diff --git a/meshtastic/portnums_pb2.py b/meshtastic/portnums_pb2.py index 6194bd6..f677cd1 100644 --- a/meshtastic/portnums_pb2.py +++ b/meshtastic/portnums_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -76,22 +76,22 @@ _PORTNUM = _descriptor.EnumDescriptor( type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ENVIRONMENTAL_MEASUREMENT_APP', index=9, number=34, + name='SERIAL_APP', index=9, number=64, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='SERIAL_APP', index=10, number=64, + name='STORE_FORWARD_APP', index=10, number=65, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='STORE_FORWARD_APP', index=11, number=65, + name='RANGE_TEST_APP', index=11, number=66, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='RANGE_TEST_APP', index=12, number=66, + name='ENVIRONMENTAL_MEASUREMENT_APP', index=12, number=67, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), @@ -128,10 +128,10 @@ ROUTING_APP = 5 ADMIN_APP = 6 REPLY_APP = 32 IP_TUNNEL_APP = 33 -ENVIRONMENTAL_MEASUREMENT_APP = 34 SERIAL_APP = 64 STORE_FORWARD_APP = 65 RANGE_TEST_APP = 66 +ENVIRONMENTAL_MEASUREMENT_APP = 67 PRIVATE_APP = 256 ATAK_FORWARDER = 257 MAX = 511 diff --git a/meshtastic/radioconfig_pb2.py b/meshtastic/radioconfig_pb2.py index e064a44..f66b4b0 100644 --- a/meshtastic/radioconfig_pb2.py +++ b/meshtastic/radioconfig_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\021RadioConfigProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x11radioconfig.proto\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42*\n\x13\x63om.geeksville.meshB\x11RadioConfigProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\x11radioconfig.proto\"\xa5\x0f\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xe2\x0e\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\x12;\n2environmental_measurement_plugin_display_farenheit\x18\x91\x01 \x01(\x08\x12v\n,environmental_measurement_plugin_sensor_type\x18\x92\x01 \x01(\x0e\x32?.RadioConfig.UserPreferences.EnvironmentalMeasurementSensorType\x12\x34\n+environmental_measurement_plugin_sensor_pin\x18\x93\x01 \x01(\r\"/\n\"EnvironmentalMeasurementSensorType\x12\t\n\x05\x44HT11\x10\x00*f\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42*\n\x13\x63om.geeksville.meshB\x11RadioConfigProtosH\x03\x62\x06proto3' ) _REGIONCODE = _descriptor.EnumDescriptor( @@ -75,11 +75,16 @@ _REGIONCODE = _descriptor.EnumDescriptor( serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RU', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=1697, - serialized_end=1791, + serialized_start=1981, + serialized_end=2083, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -179,8 +184,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=1794, - serialized_end=2003, + serialized_start=2086, + serialized_end=2295, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -220,8 +225,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=2005, - serialized_end=2111, + serialized_start=2297, + serialized_end=2403, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -251,8 +256,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=2113, - serialized_end=2177, + serialized_start=2405, + serialized_end=2469, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -266,6 +271,7 @@ JP = 5 ANZ = 6 KR = 7 TW = 8 +RU = 9 MAUnset = 0 MA100 = 1 MA190 = 2 @@ -293,6 +299,26 @@ LocEnabled = 1 LocDisabled = 2 +_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE = _descriptor.EnumDescriptor( + name='EnvironmentalMeasurementSensorType', + full_name='RadioConfig.UserPreferences.EnvironmentalMeasurementSensorType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='DHT11', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1932, + serialized_end=1979, +) +_sym_db.RegisterEnumDescriptor(_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE) + _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( name='UserPreferences', @@ -631,11 +657,33 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_display_farenheit', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_display_farenheit', index=47, + number=145, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_sensor_type', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_sensor_type', index=48, + number=146, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_sensor_pin', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_sensor_pin', index=49, + number=147, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ + _RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE, ], serialized_options=None, is_extendable=False, @@ -644,7 +692,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( oneofs=[ ], serialized_start=89, - serialized_end=1695, + serialized_end=1979, ) _RADIOCONFIG = _descriptor.Descriptor( @@ -675,14 +723,16 @@ _RADIOCONFIG = _descriptor.Descriptor( oneofs=[ ], serialized_start=22, - serialized_end=1695, + serialized_end=1979, ) _RADIOCONFIG_USERPREFERENCES.fields_by_name['region'].enum_type = _REGIONCODE _RADIOCONFIG_USERPREFERENCES.fields_by_name['charge_current'].enum_type = _CHARGECURRENT _RADIOCONFIG_USERPREFERENCES.fields_by_name['location_share'].enum_type = _LOCATIONSHARING _RADIOCONFIG_USERPREFERENCES.fields_by_name['gps_operation'].enum_type = _GPSOPERATION +_RADIOCONFIG_USERPREFERENCES.fields_by_name['environmental_measurement_plugin_sensor_type'].enum_type = _RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE _RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG +_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE.containing_type = _RADIOCONFIG_USERPREFERENCES _RADIOCONFIG.fields_by_name['preferences'].message_type = _RADIOCONFIG_USERPREFERENCES DESCRIPTOR.message_types_by_name['RadioConfig'] = _RADIOCONFIG DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE diff --git a/proto b/proto index 741d59f..7c025b9 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 741d59faea1909606cd50907fa347998eaeda032 +Subproject commit 7c025b9a4d54bb410ec17ee653122861b413f177 diff --git a/setup.py b/setup.py index 442525d..03363ee 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.2.5", + version="1.2.6", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown", From 69e300b6654b213e5826c3a07af5e6361a310a50 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sun, 7 Mar 2021 09:32:04 +0800 Subject: [PATCH 46/48] fix formatting --- meshtastic/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index dea4708..617fe1c 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -9,6 +9,7 @@ import base64 from . import SerialInterface, TCPInterface, BLEInterface, test, remote_hardware from pubsub import pub from . import mesh_pb2, portnums_pb2, channel_pb2 +from .util import stripnl import google.protobuf.json_format import pyqrcode import traceback @@ -284,7 +285,7 @@ def onConnected(interface): print(f"\nChannel URL {interface.channelURL}") print("Nodes in mesh:") for n in interface.nodes.values(): - print(n) + print(stripnl(n)) if args.nodes: closeNow = True From 8693ec93b52ece8c0a98f5e6848fad65cccea384 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sun, 7 Mar 2021 09:32:13 +0800 Subject: [PATCH 47/48] cleaner test output --- meshtastic/test.py | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/meshtastic/test.py b/meshtastic/test.py index 4147ae4..dee1a3c 100644 --- a/meshtastic/test.py +++ b/meshtastic/test.py @@ -23,7 +23,8 @@ sendingInterface = None def onReceive(packet, interface): """Callback invoked when a packet arrives""" if sendingInterface == interface: - print("Ignoring sending interface") + pass + # print("Ignoring sending interface") else: # print(f"From {interface.stream.port}: {packet}") p = DotMap(packet) @@ -44,7 +45,7 @@ def subscribe(): pub.subscribe(onNode, "meshtastic.node") -def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): +def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False, wantAck=False): """ Sends one test packet between two nodes and then returns success or failure @@ -64,8 +65,7 @@ def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): else: toNode = toInterface.myInfo.my_node_num - logging.info(f"Sending test packet from {fromNode} to {toNode}") - wantAck = False # Don't want any sort of reliaible sending + logging.debug(f"Sending test wantAck={wantAck} packet from {fromNode} to {toNode}") global sendingInterface sendingInterface = fromInterface if not asBinary: @@ -73,15 +73,15 @@ def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): else: fromInterface.sendData((f"Binary {testNumber}").encode( "utf-8"), toNode, wantAck=wantAck) - for sec in range(45): # max of 45 secs before we timeout + for sec in range(60): # max of 60 secs before we timeout time.sleep(1) if (len(receivedPackets) >= 1): return True return False # Failed to send -def testThread(numTests=50): - logging.info("Found devices, starting tests...") +def runTests(numTests=50, wantAck=False, maxFailures=0): + logging.info(f"Running {numTests} tests with wantAck={wantAck}") numFail = 0 numSuccess = 0 for i in range(numTests): @@ -90,7 +90,7 @@ def testThread(numTests=50): isBroadcast = True # asBinary=(i % 2 == 0) success = testSend( - interfaces[0], interfaces[1], isBroadcast, asBinary=False) + interfaces[0], interfaces[1], isBroadcast, asBinary=False, wantAck=wantAck) if not success: numFail = numFail + 1 logging.error( @@ -98,15 +98,25 @@ def testThread(numTests=50): else: numSuccess = numSuccess + 1 logging.info( - f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") + f"Test succeeded {numSuccess} successes {numFail} failures so far") - if numFail >= 3: - for i in interfaces: - i.close() - return + #if numFail >= 3: + # for i in interfaces: + # i.close() + # return time.sleep(1) + if numFail > maxFailures: + logging.error("Too many failures! Test failed!") + + return numFail + +def testThread(numTests=50): + logging.info("Found devices, starting tests...") + runTests(numTests, wantAck=True) + runTests(numTests, wantAck=False, maxFailures=5) # Allow a few dropped packets + def onConnection(topic=pub.AUTO_TOPIC): """Callback invoked when we connect/disconnect from a radio""" From 6936c21927a7cd7f5026f9d679f025118d1f7b64 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sun, 7 Mar 2021 09:55:21 +0800 Subject: [PATCH 48/48] 1.2.6 --- docs/meshtastic/portnums_pb2.html | 12 +-- docs/meshtastic/radioconfig_pb2.html | 72 ++++++++++++++--- docs/meshtastic/test.html | 117 +++++++++++++++++---------- meshtastic/portnums_pb2.py | 12 +-- meshtastic/radioconfig_pb2.py | 72 ++++++++++++++--- proto | 2 +- setup.py | 2 +- 7 files changed, 210 insertions(+), 79 deletions(-) diff --git a/docs/meshtastic/portnums_pb2.html b/docs/meshtastic/portnums_pb2.html index 9b5b0e9..a2fba87 100644 --- a/docs/meshtastic/portnums_pb2.html +++ b/docs/meshtastic/portnums_pb2.html @@ -49,7 +49,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -105,22 +105,22 @@ _PORTNUM = _descriptor.EnumDescriptor( type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ENVIRONMENTAL_MEASUREMENT_APP', index=9, number=34, + name='SERIAL_APP', index=9, number=64, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='SERIAL_APP', index=10, number=64, + name='STORE_FORWARD_APP', index=10, number=65, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='STORE_FORWARD_APP', index=11, number=65, + name='RANGE_TEST_APP', index=11, number=66, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='RANGE_TEST_APP', index=12, number=66, + name='ENVIRONMENTAL_MEASUREMENT_APP', index=12, number=67, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), @@ -157,10 +157,10 @@ ROUTING_APP = 5 ADMIN_APP = 6 REPLY_APP = 32 IP_TUNNEL_APP = 33 -ENVIRONMENTAL_MEASUREMENT_APP = 34 SERIAL_APP = 64 STORE_FORWARD_APP = 65 RANGE_TEST_APP = 66 +ENVIRONMENTAL_MEASUREMENT_APP = 67 PRIVATE_APP = 256 ATAK_FORWARDER = 257 MAX = 511 diff --git a/docs/meshtastic/radioconfig_pb2.html b/docs/meshtastic/radioconfig_pb2.html index f914689..45aecbe 100644 --- a/docs/meshtastic/radioconfig_pb2.html +++ b/docs/meshtastic/radioconfig_pb2.html @@ -49,7 +49,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\021RadioConfigProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x11radioconfig.proto\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42*\n\x13\x63om.geeksville.meshB\x11RadioConfigProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\x11radioconfig.proto\"\xa5\x0f\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xe2\x0e\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\x12;\n2environmental_measurement_plugin_display_farenheit\x18\x91\x01 \x01(\x08\x12v\n,environmental_measurement_plugin_sensor_type\x18\x92\x01 \x01(\x0e\x32?.RadioConfig.UserPreferences.EnvironmentalMeasurementSensorType\x12\x34\n+environmental_measurement_plugin_sensor_pin\x18\x93\x01 \x01(\r\"/\n\"EnvironmentalMeasurementSensorType\x12\t\n\x05\x44HT11\x10\x00*f\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42*\n\x13\x63om.geeksville.meshB\x11RadioConfigProtosH\x03\x62\x06proto3' ) _REGIONCODE = _descriptor.EnumDescriptor( @@ -104,11 +104,16 @@ _REGIONCODE = _descriptor.EnumDescriptor( serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RU', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=1697, - serialized_end=1791, + serialized_start=1981, + serialized_end=2083, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -208,8 +213,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=1794, - serialized_end=2003, + serialized_start=2086, + serialized_end=2295, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -249,8 +254,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=2005, - serialized_end=2111, + serialized_start=2297, + serialized_end=2403, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -280,8 +285,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=2113, - serialized_end=2177, + serialized_start=2405, + serialized_end=2469, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -295,6 +300,7 @@ JP = 5 ANZ = 6 KR = 7 TW = 8 +RU = 9 MAUnset = 0 MA100 = 1 MA190 = 2 @@ -322,6 +328,26 @@ LocEnabled = 1 LocDisabled = 2 +_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE = _descriptor.EnumDescriptor( + name='EnvironmentalMeasurementSensorType', + full_name='RadioConfig.UserPreferences.EnvironmentalMeasurementSensorType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='DHT11', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1932, + serialized_end=1979, +) +_sym_db.RegisterEnumDescriptor(_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE) + _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( name='UserPreferences', @@ -660,11 +686,33 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_display_farenheit', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_display_farenheit', index=47, + number=145, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_sensor_type', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_sensor_type', index=48, + number=146, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_sensor_pin', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_sensor_pin', index=49, + number=147, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ + _RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE, ], serialized_options=None, is_extendable=False, @@ -673,7 +721,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( oneofs=[ ], serialized_start=89, - serialized_end=1695, + serialized_end=1979, ) _RADIOCONFIG = _descriptor.Descriptor( @@ -704,14 +752,16 @@ _RADIOCONFIG = _descriptor.Descriptor( oneofs=[ ], serialized_start=22, - serialized_end=1695, + serialized_end=1979, ) _RADIOCONFIG_USERPREFERENCES.fields_by_name['region'].enum_type = _REGIONCODE _RADIOCONFIG_USERPREFERENCES.fields_by_name['charge_current'].enum_type = _CHARGECURRENT _RADIOCONFIG_USERPREFERENCES.fields_by_name['location_share'].enum_type = _LOCATIONSHARING _RADIOCONFIG_USERPREFERENCES.fields_by_name['gps_operation'].enum_type = _GPSOPERATION +_RADIOCONFIG_USERPREFERENCES.fields_by_name['environmental_measurement_plugin_sensor_type'].enum_type = _RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE _RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG +_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE.containing_type = _RADIOCONFIG_USERPREFERENCES _RADIOCONFIG.fields_by_name['preferences'].message_type = _RADIOCONFIG_USERPREFERENCES DESCRIPTOR.message_types_by_name['RadioConfig'] = _RADIOCONFIG DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE diff --git a/docs/meshtastic/test.html b/docs/meshtastic/test.html index 73bc6b4..0a4ddc7 100644 --- a/docs/meshtastic/test.html +++ b/docs/meshtastic/test.html @@ -51,7 +51,8 @@ sendingInterface = None def onReceive(packet, interface): """Callback invoked when a packet arrives""" if sendingInterface == interface: - print("Ignoring sending interface") + pass + # print("Ignoring sending interface") else: # print(f"From {interface.stream.port}: {packet}") p = DotMap(packet) @@ -72,7 +73,7 @@ def subscribe(): pub.subscribe(onNode, "meshtastic.node") -def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): +def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False, wantAck=False): """ Sends one test packet between two nodes and then returns success or failure @@ -92,8 +93,7 @@ def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): else: toNode = toInterface.myInfo.my_node_num - logging.info(f"Sending test packet from {fromNode} to {toNode}") - wantAck = False # Don't want any sort of reliaible sending + logging.debug(f"Sending test wantAck={wantAck} packet from {fromNode} to {toNode}") global sendingInterface sendingInterface = fromInterface if not asBinary: @@ -101,15 +101,15 @@ def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False): else: fromInterface.sendData((f"Binary {testNumber}").encode( "utf-8"), toNode, wantAck=wantAck) - for sec in range(45): # max of 45 secs before we timeout + for sec in range(60): # max of 60 secs before we timeout time.sleep(1) if (len(receivedPackets) >= 1): return True return False # Failed to send -def testThread(numTests=50): - logging.info("Found devices, starting tests...") +def runTests(numTests=50, wantAck=False, maxFailures=0): + logging.info(f"Running {numTests} tests with wantAck={wantAck}") numFail = 0 numSuccess = 0 for i in range(numTests): @@ -118,7 +118,7 @@ def testThread(numTests=50): isBroadcast = True # asBinary=(i % 2 == 0) success = testSend( - interfaces[0], interfaces[1], isBroadcast, asBinary=False) + interfaces[0], interfaces[1], isBroadcast, asBinary=False, wantAck=wantAck) if not success: numFail = numFail + 1 logging.error( @@ -126,15 +126,25 @@ def testThread(numTests=50): else: numSuccess = numSuccess + 1 logging.info( - f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)") + f"Test succeeded {numSuccess} successes {numFail} failures so far") - if numFail >= 3: - for i in interfaces: - i.close() - return + #if numFail >= 3: + # for i in interfaces: + # i.close() + # return time.sleep(1) + if numFail > maxFailures: + logging.error("Too many failures! Test failed!") + + return numFail + +def testThread(numTests=50): + logging.info("Found devices, starting tests...") + runTests(numTests, wantAck=True) + runTests(numTests, wantAck=False, maxFailures=5) # Allow a few dropped packets + def onConnection(topic=pub.AUTO_TOPIC): """Callback invoked when we connect/disconnect from a radio""" @@ -225,7 +235,8 @@ def testAll():
    def onReceive(packet, interface):
         """Callback invoked when a packet arrives"""
         if sendingInterface == interface:
    -        print("Ignoring sending interface")
    +        pass 
    +        # print("Ignoring sending interface")
         else:
             # print(f"From {interface.stream.port}: {packet}")
             p = DotMap(packet)
    @@ -250,6 +261,48 @@ def testAll():
         return open(debugname, 'w+', buffering=1)
    +
    +def runTests(numTests=50, wantAck=False, maxFailures=0) +
    +
    +
    +
    + +Expand source code + +
    def runTests(numTests=50, wantAck=False, maxFailures=0):
    +    logging.info(f"Running {numTests} tests with wantAck={wantAck}")
    +    numFail = 0
    +    numSuccess = 0
    +    for i in range(numTests):
    +        global testNumber
    +        testNumber = testNumber + 1
    +        isBroadcast = True
    +        # asBinary=(i % 2 == 0)
    +        success = testSend(
    +            interfaces[0], interfaces[1], isBroadcast, asBinary=False, wantAck=wantAck)
    +        if not success:
    +            numFail = numFail + 1
    +            logging.error(
    +                f"Test failed, expected packet not received ({numFail} failures so far)")
    +        else:
    +            numSuccess = numSuccess + 1
    +            logging.info(
    +                f"Test succeeded {numSuccess} successes {numFail} failures so far")
    +
    +        #if numFail >= 3:
    +        #    for i in interfaces:
    +        #        i.close()
    +        #    return
    +
    +        time.sleep(1)
    +
    +    if numFail > maxFailures:
    +        logging.error("Too many failures! Test failed!")
    +
    +    return numFail
    +
    +
    def subscribe()
    @@ -304,7 +357,7 @@ def testAll():
    -def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False) +def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False, wantAck=False)

    Sends one test packet between two nodes and then returns success or failure

    @@ -317,7 +370,7 @@ toInterface {[type]} – [description]

    Expand source code -
    def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False):
    +
    def testSend(fromInterface, toInterface, isBroadcast=False, asBinary=False, wantAck=False):
         """
         Sends one test packet between two nodes and then returns success or failure
     
    @@ -337,8 +390,7 @@ toInterface {[type]} – [description]

    else: toNode = toInterface.myInfo.my_node_num - logging.info(f"Sending test packet from {fromNode} to {toNode}") - wantAck = False # Don't want any sort of reliaible sending + logging.debug(f"Sending test wantAck={wantAck} packet from {fromNode} to {toNode}") global sendingInterface sendingInterface = fromInterface if not asBinary: @@ -346,7 +398,7 @@ toInterface {[type]} – [description]

    else: fromInterface.sendData((f"Binary {testNumber}").encode( "utf-8"), toNode, wantAck=wantAck) - for sec in range(45): # max of 45 secs before we timeout + for sec in range(60): # max of 60 secs before we timeout time.sleep(1) if (len(receivedPackets) >= 1): return True @@ -364,30 +416,8 @@ toInterface {[type]} – [description]

    def testThread(numTests=50):
         logging.info("Found devices, starting tests...")
    -    numFail = 0
    -    numSuccess = 0
    -    for i in range(numTests):
    -        global testNumber
    -        testNumber = testNumber + 1
    -        isBroadcast = True
    -        # asBinary=(i % 2 == 0)
    -        success = testSend(
    -            interfaces[0], interfaces[1], isBroadcast, asBinary=False)
    -        if not success:
    -            numFail = numFail + 1
    -            logging.error(
    -                f"Test failed, expected packet not received ({numFail} failures so far)")
    -        else:
    -            numSuccess = numSuccess + 1
    -            logging.info(
    -                f"Test succeeded ({numSuccess} successes ({numFail} failures) so far)")
    -
    -        if numFail >= 3:
    -            for i in interfaces:
    -                i.close()
    -            return
    -
    -        time.sleep(1)
    + runTests(numTests, wantAck=True) + runTests(numTests, wantAck=False, maxFailures=5) # Allow a few dropped packets
    @@ -417,6 +447,7 @@ toInterface {[type]} – [description]

  • onNode
  • onReceive
  • openDebugLog
  • +
  • runTests
  • subscribe
  • testAll
  • testSend
  • diff --git a/meshtastic/portnums_pb2.py b/meshtastic/portnums_pb2.py index 6194bd6..f677cd1 100644 --- a/meshtastic/portnums_pb2.py +++ b/meshtastic/portnums_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\010PortnumsH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\"\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' + serialized_pb=b'\n\x0eportnums.proto*\xbe\x02\n\x07PortNum\x12\x0f\n\x0bUNKNOWN_APP\x10\x00\x12\x14\n\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n\x0cPOSITION_APP\x10\x03\x12\x10\n\x0cNODEINFO_APP\x10\x04\x12\x0f\n\x0bROUTING_APP\x10\x05\x12\r\n\tADMIN_APP\x10\x06\x12\r\n\tREPLY_APP\x10 \x12\x11\n\rIP_TUNNEL_APP\x10!\x12\x0e\n\nSERIAL_APP\x10@\x12\x15\n\x11STORE_FORWARD_APP\x10\x41\x12\x12\n\x0eRANGE_TEST_APP\x10\x42\x12!\n\x1d\x45NVIRONMENTAL_MEASUREMENT_APP\x10\x43\x12\x10\n\x0bPRIVATE_APP\x10\x80\x02\x12\x13\n\x0e\x41TAK_FORWARDER\x10\x81\x02\x12\x08\n\x03MAX\x10\xff\x03\x42!\n\x13\x63om.geeksville.meshB\x08PortnumsH\x03\x62\x06proto3' ) _PORTNUM = _descriptor.EnumDescriptor( @@ -76,22 +76,22 @@ _PORTNUM = _descriptor.EnumDescriptor( type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='ENVIRONMENTAL_MEASUREMENT_APP', index=9, number=34, + name='SERIAL_APP', index=9, number=64, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='SERIAL_APP', index=10, number=64, + name='STORE_FORWARD_APP', index=10, number=65, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='STORE_FORWARD_APP', index=11, number=65, + name='RANGE_TEST_APP', index=11, number=66, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( - name='RANGE_TEST_APP', index=12, number=66, + name='ENVIRONMENTAL_MEASUREMENT_APP', index=12, number=67, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), @@ -128,10 +128,10 @@ ROUTING_APP = 5 ADMIN_APP = 6 REPLY_APP = 32 IP_TUNNEL_APP = 33 -ENVIRONMENTAL_MEASUREMENT_APP = 34 SERIAL_APP = 64 STORE_FORWARD_APP = 65 RANGE_TEST_APP = 66 +ENVIRONMENTAL_MEASUREMENT_APP = 67 PRIVATE_APP = 256 ATAK_FORWARDER = 257 MAX = 511 diff --git a/meshtastic/radioconfig_pb2.py b/meshtastic/radioconfig_pb2.py index e064a44..f66b4b0 100644 --- a/meshtastic/radioconfig_pb2.py +++ b/meshtastic/radioconfig_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_options=b'\n\023com.geeksville.meshB\021RadioConfigProtosH\003', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x11radioconfig.proto\"\x89\r\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xc6\x0c\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r*^\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42*\n\x13\x63om.geeksville.meshB\x11RadioConfigProtosH\x03\x62\x06proto3' + serialized_pb=b'\n\x11radioconfig.proto\"\xa5\x0f\n\x0bRadioConfig\x12\x31\n\x0bpreferences\x18\x01 \x01(\x0b\x32\x1c.RadioConfig.UserPreferences\x1a\xe2\x0e\n\x0fUserPreferences\x12\x1f\n\x17position_broadcast_secs\x18\x01 \x01(\r\x12\x1b\n\x13send_owner_interval\x18\x02 \x01(\r\x12\x1b\n\x13wait_bluetooth_secs\x18\x04 \x01(\r\x12\x16\n\x0escreen_on_secs\x18\x05 \x01(\r\x12\x1a\n\x12phone_timeout_secs\x18\x06 \x01(\r\x12\x1d\n\x15phone_sds_timeout_sec\x18\x07 \x01(\r\x12\x1d\n\x15mesh_sds_timeout_secs\x18\x08 \x01(\r\x12\x10\n\x08sds_secs\x18\t \x01(\r\x12\x0f\n\x07ls_secs\x18\n \x01(\r\x12\x15\n\rmin_wake_secs\x18\x0b \x01(\r\x12\x11\n\twifi_ssid\x18\x0c \x01(\t\x12\x15\n\rwifi_password\x18\r \x01(\t\x12\x14\n\x0cwifi_ap_mode\x18\x0e \x01(\x08\x12\x1b\n\x06region\x18\x0f \x01(\x0e\x32\x0b.RegionCode\x12&\n\x0e\x63harge_current\x18\x10 \x01(\x0e\x32\x0e.ChargeCurrent\x12\x11\n\tis_router\x18% \x01(\x08\x12\x14\n\x0cis_low_power\x18& \x01(\x08\x12\x16\n\x0e\x66ixed_position\x18\' \x01(\x08\x12\x15\n\rfactory_reset\x18\x64 \x01(\x08\x12\x19\n\x11\x64\x65\x62ug_log_enabled\x18\x65 \x01(\x08\x12(\n\x0elocation_share\x18 \x01(\x0e\x32\x10.LocationSharing\x12$\n\rgps_operation\x18! \x01(\x0e\x32\r.GpsOperation\x12\x1b\n\x13gps_update_interval\x18\" \x01(\r\x12\x18\n\x10gps_attempt_time\x18$ \x01(\r\x12\x17\n\x0fignore_incoming\x18g \x03(\r\x12\x1c\n\x14serialplugin_enabled\x18x \x01(\x08\x12\x19\n\x11serialplugin_echo\x18y \x01(\x08\x12\x18\n\x10serialplugin_rxd\x18z \x01(\r\x12\x18\n\x10serialplugin_txd\x18{ \x01(\r\x12\x1c\n\x14serialplugin_timeout\x18| \x01(\r\x12\x19\n\x11serialplugin_mode\x18} \x01(\r\x12\'\n\x1f\x65xt_notification_plugin_enabled\x18~ \x01(\x08\x12)\n!ext_notification_plugin_output_ms\x18\x7f \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_output\x18\x80\x01 \x01(\r\x12\'\n\x1e\x65xt_notification_plugin_active\x18\x81\x01 \x01(\x08\x12.\n%ext_notification_plugin_alert_message\x18\x82\x01 \x01(\x08\x12+\n\"ext_notification_plugin_alert_bell\x18\x83\x01 \x01(\x08\x12\"\n\x19range_test_plugin_enabled\x18\x84\x01 \x01(\x08\x12!\n\x18range_test_plugin_sender\x18\x85\x01 \x01(\r\x12\x1f\n\x16range_test_plugin_save\x18\x86\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_enabled\x18\x88\x01 \x01(\x08\x12%\n\x1cstore_forward_plugin_records\x18\x89\x01 \x01(\r\x12=\n4environmental_measurement_plugin_measurement_enabled\x18\x8c\x01 \x01(\x08\x12\x38\n/environmental_measurement_plugin_screen_enabled\x18\x8d\x01 \x01(\x08\x12\x44\n;environmental_measurement_plugin_read_error_count_threshold\x18\x8e\x01 \x01(\r\x12\x39\n0environmental_measurement_plugin_update_interval\x18\x8f\x01 \x01(\r\x12;\n2environmental_measurement_plugin_recovery_interval\x18\x90\x01 \x01(\r\x12;\n2environmental_measurement_plugin_display_farenheit\x18\x91\x01 \x01(\x08\x12v\n,environmental_measurement_plugin_sensor_type\x18\x92\x01 \x01(\x0e\x32?.RadioConfig.UserPreferences.EnvironmentalMeasurementSensorType\x12\x34\n+environmental_measurement_plugin_sensor_pin\x18\x93\x01 \x01(\r\"/\n\"EnvironmentalMeasurementSensorType\x12\t\n\x05\x44HT11\x10\x00*f\n\nRegionCode\x12\t\n\x05Unset\x10\x00\x12\x06\n\x02US\x10\x01\x12\t\n\x05\x45U433\x10\x02\x12\t\n\x05\x45U865\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*\xd1\x01\n\rChargeCurrent\x12\x0b\n\x07MAUnset\x10\x00\x12\t\n\x05MA100\x10\x01\x12\t\n\x05MA190\x10\x02\x12\t\n\x05MA280\x10\x03\x12\t\n\x05MA360\x10\x04\x12\t\n\x05MA450\x10\x05\x12\t\n\x05MA550\x10\x06\x12\t\n\x05MA630\x10\x07\x12\t\n\x05MA700\x10\x08\x12\t\n\x05MA780\x10\t\x12\t\n\x05MA880\x10\n\x12\t\n\x05MA960\x10\x0b\x12\n\n\x06MA1000\x10\x0c\x12\n\n\x06MA1080\x10\r\x12\n\n\x06MA1160\x10\x0e\x12\n\n\x06MA1240\x10\x0f\x12\n\n\x06MA1320\x10\x10*j\n\x0cGpsOperation\x12\x0e\n\nGpsOpUnset\x10\x00\x12\x13\n\x0fGpsOpStationary\x10\x01\x12\x0f\n\x0bGpsOpMobile\x10\x02\x12\x11\n\rGpsOpTimeOnly\x10\x03\x12\x11\n\rGpsOpDisabled\x10\x04*@\n\x0fLocationSharing\x12\x0c\n\x08LocUnset\x10\x00\x12\x0e\n\nLocEnabled\x10\x01\x12\x0f\n\x0bLocDisabled\x10\x02\x42*\n\x13\x63om.geeksville.meshB\x11RadioConfigProtosH\x03\x62\x06proto3' ) _REGIONCODE = _descriptor.EnumDescriptor( @@ -75,11 +75,16 @@ _REGIONCODE = _descriptor.EnumDescriptor( serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RU', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=1697, - serialized_end=1791, + serialized_start=1981, + serialized_end=2083, ) _sym_db.RegisterEnumDescriptor(_REGIONCODE) @@ -179,8 +184,8 @@ _CHARGECURRENT = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=1794, - serialized_end=2003, + serialized_start=2086, + serialized_end=2295, ) _sym_db.RegisterEnumDescriptor(_CHARGECURRENT) @@ -220,8 +225,8 @@ _GPSOPERATION = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=2005, - serialized_end=2111, + serialized_start=2297, + serialized_end=2403, ) _sym_db.RegisterEnumDescriptor(_GPSOPERATION) @@ -251,8 +256,8 @@ _LOCATIONSHARING = _descriptor.EnumDescriptor( ], containing_type=None, serialized_options=None, - serialized_start=2113, - serialized_end=2177, + serialized_start=2405, + serialized_end=2469, ) _sym_db.RegisterEnumDescriptor(_LOCATIONSHARING) @@ -266,6 +271,7 @@ JP = 5 ANZ = 6 KR = 7 TW = 8 +RU = 9 MAUnset = 0 MA100 = 1 MA190 = 2 @@ -293,6 +299,26 @@ LocEnabled = 1 LocDisabled = 2 +_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE = _descriptor.EnumDescriptor( + name='EnvironmentalMeasurementSensorType', + full_name='RadioConfig.UserPreferences.EnvironmentalMeasurementSensorType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='DHT11', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1932, + serialized_end=1979, +) +_sym_db.RegisterEnumDescriptor(_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE) + _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( name='UserPreferences', @@ -631,11 +657,33 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_display_farenheit', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_display_farenheit', index=47, + number=145, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_sensor_type', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_sensor_type', index=48, + number=146, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='environmental_measurement_plugin_sensor_pin', full_name='RadioConfig.UserPreferences.environmental_measurement_plugin_sensor_pin', index=49, + number=147, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ + _RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE, ], serialized_options=None, is_extendable=False, @@ -644,7 +692,7 @@ _RADIOCONFIG_USERPREFERENCES = _descriptor.Descriptor( oneofs=[ ], serialized_start=89, - serialized_end=1695, + serialized_end=1979, ) _RADIOCONFIG = _descriptor.Descriptor( @@ -675,14 +723,16 @@ _RADIOCONFIG = _descriptor.Descriptor( oneofs=[ ], serialized_start=22, - serialized_end=1695, + serialized_end=1979, ) _RADIOCONFIG_USERPREFERENCES.fields_by_name['region'].enum_type = _REGIONCODE _RADIOCONFIG_USERPREFERENCES.fields_by_name['charge_current'].enum_type = _CHARGECURRENT _RADIOCONFIG_USERPREFERENCES.fields_by_name['location_share'].enum_type = _LOCATIONSHARING _RADIOCONFIG_USERPREFERENCES.fields_by_name['gps_operation'].enum_type = _GPSOPERATION +_RADIOCONFIG_USERPREFERENCES.fields_by_name['environmental_measurement_plugin_sensor_type'].enum_type = _RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE _RADIOCONFIG_USERPREFERENCES.containing_type = _RADIOCONFIG +_RADIOCONFIG_USERPREFERENCES_ENVIRONMENTALMEASUREMENTSENSORTYPE.containing_type = _RADIOCONFIG_USERPREFERENCES _RADIOCONFIG.fields_by_name['preferences'].message_type = _RADIOCONFIG_USERPREFERENCES DESCRIPTOR.message_types_by_name['RadioConfig'] = _RADIOCONFIG DESCRIPTOR.enum_types_by_name['RegionCode'] = _REGIONCODE diff --git a/proto b/proto index 741d59f..7c025b9 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 741d59faea1909606cd50907fa347998eaeda032 +Subproject commit 7c025b9a4d54bb410ec17ee653122861b413f177 diff --git a/setup.py b/setup.py index 442525d..03363ee 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.2.5", + version="1.2.6", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown",