Adding a New Region (Solved)

Hi Folks
Upgrading to the latest LoRaServer (and app server and gateway bridge), the modifications that I made to the version (a few versions back) to add a new Region don’t seem to be working with the latest version. So just wanting to know if anything has changed recently that requires additional or different modifications to add a new region?

The new Region (NZ865_867), which has been working fine, was added by adding a modified IN865_867 regional specification file, which is very close to the new Region and also updating the regional entries in band.go correspondingly (same for app server and gateway bridge).
Should this still work?

_____ … some time later …

The problem is solved. Turns out it was a hardware issue (a gateway needs to be very close to a node under test if it is running at an unsupported frequency - i.e. dramatic signal attenuation)!!

In any case here is what I did to add a new region for a license free band of frequencies in New Zealand.

In LoRaServer

add new region definition file, e.g. band_nz_865_867.go to loraserver/vendor/github.com/brocaar/lorawan/band/, in this case based on band_in_865_867.go

network_server.go - add new region to rfRegionMapping (e.g. band.NZ_865_867: backend.NZ865, )

main.go - add new region to var bands = [] string { (e.g. string(band.NZ_865_867), )

loraserver/vendor/github.com/brocaar/lorawan/band/band.go - add new region to // Available ISM bands (e.g. NZ_865_867 Name = “NZ_865_867” and add new case to func GetConfig (e.g. case NZ_865_867: return newNZ865Band(repeaterCompatible)

(Note -the /vendor folder is only available after ‘make requirements’, see compiling from source doc)

backend.go - add new region to //Supported RF Regions (e.g. NZ865 RFRegion = “NZ865”)

In lora-app-server

backend.go - add new region to //Supported RF Regions (e.g. NZ865 RFRegion = “NZ865”)

In lora-gateway-bridge

add new region definition file, e.g. band_nz_865_867.go to lora-gateway-bridge/vendor/github.com/brocaar/lorawan/band/, which was based on band_in_865_867.go

network_server.go - add new region to rfRegionMapping (e.g. band.NZ_865_867: backend.NZ865, )

backend.go - add new region to //Supported RF Regions (e.g. NZ865 RFRegion = “NZ865”)

main.go - add new region to var bands = [] string { (e.g. string(band.NZ_865_867), )

lora-gateway-bridge/vendor/github.com/brocaar/lorawan/band/band.go - add new region to // Available ISM bands (e.g. NZ_865_867 Name = “NZ_865_867” and add new case to func GetConfig (e.g. case NZ_865_867: return newNZ865Band(repeaterCompatible)

(Note -the /vendor folder is only available after ‘make requirements’, see compiling from source doc)

Create new band_nz_865_867_test.go in lora-gateway-bridge/vendor/github.com/brocaar/lorawan/band/ based on band_in_865_867_test.go

Each of loraserver, lora-app-server and lora-gateway-bridge then compiled using Docker as per the documentation.

Cheers Ron

1 Like