From 040f6298976839120b07ee8a34e11494a370d401 Mon Sep 17 00:00:00 2001 From: Charles Crossan Date: Mon, 22 Feb 2021 19:03:47 -0500 Subject: [PATCH 1/3] udpate protobufs for environmental measurement preferences --- mesh.proto | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/mesh.proto b/mesh.proto index b29b177..d372c92 100644 --- a/mesh.proto +++ b/mesh.proto @@ -897,6 +897,34 @@ message RadioConfig { */ bool store_forward_plugin_enabled = 136; uint32 store_forward_plugin_records = 137; + + /** + Preferences for the EnvironmentalMeasurement Plugin + FIXME - Move this out of UserPreferences and into a section for plugin configuration. + */ + /* + * Enable/Disable the environmental measurement plugin + */ + bool environmental_measurement_plugin_enabled = 140; + /* + * Sometimes sensor reads can fail. If this happens, we + * will retry a configurable number of attempts + * Each attempt will be delayed by the minimum + * required refresh rate for that sensor + */ + uint32 environmental_measurement_plugin_read_error_count_threshold = 141; + /* + * Interval in seconds of how often we should try to send our + * measurements to the mesh + */ + uint32 environmental_measurement_plugin_update_interval = 142; + /* Sometimes we can end up with more than read_error_count_threshold + * failures. In this case, we will stop trying to read from the sensor + * for a while. Wait this long until trying to read from the sensor again + */ + uint32 environmental_measurement_plugin_recovery_interval = 143; + + } UserPreferences preferences = 1; From d70f6f6f669df79c9423795caf34adbd28967e19 Mon Sep 17 00:00:00 2001 From: Charles Crossan Date: Mon, 22 Feb 2021 20:39:23 -0500 Subject: [PATCH 2/3] update protobufs --- mesh.proto | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mesh.proto b/mesh.proto index d372c92..a5f0314 100644 --- a/mesh.proto +++ b/mesh.proto @@ -903,26 +903,30 @@ message RadioConfig { FIXME - Move this out of UserPreferences and into a section for plugin configuration. */ /* - * Enable/Disable the environmental measurement plugin + * Enable/Disable the environmental measurement plugin measurement collection */ - bool environmental_measurement_plugin_enabled = 140; + bool environmental_measurement_plugin_measurement_enabled = 140; + /* + * Enable/Disable the environmental measurement plugin on-device display + */ + bool environmental_measurement_plugin_screen_enabled = 141; /* * Sometimes sensor reads can fail. If this happens, we * will retry a configurable number of attempts * Each attempt will be delayed by the minimum * required refresh rate for that sensor */ - uint32 environmental_measurement_plugin_read_error_count_threshold = 141; + uint32 environmental_measurement_plugin_read_error_count_threshold = 142; /* * Interval in seconds of how often we should try to send our * measurements to the mesh */ - uint32 environmental_measurement_plugin_update_interval = 142; + uint32 environmental_measurement_plugin_update_interval = 143; /* Sometimes we can end up with more than read_error_count_threshold * failures. In this case, we will stop trying to read from the sensor * for a while. Wait this long until trying to read from the sensor again */ - uint32 environmental_measurement_plugin_recovery_interval = 143; + uint32 environmental_measurement_plugin_recovery_interval = 144; } From d479a55cdeadb248bdf633675897435cc6acbe42 Mon Sep 17 00:00:00 2001 From: michelepagot Date: Wed, 24 Feb 2021 00:15:20 +0100 Subject: [PATCH 3/3] Fix some typo and improve indentation of code comments --- deviceonly.proto | 7 +- mesh.proto | 215 ++++++++++++++++++++++++------------------ portnums.proto | 40 ++++---- remote_hardware.proto | 14 ++- 4 files changed, 156 insertions(+), 120 deletions(-) diff --git a/deviceonly.proto b/deviceonly.proto index 9c6d6e8..75be355 100644 --- a/deviceonly.proto +++ b/deviceonly.proto @@ -59,9 +59,10 @@ message DeviceState { bool did_gps_reset = 11; /* - * Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc) - * are ignored, only psk is used. - * Note: this is not kept inside of RadioConfig because that would make ToRadio/FromRadio worse case > 512 bytes (to big for BLE) + * Secondary channels are only used for encryption/decryption/authentication purposes. + * Their radio settings (freq etc) are ignored, only psk is used. + * Note: this is not kept inside of RadioConfig because that would make + * ToRadio/FromRadio worse case > 512 bytes (to big for BLE) */ repeated ChannelSettings secondary_channels = 12; } \ No newline at end of file diff --git a/mesh.proto b/mesh.proto index 6303359..c6eaa95 100644 --- a/mesh.proto +++ b/mesh.proto @@ -31,7 +31,8 @@ import "portnums.proto"; message Position { /* - * The new preferred location encoding, divide by 1e-7 to get degrees in floating point + * The new preferred location encoding, divide by 1e-7 to get degrees + * in floating point */ sint32 latitude_i = 7; @@ -54,7 +55,7 @@ message Position { * be sent by devices which has a hardware GPS clock. * seconds since 1970 */ - fixed32 time = 9; + fixed32 time = 9; } /* @@ -107,22 +108,23 @@ message User { * Signal that would mean +16504442323, for the default macaddr * derived id it would be !<8 hexidecimal bytes> */ - string id = 1; - + string id = 1; + /* * A full name for this user, i.e. "Kevin Hester" */ - string long_name = 2; - + string long_name = 2; + /* * A VERY short name, ideally two characters. Suitable for a tiny OLED screen */ - string short_name = 3; - + string short_name = 3; + /* - * This is the addr of the radio. Not populated by the phone, but added by the esp32 when broadcasting + * This is the addr of the radio. Not populated by the phone, + * but added by the esp32 when broadcasting */ - bytes macaddr = 4; + bytes macaddr = 4; } /* @@ -137,7 +139,8 @@ message RouteDiscovery { } /* - * A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide + * A failure in delivering a message (usually used for routing control messages, + * but might be provided in addition to ack.fail_id to provide * details on the type of failure). */ enum ErrorReason { @@ -157,14 +160,10 @@ enum ErrorReason { TIMEOUT = 3; - /* - * No suitable interface could be found for delivering this packet - */ + /* No suitable interface could be found for delivering this packet */ NO_INTERFACE = 4; - /* - * We reached the max retransmission count (typically for naive flood routing) - */ + /* We reached the max retransmission count (typically for naive flood routing) */ MAX_RETRANSMIT = 5; } @@ -183,8 +182,8 @@ message SubPacket { /* * A route request going from the requester - * FIXME - these route messages should be moved into regular data packets and use the regular on - * device plugin mechanism. + * FIXME - these route messages should be moved into regular data packets and + * use the regular on device plugin mechanism. */ RouteDiscovery route_request = 6; @@ -194,20 +193,23 @@ message SubPacket { RouteDiscovery route_reply = 7; /* - * A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide + * A failure in delivering a message (usually used for routing control messages, + * but might be provided in addition to ack.fail_id to provide * details on the type of failure). */ ErrorReason error_reason = 13; /* - * Prior to 1.20 positions were communicated as a special payload type, now they are GPS_POSITION_APP Data + * Prior to 1.20 positions were communicated as a special payload type, + * now they are GPS_POSITION_APP Data */ Position position = 1 [deprecated = true]; /* - * Prior to 1.20 positions were communicated as a special payload type, now they are MESH_USERINFO_APP + * Prior to 1.20 positions were communicated as a special payload type, + * now they are MESH_USERINFO_APP */ - User user = 4 [deprecated = true]; + User user = 4 [deprecated = true]; } /* @@ -219,7 +221,7 @@ message SubPacket { oneof ackVariant { /* - * This packet is a requested acknoledgement indicating that we have received + * This packet is a requested acknowledgment indicating that we have received * the specified message ID. This packet type can be used both for immediate * (0 hops) messages or can be routed through multiple hops if dest is set. * Note: As an optimization, recipients can _also_ populate a field in payload @@ -235,7 +237,7 @@ message SubPacket { /* * The address of the destination node. - * This field is is filled in by the mesh radio device software, applicaiton + * This field is is filled in by the mesh radio device software, application * layer software should never need it. * RouteDiscovery messages _must_ populate this. Other message types might need * to if they are doing multihop routing. @@ -263,17 +265,28 @@ message SubPacket { */ message MeshPacket { - /* The priority of this message for sending. Higher priorities are sent first (when managing the transmit queue). - This field is never sent over the air, it is only used internally inside of a local device node. API clients (either on the local node or - connected directly to the node) can set this parameter if necessary. + /* The priority of this message for sending. Higher priorities are sent first + (when managing the transmit queue). + This field is never sent over the air, it is only used internally inside of a local device node. + API clients (either on the local node or connected directly to the node) + can set this parameter if necessary. (values must be <= 127 to keep protobuf field to one byte in size. Detailed background on this field: - I noticed a funny side effect of lora being so slow: Usually when making a protocol there isn’t much need to use message priority to change the order of transmission (because interfaces are fairly fast). But for lora where packets can take a few seconds each, it is very important to make sure that critical packets are sent ASAP. In the case of meshtastic that means we want to send protocol acks as soon as possible (to prevent unneeded retransmissions), we want routing messages to be sent next, then messages marked as reliable and finally ‘background’ packets like periodic position updates. + I noticed a funny side effect of lora being so slow: Usually when making + a protocol there isn’t much need to use message priority to change the order + of transmission (because interfaces are fairly fast). + But for lora where packets can take a few seconds each, it is very important + to make sure that critical packets are sent ASAP. + In the case of meshtastic that means we want to send protocol acks as soon as possible + (to prevent unneeded retransmissions), we want routing messages to be sent next, + then messages marked as reliable and finally ‘background’ packets like periodic position updates. - So I bit the bullet and implemented a new (internal - not sent over the air) field in MeshPacket called ‘priority’. And the transmission queue in the router object is now a priority queue. + So I bit the bullet and implemented a new (internal - not sent over the air) + field in MeshPacket called ‘priority’. + And the transmission queue in the router object is now a priority queue. */ enum Priority { /* Treated as Priority.DEFAULT */ @@ -281,16 +294,19 @@ message MeshPacket { MIN = 1; - /* Background position updates are sent with very low priority - if the link is super conjested they might not go out at all */ + /* Background position updates are sent with very low priority - + * if the link is super congested they might not go out at all */ BACKGROUND = 10; /* This priority is used for most messages that don't have a priority set */ DEFAULT = 64; - /* If priority is unset but the message is marked as want_ack, assume it is important and use a slightly higher priority */ + /* If priority is unset but the message is marked as want_ack, + * assume it is important and use a slightly higher priority */ RELIABLE = 70; - /* Ack/naks are sent with very high priority to ensure that retransmission stops as soon as possible */ + /* Ack/naks are sent with very high priority to ensure that retransmission + * stops as soon as possible */ ACK = 120; MAX = 127; @@ -311,14 +327,13 @@ message MeshPacket { uint32 to = 2; /* - * If set, this indicates the index in the secondary_channels table that this packet + * If set, this indicates the index in the secondary_channels table that this packet * was sent/received on. If unset, packet was on the primary channel. * A particular node might know only a subset of channels in use on the mesh. Therefore channel_index * is inherently a local concept and meaningless to send between nodes. */ uint32 channel_index = 4; - /* * Internally to the mesh radios we will route SubPackets encrypted per * docs/software/crypto.md. However, when a particular node has the correct @@ -344,7 +359,7 @@ message MeshPacket { * FIXME - really should be fixed32 instead, this encoding only * hurts the ble link though. */ - uint32 id = 6; + uint32 id = 6; /* * The time this message was received by the esp32 (secs since 1970). Note: @@ -356,12 +371,12 @@ message MeshPacket { /* * *Never* sent over the radio links. Set during reception to indicate the SNR - * of this packet. Used to collect statistics on current link waulity. + * of this packet. Used to collect statistics on current link quality. */ float rx_snr = 7; /* - * If unset treated as zero (no fowarding, send to adjacent nodes only) + * If unset treated as zero (no forwarding, send to adjacent nodes only) * if 1, allow hopping through one node, etc... * For our usecase real world topologies probably have a max of about 3. * This field is normally placed into a few of bits in the header. @@ -374,7 +389,7 @@ message MeshPacket { * Broadcasts messages treat this flag specially: Since acks for broadcasts would * rapidly flood the channel, the normal ack behavior is suppressed. Instead, * the original sender listens to see if at least one node is rebroadcasting this - * packet (because naive flooding algoritm). If it hears that the odds (given + * packet (because naive flooding algorithm). If it hears that the odds (given * typical LoRa topologies) the odds are very high that every node should * eventually receive the message. So FloodingRouter.cpp generates an implicit * ack which is delivered to the original sender. If after some time we don't @@ -410,10 +425,10 @@ enum Constants { /* * Full settings (center freq, spread factor, pre-shared secret key etc...) - * needed to configure a radio for speaking on a particlar channel This + * needed to configure a radio for speaking on a particular channel This * information can be encoded as a QRcode/url so that other users can configure * their radio to join the same channel. - * A note aboute how channel names are shown to users: channelname-Xy + * A note about how channel names are shown to users: channelname-Xy * poundsymbol is a prefix used to indicate this is a channel name (idea from @professr). * Where X is a letter from A-Z (base 26) representing a hash of the PSK for this * channel - so that if the user changes anything about the channel (which does @@ -503,7 +518,7 @@ message ChannelSettings { /* * A channel number between 1 and 13 (or whatever the max is in the current * region). If ZERO then the rule is "use the old channel name hash based - * algoritm to derive the channel number") + * algorithm to derive the channel number") * If using the hash algorithm the channel number will be: hash(channel_name) % * NUM_CHANNELS (Where num channels depends on the regulatory region). * NUM_CHANNELS_US is 13, for other values see MeshRadio.h in the device code. @@ -519,9 +534,10 @@ message ChannelSettings { uint32 channel_num = 9; /* - * A simple preshared key for now for crypto. Must be either 0 bytes (no + * A simple pre-shared key for now for crypto. Must be either 0 bytes (no * crypto), 16 bytes (AES128), or 32 bytes (AES256) - * A special shorthand is used for 1 byte long psks. These psks should be treated as only minimally secure, + * A special shorthand is used for 1 byte long psks. + * These psks should be treated as only minimally secure, * because they are listed in this source code. Those bytes are mapped using the following scheme: * 0 = No crypto * 1 = The special default channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0xbf} @@ -532,10 +548,11 @@ message ChannelSettings { /* * A SHORT name that will be packed into the URL. Less than 12 bytes. * Something for end users to call the channel - * If this is the empty string it is assumed that this channel is the special (minimially secure) "Default" - * channel. In user interfaces it should be rendered as a local language translation of "X". For channel_num + * If this is the empty string it is assumed that this channel + * is the special (minimally secure) "Default"channel. + * In user interfaces it should be rendered as a local language translation of "X". For channel_num * hashing empty string will be treated as "X". - * Where "X" is selected based on the english words listed above for ModemConfig + * Where "X" is selected based on the English words listed above for ModemConfig */ string name = 5; @@ -621,7 +638,7 @@ enum ChargeCurrent { enum GpsOperation { /* - * This is treated as GpsOpMobile - it is the default settting + * This is treated as GpsOpMobile - it is the default setting */ GpsOpUnset = 0; @@ -630,7 +647,7 @@ enum GpsOperation { * * This node is mostly stationary, we should try to get location only once per day, * Once we have that position we should turn the GPS to sleep mode - * This is the recommendated configuration for stationary 'router' nodes + * This is the recommended configuration for stationary 'router' nodes */ GpsOpStationary = 1; @@ -820,9 +837,9 @@ message RadioConfig { */ bool debug_log_enabled = 101; - /* - * How our location is shared with other nodes (or the local phone) - */ + /** + How our location is shared with other nodes (or the local phone) + */ LocationSharing location_share = 32; /* @@ -861,11 +878,11 @@ message RadioConfig { */ repeated uint32 ignore_incoming = 103; - /* - * Preferences for the SerialPlugin - * - * FIXME - Move this out of UserPreferences and into a section for plugin configuration. - */ + /** + Preferences for the SerialPlugin + + FIXME - Move this out of UserPreferences and into a section for plugin configuration. + */ bool serialplugin_enabled = 120; bool serialplugin_echo = 121; uint32 serialplugin_rxd = 122; @@ -873,11 +890,11 @@ message RadioConfig { uint32 serialplugin_timeout = 124; uint32 serialplugin_mode = 125; - /* - * Preferences for the ExternalNotificationPlugin - * - * FIXME - Move this out of UserPreferences and into a section for plugin configuration. - */ + /** + Preferences for the ExternalNotificationPlugin + + FIXME - Move this out of UserPreferences and into a section for plugin configuration. + */ bool ext_notification_plugin_enabled = 126; uint32 ext_notification_plugin_output_ms = 127; uint32 ext_notification_plugin_output = 128; @@ -885,20 +902,20 @@ message RadioConfig { bool ext_notification_plugin_alert_message = 130; bool ext_notification_plugin_alert_bell = 131; - /* - * Preferences for the RangeTestPlugin - * - * FIXME - Move this out of UserPreferences and into a section for plugin configuration. - */ + /** + Preferences for the RangeTestPlugin + + FIXME - Move this out of UserPreferences and into a section for plugin configuration. + */ bool range_test_plugin_enabled = 132; uint32 range_test_plugin_sender = 133; bool range_test_plugin_save = 134; - /* - * Preferences for the StoreForwardPlugin - * - * FIXME - Move this out of UserPreferences and into a section for plugin configuration. - */ + /** + Preferences for the StoreForwardPlugin + + FIXME - Move this out of UserPreferences and into a section for plugin configuration. + */ bool store_forward_plugin_enabled = 136; uint32 store_forward_plugin_records = 137; } @@ -952,19 +969,19 @@ message NodeInfo { Position position = 3; /* - * Returns the Signal-to-noise ratio (SNR) of the last received message, as measured by the receiver. - * Return SNR of the last received message in dB + * Returns the Signal-to-noise ratio (SNR) of the last received message, + * as measured by the receiver. Return SNR of the last received message in dB */ float snr = 7; /* * Returns the last measured frequency error. * The LoRa receiver estimates the frequency offset between the receiver - * centre frequency and that of the received LoRa signal. This function + * center frequency and that of the received LoRa signal. This function * returns the estimates offset (in Hz) of the last received message. * Caution: this measurement is not absolute, but is measured relative to the * local receiver's oscillator. Apparent errors may be due to the - * transmitter, the receiver or both. \return The estimated centre frequency + * transmitter, the receiver or both. \return The estimated center frequency * offset in Hz of the last received message. * int32 frequency_error = 6; * @@ -983,10 +1000,11 @@ message NodeInfo { uint32 next_hop = 5; } -/* Error codes for critical errors +/** Error codes for critical errors * - * The device might report these fault codes on the screen. If you encounter a fault code, please - * post on the meshtastic.discourse.group and we'll try to help. + * The device might report these fault codes on the screen. + * If you encounter a fault code, please post on the meshtastic.discourse.group + * and we'll try to help. */ enum CriticalErrorCode { None = 0; @@ -1043,15 +1061,17 @@ enum CriticalErrorCode { message MyNodeInfo { /* - * Tells the phone what our node number is, default starting value is lowbyte of macaddr, but it will be fixed if that is already in use + * Tells the phone what our node number is, default starting value is + * lowbyte of macaddr, but it will be fixed if that is already in use */ uint32 my_node_num = 1; /* - * Note: this bool no longer means "we have our own GPS". Because gps_operation is more advanced, - * but we'd like old phone apps to keep working. So for legacy reasons we set this flag as follows: - * if false it would be great if the phone can help provide gps coordinates. If true we don't need location - * assistance from the phone. + * Note: this bool no longer means "we have our own GPS". + * Because gps_operation is more advanced, but we'd like old phone apps + * to keep working. So for legacy reasons we set this flag as follows: + * if false it would be great if the phone can help provide gps coordinates. + * If true we don't need location assistance from the phone. */ bool has_gps = 2; @@ -1082,8 +1102,10 @@ message MyNodeInfo { /* * An error message we'd like to report back to the mothership through analytics. - * It indicates a serious bug occurred on the device, the device coped with it, but we still want to tell the devs about the bug. - * This field will be cleared after the phone reads MyNodeInfo (i.e. it will onlybe reported once) + * It indicates a serious bug occurred on the device, the device coped with it, + * but we still want to tell the devs about the bug. + * This field will be cleared after the phone reads MyNodeInfo + * (i.e. it will only be reported once) * a numeric error code to go with error message, zero means no error */ CriticalErrorCode error_code = 7; @@ -1094,13 +1116,15 @@ message MyNodeInfo { uint32 error_address = 8; /* - * The total number of errors this node has ever encountered (well - since the last time we discarded preferences) + * The total number of errors this node has ever encountered + * (well - since the last time we discarded preferences) */ uint32 error_count = 9; /* * How many bits are used for the packetid. If zero it is assumed we use - * eight bit packetids Old device loads (older that 0.6.5 do not populate this field, but all newer loads do). + * eight bit packetids Old device loads (older that 0.6.5 do not populate this field, + * but all newer loads do). */ uint32 packet_id_bits = 10; @@ -1153,9 +1177,9 @@ message MyNodeInfo { /* Debug output from the device. * * To minimize the size of records inside the device code, if a time/source/level is not set - * on the message it is assumed to be a contuinuation of the previously sent message. This allows - * the device code to use fixed maxlen 64 byte strings for messages, and then extend as needed by - * emitting multiple records. + * on the message it is assumed to be a continuation of the previously sent message. + * This allows the device code to use fixed maxlen 64 byte strings for messages, + * and then extend as needed by emitting multiple records. */ message LogRecord { @@ -1193,12 +1217,14 @@ message LogRecord { /* * Packets from the radio to the phone will appear on the fromRadio characteristic. * It will support READ and NOTIFY. When a new packet arrives the device will BLE notify? - * It will sit in that descriptor until consumed by the phone, at which point the next item in the FIFO will be populated. + * It will sit in that descriptor until consumed by the phone, + * at which point the next item in the FIFO will be populated. */ message FromRadio { /* - * The packet num, used to allow the phone to request missing read packets from the FIFO, see our bluetooth docs + * The packet num, used to allow the phone to request missing read packets from the FIFO, + * see our bluetooth docs */ uint32 num = 1; @@ -1243,7 +1269,8 @@ message FromRadio { /* * One of the channels, they are all sent during config download * The first channel is the "primary" channel all other channels are secondary channels - * The primary channel is also sent as part of RadioConfig (which is deprecated, but to support older clients) + * The primary channel is also sent as part of RadioConfig + * (which is deprecated, but to support older clients) */ ChannelSettings channel = 10; } diff --git a/portnums.proto b/portnums.proto index 0438d9a..2607f14 100644 --- a/portnums.proto +++ b/portnums.proto @@ -19,7 +19,7 @@ option optimize_for = LITE_RUNTIME; * * Note: This was formerly a Type enum named 'typ' with the same id # * - * We have change to this 'portnum' based scheme for specifying app handlers for particular payloads. + * We have change to this 'portnum' based scheme for specifying app handlers for particular payloads. * This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically. */ enum PortNum { @@ -29,8 +29,8 @@ enum PortNum { * A message sent from a device outside of the mesh, in a form the mesh does not understand * NOTE: This must be 0, because it is documented in IMeshService.aidl to be so */ - UNKNOWN_APP = 0; - + UNKNOWN_APP = 0; + /* * A simple UTF-8 text message, which even the little micros in the mesh * can understand and show on their screen eventually in some circumstances @@ -38,9 +38,9 @@ enum PortNum { * Formerly called CLEAR_TEXT */ TEXT_MESSAGE_APP = 1; - + /* - * A message receive acknowledgement, sent in cleartext - allows radio to + * A message receive acknowledgment, sent in cleartext - allows radio to * show user that a message has been read by the recipient, optional * * Note: this concept has been removed for now. Once READACK is implemented, use the @@ -68,7 +68,8 @@ enum PortNum { NODEINFO_APP = 4; /* - * Provides a 'ping' service that replies to any packet it receives. Also this serves as a small example plugin. + * Provides a 'ping' service that replies to any packet it receives. + * Also this serves as a small example plugin. */ REPLY_APP = 32; @@ -78,13 +79,23 @@ enum PortNum { IP_TUNNEL_APP = 33; /* - * Provides a hardware serial interface to send and receive from the Meshtastic network. - * Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic - * network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh - * network. Maximum packet size of 240 bytes. + * Provides a format to send and receive environmental data from the Meshtastic network. * - * Maintained by Jm Casler (MC Hamster) : jm@casler.org + * Maintained by Charles Crossan (crossan007) : crossan007@gmail.com */ + ENVIRONMENTAL_MEASUREMENT_APP = 34; + + /** Provides a hardware serial interface to send and receive from the Meshtastic network. + Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic + network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh + network. Maximum packet size of 240 bytes. + + Plugin is disabled by default can be turned on by setting SERIALPLUGIN_ENABLED = 1 in + SerialPlugh.cpp. + + Maintained by Jm Casler (MC Hamster) : jm@casler.org + + */ SERIAL_APP = 64; /* @@ -101,13 +112,6 @@ enum PortNum { */ RANGE_TEST_APP = 66; - /* - * Provides a format to send and receive environmental data from the Meshtastic network. - * - * Maintained by Charles Crossan (crossan007) : crossan007@gmail.com - */ - ENVIRONMENTAL_MEASUREMENT_APP = 67; - /* * Private applications should use portnums >= 256. * To simplify initial development and testing you can use "PRIVATE_APP" diff --git a/remote_hardware.proto b/remote_hardware.proto index 9162d68..642b6eb 100644 --- a/remote_hardware.proto +++ b/remote_hardware.proto @@ -4,14 +4,18 @@ option java_package = "com.geeksville.mesh"; option java_outer_classname = "RemoteHardware"; option optimize_for = LITE_RUNTIME; -/* A example app to show off the plugin system. This message is used for REMOTE_HARDWARE_APP PortNums. +/* A example app to show off the plugin system. This message is used for + * REMOTE_HARDWARE_APP PortNums. * - * Also provides easy remote access to any GPIO. + * Also provides easy remote access to any GPIO. * - * In the future other remote hardware operations can be added based on user interest (i.e. serial output, spi/i2c input/output). + * In the future other remote hardware operations can be added based on user interest + * (i.e. serial output, spi/i2c input/output). * - * FIXME - currently this feature is turned on by default which is dangerous because no security yet (beyond the channel mechanism). - * It should be off by default and then protected based on some TBD mechanism (a special channel once multichannel support is included?) + * FIXME - currently this feature is turned on by default which is dangerous + * because no security yet (beyond the channel mechanism). + * It should be off by default and then protected based on some TBD mechanism + * (a special channel once multichannel support is included?) */ message HardwareMessage { enum Type {