当前位置: 首页 > news >正文

基于go版本的LoraWAN Server 的470MHz频段的设置

一、参考链接

如果您已经基于最新版本的LoraWAN Server(go 版本)的环境,搭建好了服务器的环境,但尚未进行参数设置(此处以470MHz频段设置为例),可以参考如下链接进行设置:

LoraWAN网关如何接入ChirpStack服务器?百度安全验证

此处做简要的归纳如下:

1.1 LoraWAN分配的CN470段频点

        归纳之前,简单普及下CN470段,LoraWAN分配的96个频点,具体,可以参考 chirpstack-docker中的如下位置:

chirpstack-docker/configuration/chirpstack-gateway-bridge$ ls -ll chirpstack-gateway-bridge-basicstation-cn470_
chirpstack-gateway-bridge-basicstation-cn470_0.toml 
chirpstack-gateway-bridge-basicstation-cn470_1.toml   
chirpstack-gateway-bridge-basicstation-cn470_2.toml 
chirpstack-gateway-bridge-basicstation-cn470_3.toml 
chirpstack-gateway-bridge-basicstation-cn470_4.toml
chirpstack-gateway-bridge-basicstation-cn470_5.toml   
chirpstack-gateway-bridge-basicstation-cn470_6.toml
chirpstack-gateway-bridge-basicstation-cn470_7.toml
chirpstack-gateway-bridge-basicstation-cn470_8.toml
chirpstack-gateway-bridge-basicstation-cn470_9.toml
chirpstack-gateway-bridge-basicstation-cn470_10.toml 
chirpstack-gateway-bridge-basicstation-cn470_11.toml  

每组对应的频率如下(在后面的ChirpStack频段地区设置时会用到,再次声明,此处与CN470 频段为示例说明)

CN470组分配的频点(MHz)
cn470_0470.3、470.5、470.7、470.9、471.1、471.3、471.5、471.7
cn470_1471.9、472.1、472.3、472.5、472.7、472.9、473.1、473.3
cn470_2473.5、473.7、473.9、474.1、474.3、474.5、474.7、474.9
cn470_3475.1、475.3、475.5、475.7、475.9、476.1、476.3、476.5
cn470_4476.7、476.9、477.1、477.3、477.5、477.7、477.9、478.1
cn470_5478.3、478.5、478.7、478.9、479.1、479.3、479.5、479.7
cn470_6479.9、480.1、480.3、180.5、480.7、480.9、481.1、481.3
cn470_7481.5、481.7、481.9、482.1、482.3、482.5、482.7、482.9
cn470_8483.1、483.3、483.5、483.7、483.9、484.1、484.3、484.5
cn470_9484.7、484.9、485.1、485.3、485.5、485.7、485.9、486.1
cn470_10486.3、486.5、486.7、486.9、487.1、487.3、487.5、487.7
cn470_11487.9、488.1、488.3、488.5、488.7、488.9、489.1、489.3

1.2 ChirpStack频段地区配置

首先,使用以下命令进入chirpstack-docker文件夹:

#从github上下载的基于docker版本的chirpstack-server 
#基于docker版本的chirpstack-server的下载地址链接:https://github.com/chirpstack/chirpstack-docker
#git clone https://github.com/chirpstack/chirpstack-docker.git
cd chirpstack-docker 

        然后,使用vim对一下文件中的 “chirpstack/configuration/chirpstack.toml” 进行编辑

vi configuration/chirpstack/chirpstack.toml

        找到如下位置:

  # Enabled regions.## Multiple regions can be enabled simultaneously. Each region must match# the 'name' parameter of the region configuration in '[[regions]]'.enabled_regions=["as923","as923_2","as923_3","as923_4","au915_0","cn470_10","cn779","eu433","eu868","in865","ism2400","kr920","ru864","us915_0","us915_1",]

        您可以根据需求添加地区,这里我们将基本可能会使用到的地区全部添加,您也可以自行选择添加(此处以我们常用的470频段进行设置,增加CN470的所有频段):

# Enabled regions.## Multiple regions can be enabled simultaneously. Each region must match# the 'name' parameter of the region configuration in '[[regions]]'.enabled_regions=["as923","as923_2","as923_3","as923_4","au915_0","cn470_0","cn470_1","cn470_2","cn470_3","cn470_4","cn470_5","cn470_6","cn470_7","cn470_8","cn470_9", "cn470_10","cn470_11","cn779","eu433","eu868","in865","ism2400","kr920","ru864","us915_0","us915_1",]

        保存当前的修改,并退出当前文件的修改;

        接下来,修改 " configuration/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml "

vi configuration/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml#默认为 eu868 的配置参数,此处根据你的实际情况进行修改,
#将如下内容修改为CN470 你所需的频段,比如使用 cn470_0[integration.mqtt]
event_topic_template="eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}"
state_topic_template="eu88/gateway/{{ .GatewayID }}/state/{{ .StateType }}"
command_topic_template="eu868/gateway/{{ .GatewayID }}/command/#"

        修改之后,如下所示(后续的射频通讯采用 cn470_0 组的频点,在终端,网关,以及服务器均设置为此参数):

