MQTT is SO CLOSE to being a great feature!

I love Meshtastic, but one of the limiting factors about it is simply the limitations of LoRA RF - distance.

A number of usage scenarios involve going in and out of areas with cell phone signal. For instance, while on vacation in the mountains, I may be at a cabin with a signal but others may be on a trail without, etc. The MQTT support on the module is a beginning to bridge that. One can already do things like have an Internet backhaul letting Meshtastic nodes in two cities offer access to the same channel.

What if, however, the MQTT support was in the app instead? This would allow app-to-app messaging via the Internet directly, via LoRA directly as now, or via both (as before). But now, instead of having to set up a clumsy wifi interface, the app would just route as appropriate. https://briarproject.org/ does exactly this, with a different tech stack: Bluetooth for very short-range local communication, and Tor for Internet connectivity.

Letting this happen in the app would turn every person that has a Meshtastic device and cell phone signal into an instant bridge to others. And, in cases where people know they will be in cell phone coverage area, lets them communicate without a dedicated device.

Thoughts?

6 Likes

We don’t want to be dependent on cellular or wifi to work.

4 Likes

Absolutely! That would remove the killer feature of Meshtastic. But that’s not what I’m proposing.

I’m saying: look, Meshtastic already has the ability to use the Internet to bridge long distances, via the MQTT support in the firmware. By adding that support to the app, it would be a lot more convenient. (Especially since turning on wifi turns off Bluetooth!)

3 Likes

WiFi uses a lot of power, MQTT even more, so not really a great choice for app connected handsets. A NRF device uses 5-15ma, wifi connected node is closer to 200ma.

I’m not necessarily thinking wifi, even 4G/5G. Probably the key is to not keep the TCP connection open always; Android push notifications, eg from push notification - Basic Steps for Using MQTT in android - Stack Overflow , coul dhelp.

IME, Briar (which uses Tor and would tend to have even worse battery life) does add a battery drain, but an acceptable one on Android. I think it would be a fine option for those that are willing to have the tradeoff, even without push notifications for mqtt.

3 Likes

If someone would like to implement what you’re suggesting, we’d gladly provide some guidance and accept the PR.

:slight_smile:

2 Likes

Absolutely fair! Unfortunately I lack experience in mobile development. Just planting a seed :slight_smile:

3 Likes

This feature is already in the firmware (MQTT Client Proxy) and has been implemented in the apple apps.

3 Likes

Just turned it on on my workphone, let’s see how much data is used :slight_smile:

Now how do I know it is being used by anyone?

Does this mean that if I have an old phone at home that is connected to my wifi and via bluetooth to one of meshtastic devices (like my lilygo T-Echo) I can very simply create an mqtt server.node at home.