LoRaWAN Packet Configuration?

Bluetooth, XBee, RF......

LoRaWAN Packet Configuration?

Postby dino.saw » Thu Mar 08, 2018 1:35 pm

Hi, I'm currently using a HAT-LRGW-915 together with a Raspi to forward my device data to The Things Network, things are working well so far. :D

I was wondering, is there a way to configure the Raspi shield so that I can forward the device data to my own server instead of to The Things Network?

Thanks.
dino.saw
Fledgling
 
Posts: 1
Joined: Thu Mar 08, 2018 1:29 pm

Re: LoRaWAN Packet Configuration?

Postby peterchua93 » Thu Mar 08, 2018 11:37 pm

hi, LoRaWan is just a protocol for you to send the data to the TTN, you can directly send the data to the server you want with just the raspberry pi.
here is an examplehttp://help.ubidots.com/iot-projects-tutorials/diy-raspberry-pi-temperature-system-with-ubidots
peterchua93
Freshie
 
Posts: 6
Joined: Wed Mar 07, 2018 10:45 pm

Re: LoRaWAN Packet Configuration?

Postby bengchet » Mon Mar 12, 2018 6:28 pm

Hi,

Yes it is possible. Just login into Raspberry pi LoRa Gateway via USB or SSH, look for local_conf.json at /opt/ttn-gateway/bin.

Code: Select all
cd /opt/ttn-gateway/bin
sudo nano local_conf.json


Edit the address and port under servers section inside the JSON file and save. Another alternative you can add your own server to servers section because the gateway supports sending JSON to multiple servers via UDP.

Example editing server:
Code: Select all
{
  "gateway_conf": {
    "gateway_ID": "xxxxxxxxxxxxxxxxxxxx",
    "servers": [
      {
        "server_address": "your own network server",
        "serv_port_up": your own UDP port,
        "serv_port_down": your own UDP port,
        "serv_enabled": true
      }
    ],
    "ref_latitude": xxx,
    "ref_longitude": xxx,
    "ref_altitude": xxx,
    "contact_email": "xxx",
    "description": "xxx"
  }
}


Example adding server:
Code: Select all
{
  "gateway_conf": {
    "gateway_ID": "xxxxxxxxxxxxxxxxxxxx",
    "servers": [
      {
        "server_address": "router.eu.thethings.network",
        "serv_port_up": 1700,
        "serv_port_down": 1700,
        "serv_enabled": true
      },
      {
        "server_address": "your own network server", <--
        "serv_port_up": your own UDP port, <--
        "serv_port_down": your own UDP port, <--
        "serv_enabled": true
      }
    ],
    "ref_latitude": xxx,
    "ref_longitude": xxx,
    "ref_altitude": xxx,
    "contact_email": "xxx",
    "description": "xxx"
  }
}


After editing and saving, restart the gateway.
bengchet
Moderator
 
Posts: 227
Joined: Tue Aug 25, 2015 8:29 am


Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 1 guest

cron