Skip to content

Commit d2a918b

Browse files
committed
use SPECIAL_NONCE
1 parent 694e027 commit d2a918b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/mt_protocol.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
pb_byte_t pb_buf[PB_BUFSIZE+4];
1414
size_t pb_size = 0; // Number of bytes currently in the buffer
1515

16+
// Nonce to request only my nodeinfo and skip other nodes in the db
17+
#define SPECIAL_NONCE 69420
18+
1619
// Wait this many msec if there's nothing new on the channel
1720
#define NO_NEWS_PAUSE 25
1821

@@ -234,8 +237,7 @@ bool handle_packet(uint32_t now, size_t payload_len) {
234237
// Be prepared to request a node report to re-establish flow after an MT reboot
235238
meshtastic_ToRadio toRadio = meshtastic_ToRadio_init_default;
236239
toRadio.which_payload_variant = meshtastic_ToRadio_want_config_id_tag;
237-
want_config_id = random(0x7FffFFff); // random() can't handle anything bigger
238-
toRadio.want_config_id = want_config_id;
240+
toRadio.want_config_id = SPECIAL_NONCE;
239241

240242
if (!status) {
241243
d("Decoding failed");

0 commit comments

Comments
 (0)