How to connect my device ONLY to my own Gateway

Settings:
Device: (Weatherstation) on TTN The Things Stack
Gateway: Dragino PG1302 LoRaWan Concentrator HAT on Raspberry PI 3B
Configuration: SemTech UDP

Question:
How can i setup the connection between my device and my gateway that it ONLY sends data to my own gateway and not to other gateways?

You canā€™t. That is not the way LoRaWAN works.

LoRaWAN devices broadcast their transmissions to anyone listening. Any gateways in radio vicinity will forward the received data to a LNS (LoRaWAN network server) and the LNS that knows the device will have the keys to decrypt the data.
So there is no way to limit transmission to just one gateway, but there is no need either.

1 Like

There is the possibility to run your own LNS (LoRaWAN network server), but this contradicts the shared use.
But also in this case all other gateways receive the data but do not transmit them to the TTN network.
Unfortunately, there are many who think that the data you send is too sensitive and should therefore only remain private, which in my opinion is rarely the case and is also protected by encryption.
Having your own server would only make sense if you need fast transfers of data and would thus violate the fair use policy.

Translated with DeepL Translate: The world's most accurate translator (free version) from:
Es gibt zwar die Mƶglichkeit einen eigenen LNS (LoRaWAN-Netzwerkserver) zu betreiben, aber das widerspricht der gemeinschaftlichen Nutzung.
Aber auch dabei empfangen alle anderen Gateways die Daten Ć¼bermitteln sie aber dannn nicht an das TTN Netzwerk.
Leider gibt es viele, die meinen dass die Daten die man sendet zu sensibel sind und deshalb nur privat bleiben sollten, was meiner Meinung nach selten der Fall ist und auch durch VerschlĆ¼sselung geschĆ¼tzt ist.
Sinn wĆ¼rde ein eigener Server nur machen wenn man schnelle Ɯbertragungen von Daten benƶtigt und damit gegen die Fair Use Policy verstoƟen wĆ¼rde.

Sorry, not true. Any gateway receiving a LoRaWAN packet will forward it to the LNS it is connected to. The LNS decides it can not handle the packet and drop it. This applies to TTN as well.

Data will never remain private as anyone within RF signal reach can receive the data. That is why the encryption is being used.

And in that case you should be aware of the legal limits. And also consider that you are using a shared resource (limited number of frequencies) so transmitting often will create a denial of service for other LoRaWAN users in your vicinity. Act responsibly and keep usage of the airwaves limited.

Thanks for the replies.

The reason i asked is as follows:
My device connected in the beginning with my own Gateway (as it was nearest i guess), but since a a week it connects to another gateway. Since then i receive Sensor Errors.
So i thought i had to use my own Gateway again.
But it can be coincidence.

LoRaWAN is not WiFi. A device does not connect to a gateway. It broadcasts the packet and every gateway withing RF range will receive and forward the data to the back-end it is connected to.

Have you checked the meta-data of the uplinks to see if there are multiple gateways listed?

LoRaWAN uses cryptographic validation of the packet contents. So if you receive data it traveled through the air and over the internet without issues. In that case any errors you get must be before transmission or after it landed at TTN.
As my crystal ball wore out a long time ago I canā€™t help you further without (a lot) more detail on the ā€˜Sensor Errorsā€™.

1 Like

Thanks for your helpful replies.

After some measurements on spot it occured that the device is sending absurd (wrong) data.
I am in contact with the supplier of the device.

Thanks.

Regards, Wim