Usage of gateway in TTN application

Hi,

Currently I have 1 gateway running in TTN, where I can see traffic coming in and I can see that it’s connected. I want to use my (already defined) gateway in an application, is that possible? Because I have linked the gateway to the application but it seems not to be connected and it doesn’t receive any messages in the application.

You can not link a gateway to an application. Nodes are linked to applications. Gateways work for all TTN applications (even those of other users should they be in range of the gateway).

1 Like

Thank you for your quick reply. the reason I asked my question is because I am trying to set up a connection from TTN to microsoft Azure IoT Hub. I have found software on a bridge between a TTN application and IoT Hub, which is working for me, but I would like to use the messages my gateway is receiving instead of an application, do you have advice on how to use these messages instead of the application? Is there a way to adjust the decoder function of a gateway in TTN?

Another question I have is whether it’s possible to delete the gateway and use it as a node in an application instead?

What you’re proposing is just not how TheThingsNetwork works. It may or may not be possible, but I think it would be a huge project to try to re-invent something that works in a completely different way. Maybe I’m missing some kind of hidden requirement.

If you want to use just your own gateway, in a custom way, and dedicate the gateway specifically to your own application, then TheThingsNetwork is probably not for you. We can still help you to discover how it can be used of course, but only in the context of TheThingsNetwork.

A gateway does not have a decoder function, as far as I know. It’s just a relay between the radio and the network.

That is not possible. And it would not be useful as messages received by a gateway are (still) encrypted, only when a message is available at application level has it been decrypted.

Gateways do not have decoder functions. There is nothing that can be decided at that point. Only at application level the data is decrypted and can it be decoded.

No that is not possible. Gateways and nodes provide totally different functions in a LoRaWAN network and using one for the functions provided by the other is not possible.

The key question is why you want to use gateway level messages in stead of application level messages. What do you think you gain by using gateway messages?

I am trying to create a proof of concept to proof (up- and down-link) communication between a Siemens PLC and Microsoft Azure IoT Hub. The way I have designed my proof of concept, is that the PLC communicates with an Arduino UNO (with an Ethernet shield to receive data from the PLC and a LoRa shield to transmit and receive messages via LoRa). The Arduino UNO will transmit messages further to a Dragino gateway, which transfers the messages to TTN and the main goal of my question is the part where communication can be realized between TTN and a Microsoft Azure IoT Hub.

To realize this part, I have followed this workshop: lora-azure-iot-workshop/TheThingsNetwork.md at master · JeeWeetje/lora-azure-iot-workshop · GitHub. I have created an application on TTN and when I transmit test messages, the communication works. However; I don’t want to use test messages, but the messages that my gateway receives (This is currently working, the gateway does receive messages). I understand that it’s not the most logical solution at the moment, but I am trying to prove that it could (possibly) work for a larger application in the future (this is my graduation internship assignment).

  1. Since when does the IoT hub integration for TTN support downlink?
  2. PLCs traditionally require a lot of traffic. LoRaWAN is suited for very limited amounts of traffic only. Uplink has reasonable capacity and downlink should be close to zero bytes per day as every downlink transmission disables the receiving capacity of the gateway.

This communication should be done at application level for LoRaWAN. However as indicated above I very much doubt LoRaWAN is a viable solution for PLC connectivity.

Communication from the Arduino? In that case you should have real traffic in the application that is being forwarded to Azure. What is holding you back from replacing those test messages with life data? If it is not traffic from the Arduino that arrives in the application you need to get the node transmitting data to the application first.

It seems you don’t fully understand the LoRaWAN ‘stack’. Data between nodes and software using the data is passed through the LoRaWAN application server which decrypts the data and makes it available. In TTN this is the application in the console which you integrate with Azure.
Gateway traffic can not be used for Azure IoT integration because in a LoRaWAN topology there are other components required (network server, join server, application server) to make communication between a node and the ‘user’ work. (‘User’ is software which processes the data like Azure IoT.) Azure IoT does not provide those components as far as I know (and if it does it replaces TTN).

I have seen that TTN offers Azure integration, how does this work? https://www.thethingsnetwork.org/marketplace/product/integration-with-azure-iot For me, it doesn’t have to be IoT Hub, as long as there is a way to connect to Microsoft Azure.

Yes, this is true. I want to replace it with live data but I haven’t programmed the PLC and Arduino yet, I will do this first.

What are the consequences for you & your hosting company if this just never gets going?

With kindness, have you just dived in to strapping different modules & things together or have you got an actual design based on knowledge. The phrase I use for such a setup is “The Taj Mahal with the Eiffel Tower on top”.

Why can’t the the PLC not communicate directly. If it can’t, why can’t the Uno? Is there no WiFi? What downlink functionality is required - because often a PLC will be wanting more commands than LoRaWAN can reasonable offer or indeed, guarantee to be delivered. Uplinks are not guaranteed either.

The core question is the amount of data flow & acceptable packet loss - document that and come back and we can tell you it that’s in scope for LoRaWAN.

2 Likes

+1.

“You gota do the numbers”