Can RFM95 radio work with LoRa and LoRaWAN

Hello,

I have a radio module which works fine with LoRaWAN.
Actually, I have a new project and my module can be used for it.

I will have 3 pair of modules. One pair per room. One will measure the room temperature and humidity and the second will be connect to a 220V relay and to an electrical heat.

The module 1 works only with LoRa.
The module 2 should work with LoRa and LoRaWAN

The module 1 communicate with Module 2 and when the temperature is over a threshold, the module opens the relay and the heater switch off. The remperature is below the threshold, the heater is switch on by the module1.

I would like to use LoRa with Module 1 and Module 2, but I would like that module 2 switch to LoRaWAN, each 1/4 hour, to send the measures to TTN.

Could I make working LoRa and LoRaWAN on the same module?

I suppose, I will have to reinitiate LoRaWAN after LoRa and reinitiate LoRa anter LoraWAN (as if I switch on and start my module?

How would you suggest me to do?

I heard that LoRaWAN modules will be able communicate together soon. Do you have some new about it?

Thank and enjoy

entertaining *follow :sunglasses:

No idea if you could make two LoRa setup and libraries share the same LoRa device.

Two LoRa devices on module 2 ought to be a good deal easier.

This should be achievable with a single radio, if and only if you are willing to take time to really understand LoRaWAN, the other protocol, and whatever software stack you start from. It will not be a simple project, and you will probably not find guidance on the details, but rather have to figure out a lot on your own, starting with building a thorough understanding of how things already work.

As summarized elsewhere, your likely starting points are LMiC or LoRaMAC Node.

A traditional class A LoRaWAN node spends 99.5% of its time asleep, and only really operates in brief cycles between transmit and one or two precisely timed receive windows following shortly thereafter. All of the rest of the time, the radio hardware is yours to do with as you wish, within the limits of regulation and physics.

While LMiC is a complex codebase with some real oddities and hidden mechanisms, one thing it does having going for it is that it does most of what is needed to configure the radio each time it wants to use it. You’d have to make sure there is no other configuration somewhere but most of it is in the relevant LoRa and FSK tx and rx functions.

Another option would be to use LMiC (or whatever stack)'s existing transmit and receive functions for your custom purpose as well, though you’d need to figure out a way to make them take the air settings you are tracking instead of those the LoRaWAN stack is.

You’ll also have to consider the details of event scheduling - the problem is fairly simple - don’t let both things try to use the radio at once, but rather exploit the overwhelming idle time - but you will have to work out the details. Note that adding a second radio wouldn’t help much, as one shouting into the other’s ear would be deafening regardless of frequency.

It’s also unclear how far you have developed the non-LoRaWAN part of the system. That may be more complicated than it seems, not because LoRaWAN is special, but because it’s hard to coordinate a pair of node-class radios to communicate with each other while doing a polite job of using multiple frequencies. And this all but requires that your dual-mode device be mains, and not battery powered.

Realistically there are probably much better ways to solve your local communication problem.

3 Likes

Thank for your big answer. Otherwise, can we not make working Module 1 as uplink and downlink.
Module send a request to TTN retrun a value linke 1 or 0 to the node
But I beleive not, becausee I know downlinks are not recommanded and it will make a lot of traffic.

Not at all clear what you are suggesting, but the fair access policy limits TTN downlink messages to 10 per day.

There are LoRa modules that can be used via a serial port connection, so having a TTN node talk to other sensors need not involve running a second hardware SPI based LoRa library.

Check out this single channel gateway. It has possibility to be gateway and node at the same time. So you can connect sensor to it, connect it to Internet (TTN), and your second module woth relay can transmit every 15min for example. If there will be need for turning on relay, send downlink message as answer to this messages. In backend make python script that will check temperature, and publish downlink messages when needed. :smiley: