Search code examples
iotgatewaylora

Configuring LoraWan Gateway


I'm trying to build a LoRaWan Network using a sensor programmable with Arduino and a Dragino Lora Shield, I have found many solutions for using the gateway, including An RPI and another Dragino Lora Shield or with iC880A, and the data I recieve will be sent do a server in the cloud. I am very confused about programming the gateway, do i need to tell it to connect to the node and to the server ? or does it recieve the date automatically ? and do I program the server to connect to the gateway or directly to the nodes ?


Solution

  • 1) do i need to tell it to connect to the node? or does it recieve the date automatically ?

    You have to configure your gateway and devices either in ABP mode or OTAA mode.

    Over-the-Air Activation (OTAA) Over-the-Air Activation (OTAA) is the preferred and most secure way to connect with The Things Network. Devices perform a join-procedure with the network, during which a dynamic DevAddr is assigned and security keys are negotiated with the device.

    Activation by Personalization (ABP) In some cases you might need to hardcode the DevAddr as well as the security keys in the device. This means activating a device by personalization (ABP). This strategy might seem simpler, because you skip the join procedure, but it has some downsides related to security.

    2) do i need to tell it to connect to the server? and do I program the server to connect to the gateway or directly to the nodes ?

    Your server shouldn't talk to the nodes, it only communicates with your LoRaWAN gateway.

    There are several ways for a gateway to send data to your server. For example, you could use MQTT or Protocol Buffer.