Closed ernax78 closed 2 years ago
GUVWAF — Yesterday at 11:32 PM I guess it has to do with this line: https://github.com/meshtastic/Meshtastic-device/blob/master/src/mesh/FloodingRouter.cpp#L33 Fixing it might be as easy as changing '== NODENUM_BROADCAST' into '!= getNodeNum()'.
Did you by any chance build the firmware on your devices from source? I can confirm that with the above modification normal flooding still works, but since I have only two nodes, I cannot verify rebroadcasting using a DM (since a node will not rebroadcast a packet destined for itself). I am pretty confident that it will work, so you might give it a try.
I probably have something setup wrong, but can't compile 1.2.64 to test this edit, strangely I can compile 1.3 fine, but I can't use that yet until the web and iOS updates are made.
I have tested this on my setup in the office now and it is almost as you wrote.
My setup: Office: T-Echo (1.2.64) -> Modified T-Lora (1.2.50) ----- MQTT ------> T-Beam (1.2.64)
With unmodified firmware - no messages are forwarded
With the modification you proposed - no messages are forwarded when doing DM due to the fact it seems HopLimit = 0 on DMs
With the "Ugly fix" below (do not do it - it will cause your device to go in to a boot loop due to assert error) the DMs are indeed forwarded to my T-beam over MQTT, however I do not get an "ack" it has been recieved from the T-beam
if (p->to != getNodeNum() && p->hop_limit >= 0 && getFrom(p) != getNodeNum())
Conclusion is this "bug" goes deeper than this simple fix and possibly needs some architectural thought.
Next test would be to try to send DM where HopLimit is not 0, I have not found that in the code yet, maybe someone can give me a pointer.
Also, with the upcoming 1.3, I dont know if it is wise to continue testing on the 1.2 branch if there are some changes done on routing on 1.3 from 1.2.
@ernax78 You can let the device set the default hop_limit (which is 3) also on a DM by removing "p->to == NODENUM_BROADCAST &&" on this line.
Regarding ACKs not being sent back: I think this is 'normal' behavior, since ACKs are not rebroadcasted (reaching only immediate neighbors is assumed here) and thus the ACK sent by your T-beam will not end up on the T-Echo.
I think for these specific routing settings, nothing has changed on 1.3 with respect to 1.2, so you can continue testing on 1.2.
The ack is only sent to the node that sent the DM
Category
Other
Hardware
Not Applicable
Firmware Version
1.2.64
Description
After discussing with @andrekir on Discord, it seems this bug is not addressed in 1.3 either so here it goes;
If you send a direct message it will not be re-broadcasted in the mesh, it will just send directly from the sending station and not "bounce" via MQTT nor other re-broadcast via other stations.
To reproduce: Send a DM that does not have direct radio connection with the sending station. If you send a "broadcast" it will get the message (via MQTT / re-broadcast) If you send the DM, it will not be recieved.
Log output snatched from AndreK at Discord
Relevant log output
direct message (To0xff)