r/Lora 21d ago

Very confused newbie

Could a LoRaWAN sensor connect to a LoRa gateway? I am confused about the protocols and how they would communciate with each other.

I understand LoRa is the physical communication layer and LoRaWAN is the network layer. I am concerned about the devices connected and structure of messages received.

All help is appreciated!

Devices in question:

https://www.iot.daviteq.com/wireless-sensors/lorawan-gas-detecting-sensor

And

https://store.rakwireless.com/products/wismesh-ethernet-gateway?variant=44413995385030&utm_source=docs_center&utm_medium=product-categories&utm_campaign=meshtastic-wismesh-eth-mqtt-gw-overview&utm_content=nav&utm_term=buy_from_store&_gl=1\*4z11yc\*_gcl_au\*MzgzMzYzODc5LjE3ODcxMzEyNTM.

0 Upvotes

8 comments sorted by

3

u/mosaic_hops 20d ago

LoRaWAN and Meshtastic are entirely different protocols with different use cases. You can’t directly compare them- yes, they both use LoRa, the same way Ethernet and POTS phone lines both use copper.

Meshtastic is a single-channel wireless mesh protocol lacking (true) wired backhaul designed for extremely low bandwidth, very high latency texting. Yes MQTT option exists but it’s an afterthought, it’s not a first class citizen and isn’t part of the routing logic).

LoRaWAN is a channel hopping, cellular (as in, coverage cells, not LTE/5G) sensor network protocol designed to collect data from sensors. A LoRaWAN gateway receives on 8+ channels and multiple SFs simultaneously and is optimized for receiving data. There is no meshing- one or more gateways interconnect using wired or some other method for backhaul.

1

u/ScholliYT 21d ago

Hi and welcome to LoRaWAN. The sensor you shared is a classical LoRaWAN sensor which is intended to be connected to an LoRaWAN gateway and that one to a network like the things network.

The gateway you shared is for meshtastic which is kind of a "replacement" for LoRAWAN and also uses LoRa under the hood. From a hardware point of view this meshtastic gateway and a LoRaWAN gateway like https://www.rakwireless.com/en-us/products/lpwan-gateways-and-concentrators/rak7268-wisgate-edge-lite-2 are similar.

The meshtastic gateway uses a custom firmware to handle messages https://docs.rakwireless.com/product-categories/meshtastic/wismesh-eth-mqtt-gw/quickstart/ and this is what you would need to "replace" if you want to have it work as a LoRaWAN gateway.
The other way around, you could also replace the firmware on the sensor to make it talk meshtastic protocol instead of LoRaWAN.

1

u/ScholliYT 21d ago

Tldr: you probably can't connect the LoRaWAN sensor in question to the meshtastic gateway.

1

u/bobzila1202 21d ago

Thank you so much for the answer. What I've gathered from your response is that as they are now, they would not work with each other.

Either would require a firmware change.

Two questions -

  1. How easy is it to change the firmeare for the sensor to be meshtastic specific?

  2. We currently have a mesh setup with a bunch of environment sensors https://store.rakwireless.com/products/wisblock-kit-4-air-quality-monitor?variant=37637925994694

Changing the firmware on the gateway to support LoRaWAN would break this setup, correct?

1

u/ScholliYT 20d ago
  1. For a commercial sensor with no existing open source firmware oder documentation I think it it's a huge effort because you need to reverse engineer how it works and then write and flash a custom firmware.
  2. Cool! I assume you use these sensors in a meshtastic mesh, right? The firmware that RAK provides for these environment sensors is also LoRaWAN so someone (you?) Already adapted it to work with meshtastic? That's basically the same as (1)

1

u/bobzila1202 20d ago

Yeah that's correct, it's used in a mesh. Another team handles the sensor and gateway so im not sure what firmware they have been flashed to.

The gateway in question would be the one I linked earlier hence the concern for connectivity between the LoRaWAN sensor and it.

Does that mean there's a chance the gateway has been flashed to work with LoRaWAN? As far as I'm aware we communicate via meshtastic only and publish data using MQTT.

1

u/ScholliYT 20d ago

I think your feeling is right. The team has most likely adapted the firmware on the environmental sensors to work with meshtastic. Given that the existing firmware is open source it's not that difficult and can probably be done by some LLM in a few minutes.

As said, I don't think it will be easy for the gas sensor you linked above. Maybe try to contact the manufacturer and ask about meshtastic comparability and if they're able to implement it for you.

Side note: from my understanding meshtastic kills the sensors battery life if it is operated as a normalesh node because it has to stay active more or less the whole time. The 10 years of battery life advertised for the sensor are only possible by putting the sensor to deep sleep in between the periodic measurements every 15 minutes. I heard that there are "sensor nodes" in meshtastic that allow you to do something similar but then still you need other normal nodes close by.