Skip to content

Implementation Details for Relay Node Message display #33

@RCGV1

Description

@RCGV1

Basic concept

All packets that are relayed from a 2.6+ node will include a relay_node field in the header containing the last byte of the relaying node's id. Using this we can determine who relayed a message that we received.

Implementation

When we receive a message we store the relay_node of the packet in our database. When a user checks the details of a recieved message we search our app node databse for which nodeid matches with the relay_node if there are multiple results we sort by which has the least hopsAway.

let relaySuffix = Int64(self.relayNode & 0xFF)
let request: NSFetchRequest<UserEntity> = UserEntity.fetchRequest()
request.predicate = NSPredicate(format: "(num & 0xFF) == %lld", relaySuffix)

We then display the long name of the node that most likely relayed it.

For sent messages

We do a similar thing of storing how a ack got back to us to display who relayed a ack back to us in a dm. If you check the details of a acknowledged dm you will see the name of the node who got the ack back to you.

We also show how many nodes we heard reboradcasting our sent message. This is accomplished by keeping a count of relayNumbers and appending to it when we get an implicit ack packet.

(This has not been added yet to iOS but is planned) We also display a list of all nodes that we heard rebroadcast our message. This is because in a big mesh you can hear multiple nodes rebroadcasting your message and it is good to see who it is.

Reference the iOS PR:

meshtastic/Meshtastic-Apple#1486

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions