Commit c386dfda authored by Orne Brocaar's avatar Orne Brocaar
Browse files

Add AS923_4 sub-band. Fix AS923 sub-bands in GetVersion API.

parent a91c581a
......@@ -182,6 +182,7 @@ get_downlink_data_delay="{{ .NetworkServer.GetDownlinkDataDelay }}"
# * AS923 (AS923 without frequency offset)
# * AS923_2 (AS923 with -1.80 MHz frequency offset)
# * AS923_3 (AS923 with -6.60 MHz frequency offset)
# * AS923_4 (AS923 with -5.90 MHz frequency offset)
# * AU915
# * CN470
# * CN779
......
......@@ -84,10 +84,10 @@ github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwj
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 h1:oMCHnXa6CCCafdPDbMh/lWRhRByN0VFLvv+g+ayx1SI=
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/brocaar/chirpstack-api/go/v3 v3.11.0 h1:RV4DVNRlDqilrv7ttqg4REdTxFyQ8F8ETmymUgpC/cI=
github.com/brocaar/chirpstack-api/go/v3 v3.11.0/go.mod h1:v8AWP19nOJK4rwJsr1+weDfpUc4UNLbRh8Eygn4Oh00=
github.com/brocaar/lorawan v0.0.0-20210629093152-95aaed5ba796 h1:watbdo40AI0WmQP+a+PcG31y+nAn8wCc8jLthZ41Fog=
github.com/brocaar/lorawan v0.0.0-20210629093152-95aaed5ba796/go.mod h1:Vlf3gOwizqX4y3snWe/i2EqRT83HvYuwBjRu39PevW0=
github.com/brocaar/chirpstack-api/go/v3 v3.11.1 h1:/CpPFxvaNcF0yEE+Y0t2BJF529sciIMTsK/Wx565Z7c=
github.com/brocaar/chirpstack-api/go/v3 v3.11.1/go.mod h1:v8AWP19nOJK4rwJsr1+weDfpUc4UNLbRh8Eygn4Oh00=
github.com/brocaar/lorawan v0.0.0-20210809075358-95fc1667572e h1:htxGGoTtAoy4p3qnq42qb0GfupCLe2AXJkSqzLYEPnA=
github.com/brocaar/lorawan v0.0.0-20210809075358-95fc1667572e/go.mod h1:Vlf3gOwizqX4y3snWe/i2EqRT83HvYuwBjRu39PevW0=
github.com/caarlos0/ctrlc v1.0.0 h1:2DtF8GSIcajgffDFJzyG15vO+1PuBWOMUdFut7NnXhw=
github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw=
github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e h1:V9a67dfYqPLAvzk5hMQOXYJlZ4SLIXgyKIE+ZiHzgGQ=
......
package ns
import (
"strings"
"time"
"github.com/gofrs/uuid"
......@@ -1733,6 +1734,9 @@ func (n *NetworkServerAPI) GetMulticastQueueItemsForMulticastGroup(ctx context.C
func (n *NetworkServerAPI) GetVersion(ctx context.Context, req *empty.Empty) (*ns.GetVersionResponse, error) {
region, ok := map[string]common.Region{
common.Region_AS923.String(): common.Region_AS923,
common.Region_AS923_2.String(): common.Region_AS923_2,
common.Region_AS923_3.String(): common.Region_AS923_3,
common.Region_AS923_4.String(): common.Region_AS923_4,
common.Region_AU915.String(): common.Region_AU915,
common.Region_CN470.String(): common.Region_CN470,
common.Region_CN779.String(): common.Region_CN779,
......@@ -1743,7 +1747,7 @@ func (n *NetworkServerAPI) GetVersion(ctx context.Context, req *empty.Empty) (*n
common.Region_RU864.String(): common.Region_RU864,
common.Region_US915.String(): common.Region_US915,
common.Region_ISM2400.String(): common.Region_ISM2400,
}[band.Band().Name()]
}[strings.Replace(band.Band().Name(), "_", "-", -1)]
if !ok {
log.WithFields(log.Fields{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment