mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-24 05:50:16 +00:00
Add next_hop and relayed_by in PacketHistory for setting next-hop and handle flooding fallback
This commit is contained in:
parent
2e303a33be
commit
6fe42ed4c5
@ -727,11 +727,7 @@ void setup()
|
|||||||
audioThread = new AudioThread();
|
audioThread = new AudioThread();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
config.lora.next_hop_routing = true; // FIXME - remove this before merging
|
service.init();
|
||||||
LOG_INFO("USING NEXT-HOP ROUTING\n");
|
|
||||||
|
|
||||||
service = new MeshService();
|
|
||||||
service->init();
|
|
||||||
|
|
||||||
// Now that the mesh service is created, create any modules
|
// Now that the mesh service is created, create any modules
|
||||||
setupModules();
|
setupModules();
|
||||||
|
@ -13,6 +13,7 @@ FloodingRouter::FloodingRouter() {}
|
|||||||
ErrorCode FloodingRouter::send(meshtastic_MeshPacket *p)
|
ErrorCode FloodingRouter::send(meshtastic_MeshPacket *p)
|
||||||
{
|
{
|
||||||
// Add any messages _we_ send to the seen message list (so we will ignore all retransmissions we see)
|
// Add any messages _we_ send to the seen message list (so we will ignore all retransmissions we see)
|
||||||
|
p->relay_node = nodeDB->getLastByteOfNodeNum(getNodeNum()); // First set the relayer to us
|
||||||
wasSeenRecently(p); // FIXME, move this to a sniffSent method
|
wasSeenRecently(p); // FIXME, move this to a sniffSent method
|
||||||
|
|
||||||
return Router::send(p);
|
return Router::send(p);
|
||||||
|
@ -85,12 +85,8 @@ int MeshService::handleFromRadio(const meshtastic_MeshPacket *mp)
|
|||||||
"request for its NodeInfo.\n");
|
"request for its NodeInfo.\n");
|
||||||
} else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user &&
|
} else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user &&
|
||||||
nodeInfoModule) {
|
nodeInfoModule) {
|
||||||
LOG_INFO("Heard a node on channel %d we don't know, sending NodeInfo and asking for a response.\n", mp->channel);
|
// LOG_INFO("Heard a node on channel %d we don't know, sending NodeInfo and asking for a response.\n", mp->channel);
|
||||||
if (airTime->isTxAllowedChannelUtil(true)) {
|
// nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel);
|
||||||
nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel);
|
|
||||||
} else {
|
|
||||||
LOG_DEBUG("Skip sending NodeInfo due to > 25 percent channel util.\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printPacket("Forwarding to phone", mp);
|
printPacket("Forwarding to phone", mp);
|
||||||
|
@ -39,6 +39,9 @@ enum RxSource {
|
|||||||
/// We normally just use max 3 hops for sending reliable messages
|
/// We normally just use max 3 hops for sending reliable messages
|
||||||
#define HOP_RELIABLE 3
|
#define HOP_RELIABLE 3
|
||||||
|
|
||||||
|
// For old firmware or when falling back to flooding, there is no next-hop preference
|
||||||
|
#define NO_NEXT_HOP_PREFERENCE 0
|
||||||
|
|
||||||
typedef int ErrorCode;
|
typedef int ErrorCode;
|
||||||
|
|
||||||
/// Alloc and free packets to our global, ISR safe pool
|
/// Alloc and free packets to our global, ISR safe pool
|
||||||
|
@ -14,6 +14,7 @@ PendingPacket::PendingPacket(meshtastic_MeshPacket *p, uint8_t numRetransmission
|
|||||||
ErrorCode NextHopRouter::send(meshtastic_MeshPacket *p)
|
ErrorCode NextHopRouter::send(meshtastic_MeshPacket *p)
|
||||||
{
|
{
|
||||||
// Add any messages _we_ send to the seen message list (so we will ignore all retransmissions we see)
|
// Add any messages _we_ send to the seen message list (so we will ignore all retransmissions we see)
|
||||||
|
p->relay_node = nodeDB->getLastByteOfNodeNum(getNodeNum()); // First set the relayer to us
|
||||||
wasSeenRecently(p); // FIXME, move this to a sniffSent method
|
wasSeenRecently(p); // FIXME, move this to a sniffSent method
|
||||||
|
|
||||||
p->next_hop = getNextHop(p->to, p->relay_node); // set the next hop
|
p->next_hop = getNextHop(p->to, p->relay_node); // set the next hop
|
||||||
@ -44,14 +45,21 @@ bool NextHopRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
|||||||
void NextHopRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)
|
void NextHopRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)
|
||||||
{
|
{
|
||||||
NodeNum ourNodeNum = getNodeNum();
|
NodeNum ourNodeNum = getNodeNum();
|
||||||
|
// TODO DMs are now usually not decoded!
|
||||||
bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) && (p->decoded.request_id != 0);
|
bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) && (p->decoded.request_id != 0);
|
||||||
if (isAckorReply) {
|
if (isAckorReply) {
|
||||||
// Update next-hop for the original transmitter of this successful transmission to the relay node, but ONLY if "from" is
|
// Update next-hop for the original transmitter of this successful transmission to the relay node, but ONLY if "from" is
|
||||||
// not 0 (means implicit ACK)
|
// not 0 (means implicit ACK) and original packet was also relayed by this node, or we sent it directly to the destination
|
||||||
if (p->to == ourNodeNum && p->from != 0) {
|
if (p->to == ourNodeNum && p->from != 0) {
|
||||||
if (p->hop_start && p->relay_node) { // Only if hopStart is set, relay_node is valid (both introduced in v2.3)
|
if (p->relay_node) {
|
||||||
|
// Check who was the original relayer of this packet
|
||||||
|
uint8_t original_relayer = PacketHistory::getRelayerFromHistory(p->decoded.request_id, p->to);
|
||||||
|
uint8_t ourRelayID = nodeDB->getLastByteOfNodeNum(ourNodeNum);
|
||||||
meshtastic_NodeInfoLite *origTx = nodeDB->getMeshNode(p->from);
|
meshtastic_NodeInfoLite *origTx = nodeDB->getMeshNode(p->from);
|
||||||
if (origTx) {
|
// Either original relayer and relayer of ACK are the same, or we were the relayer and the ACK came directly from
|
||||||
|
// the destination
|
||||||
|
if (origTx && original_relayer == p->relay_node ||
|
||||||
|
original_relayer == ourRelayID && p->relay_node == nodeDB->getLastByteOfNodeNum(p->from)) {
|
||||||
LOG_DEBUG("Update next hop of 0x%x to 0x%x based on received ACK or reply.\n", p->from, p->relay_node);
|
LOG_DEBUG("Update next hop of 0x%x to 0x%x based on received ACK or reply.\n", p->from, p->relay_node);
|
||||||
origTx->next_hop = p->relay_node;
|
origTx->next_hop = p->relay_node;
|
||||||
}
|
}
|
||||||
@ -65,8 +73,7 @@ void NextHopRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtast
|
|||||||
|
|
||||||
if (config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE) {
|
if (config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE) {
|
||||||
if ((p->to != ourNodeNum) && (getFrom(p) != ourNodeNum)) {
|
if ((p->to != ourNodeNum) && (getFrom(p) != ourNodeNum)) {
|
||||||
if (p->hop_start == 0 || p->next_hop == NO_NEXT_HOP_PREFERENCE ||
|
if (p->next_hop == NO_NEXT_HOP_PREFERENCE || p->next_hop == nodeDB->getLastByteOfNodeNum(ourNodeNum)) {
|
||||||
p->next_hop == nodeDB->getLastByteOfNodeNum(ourNodeNum)) {
|
|
||||||
meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); // keep a copy because we will be sending it
|
meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); // keep a copy because we will be sending it
|
||||||
LOG_INFO("Relaying received message coming from %x\n", p->relay_node);
|
LOG_INFO("Relaying received message coming from %x\n", p->relay_node);
|
||||||
|
|
||||||
@ -185,14 +192,14 @@ int32_t NextHopRouter::doRetransmissions()
|
|||||||
LOG_DEBUG("Sending retransmission fr=0x%x,to=0x%x,id=0x%x, tries left=%d\n", p.packet->from, p.packet->to,
|
LOG_DEBUG("Sending retransmission fr=0x%x,to=0x%x,id=0x%x, tries left=%d\n", p.packet->from, p.packet->to,
|
||||||
p.packet->id, p.numRetransmissions);
|
p.packet->id, p.numRetransmissions);
|
||||||
|
|
||||||
if (config.lora.next_hop_routing && p.packet->to != NODENUM_BROADCAST) {
|
if (p.packet->to != NODENUM_BROADCAST) {
|
||||||
if (p.numRetransmissions == 1) {
|
if (p.numRetransmissions == 1) {
|
||||||
// Last retransmission, reset next_hop (fallback to FloodingRouter)
|
// Last retransmission, reset next_hop (fallback to FloodingRouter)
|
||||||
p.packet->next_hop = NO_NEXT_HOP_PREFERENCE;
|
p.packet->next_hop = NO_NEXT_HOP_PREFERENCE;
|
||||||
// Also reset it in the nodeDB
|
// Also reset it in the nodeDB
|
||||||
meshtastic_NodeInfoLite *sentTo = nodeDB->getMeshNode(p.packet->to);
|
meshtastic_NodeInfoLite *sentTo = nodeDB->getMeshNode(p.packet->to);
|
||||||
if (sentTo) {
|
if (sentTo) {
|
||||||
LOG_DEBUG("Resetting next hop for packet with dest 0x%x\n", p.packet->to);
|
LOG_WARN("Resetting next hop for packet with dest 0x%x\n", p.packet->to);
|
||||||
sentTo->next_hop = NO_NEXT_HOP_PREFERENCE;
|
sentTo->next_hop = NO_NEXT_HOP_PREFERENCE;
|
||||||
}
|
}
|
||||||
FloodingRouter::send(packetPool.allocCopy(*p.packet));
|
FloodingRouter::send(packetPool.allocCopy(*p.packet));
|
||||||
|
@ -104,8 +104,6 @@ class NextHopRouter : public FloodingRouter
|
|||||||
*/
|
*/
|
||||||
virtual void sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) override;
|
virtual void sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) override;
|
||||||
|
|
||||||
constexpr static uint8_t NO_NEXT_HOP_PREFERENCE = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to find the pending packet record for this ID (or NULL if not found)
|
* Try to find the pending packet record for this ID (or NULL if not found)
|
||||||
*/
|
*/
|
||||||
|
@ -28,6 +28,8 @@ bool PacketHistory::wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpd
|
|||||||
r.id = p->id;
|
r.id = p->id;
|
||||||
r.sender = getFrom(p);
|
r.sender = getFrom(p);
|
||||||
r.rxTimeMsec = now;
|
r.rxTimeMsec = now;
|
||||||
|
r.next_hop = p->next_hop;
|
||||||
|
r.relayed_by = p->relay_node;
|
||||||
|
|
||||||
auto found = recentPackets.find(r);
|
auto found = recentPackets.find(r);
|
||||||
bool seenRecently = (found != recentPackets.end()); // found not equal to .end() means packet was seen recently
|
bool seenRecently = (found != recentPackets.end()); // found not equal to .end() means packet was seen recently
|
||||||
@ -38,13 +40,22 @@ bool PacketHistory::wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpd
|
|||||||
seenRecently = false;
|
seenRecently = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (seenRecently) {
|
||||||
|
// If it was seen with a next-hop not set to us, and now it's NO_NEXT_HOP_PREFERENCE, it's a fallback to flooding, so we
|
||||||
|
// consider it unseen because we might need to handle it now
|
||||||
|
if (found->next_hop != NO_NEXT_HOP_PREFERENCE && found->next_hop != nodeDB->getLastByteOfNodeNum(nodeDB->getNodeNum()) &&
|
||||||
|
p->next_hop == NO_NEXT_HOP_PREFERENCE) {
|
||||||
|
seenRecently = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (seenRecently) {
|
if (seenRecently) {
|
||||||
LOG_DEBUG("Found existing packet record for fr=0x%x,to=0x%x,id=0x%x\n", p->from, p->to, p->id);
|
LOG_DEBUG("Found existing packet record for fr=0x%x,to=0x%x,id=0x%x\n", p->from, p->to, p->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (withUpdate) {
|
if (withUpdate) {
|
||||||
if (found != recentPackets.end()) { // delete existing to updated timestamp (re-insert)
|
if (found != recentPackets.end()) { // delete existing to updated timestamp and next-hop/relayed_by (re-insert)
|
||||||
recentPackets.erase(found); // as unsorted_set::iterator is const (can't update timestamp - so re-insert..)
|
recentPackets.erase(found); // as unsorted_set::iterator is const (can't update - so re-insert..)
|
||||||
}
|
}
|
||||||
recentPackets.insert(r);
|
recentPackets.insert(r);
|
||||||
printPacket("Add packet record", p);
|
printPacket("Add packet record", p);
|
||||||
@ -78,3 +89,19 @@ void PacketHistory::clearExpiredRecentPackets()
|
|||||||
|
|
||||||
LOG_DEBUG("recentPackets size=%ld (after clearing expired packets)\n", recentPackets.size());
|
LOG_DEBUG("recentPackets size=%ld (after clearing expired packets)\n", recentPackets.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Find the relayer of a packet in the history given an ID and sender
|
||||||
|
* @return the 1-byte relay identifier, or NULL if not found */
|
||||||
|
uint8_t PacketHistory::getRelayerFromHistory(const uint32_t id, const NodeNum sender)
|
||||||
|
{
|
||||||
|
PacketRecord r;
|
||||||
|
r.id = id;
|
||||||
|
r.sender = sender;
|
||||||
|
auto found = recentPackets.find(r);
|
||||||
|
|
||||||
|
if (found == recentPackets.end()) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return found->relayed_by;
|
||||||
|
}
|
@ -13,6 +13,8 @@ struct PacketRecord {
|
|||||||
NodeNum sender;
|
NodeNum sender;
|
||||||
PacketId id;
|
PacketId id;
|
||||||
uint32_t rxTimeMsec; // Unix time in msecs - the time we received it
|
uint32_t rxTimeMsec; // Unix time in msecs - the time we received it
|
||||||
|
uint8_t next_hop; // The next hop asked for this packet
|
||||||
|
uint8_t relayed_by; // The node that relayed this packet
|
||||||
|
|
||||||
bool operator==(const PacketRecord &p) const { return sender == p.sender && id == p.id; }
|
bool operator==(const PacketRecord &p) const { return sender == p.sender && id == p.id; }
|
||||||
};
|
};
|
||||||
@ -42,4 +44,8 @@ class PacketHistory
|
|||||||
* @param withUpdate if true and not found we add an entry to recentPackets
|
* @param withUpdate if true and not found we add an entry to recentPackets
|
||||||
*/
|
*/
|
||||||
bool wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpdate = true);
|
bool wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpdate = true);
|
||||||
|
|
||||||
|
/* Find the relayer of a packet in the history given an ID and sender
|
||||||
|
* @return the 1-byte relay identifier, or NULL if not found */
|
||||||
|
uint8_t getRelayerFromHistory(const uint32_t id, const NodeNum sender);
|
||||||
};
|
};
|
@ -396,8 +396,9 @@ void RadioLibInterface::handleReceiveInterrupt()
|
|||||||
mp->hop_start = (h->flags & PACKET_FLAGS_HOP_START_MASK) >> PACKET_FLAGS_HOP_START_SHIFT;
|
mp->hop_start = (h->flags & PACKET_FLAGS_HOP_START_MASK) >> PACKET_FLAGS_HOP_START_SHIFT;
|
||||||
mp->want_ack = !!(h->flags & PACKET_FLAGS_WANT_ACK_MASK);
|
mp->want_ack = !!(h->flags & PACKET_FLAGS_WANT_ACK_MASK);
|
||||||
mp->via_mqtt = !!(h->flags & PACKET_FLAGS_VIA_MQTT_MASK);
|
mp->via_mqtt = !!(h->flags & PACKET_FLAGS_VIA_MQTT_MASK);
|
||||||
mp->next_hop = h->next_hop;
|
// If hop_start is not set, next_hop and relay_node are invalid (firmware <2.3)
|
||||||
mp->relay_node = h->relay_node;
|
mp->next_hop = mp->hop_start == 0 ? NO_NEXT_HOP_PREFERENCE : h->next_hop;
|
||||||
|
mp->relay_node = mp->hop_start == 0 ? NO_NEXT_HOP_PREFERENCE : h->relay_node;
|
||||||
|
|
||||||
addReceiveMetadata(mp);
|
addReceiveMetadata(mp);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ ErrorCode ReliableRouter::send(meshtastic_MeshPacket *p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (config.lora.next_hop_routing && p->to != NODENUM_BROADCAST) ? NextHopRouter::send(p) : FloodingRouter::send(p);
|
return p->to == NODENUM_BROADCAST ? FloodingRouter::send(p) : NextHopRouter::send(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReliableRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
bool ReliableRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
||||||
|
@ -32,9 +32,7 @@ typedef enum _meshtastic_AdminMessage_ConfigType {
|
|||||||
/* TODO: REPLACE */
|
/* TODO: REPLACE */
|
||||||
meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6,
|
meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6,
|
||||||
/* TODO: REPLACE */
|
/* TODO: REPLACE */
|
||||||
meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG = 7,
|
meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG = 7
|
||||||
/* */
|
|
||||||
meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG = 8
|
|
||||||
} meshtastic_AdminMessage_ConfigType;
|
} meshtastic_AdminMessage_ConfigType;
|
||||||
|
|
||||||
/* TODO: REPLACE */
|
/* TODO: REPLACE */
|
||||||
@ -206,8 +204,8 @@ extern "C" {
|
|||||||
|
|
||||||
/* Helper constants for enums */
|
/* Helper constants for enums */
|
||||||
#define _meshtastic_AdminMessage_ConfigType_MIN meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG
|
#define _meshtastic_AdminMessage_ConfigType_MIN meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG
|
||||||
#define _meshtastic_AdminMessage_ConfigType_MAX meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG
|
#define _meshtastic_AdminMessage_ConfigType_MAX meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG
|
||||||
#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG+1))
|
#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG+1))
|
||||||
|
|
||||||
#define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG
|
#define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG
|
||||||
#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG
|
#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG
|
||||||
@ -322,8 +320,7 @@ X(a, STATIC, ONEOF, BOOL, (payload_variant,exit_simulator,exit_simulato
|
|||||||
X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_seconds,reboot_seconds), 97) \
|
X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_seconds,reboot_seconds), 97) \
|
||||||
X(a, STATIC, ONEOF, INT32, (payload_variant,shutdown_seconds,shutdown_seconds), 98) \
|
X(a, STATIC, ONEOF, INT32, (payload_variant,shutdown_seconds,shutdown_seconds), 98) \
|
||||||
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset_config,factory_reset_config), 99) \
|
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset_config,factory_reset_config), 99) \
|
||||||
X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), 100) \
|
X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), 100)
|
||||||
X(a, STATIC, SINGULAR, BYTES, session_passkey, 101)
|
|
||||||
#define meshtastic_AdminMessage_CALLBACK NULL
|
#define meshtastic_AdminMessage_CALLBACK NULL
|
||||||
#define meshtastic_AdminMessage_DEFAULT NULL
|
#define meshtastic_AdminMessage_DEFAULT NULL
|
||||||
#define meshtastic_AdminMessage_payload_variant_get_channel_response_MSGTYPE meshtastic_Channel
|
#define meshtastic_AdminMessage_payload_variant_get_channel_response_MSGTYPE meshtastic_Channel
|
||||||
|
@ -34,22 +34,3 @@ PB_BIND(meshtastic_Config_BluetoothConfig, meshtastic_Config_BluetoothConfig, AU
|
|||||||
|
|
||||||
|
|
||||||
PB_BIND(meshtastic_Config_SecurityConfig, meshtastic_Config_SecurityConfig, AUTO)
|
PB_BIND(meshtastic_Config_SecurityConfig, meshtastic_Config_SecurityConfig, AUTO)
|
||||||
|
|
||||||
|
|
||||||
PB_BIND(meshtastic_Config_SessionkeyConfig, meshtastic_Config_SessionkeyConfig, AUTO)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -284,6 +284,10 @@ typedef struct _meshtastic_Config_DeviceConfig {
|
|||||||
/* Disabling this will disable the SerialConsole by not initilizing the StreamAPI
|
/* Disabling this will disable the SerialConsole by not initilizing the StreamAPI
|
||||||
Moved to SecurityConfig */
|
Moved to SecurityConfig */
|
||||||
bool serial_enabled;
|
bool serial_enabled;
|
||||||
|
/* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
||||||
|
Set this to true to leave the debug log outputting even when API is active.
|
||||||
|
Moved to SecurityConfig */
|
||||||
|
bool debug_log_enabled;
|
||||||
/* For boards without a hard wired button, this is the pin number that will be used
|
/* For boards without a hard wired button, this is the pin number that will be used
|
||||||
Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. */
|
Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. */
|
||||||
uint32_t button_gpio;
|
uint32_t button_gpio;
|
||||||
@ -501,8 +505,6 @@ typedef struct _meshtastic_Config_LoRaConfig {
|
|||||||
Please respect your local laws and regulations. If you are a HAM, make sure you
|
Please respect your local laws and regulations. If you are a HAM, make sure you
|
||||||
enable HAM mode and turn off encryption. */
|
enable HAM mode and turn off encryption. */
|
||||||
float override_frequency;
|
float override_frequency;
|
||||||
/* If the NeighborInfo Module is enabled, use its information for next hop-based routing */
|
|
||||||
bool next_hop_routing;
|
|
||||||
/* If true, disable the build-in PA FAN using pin define in RF95_FAN_EN. */
|
/* If true, disable the build-in PA FAN using pin define in RF95_FAN_EN. */
|
||||||
bool pa_fan_disabled;
|
bool pa_fan_disabled;
|
||||||
/* For testing it is useful sometimes to force a node to never listen to
|
/* For testing it is useful sometimes to force a node to never listen to
|
||||||
@ -521,6 +523,9 @@ typedef struct _meshtastic_Config_BluetoothConfig {
|
|||||||
meshtastic_Config_BluetoothConfig_PairingMode mode;
|
meshtastic_Config_BluetoothConfig_PairingMode mode;
|
||||||
/* Specified PIN for PairingMode.FixedPin */
|
/* Specified PIN for PairingMode.FixedPin */
|
||||||
uint32_t fixed_pin;
|
uint32_t fixed_pin;
|
||||||
|
/* Enables device (serial style logs) over Bluetooth
|
||||||
|
Moved to SecurityConfig */
|
||||||
|
bool device_logging_enabled;
|
||||||
} meshtastic_Config_BluetoothConfig;
|
} meshtastic_Config_BluetoothConfig;
|
||||||
|
|
||||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_public_key_t;
|
typedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_public_key_t;
|
||||||
@ -534,25 +539,21 @@ typedef struct _meshtastic_Config_SecurityConfig {
|
|||||||
Used to create a shared key with a remote device. */
|
Used to create a shared key with a remote device. */
|
||||||
meshtastic_Config_SecurityConfig_private_key_t private_key;
|
meshtastic_Config_SecurityConfig_private_key_t private_key;
|
||||||
/* The public key authorized to send admin messages to this node. */
|
/* The public key authorized to send admin messages to this node. */
|
||||||
pb_size_t admin_key_count;
|
meshtastic_Config_SecurityConfig_admin_key_t admin_key;
|
||||||
meshtastic_Config_SecurityConfig_admin_key_t admin_key[1];
|
|
||||||
/* If true, device is considered to be "managed" by a mesh administrator via admin messages
|
/* If true, device is considered to be "managed" by a mesh administrator via admin messages
|
||||||
Device is managed by a mesh administrator. */
|
Device is managed by a mesh administrator. */
|
||||||
bool is_managed;
|
bool is_managed;
|
||||||
/* Serial Console over the Stream API." */
|
/* Serial Console over the Stream API." */
|
||||||
bool serial_enabled;
|
bool serial_enabled;
|
||||||
/* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
/* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
||||||
Output live debug logging over serial or bluetooth is set to true. */
|
Output live debug logging over serial. */
|
||||||
bool debug_log_api_enabled;
|
bool debug_log_api_enabled;
|
||||||
|
/* Enables device (serial style logs) over Bluetooth */
|
||||||
|
bool bluetooth_logging_enabled;
|
||||||
/* Allow incoming device control over the insecure legacy admin channel. */
|
/* Allow incoming device control over the insecure legacy admin channel. */
|
||||||
bool admin_channel_enabled;
|
bool admin_channel_enabled;
|
||||||
} meshtastic_Config_SecurityConfig;
|
} meshtastic_Config_SecurityConfig;
|
||||||
|
|
||||||
/* Blank config request, strictly for getting the session key */
|
|
||||||
typedef struct _meshtastic_Config_SessionkeyConfig {
|
|
||||||
char dummy_field;
|
|
||||||
} meshtastic_Config_SessionkeyConfig;
|
|
||||||
|
|
||||||
typedef struct _meshtastic_Config {
|
typedef struct _meshtastic_Config {
|
||||||
pb_size_t which_payload_variant;
|
pb_size_t which_payload_variant;
|
||||||
union {
|
union {
|
||||||
@ -564,7 +565,6 @@ typedef struct _meshtastic_Config {
|
|||||||
meshtastic_Config_LoRaConfig lora;
|
meshtastic_Config_LoRaConfig lora;
|
||||||
meshtastic_Config_BluetoothConfig bluetooth;
|
meshtastic_Config_BluetoothConfig bluetooth;
|
||||||
meshtastic_Config_SecurityConfig security;
|
meshtastic_Config_SecurityConfig security;
|
||||||
meshtastic_Config_SessionkeyConfig sessionkey;
|
|
||||||
} payload_variant;
|
} payload_variant;
|
||||||
} meshtastic_Config;
|
} meshtastic_Config;
|
||||||
|
|
||||||
@ -649,7 +649,6 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Initializer values for message structs */
|
/* Initializer values for message structs */
|
||||||
#define meshtastic_Config_init_default {0, {meshtastic_Config_DeviceConfig_init_default}}
|
#define meshtastic_Config_init_default {0, {meshtastic_Config_DeviceConfig_init_default}}
|
||||||
#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||||
@ -659,9 +658,8 @@ extern "C" {
|
|||||||
#define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0}
|
#define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0}
|
||||||
#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN}
|
#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN}
|
||||||
#define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0}
|
#define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0}
|
||||||
#define meshtastic_Config_BluetoothConfig_init_default {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0}
|
#define meshtastic_Config_BluetoothConfig_init_default {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0, 0}
|
||||||
#define meshtastic_Config_SecurityConfig_init_default {{0, {0}}, {0, {0}}, 0, {{0, {0}}}, 0, 0, 0, 0}
|
#define meshtastic_Config_SecurityConfig_init_default {{0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_Config_SessionkeyConfig_init_default {0}
|
|
||||||
#define meshtastic_Config_init_zero {0, {meshtastic_Config_DeviceConfig_init_zero}}
|
#define meshtastic_Config_init_zero {0, {meshtastic_Config_DeviceConfig_init_zero}}
|
||||||
#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||||
#define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
#define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
||||||
@ -670,9 +668,8 @@ extern "C" {
|
|||||||
#define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0}
|
#define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0}
|
||||||
#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN}
|
#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN}
|
||||||
#define meshtastic_Config_LoRaConfig_init_zero {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0}
|
#define meshtastic_Config_LoRaConfig_init_zero {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0}
|
||||||
#define meshtastic_Config_BluetoothConfig_init_zero {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0}
|
#define meshtastic_Config_BluetoothConfig_init_zero {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0, 0}
|
||||||
#define meshtastic_Config_SecurityConfig_init_zero {{0, {0}}, {0, {0}}, 0, {{0, {0}}}, 0, 0, 0, 0}
|
#define meshtastic_Config_SecurityConfig_init_zero {{0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_Config_SessionkeyConfig_init_zero {0}
|
|
||||||
|
|
||||||
/* Field tags (for use in manual encoding/decoding) */
|
/* Field tags (for use in manual encoding/decoding) */
|
||||||
#define meshtastic_Config_DeviceConfig_role_tag 1
|
#define meshtastic_Config_DeviceConfig_role_tag 1
|
||||||
@ -745,19 +742,20 @@ extern "C" {
|
|||||||
#define meshtastic_Config_LoRaConfig_override_duty_cycle_tag 12
|
#define meshtastic_Config_LoRaConfig_override_duty_cycle_tag 12
|
||||||
#define meshtastic_Config_LoRaConfig_sx126x_rx_boosted_gain_tag 13
|
#define meshtastic_Config_LoRaConfig_sx126x_rx_boosted_gain_tag 13
|
||||||
#define meshtastic_Config_LoRaConfig_override_frequency_tag 14
|
#define meshtastic_Config_LoRaConfig_override_frequency_tag 14
|
||||||
#define meshtastic_Config_LoRaConfig_next_hop_routing_tag 15
|
#define meshtastic_Config_LoRaConfig_pa_fan_disabled_tag 15
|
||||||
#define meshtastic_Config_LoRaConfig_pa_fan_disabled_tag 16
|
|
||||||
#define meshtastic_Config_LoRaConfig_ignore_incoming_tag 103
|
#define meshtastic_Config_LoRaConfig_ignore_incoming_tag 103
|
||||||
#define meshtastic_Config_LoRaConfig_ignore_mqtt_tag 104
|
#define meshtastic_Config_LoRaConfig_ignore_mqtt_tag 104
|
||||||
#define meshtastic_Config_BluetoothConfig_enabled_tag 1
|
#define meshtastic_Config_BluetoothConfig_enabled_tag 1
|
||||||
#define meshtastic_Config_BluetoothConfig_mode_tag 2
|
#define meshtastic_Config_BluetoothConfig_mode_tag 2
|
||||||
#define meshtastic_Config_BluetoothConfig_fixed_pin_tag 3
|
#define meshtastic_Config_BluetoothConfig_fixed_pin_tag 3
|
||||||
|
#define meshtastic_Config_BluetoothConfig_device_logging_enabled_tag 4
|
||||||
#define meshtastic_Config_SecurityConfig_public_key_tag 1
|
#define meshtastic_Config_SecurityConfig_public_key_tag 1
|
||||||
#define meshtastic_Config_SecurityConfig_private_key_tag 2
|
#define meshtastic_Config_SecurityConfig_private_key_tag 2
|
||||||
#define meshtastic_Config_SecurityConfig_admin_key_tag 3
|
#define meshtastic_Config_SecurityConfig_admin_key_tag 3
|
||||||
#define meshtastic_Config_SecurityConfig_is_managed_tag 4
|
#define meshtastic_Config_SecurityConfig_is_managed_tag 4
|
||||||
#define meshtastic_Config_SecurityConfig_serial_enabled_tag 5
|
#define meshtastic_Config_SecurityConfig_serial_enabled_tag 5
|
||||||
#define meshtastic_Config_SecurityConfig_debug_log_api_enabled_tag 6
|
#define meshtastic_Config_SecurityConfig_debug_log_api_enabled_tag 6
|
||||||
|
#define meshtastic_Config_SecurityConfig_bluetooth_logging_enabled_tag 7
|
||||||
#define meshtastic_Config_SecurityConfig_admin_channel_enabled_tag 8
|
#define meshtastic_Config_SecurityConfig_admin_channel_enabled_tag 8
|
||||||
#define meshtastic_Config_device_tag 1
|
#define meshtastic_Config_device_tag 1
|
||||||
#define meshtastic_Config_position_tag 2
|
#define meshtastic_Config_position_tag 2
|
||||||
@ -767,7 +765,6 @@ extern "C" {
|
|||||||
#define meshtastic_Config_lora_tag 6
|
#define meshtastic_Config_lora_tag 6
|
||||||
#define meshtastic_Config_bluetooth_tag 7
|
#define meshtastic_Config_bluetooth_tag 7
|
||||||
#define meshtastic_Config_security_tag 8
|
#define meshtastic_Config_security_tag 8
|
||||||
#define meshtastic_Config_sessionkey_tag 9
|
|
||||||
|
|
||||||
/* Struct field encoding specification for nanopb */
|
/* Struct field encoding specification for nanopb */
|
||||||
#define meshtastic_Config_FIELDLIST(X, a) \
|
#define meshtastic_Config_FIELDLIST(X, a) \
|
||||||
@ -778,8 +775,7 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,network,payload_variant.netw
|
|||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,display,payload_variant.display), 5) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,display,payload_variant.display), 5) \
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,lora,payload_variant.lora), 6) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,lora,payload_variant.lora), 6) \
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,bluetooth,payload_variant.bluetooth), 7) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,bluetooth,payload_variant.bluetooth), 7) \
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,security,payload_variant.security), 8) \
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,security,payload_variant.security), 8)
|
||||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,sessionkey,payload_variant.sessionkey), 9)
|
|
||||||
#define meshtastic_Config_CALLBACK NULL
|
#define meshtastic_Config_CALLBACK NULL
|
||||||
#define meshtastic_Config_DEFAULT NULL
|
#define meshtastic_Config_DEFAULT NULL
|
||||||
#define meshtastic_Config_payload_variant_device_MSGTYPE meshtastic_Config_DeviceConfig
|
#define meshtastic_Config_payload_variant_device_MSGTYPE meshtastic_Config_DeviceConfig
|
||||||
@ -790,7 +786,6 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,sessionkey,payload_variant.s
|
|||||||
#define meshtastic_Config_payload_variant_lora_MSGTYPE meshtastic_Config_LoRaConfig
|
#define meshtastic_Config_payload_variant_lora_MSGTYPE meshtastic_Config_LoRaConfig
|
||||||
#define meshtastic_Config_payload_variant_bluetooth_MSGTYPE meshtastic_Config_BluetoothConfig
|
#define meshtastic_Config_payload_variant_bluetooth_MSGTYPE meshtastic_Config_BluetoothConfig
|
||||||
#define meshtastic_Config_payload_variant_security_MSGTYPE meshtastic_Config_SecurityConfig
|
#define meshtastic_Config_payload_variant_security_MSGTYPE meshtastic_Config_SecurityConfig
|
||||||
#define meshtastic_Config_payload_variant_sessionkey_MSGTYPE meshtastic_Config_SessionkeyConfig
|
|
||||||
|
|
||||||
#define meshtastic_Config_DeviceConfig_FIELDLIST(X, a) \
|
#define meshtastic_Config_DeviceConfig_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, UENUM, role, 1) \
|
X(a, STATIC, SINGULAR, UENUM, role, 1) \
|
||||||
@ -888,8 +883,7 @@ X(a, STATIC, SINGULAR, UINT32, channel_num, 11) \
|
|||||||
X(a, STATIC, SINGULAR, BOOL, override_duty_cycle, 12) \
|
X(a, STATIC, SINGULAR, BOOL, override_duty_cycle, 12) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, sx126x_rx_boosted_gain, 13) \
|
X(a, STATIC, SINGULAR, BOOL, sx126x_rx_boosted_gain, 13) \
|
||||||
X(a, STATIC, SINGULAR, FLOAT, override_frequency, 14) \
|
X(a, STATIC, SINGULAR, FLOAT, override_frequency, 14) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, next_hop_routing, 15) \
|
X(a, STATIC, SINGULAR, BOOL, pa_fan_disabled, 15) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, pa_fan_disabled, 16) \
|
|
||||||
X(a, STATIC, REPEATED, UINT32, ignore_incoming, 103) \
|
X(a, STATIC, REPEATED, UINT32, ignore_incoming, 103) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, ignore_mqtt, 104)
|
X(a, STATIC, SINGULAR, BOOL, ignore_mqtt, 104)
|
||||||
#define meshtastic_Config_LoRaConfig_CALLBACK NULL
|
#define meshtastic_Config_LoRaConfig_CALLBACK NULL
|
||||||
@ -898,26 +892,23 @@ X(a, STATIC, SINGULAR, BOOL, ignore_mqtt, 104)
|
|||||||
#define meshtastic_Config_BluetoothConfig_FIELDLIST(X, a) \
|
#define meshtastic_Config_BluetoothConfig_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||||
X(a, STATIC, SINGULAR, UENUM, mode, 2) \
|
X(a, STATIC, SINGULAR, UENUM, mode, 2) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, fixed_pin, 3)
|
X(a, STATIC, SINGULAR, UINT32, fixed_pin, 3) \
|
||||||
|
X(a, STATIC, SINGULAR, BOOL, device_logging_enabled, 4)
|
||||||
#define meshtastic_Config_BluetoothConfig_CALLBACK NULL
|
#define meshtastic_Config_BluetoothConfig_CALLBACK NULL
|
||||||
#define meshtastic_Config_BluetoothConfig_DEFAULT NULL
|
#define meshtastic_Config_BluetoothConfig_DEFAULT NULL
|
||||||
|
|
||||||
#define meshtastic_Config_SecurityConfig_FIELDLIST(X, a) \
|
#define meshtastic_Config_SecurityConfig_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, BYTES, public_key, 1) \
|
X(a, STATIC, SINGULAR, BYTES, public_key, 1) \
|
||||||
X(a, STATIC, SINGULAR, BYTES, private_key, 2) \
|
X(a, STATIC, SINGULAR, BYTES, private_key, 2) \
|
||||||
X(a, STATIC, REPEATED, BYTES, admin_key, 3) \
|
X(a, STATIC, SINGULAR, BYTES, admin_key, 3) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, is_managed, 4) \
|
X(a, STATIC, SINGULAR, BOOL, is_managed, 4) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, serial_enabled, 5) \
|
X(a, STATIC, SINGULAR, BOOL, serial_enabled, 5) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, debug_log_api_enabled, 6) \
|
X(a, STATIC, SINGULAR, BOOL, debug_log_api_enabled, 6) \
|
||||||
|
X(a, STATIC, SINGULAR, BOOL, bluetooth_logging_enabled, 7) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, admin_channel_enabled, 8)
|
X(a, STATIC, SINGULAR, BOOL, admin_channel_enabled, 8)
|
||||||
#define meshtastic_Config_SecurityConfig_CALLBACK NULL
|
#define meshtastic_Config_SecurityConfig_CALLBACK NULL
|
||||||
#define meshtastic_Config_SecurityConfig_DEFAULT NULL
|
#define meshtastic_Config_SecurityConfig_DEFAULT NULL
|
||||||
|
|
||||||
#define meshtastic_Config_SessionkeyConfig_FIELDLIST(X, a) \
|
|
||||||
|
|
||||||
#define meshtastic_Config_SessionkeyConfig_CALLBACK NULL
|
|
||||||
#define meshtastic_Config_SessionkeyConfig_DEFAULT NULL
|
|
||||||
|
|
||||||
extern const pb_msgdesc_t meshtastic_Config_msg;
|
extern const pb_msgdesc_t meshtastic_Config_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Config_DeviceConfig_msg;
|
extern const pb_msgdesc_t meshtastic_Config_DeviceConfig_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Config_PositionConfig_msg;
|
extern const pb_msgdesc_t meshtastic_Config_PositionConfig_msg;
|
||||||
@ -928,7 +919,6 @@ extern const pb_msgdesc_t meshtastic_Config_DisplayConfig_msg;
|
|||||||
extern const pb_msgdesc_t meshtastic_Config_LoRaConfig_msg;
|
extern const pb_msgdesc_t meshtastic_Config_LoRaConfig_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Config_BluetoothConfig_msg;
|
extern const pb_msgdesc_t meshtastic_Config_BluetoothConfig_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Config_SecurityConfig_msg;
|
extern const pb_msgdesc_t meshtastic_Config_SecurityConfig_msg;
|
||||||
extern const pb_msgdesc_t meshtastic_Config_SessionkeyConfig_msg;
|
|
||||||
|
|
||||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||||
#define meshtastic_Config_fields &meshtastic_Config_msg
|
#define meshtastic_Config_fields &meshtastic_Config_msg
|
||||||
@ -941,20 +931,18 @@ extern const pb_msgdesc_t meshtastic_Config_SessionkeyConfig_msg;
|
|||||||
#define meshtastic_Config_LoRaConfig_fields &meshtastic_Config_LoRaConfig_msg
|
#define meshtastic_Config_LoRaConfig_fields &meshtastic_Config_LoRaConfig_msg
|
||||||
#define meshtastic_Config_BluetoothConfig_fields &meshtastic_Config_BluetoothConfig_msg
|
#define meshtastic_Config_BluetoothConfig_fields &meshtastic_Config_BluetoothConfig_msg
|
||||||
#define meshtastic_Config_SecurityConfig_fields &meshtastic_Config_SecurityConfig_msg
|
#define meshtastic_Config_SecurityConfig_fields &meshtastic_Config_SecurityConfig_msg
|
||||||
#define meshtastic_Config_SessionkeyConfig_fields &meshtastic_Config_SessionkeyConfig_msg
|
|
||||||
|
|
||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define MESHTASTIC_MESHTASTIC_CONFIG_PB_H_MAX_SIZE meshtastic_Config_size
|
#define MESHTASTIC_MESHTASTIC_CONFIG_PB_H_MAX_SIZE meshtastic_Config_size
|
||||||
#define meshtastic_Config_BluetoothConfig_size 10
|
#define meshtastic_Config_BluetoothConfig_size 12
|
||||||
#define meshtastic_Config_DeviceConfig_size 98
|
#define meshtastic_Config_DeviceConfig_size 100
|
||||||
#define meshtastic_Config_DisplayConfig_size 30
|
#define meshtastic_Config_DisplayConfig_size 30
|
||||||
#define meshtastic_Config_LoRaConfig_size 84
|
#define meshtastic_Config_LoRaConfig_size 82
|
||||||
#define meshtastic_Config_NetworkConfig_IpV4Config_size 20
|
#define meshtastic_Config_NetworkConfig_IpV4Config_size 20
|
||||||
#define meshtastic_Config_NetworkConfig_size 196
|
#define meshtastic_Config_NetworkConfig_size 196
|
||||||
#define meshtastic_Config_PositionConfig_size 62
|
#define meshtastic_Config_PositionConfig_size 62
|
||||||
#define meshtastic_Config_PowerConfig_size 52
|
#define meshtastic_Config_PowerConfig_size 52
|
||||||
#define meshtastic_Config_SecurityConfig_size 111
|
#define meshtastic_Config_SecurityConfig_size 112
|
||||||
#define meshtastic_Config_SessionkeyConfig_size 0
|
|
||||||
#define meshtastic_Config_size 199
|
#define meshtastic_Config_size 199
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -360,10 +360,9 @@ extern const pb_msgdesc_t meshtastic_OEMStore_msg;
|
|||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
/* meshtastic_DeviceState_size depends on runtime parameters */
|
/* meshtastic_DeviceState_size depends on runtime parameters */
|
||||||
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_OEMStore_size
|
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_OEMStore_size
|
||||||
|
|
||||||
#define meshtastic_ChannelFile_size 718
|
#define meshtastic_ChannelFile_size 718
|
||||||
#define meshtastic_NodeInfoLite_size 183
|
#define meshtastic_NodeInfoLite_size 203
|
||||||
#define meshtastic_OEMStore_size 3497
|
#define meshtastic_OEMStore_size 3502
|
||||||
#define meshtastic_PositionLite_size 28
|
#define meshtastic_PositionLite_size 28
|
||||||
#define meshtastic_UserLite_size 96
|
#define meshtastic_UserLite_size 96
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
|||||||
|
|
||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalModuleConfig_size
|
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalModuleConfig_size
|
||||||
#define meshtastic_LocalConfig_size 664
|
#define meshtastic_LocalConfig_size 669
|
||||||
#define meshtastic_LocalModuleConfig_size 687
|
#define meshtastic_LocalModuleConfig_size 687
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -180,25 +180,6 @@ typedef enum _meshtastic_HardwareModel {
|
|||||||
meshtastic_HardwareModel_SENSECAP_INDICATOR = 70,
|
meshtastic_HardwareModel_SENSECAP_INDICATOR = 70,
|
||||||
/* Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. */
|
/* Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. */
|
||||||
meshtastic_HardwareModel_TRACKER_T1000_E = 71,
|
meshtastic_HardwareModel_TRACKER_T1000_E = 71,
|
||||||
/* RAK3172 STM32WLE5 Module (https://store.rakwireless.com/products/wisduo-lpwan-module-rak3172) */
|
|
||||||
meshtastic_HardwareModel_RAK3172 = 72,
|
|
||||||
/* Seeed Studio Wio-E5 (either mini or Dev kit) using STM32WL chip. */
|
|
||||||
meshtastic_HardwareModel_WIO_E5 = 73,
|
|
||||||
/* RadioMaster 900 Bandit, https://www.radiomasterrc.com/products/bandit-expresslrs-rf-module
|
|
||||||
SSD1306 OLED and No GPS */
|
|
||||||
meshtastic_HardwareModel_RADIOMASTER_900_BANDIT = 74,
|
|
||||||
/* Minewsemi ME25LS01 (ME25LE01_V1.0). NRF52840 w/ LR1110 radio, buttons and leds and pins. */
|
|
||||||
meshtastic_HardwareModel_ME25LS01_4Y10TD = 75,
|
|
||||||
/* RP2040_FEATHER_RFM95
|
|
||||||
Adafruit Feather RP2040 with RFM95 LoRa Radio RFM95 with SX1272, SSD1306 OLED
|
|
||||||
https://www.adafruit.com/product/5714
|
|
||||||
https://www.adafruit.com/product/326
|
|
||||||
https://www.adafruit.com/product/938
|
|
||||||
^^^ short A0 to switch to I2C address 0x3C */
|
|
||||||
meshtastic_HardwareModel_RP2040_FEATHER_RFM95 = 76,
|
|
||||||
/* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ */
|
|
||||||
meshtastic_HardwareModel_M5STACK_COREBASIC = 77,
|
|
||||||
meshtastic_HardwareModel_M5STACK_CORE2 = 78,
|
|
||||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||||
@ -693,6 +674,10 @@ typedef struct _meshtastic_MeshPacket {
|
|||||||
/* Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header.
|
/* Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header.
|
||||||
When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. */
|
When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. */
|
||||||
uint8_t hop_start;
|
uint8_t hop_start;
|
||||||
|
/* Records the public key the packet was encrypted with, if applicable. */
|
||||||
|
meshtastic_MeshPacket_public_key_t public_key;
|
||||||
|
/* Indicates whether the packet was en/decrypted using PKI */
|
||||||
|
bool pki_encrypted;
|
||||||
/* Last byte of the node number of the node that should be used as the next hop in routing. */
|
/* Last byte of the node number of the node that should be used as the next hop in routing. */
|
||||||
uint8_t next_hop;
|
uint8_t next_hop;
|
||||||
/* Last byte of the node number of the node that will relay/relayed this packet. */
|
/* Last byte of the node number of the node that will relay/relayed this packet. */
|
||||||
@ -1084,12 +1069,12 @@ extern "C" {
|
|||||||
/* Initializer values for message structs */
|
/* Initializer values for message structs */
|
||||||
#define meshtastic_Position_init_default {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_Position_init_default {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_User_init_default {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
#define meshtastic_User_init_default {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||||
#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||||
#define meshtastic_Routing_init_default {0, {meshtastic_RouteDiscovery_init_default}}
|
#define meshtastic_Routing_init_default {0, {meshtastic_RouteDiscovery_init_default}}
|
||||||
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||||
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
||||||
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0}
|
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0}
|
||||||
#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, 0, 0}
|
#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, 0, 0}
|
||||||
#define meshtastic_MyNodeInfo_init_default {0, 0, 0}
|
#define meshtastic_MyNodeInfo_init_default {0, 0, 0}
|
||||||
#define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
#define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
||||||
@ -1109,12 +1094,12 @@ extern "C" {
|
|||||||
#define meshtastic_ChunkedPayloadResponse_init_default {0, 0, {0}}
|
#define meshtastic_ChunkedPayloadResponse_init_default {0, 0, {0}}
|
||||||
#define meshtastic_Position_init_zero {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_Position_init_zero {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_User_init_zero {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
#define meshtastic_User_init_zero {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||||
#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||||
#define meshtastic_Routing_init_zero {0, {meshtastic_RouteDiscovery_init_zero}}
|
#define meshtastic_Routing_init_zero {0, {meshtastic_RouteDiscovery_init_zero}}
|
||||||
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||||
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
||||||
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0}
|
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0}
|
||||||
#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, 0, 0}
|
#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, 0, 0}
|
||||||
#define meshtastic_MyNodeInfo_init_zero {0, 0, 0}
|
#define meshtastic_MyNodeInfo_init_zero {0, 0, 0}
|
||||||
#define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
#define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
||||||
@ -1207,10 +1192,10 @@ extern "C" {
|
|||||||
#define meshtastic_MeshPacket_delayed_tag 13
|
#define meshtastic_MeshPacket_delayed_tag 13
|
||||||
#define meshtastic_MeshPacket_via_mqtt_tag 14
|
#define meshtastic_MeshPacket_via_mqtt_tag 14
|
||||||
#define meshtastic_MeshPacket_hop_start_tag 15
|
#define meshtastic_MeshPacket_hop_start_tag 15
|
||||||
#define meshtastic_MeshPacket_next_hop_tag 16
|
#define meshtastic_MeshPacket_public_key_tag 16
|
||||||
#define meshtastic_MeshPacket_relay_node_tag 17
|
#define meshtastic_MeshPacket_pki_encrypted_tag 17
|
||||||
#define meshtastic_MeshPacket_public_key_tag 18
|
#define meshtastic_MeshPacket_next_hop_tag 18
|
||||||
#define meshtastic_MeshPacket_pki_encrypted_tag 19
|
#define meshtastic_MeshPacket_relay_node_tag 19
|
||||||
#define meshtastic_NodeInfo_num_tag 1
|
#define meshtastic_NodeInfo_num_tag 1
|
||||||
#define meshtastic_NodeInfo_user_tag 2
|
#define meshtastic_NodeInfo_user_tag 2
|
||||||
#define meshtastic_NodeInfo_position_tag 3
|
#define meshtastic_NodeInfo_position_tag 3
|
||||||
@ -1397,10 +1382,10 @@ X(a, STATIC, SINGULAR, INT32, rx_rssi, 12) \
|
|||||||
X(a, STATIC, SINGULAR, UENUM, delayed, 13) \
|
X(a, STATIC, SINGULAR, UENUM, delayed, 13) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, via_mqtt, 14) \
|
X(a, STATIC, SINGULAR, BOOL, via_mqtt, 14) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, hop_start, 15) \
|
X(a, STATIC, SINGULAR, UINT32, hop_start, 15) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, next_hop, 16) \
|
X(a, STATIC, SINGULAR, BYTES, public_key, 16) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, relay_node, 17)
|
X(a, STATIC, SINGULAR, BOOL, pki_encrypted, 17) \
|
||||||
X(a, STATIC, SINGULAR, BYTES, public_key, 18) \
|
X(a, STATIC, SINGULAR, UINT32, next_hop, 18) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, pki_encrypted, 19)
|
X(a, STATIC, SINGULAR, UINT32, relay_node, 19)
|
||||||
#define meshtastic_MeshPacket_CALLBACK NULL
|
#define meshtastic_MeshPacket_CALLBACK NULL
|
||||||
#define meshtastic_MeshPacket_DEFAULT NULL
|
#define meshtastic_MeshPacket_DEFAULT NULL
|
||||||
#define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data
|
#define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data
|
||||||
@ -1643,7 +1628,7 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||||||
#define meshtastic_FromRadio_size 510
|
#define meshtastic_FromRadio_size 510
|
||||||
#define meshtastic_Heartbeat_size 0
|
#define meshtastic_Heartbeat_size 0
|
||||||
#define meshtastic_LogRecord_size 426
|
#define meshtastic_LogRecord_size 426
|
||||||
#define meshtastic_MeshPacket_size 364
|
#define meshtastic_MeshPacket_size 372
|
||||||
#define meshtastic_MqttClientProxyMessage_size 501
|
#define meshtastic_MqttClientProxyMessage_size 501
|
||||||
#define meshtastic_MyNodeInfo_size 18
|
#define meshtastic_MyNodeInfo_size 18
|
||||||
#define meshtastic_NeighborInfo_size 258
|
#define meshtastic_NeighborInfo_size 258
|
||||||
|
@ -283,14 +283,12 @@ extern "C" {
|
|||||||
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0}
|
|
||||||
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
||||||
#define meshtastic_Nau7802Config_init_default {0, 0}
|
#define meshtastic_Nau7802Config_init_default {0, 0}
|
||||||
#define meshtastic_DeviceMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_DeviceMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0}
|
|
||||||
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
||||||
#define meshtastic_Nau7802Config_init_zero {0, 0}
|
#define meshtastic_Nau7802Config_init_zero {0, 0}
|
||||||
|
|
||||||
@ -464,7 +462,6 @@ extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
|||||||
#define meshtastic_AirQualityMetrics_size 72
|
#define meshtastic_AirQualityMetrics_size 72
|
||||||
#define meshtastic_DeviceMetrics_size 27
|
#define meshtastic_DeviceMetrics_size 27
|
||||||
#define meshtastic_EnvironmentMetrics_size 85
|
#define meshtastic_EnvironmentMetrics_size 85
|
||||||
#define meshtastic_LocalStats_size 42
|
|
||||||
#define meshtastic_Nau7802Config_size 16
|
#define meshtastic_Nau7802Config_size 16
|
||||||
#define meshtastic_PowerMetrics_size 30
|
#define meshtastic_PowerMetrics_size 30
|
||||||
#define meshtastic_Telemetry_size 92
|
#define meshtastic_Telemetry_size 92
|
||||||
|
@ -186,7 +186,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case meshtastic_AdminMessage_factory_reset_config_tag: {
|
case meshtastic_AdminMessage_factory_reset_config_tag: {
|
||||||
LOG_INFO("Initiating factory config reset\n");
|
LOG_INFO("Initiating factory reset\n");
|
||||||
nodeDB->factoryReset();
|
nodeDB->factoryReset();
|
||||||
reboot(DEFAULT_REBOOT_SECONDS);
|
reboot(DEFAULT_REBOOT_SECONDS);
|
||||||
break;
|
break;
|
||||||
|
@ -148,18 +148,8 @@ void setupModules()
|
|||||||
delete upDownInterruptImpl1;
|
delete upDownInterruptImpl1;
|
||||||
upDownInterruptImpl1 = nullptr;
|
upDownInterruptImpl1 = nullptr;
|
||||||
}
|
}
|
||||||
|
// cardKbI2cImpl = new CardKbI2cImpl();
|
||||||
#if HAS_SCREEN
|
// cardKbI2cImpl->init();
|
||||||
// In order to have the user button dismiss the canned message frame, this class lightly interacts with the Screen class
|
|
||||||
scanAndSelectInput = new ScanAndSelectInput();
|
|
||||||
if (!scanAndSelectInput->init()) {
|
|
||||||
delete scanAndSelectInput;
|
|
||||||
scanAndSelectInput = nullptr;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cardKbI2cImpl = new CardKbI2cImpl();
|
|
||||||
cardKbI2cImpl->init();
|
|
||||||
#ifdef INPUTBROKER_MATRIX_TYPE
|
#ifdef INPUTBROKER_MATRIX_TYPE
|
||||||
kbMatrixImpl = new KbMatrixImpl();
|
kbMatrixImpl = new KbMatrixImpl();
|
||||||
kbMatrixImpl->init();
|
kbMatrixImpl->init();
|
||||||
|
@ -91,7 +91,7 @@ NodeInfoModule::NodeInfoModule()
|
|||||||
: ProtobufModule("nodeinfo", meshtastic_PortNum_NODEINFO_APP, &meshtastic_User_msg), concurrency::OSThread("NodeInfoModule")
|
: ProtobufModule("nodeinfo", meshtastic_PortNum_NODEINFO_APP, &meshtastic_User_msg), concurrency::OSThread("NodeInfoModule")
|
||||||
{
|
{
|
||||||
isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others
|
isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others
|
||||||
setIntervalFromNow(30 *
|
setIntervalFromNow(20 *
|
||||||
1000); // Send our initial owner announcement 30 seconds after we start (to give network time to setup)
|
1000); // Send our initial owner announcement 30 seconds after we start (to give network time to setup)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,8 +17,7 @@ class DeviceTelemetryModule : private concurrency::OSThread, public ProtobufModu
|
|||||||
{
|
{
|
||||||
uptimeWrapCount = 0;
|
uptimeWrapCount = 0;
|
||||||
uptimeLastMs = millis();
|
uptimeLastMs = millis();
|
||||||
nodeStatusObserver.observe(&nodeStatus->onNewStatus);
|
setIntervalFromNow(450000 * 1000); // Wait until NodeInfo is sent
|
||||||
setIntervalFromNow(45 * 1000); // Wait until NodeInfo is sent
|
|
||||||
}
|
}
|
||||||
virtual bool wantUIFrame() { return false; }
|
virtual bool wantUIFrame() { return false; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user