-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark packets received via MQTT and add option to ignore them #3117
Conversation
looks good! in MQTT::onSend can we add a check for |
Yes, we can do that, but we would need to create an implicit ACK in another way then, otherwise it tries to retransmit every time. Shall we just create an implicit ACK whenever it is connected to the MQTT broker? |
yes, I believe preventing duplicates would be the priority. we're at over 85% duplicates in the public MQTT LongFast, if this is the main source it will be a big improvement. |
Generate implicit ACK for packets we as an MQTT gateway sent
Implemented in 5363ad8. |
2.2.19 protos yanked and reprovisioned with the new config property |
This will use one bit in the unencrypted Meshtastic header flags (out of 4 currently unused) to mark that a packet passed via MQTT somewhere on the path towards the node. Using the LoRa config
ignore_mqtt
, one can then ignore packets that came via MQTT. Thevia_mqtt
tag in the MeshPacket can also be used to show that a Traceroute did not go purely via LoRa.Tested with three devices, 2 of which where connected to MQTT, of which one had LoRa Tx disabled. Packets received via MQTT were marked accordingly and ignored correctly. Note that the tag is only set when receiving a downlink on MQTT and not when an uplink is sent via MQTT, as it would mark the packet in memory and then also send it out marked when sending via LoRa.
Needs protobuf PR meshtastic/protobufs#423.