Commit Graph
100 Commits
Author SHA1 Message Date
68250dc937 Mark implicit ACK for MQTT as MQTT transport (#8939)
* Mark implicit ACK for MQTT as MQTT transport

* TRUNK

* Fix build

* Make sure implicit ACKs from MQTT do not stop retransmissions in ReliableRouter

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-12-12 05:19:32 -06:00
GUVWAFandGitHub bca0e1abde Fix boot on RP2040 by excluding new FreeRTOS task (#8508) 2025-11-01 16:48:04 -05:00
GUVWAFandGitHub 664d17c519 Revert "Revert "develop --> Master" (#8244)" (#8450)
This reverts commit 5bcc47dddb.
2025-10-25 06:59:01 -05:00
GUVWAFandGitHub 07d354fa02 Move airtime calculation to when Tx is complete (#8427) 2025-10-23 05:42:36 -05:00
888692a373 Add dropped packet count to LocalStats (#8207)
* Add dropped packet count to LocalStats
In case the transmit queue was full

* Trunked

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-10-04 08:13:58 -05:00
GUVWAFandGitHub e8296914a5 Calculate airtime of transmitted and received packets separately (#8205) 2025-10-04 05:29:25 -05:00
GUVWAFandGitHub aa876ba42f Merge branch 'develop' into assymRelay 2025-09-25 20:01:35 +02:00
GUVWAFandBen Meadors 34c2191f63 Use lora.use_preset config to get name (#8057) 2025-09-20 12:17:49 -05:00
GUVWAFandGitHub 52527e281d Use lora.use_preset config to get name (#8057) 2025-09-20 12:17:14 -05:00
1d3c47c5fa Make sure to ACK ACKs/replies if next-hop routing is used (#8052)
* Make sure to ACK ACKs/replies if next-hop routing is used
To stop their retransmissions; hop limit of 0 is enough

* Update src/mesh/ReliableRouter.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-20 06:37:40 -05:00
GUVWAFandGitHub 4594ae474e Upon receiving ACK/reply directly, only update next-hop if we’re the *sole* relayer (#7859) 2025-09-06 06:23:43 -05:00
GUVWAFandBen Meadors a25bfd264c Only stop retransmissions when receiving implicit ACK over LoRa (#7872)
* Only stop retransmissions when receiving implicit ACK over LoRa

* trunk fmt
2025-09-05 12:00:23 -05:00
GUVWAFandGitHub 4d6fe936ae Only stop retransmissions when receiving implicit ACK over LoRa (#7872)
* Only stop retransmissions when receiving implicit ACK over LoRa

* trunk fmt
2025-09-05 11:01:25 -05:00
GUVWAFandGitHub 8d5ae1d5d2 Fix marking LoRa transport mechanism (#7634) 2025-08-15 19:09:25 +02:00
8908805894 Don't cancel sending ReTx for relayer if we're ROUTER(_LATE)/REPEATER (#6904)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-05-27 18:10:14 -05:00
GUVWAFandGitHub b1e35cd8b3 Fix preamble detected IRQ flag (#6653) 2025-04-22 14:21:29 -05:00
69f938ea98 Send UDP packet even if it's encrypted (#6524)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-04-09 06:13:49 -05:00
9893d24c62 Only request all NodeInfo/Position on fresh install (#6184)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-03-01 06:57:44 -06:00
GUVWAFandGitHub cfcd9cc210 Revert "Rak4631 remove spi1 (#6042)" (#6121)
This reverts commit 9b46cb4ef0.
2025-02-22 08:03:05 -06:00
GUVWAFandGitHub 4942c7b71f Fix PowerTelemetry initialization (#6106) 2025-02-20 15:28:01 -06:00
GUVWAFandGitHub 4709d21df8 Ignore and disallow multi-hop traceroutes destined to broadcast address (#6109)
* Ignore traceroutes destined to broadcast address

* Disallow multi-hop traceroute request to broadcast address

* Allow zero-hop broadcast requests
2025-02-20 14:34:09 -06:00
27fea5fc07 Fix STM32WL TCXO setting; enable logs and modules (#6063)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-02-15 09:06:10 -06:00
GUVWAFandGitHub 8c9947b05c Allow NeighborInfo on non-default frequency slot (#6061) 2025-02-15 07:55:51 -06:00
GUVWAFandGitHub d740934278 Don't rate-limit position requests for Lost and Found role (#5981) 2025-02-03 19:24:47 +08:00
4747e73f37 Space out periodic broadcasts of modules automatically (#5931)
* Space out periodic broadcasts of modules automatically

* Add warning for function usage

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-01-26 13:59:59 -06:00
GUVWAFandGitHub a14346bc4f Rate limit position replies to three minutes (#5932) 2025-01-25 09:24:24 -06:00
GUVWAFandGitHub f87c370123 Fix possible memory leak for ROUTER_LATE (#5901) 2025-01-21 18:11:37 +01:00
GUVWAFandGitHub 6b8cf164e9 Save some flash usage on STM32WL (#5819) 2025-01-11 07:20:32 -06:00
GUVWAFandGitHub 812aa35f09 Enable Tx interrupt immediately after startTransmit() (#5820) 2025-01-11 07:19:17 -06:00
9cc79b1d1e Explicitly set CAD symbols, improve slot time calculation and adjust CW size accordingly (#5749)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-01-05 18:55:20 -06:00
GUVWAFandGitHub b12aa3f360 Unset received SNR/RSSI values upon receiving packet via MQTT (#5668) 2024-12-26 20:49:06 +11:00
GUVWAFandGitHub f4cff33450 Portduino: specify C++ version and add link pthread (#5642) 2024-12-21 11:13:03 -06:00
GUVWAFandGitHub 69d01a8088 StoreForward: (tapback) reply support (#5585) 2024-12-15 13:11:13 -06:00
GUVWAFandGitHub 44cf6d388e Portduino: fix setting hwId via argument (#5565) 2024-12-14 11:55:32 +01:00
GUVWAFandGitHub c3d60342f4 Don't use channel index for encrypted packet (#5509)
* Don't use channel index for encrypted packet

* Remove assert in `getKey`, set invalid key length
So encrypting will fail without reboot

* Reset channel to 0 when unable to encrypt
Such that the NAK doesn't use the failing channel hash
2024-12-05 10:00:19 +08:00
GUVWAFandGitHub 57ea6a265e SimRadio: clean-up and emulate collisions (#5487)
* Clean up SimRadio and don't let it use PKC

* Add collision emulation for SimRadio

* Add stats from SimRadio to LocalStats

* Make emulating collisions optional
2024-12-03 06:21:24 -06:00
GUVWAFandGitHub 9f4c8a2804 Update arduino-pico core and remove MDNS restriction (#5483) 2024-11-30 13:16:02 -06:00
GUVWAFandGitHub dbc5ec27f7 Temporarily disable MDNS when MQTT is enabled (#5418)
Leads to a panic
2024-11-21 14:11:50 -06:00
GUVWAFandGitHub 364dead3aa Update platform-raspberrypi also (#5407)
* Update arduino-pico core to fix sporadic hangs

* Update platform-raspberrypi also
2024-11-20 14:53:36 -06:00
GUVWAFandGitHub 154864dfbf Update arduino-pico core to fix sporadic hangs (#5406) 2024-11-20 13:18:27 -06:00
GUVWAFandGitHub 0d1f9e915f Move some actions to after startTransmit() (#5383)
To minimize the time between channel scan and actual transmit
2024-11-17 10:51:01 -06:00
GUVWAFandGitHub 9545a10361 RP2040: Update core; add mDNS support (#5355)
* Update arduino-pico core

* RP2040: Add mDNS support

* SimpleMDNS `begin` now returns a bool

* Add `-g` option to `debug_build_flags` to link files for gdb

* RAK11310 needs old platform as well

* Change defines to specific architecture

* Core version 4.2.1 is out
2024-11-16 08:20:20 +08:00
GUVWAFandGitHub e866734a25 Handle repeated packet after potentially canceling previous Tx (#5330)
* Revert "Fix sending duplicate packets to PhoneAPI/MQTT (#5315)"

This reverts commit 40bc04b521.

* Handle repeated packet after potentially canceling previous Tx
2024-11-12 15:23:32 -06:00
GUVWAFandGitHub f4b0e19a65 Fix another heap leak (#5328) 2024-11-12 10:59:29 -06:00
GUVWAFandGitHub 40bc04b521 Fix sending duplicate packets to PhoneAPI/MQTT (#5315)
* Fix potential duplicate packets to PhoneAPI/MQTT

* Fix include error for STM32

* Fix cppcheck error
2024-11-12 07:54:05 +08:00
GUVWAFandGitHub 9b4c260a92 Fix memory leak in MQTT (#5311) 2024-11-11 13:22:22 +01:00
GUVWAFandGitHub 893efe4f11 Always set the channel corresponding to a node (#5287) 2024-11-09 11:30:12 +08:00
GUVWAFandGitHub 2c2213ef9b Add setting to transmit NeighborInfo over LoRa (#5286)
* Add setting to transmit NeighborInfo over LoRa
Only if not using the default channel

* Bump minimum broadcast interval for NeighborInfo to 4 hours
2024-11-09 09:38:48 +08:00
GUVWAFandGitHub 3bd3911913 Only PKC encrypt when packet originates from us (#5267) 2024-11-06 22:00:26 +01:00
GUVWAFandGitHub 7ba6d97e99 Release no-LoRa packet after sending to phone (#5254) 2024-11-04 14:13:54 -06:00
GUVWAFandGitHub f3b698905d Disable automatic NodeInfo request when NodeDB is full (#5255) 2024-11-04 14:06:12 -06:00
GUVWAFandGitHub da7424a604 Improve ACK logic for responses and repeated packets (#5232)
* Don't send ACKs to responses over multiple hops

* Move repeated sending logic to `wasSeenRecently()`

* Add exception for simulator for duplicate packets from PhoneAPI

* Add short debug message
2024-11-03 06:21:45 -06:00
2d4d36c605 Drop oldest packet from radio when queue is full (#5212)
And still notify Router

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-11-01 15:48:55 -05:00
GUVWAFandGitHub 462a0718cf Fix SerialModule getting packet from ourselves (#5206) 2024-10-31 11:46:00 -05:00
GUVWAFandGitHub 09c8642aa6 Fix rebroadcasting encrypted packets when KNOWN_ONLY or LOCAL_ONLY is used (#5109) 2024-10-20 17:04:45 -05:00
GUVWAFandGitHub d55c08d5cd Uplink DMs not to us if MQTT encryption enabled (#5025)
* Uplink DMs not to us if MQTT encryption enabled

* Only really need to try uplinking encrypted packet if MQTT encryption is enabled

* Add log about publishing nothing when packet is not decrypted and encryption_enabled is false

* Improve comment
2024-10-10 15:11:58 -05:00
GUVWAFandGitHub ddd4a45bc3 Ignore packets coming from the broadcast address (#4998) 2024-10-09 11:59:00 +08:00
GUVWAFandGitHub 673fe294f3 Add rxDupe, txRelay and txRelayCanceled to LocalStats (#4936)
* Introduce `isFromUs()` and `isToUs()`

* Add rxDupe, txRelay and txRelayCanceled to LocalStats
2024-10-04 06:28:51 -05:00
GUVWAFandGitHub 3492c9aa99 Construct StoreForwardModule for Portduino as well (#4903)
* Construct StoreForwardModule for Portduino as well

* Remove duplicate variables
2024-09-29 16:17:23 -05:00
12efedec42 Potential fix for bad Rx performance on T1000-E (#4885)
* Potential fix for bad Rx performance on T1000-E

* validate and refactor RF switching, eliminate godmode

---------

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2024-09-28 09:24:13 -05:00
GUVWAFandGitHub db4a793aa9 Merge branch 'master' into master 2024-09-18 11:38:40 +02:00
GUVWAFandGitHub 8893529653 Make local stats number of Rx packets sum of good and bad (#4709) 2024-09-14 17:53:27 -05:00
GUVWAFandGitHub b39aca8d11 Merge branch 'master' into master 2024-09-13 08:49:04 +02:00
GUVWAFandGitHub f1602ee3f6 Merge pull request #4669 from GUVWAF/trFix 2024-09-09 23:13:39 +02:00
GUVWAFandGitHub 5537f98dd6 Merge branch 'master' into trFix 2024-09-09 21:29:37 +02:00
GUVWAFandGitHub 4ed12bf21d Try fix repeatedly getting a new NodeNum (#4670) 2024-09-09 14:22:32 -05:00
GUVWAFandGitHub 56223710b5 More priorities for different types of MeshPackets (#4606) 2024-09-01 10:29:53 -05:00
GUVWAFandGitHub eb071ec80d Set high priority for text messages (#4592) 2024-08-30 14:54:44 -05:00
GUVWAFandGitHub a85df199a5 Only accept PKI messages for MQTT downlink if we know transmitter and receiver (#4498) 2024-08-18 12:15:50 -05:00
GUVWAFandGitHub 7a65c8838d Fall back to default modem preset if requested bandwidth is too large (#4497) 2024-08-18 09:14:23 -05:00
GUVWAFandGitHub 33ced7e87a Add two-way traceroute result with SNR per hop (#4485)
* Add two-way traceroute result with SNR per hop

* Update protos
2024-08-17 17:34:32 -05:00
GUVWAFandGitHub f97ae52263 STM32WL improvements (#4449)
* STM32WL: Enable DeviceTelemetry

* Add long/short name user preference options

* Add new STM32WL-based hardware models
2024-08-12 20:31:45 -05:00
GUVWAFandGitHub debf4b934f Fix for "has default channel" with empty channel name (#4430) 2024-08-09 15:26:22 -05:00
9e4ce86c2a Let StoreForward server send history to phoneAPI (#4282)
* Send StoreForward history of the server to a connected client
To extend the ToPhoneQueue

* Add delay after sending history info

* Don't allow history request over LoRa on default channel

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-07-13 12:36:44 -05:00
GUVWAFandGitHub 86ca81b555 If toPhoneQueue is full, still increment fromNum to avoid client never getting packets (#4246) 2024-07-07 09:06:42 -05:00
8078e03f5f Implement replies for all telemetry types based on variant tag (#4164)
* Implement replies for all telemetry types based on variant tag

* Remove check for `ignoreRequest`: modules can set this, don't need to check

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-06-23 07:13:59 -05:00
GUVWAFandGitHub ce5f73bb00 Merge pull request #4088 from ab0oo/master
feature-mqtt: add hop_start to MQTT uplink
2024-06-13 12:43:30 +02:00
GUVWAFandGitHub 24458a73d6 Add missing hops in traceroute as "unkown" (#4056)
E.g. in case a node couldn't decrypt the packet
2024-06-09 16:03:53 -05:00
GUVWAFandGitHub 237944aaf0 Avoid assert on receiving undecryptable packet (#4059)
* Send NAK on primary if original packet couldn't be decoded

* Add checks for `isDecoded` when accessing `decoded`

* Channel index should be of original packet, not of newly allocated NAK
2024-06-09 16:02:52 -05:00
GUVWAFandGitHub e51ee91c39 Optimization: stop relaying when reply is received (#3753) 2024-04-30 20:07:15 -05:00
64edfb76e0 Uplink to MQTT after potentially altering content (#3646)
Mainly for traceroute module now

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-18 17:44:13 -05:00
e4b5f2ce14 NeighborInfo: Only keep neighbors in RAM (#3660)
* NeighborInfo: Only keep neighbors in RAM
It fills up quickly when nodes are running >=2.3

* Defer first transmission as it's usually empty

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-18 16:16:50 -05:00
GUVWAFandGitHub 4c0b7ea409 StoreForward: Remove assert when receiving unhandled case (#3661) 2024-04-18 14:28:11 -05:00
bc085ab840 Fix #3641: Always set MAC when picking new NodeNum (#3651)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-17 07:07:40 -05:00
GUVWAFandGitHub c34956e9d8 Cosmetics: rename remaining plugins → modules and less errors (#3645) 2024-04-16 17:47:56 -05:00
GUVWAFandGitHub 3bee6ce9c3 Only set NodeNum based on MAC if it's still zero (#3585)
* Only set NodeNum based on MAC if it's still zero

* Already declared
2024-04-10 11:29:29 -05:00
a4c22321fc Don't save Neighbors to flash when receiving (#3519)
* Don't save Neighbors to flash when receiving

* Move `shouldSave` to `saveProtoForModule()`

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-31 08:03:29 -05:00
GUVWAFandGitHub 77fb230baa Native: fail-safes for simulated node without config file (#3486)
* LinuxInput: only close if file descriptor is assigned

* Native: set some defaults if no configuration file found
2024-03-24 13:42:32 -05:00
GUVWAFandGitHub 381d5230b8 Merge pull request #3480 from GUVWAF/logsMapReport
Don't spam logs if no position with map reporting (2)
2024-03-23 20:12:25 +01:00
GUVWAFandGitHub a7c005ccdf Merge branch 'meshtastic:master' into logsMapReport 2024-03-23 19:36:21 +01:00
GUVWAFandGitHub 4cce4c7c93 Set unused header bytes to zero for future use (#3479) 2024-03-23 12:38:29 -05:00
GUVWAFandGitHub d30d6bd3eb Fix #3452: only alter received packet if port number matches (#3474)
* Use `alterReceivedProtobuf()` for NeighborInfo and Traceroute
`alterReceived()` should never return NULL
Traceroute should be promiscuous

* Remove extensive logging from NeighborInfo module
2024-03-23 07:31:58 -05:00
GUVWAFandGitHub 155df45d92 Add sanity check for map report interval and position precision (#3459)
* Add sanity check for map report interval and position precision

* Use new `Default::` methods
2024-03-21 16:20:20 -05:00
GUVWAFandGitHub 0a7ddb7594 Let NeighborInfo Module ignore packets coming from MQTT (#3457) 2024-03-21 14:42:53 -05:00
GUVWAFandGitHub 4debcd5ccd Set default position precision of mapReport to 14 (#3456) 2024-03-21 14:35:17 -05:00
GUVWAFandGitHub 724fa38a55 Fix T-LoRa V2.1-6 with TCXO init (#3392) 2024-03-12 16:42:34 -05:00
GUVWAFandGitHub 045dda64e7 Merge pull request #3383 from AeroXuk/patch-1
Fix for incorrect mapTopic mqtt path
2024-03-12 08:39:30 +01:00
GUVWAFandGitHub 5f47ca1f32 Don't spam logs if no position with map reporting (#3378) 2024-03-11 15:58:45 -05:00
GUVWAFandGitHub 3da7c0dba7 Add hops_away to JSON output (#3357) 2024-03-09 11:32:49 -06:00
585805c3b9 Add original hop limit to header to determine hops used (#3321)
* Set `hop_start` in header to determine how many hops each packet traveled

* Set hopLimit of response according to hops used by request

* Identify neighbors based on `hopStart` and `hopLimit`

* NeighborInfo: get all packets and assume a default broadcast interval

* Add fail-safe in case node in between is running modified firmware

* Add `viaMQTT` and `hopsAway` to NodeInfo

* Replace `HOP_RELIABLE` with hopStart for repeated packet

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-08 07:13:57 -06:00