Receive all messages in entire local network over serial

I have a RAK4631 hooked up via USB serial. My python program is listening to the serial output and watching for TEXT_MESSAGE_APP messages. It is able to see the TEXT_MESSAGE_APP messages sent to and from the RAK4631, but I want it to be able to see all TEXT_MESSAGE_APP messages sent to any channel or any node in the local network.

Is this possible? What would I have to do in order to see all TEXT_MESSAGE_APP messages in the entire local network over serial?

Hi, that’s unfortunately not possible without firmware modification, but there is an open feature request #3608 for it on GitHub.

1 Like

Thank you! That’s very useful to know.

So if someone wanted to process every message over the local network, it looks like it has to be either through MQTT, or through firmware modification?

Also just wanted to confirm before I delve too deep into it: Does MQTT have this feature, where every message through every node/channel in the local network can be processed?

Yes, with MQTT you’ll also see packets sent to others, but only if your node can decrypt them (so you need the channels on that device).

1 Like

I understand that for MQTT to work on a channel, uplink and downlink have to be enabled.

How about though for node-to-node DMs? Is there any way to also have those sent via MQTT?

Yes, they are sent via MQTT.

DMs also use a channel, it’s just that the destination is not a broadcast but a specific node.

I wonder what I’m doing wrong. When I enable uplink/downlink on a channel, I am able to see via MQTT all the messages sent to that channel. But still I’m not seeing anything from any DMs.

Is there some kind of setting I have to enable in order to see the DMs over MQTT? I’m listening to every topic on the “msh” channel (“msh/#”), so I don’t feel like I’m missing it due to the topic.

Which firmware version are you running?

The latest, 2.3.3.8187fa7.

I’m waiting for some ethernet and wifi modules to arrive so that I can try connecting the RAK4631 directly to the network for sending MQTT, but currently I’m having them get sent via the Android app (latest version) with Client Proxy enabled.

Hmm, that should work, also with Client Proxy. If the DM uses the same channel where you enabled uplink and downlink, you should see the message, the only difference is the to field, which is not the broadcast address, but a specific node number.

Oh, I see. You pointed out the mistake I was making. I wasn’t sending the DM directly to the up/downlink enabled channel.

I wonder if you could give me some insight on this then: Would there be any way to have all DMs (for example sent from one node to another node, not to a specific channel) also sent via MQTT? Would that require a firmware modification?

I meant that you don’t typically control over which channel a DM is sent. When two devices only share one channel, it will be sent over that one and you should be able to see it via MQTT if you have uplink enabled on that channel.

1 Like

Thanks for all the info. Since I’m familiar with C++, I think I’ll just learn how to modify the code so that I can make it do what I want. Maybe I’ll be able to help fix some bugs in the future too.

Seems like this was recently merged in: [Feature Request]: raw packet output mode/option · Issue #3608 · meshtastic/firmware · GitHub

1 Like