在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → LoRa网关与服务器接口协议

LoRa网关与服务器接口协议

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:1.05M
  • 下载次数:7
  • 浏览次数:117
  • 发布时间:2020-07-28
  • 实例类别:一般编程问题
  • 发 布 人:robot666
  • 文件格式:.pdf
  • 所需积分:2
 

实例介绍

【实例简介】
LoRa网关与服务器接口协议。LoRa网关与服务器接口协议。
ANNWS.01.2.1.W.SYS 2 SEMTECH Gateway to Server Interface WIRELESS SeNSInG TIMING APPLICATION NOTE 1 History Revision Modification/Remarks/Motive Author 1.0 Document created DRo 2 Introduction This document defines the protocol by which the Semtech LoRa gateway communicates with the Semtech lora network server The protocol authenticates neither the gateway nor the server. Neither participant retransmits unacknowledged messages 3 Protocol stack JsoN string Lo Ra gatewa Message protocol Internet protocol Figure 1: Semtech LoRa gateway to Semtech LoRa network server protocol stack 4 UDP All communication between a gateway and a network server is over UDP [1]. The UDP source and destination port numbers shall be as listed in table 1 The GWMP message occupies the entire user data area of the UDP packet. The gateway shall periodically transmit a pull data message to the network server, in order to keep any intervening firewall open Revision 1.0- july 2015 Page 3 of 19 www.semtech.com C2015 Semtech Corporation LoRa ANNWS.01.2.1.W.SYS 2sEMTECH Gateway to Server Interface WIRELESS SeNSInG TIMING APPLICATION NOTE GWMP message Direction Gateway UDP Network server Gateway UDP destination port typ source p UDP port L PUSH_DATA To server Arbitrary The source port of the PUSH DATA PUSH ACK To gateway message to which this message is an acknowledgement PULL DATA To server Arbitrary Server gMp The source port of the PULl data port PULL ACK To gateway message to which this message is an (default 1700) acknowledgement The source port of the most recent PULL DATA message received by the PULL RESP To gateway network server from the destination gateway Table 1: UDP port used to send and receive GWMP messages 5 Gateway message protocol 5.1 Sequence diagrams 5.1.1 Gateway PULL_ DATA The gateway sends a PULL DATA message in order to keep open any firewall protecting the network server The period between the transmissions of PULL DAta messages is configured in the gateway The gateway does not react to a missing PULL ACK message LoRa network server Gateway PULL Y, Gate EUI) Figure 2: Gateway PULL DATA Revision 1.0- july 2015 Page 4 of 19 www.semtech.com C2015 Semtech Corporation LoRa ANNWS.01.2.1.W.SYS 2 SEMTECH Gateway to Server Interface WIRELESS SeNSInG TIMING APPLICATION NOTE 5.1.2 Upstream message flow The gateway sends a PUSH_ DATA message, containing the data being transferred to the network server. The network server responds with a PUSH ACK message, containing the sequence number contained in the PUSh data message. The gateway does not react to a missing PUSh ACK message LORa network Gateway server - ---PUSH_DATA(token X, Gateway EUI, JSON object)------P SH ACK( Figure 3: Upstream GWMP sequence diagram 5.1.3 Downstream message flow The network server sends a PUll rESP message containing the data being transferred to the y Lo Ra network server Gateway PULL_RESP( 」 SON op」e ACK( en x al JSON TX ACK is V2 only oro tocol sends no Figure 4: Downstream GWMP sequence diagram Revision 1.0- july 2015 Page 5 of 19 www.semtech.com C2015 Semtech Corporation LoRa ANNWS.01.2.1.W.SYS 2 SEMTECH Gateway to Server Interface WIRELESS SeNSInG TIMING APPLICATION NOTE 5.2 Message formats 5.2.1 PUSH DATA message The Push data message transports its payload a jSon object, from the lora gateway to the lo ra network server The length of a PUSh data message shall not exceed 2408 octets Offset (from start) Number of octets Function Value or description 0 Protocol versio 0x01or0x02 Arbitrary value set by 1 2 Token Gateway PUSH DATA identifier 000 4 Gateway EUI 12 JSON object Table 2: PUSH DATA message format 5.2.2 PUSH ACK message The PUSH ACK message is transmitted by the network server to acknowledge receipt of a PUSH DATA message. The server shall transmit a push- acK message immediately on receipt of a PUSh DATA message Offset (from start) Number of octets Function Value or description 0 Protocol version 0x01or0x02 The value of the token of the PUSH DATA message Token that is bei acknowledge PUSH ACK identifier Table 3: PUSH ACK message format 5.2.3 PULL_ DATA message The PUll data messages are periodically transmitted to the lora network server in order to inform the server of the UDP port number to which the network server should send any PULL _ RESP message. The PUll data message also keeps open any firewall that protects the lo ra gateway Offset (from start) Number of octets Function Value or description 0 Protocol version 0x01or0x02 Arbitrary value set by 1 2 Token Gateway PULL DATA identifier 0x02 4 Gateway EUI Table 4: PULL DATA message format Revision 1.0- july 2015 Page 6 of 19 www.semtech.com C2015 Semtech Corporation LoRa ANNWS.01.2.1.W.SYS 2 SEMTECH Gateway to Server Interface WIRELESS SeNSInG TIMING APPLICATION NOTE 5.2.4 PULL ACK message The PULL ACK message is used by the network server to acknowledge receipt of a PULL data message The server shall transmit a pull acK message immediately on receipt of a PUll data message Offset (from start Number of octets Value or description 0 Protocol version 0x01 or Oxo The value of the token of the PULl data message Token that is bein knowledged PULL ACK identifier 0X04 4 Gateway EUI Table 5: PULL ACK message format 5.2.5 PULL RESP message The PUSh data message transports its payload a Son object from the loRa network server to the LoRa gateway The length of a PUSh rESP message shall not exceed 1000 octets Offset (from start) Number of octets Function Value or description 0 Protocol version 0x01or002 If protocol version is 1, Unused(V1)∥/ transmit as zero, ignore on Token(V2) recep If protocol version is 2, the PULL RESP identifier 4 Payload Table 6: PULL_ RESP message format Revision 1.0- july 2015 Page 7 of 19 LoRa www.semtech.com C2015 Semtech Corporation ANNWS.01.2.1.W.SYS 2 SEMTECH Gateway to Server Interface WIRELESS SeNSInG TIMING APPLICATION NOTE 5.2.6 TX_ ACK message(Version 2 only) The tx ACK message is sent by a gateway to the network server as an acknowledgement to a received PULL RESP message Offset (from start Number of octets Function Value or description 0 Protocol version 0x02 If protocol version is 1 transmIt as zero, ignore on rece If protocol version is 2, the X ACK identifier 005 If no error is reported the Payload field comprises one octet of value o Payload If an error is reported, the field contains a json error"object. Table 7: TX ACK message format The jSon error" object is described in Section 6. 1.2 Revision 1.0- july 2015 Page 8 of 19 www.semtech.com C2015 Semtech Corporation LoRa ANNWS.01.2.1.W.SYS 2 SEMTECH Gateway to Server Interface WIRELESS SeNSInG TIMING APPLICATION NOTE 6 SON protocol The jSon protocol is defined by [2]. Within the lo ra system, json objects shall comprise only ascll characters No JSoN object shall contain white-space that is outside quoted text (i.e. names and text values The examples given in this section are however printed with white-space to aid the reader. The top level jSon objects contain many lower level JSON objects, of which many are not required Some of the descriptions of these object rely on this. For example, the description of optional Boolean object as not true' means either its value is or the object is not present 6.1 Top level 6.1.1 Upstream The root json object shall contain zero or more " rxpkobjects zero or one""object and zero or more other unknown, JSoN objects. The"rxpk"objects may or may not be the elements of an array 6.1.2 Upstream TX_ACK messages only A TX ACK message may contain a root JSoN object. The object, if present, shall contain a single error object 6.1.3 Downstream The root jSoN object shall contain zero or more"txpk"objects. Revision 1.0- july 2015 Page 9 of 19 www.semtech.com C2015 Semtech Corporation LoRa ANNWS.01.2.1.W.SYS 2 SEMTECH Gateway to server Interface WIRELESS SeNSInG TIMING APPLICATION NOTE 6.2 Components 6.2.1 stat(upstream) Name Required Type Function UTC system time of the gateway. The precision is time one second. The format is iSo 86013]expanded format lati float, containing up to 5 The latitude of the gateway's position in units of No decimal places degrees north of the equator float, containing up to 5 The longitude of the gateway's position in units of decimal places degrees East of the prime meridian The altitude of the gateway's position in units of signed integer metres above sea level (as defined by the United States'GPS system) The number of radio frames received since gateway unsigned integer start The number of radio frames received with correct rok unsigned integer CRC since gateway start The number of radio frames forwarded to the unsigned integer gateway' s network server since gateway start The proportion of radio frames that were forwarded ack unsigned integer to the gateway s network server and acknowledged by the server since gateway start. The proportion is expressed as a percentage. dnb No unsigned integer The number of radio frames received from the network server) ince gateway start The number of radio frames transmitted since tnb No unsigned integer gateway start Table 8:stat elements 6.2.1.1 Example White-spaces, indentation and newlines are added to aid comprehension Revision 1.0- july 2015 Page 10 of 19 LoRa www.semtech.com C2015 Semtech Corporation 【实例截图】
【核心代码】

标签:

实例下载地址

LoRa网关与服务器接口协议

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警