[integration.mqtt]
event_topic_template="cn470_0/gateway/{{ .GatewayID }}/event/{{ .EventType }}"
state_topic_template="cn470_0/gateway/{{ .GatewayID }}/state/{{ .StateType }}"
command_topic_template="cn470_0/gateway/{{ .GatewayID }}/command/#"

        保存当前的修改后,退出当前文件的编辑。

        在docker-compose.yml文件中找到以下内容:

vi docker-compose.yml
#找到如下位置
chirpstack-gateway-bridge:image: chirpstack/chirpstack-gateway-bridge:4restart: unless-stoppedports:- 1700:1700/udpvolumes:- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridgeenvironment:- INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}- INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/state/{{ .StateType }}- INTEGRATION__MQTT__COMMAND_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/command/#depends_on:- mosquittochirpstack-gateway-bridge-basicstation:image: chirpstack/chirpstack-gateway-bridge:4restart: unless-stoppedcommand: -c /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge-basicstation-eu868.tomlports:- 3001:3001volumes:- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge

        将上面的eu868修改为前面设置的 cn470_0 ,如下所示:

chirpstack-gateway-bridge:image: chirpstack/chirpstack-gateway-bridge:4restart: unless-stoppedports:- 1700:1700/udpvolumes:- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridgeenvironment:- INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=cn470_0/gateway/{{ .GatewayID }}/event/{{ .EventType }}- INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=cn470_0/gateway/{{ .GatewayID }}/state/{{ .StateType }}- INTEGRATION__MQTT__COMMAND_TOPIC_TEMPLATE=cn470_0/gateway/{{ .GatewayID }}/command/#depends_on:- mosquittochirpstack-gateway-bridge-basicstation:image: chirpstack/chirpstack-gateway-bridge:4restart: unless-stoppedcommand: -c /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge-basicstation-cn470_0.tomlports:- 3001:3001volumes:- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge

        完成后,需要重启ChirpStack服务或者重启服务器,如果是重启服务器,ChirpStack未设置自动启动,则需要手动开启ChirpStack服务。

	cd chirpstack-dockerdocker-compose up 

1.3 登录LoraWAN Server进行设置    

    接下来登录到 LoraWAN Server 进行相关的频段设置,具体的设置仍然以前面设置的 CN470_0 进行设置,这个可以自行进行设置 ,亦或**参考前面所提及的参考链接**

浏览器访问 Lorawan Server 的格式 : IP:8080

(IP为你虚拟机所获取到的IP地址,通过ifconfig查看使用虚拟机的IP地址)

二、LoraWAN Server下载链接

此处提供已经搭建好的、基于go语言版本的LoraWAN Server的地址((建议使用VMware 15.5 及以上版本打开))

LoraWAN Server 百度网盘下载链接:

链接:https://pan.baidu.com/s/1V9H1YlyOA3ciS8_3CgmVcw 
提取码:jq7n 

(如遇到百度网盘链接失效的情况下,请通过本文最后提及的联系方式告知,谢谢!)

三、注意事项

如在搭建过程中,有遇到任何问题,可通过如下方式与我联系,我将尽己所能,帮助大家解决实际应用过程中遇到的问题;

E-mail: wokholic365@126.com

QQ: 1652893264

http://www.lryc.cn/news/167987.html

相关文章:

  • C与C++的函数相互调用
  • MySQL架构介绍与说明
  • three3D的vite+vue版本基础代码
  • 实现按钮悬停动画
  • 【C++】深拷贝和浅拷贝 ② ( 默认拷贝构造函数是浅拷贝 | 代码示例 - 浅拷贝造成的问题 )
  • 【Selenium】webdriver.ChromeOptions()官方文档参数
  • pytorch代码实现之动态卷积模块ODConv
  • 动态规划:子序列问题(C++)
  • ORACLE的分区(一)
  • 【数据结构】C++实现二叉搜索树
  • Python中Mock和Patch的区别
  • sql server 查询某个字段是否有值 返回bool类型
  • 紫光展锐5G芯T820 解锁全新应用场景,让机器人更智能
  • 秋招前端面试题总结
  • 【入门篇】ClickHouse 数据类型
  • 关于Python数据分析,这里有一条高效的学习路径
  • 基于 json-server 工具,模拟实现后端接口服务环境
  • 想要精通算法和SQL的成长之路 - 课程表II
  • 【sgGoogleTranslate】自定义组件:基于Vue.js用谷歌Google Translate翻译插件实现网站多国语言开发
  • 论文总结《A Closer Look at Few-shot Classification Again》
  • Postman使用_参数设置和获取
  • 【SQL】优化SQL查询方法
  • Linux-相关操作
  • 二十、MySQL多表关系
  • HarmonyOS/OpenHarmony应用开发-DevEco Studio新建项目的整体说明
  • 去耦电路设计应用指南(三)磁珠/电感的噪声抑制
  • Spring Bean的获取方式
  • 4795-2023 船用舱底水处理装置 学习记录
  • [框架设计之道(二)]设备、任务设置及业务流程
  • Nuxt3+Vite批量引入图片