Skip to content

Questions about the PacketRouter trait #63

@tallavi

Description

@tallavi

Hi,

I’m playing around with a couple of LILYGO T-Beam v1.2 devices . I’m interfacing with them on a raspberry pi using rust code and the meshtastic crate (protobuf API over serial).

I’m having trouble grasping the concept of the PacketRouter trait:

  1. handle_packet_from_radio - this method is never called. Instead I am getting the FromRadio packets using the BroadcastReceiver I got from StreamApi::connect() method. So why does PacketRouter::handle_packet_from_radio even exists?

  2. handle_mesh_packet - this method is being called, but I also get some of the Mesh Packets using the broadcast receiver mentioned above, as Mesh Packets is one of the payload variants of FromRadio. Why some of the packets are received on the broadcast receiver and some by invoking the method of the PacketRouter? What’s the difference?

More in general on what I’m trying to achieve: Aside from using meshtastic to send/receive text packets between nodes, I’m trying to get the GPS location locally. I have no need for this information to be transmitted, I just need it transferred locally via serial to the controlling device.

  1. Is there a way to use PacketRouter to tell the module to skip the transmission of the location packets to other nodes?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions