CN109996263B - Method for NB-IoT module to dock equipment management platform based on LwM2M protocol - Google Patents

Method for NB-IoT module to dock equipment management platform based on LwM2M protocol Download PDF

Info

Publication number
CN109996263B
CN109996263B CN201910234710.3A CN201910234710A CN109996263B CN 109996263 B CN109996263 B CN 109996263B CN 201910234710 A CN201910234710 A CN 201910234710A CN 109996263 B CN109996263 B CN 109996263B
Authority
CN
China
Prior art keywords
data
instruction
module
urc
registration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910234710.3A
Other languages
Chinese (zh)
Other versions
CN109996263A (en
Inventor
黄河
唐正
陶亮亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Yirui Communication Technology Co Ltd
Original Assignee
Hefei Yirui Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Yirui Communication Technology Co Ltd filed Critical Hefei Yirui Communication Technology Co Ltd
Priority to CN201910234710.3A priority Critical patent/CN109996263B/en
Publication of CN109996263A publication Critical patent/CN109996263A/en
Application granted granted Critical
Publication of CN109996263B publication Critical patent/CN109996263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Abstract

The invention discloses a method for an NB-IoT module to dock a device management platform based on an LwM2M protocol, which comprises the following steps: the module is connected to a test platform after being electrified and connected to a network; using an AT + QIOTSEND instruction to send data; after receiving the data, the module directly outputs the data according to the configuration or reads the data by an AT + QIOTRD instruction; inquiring the state of the module docking platform through an AT + QIOTSTATE instruction; and the module initiates a logout request after receiving the AT + QIOTREG ═ 0 instruction. The invention optimizes the logic adaptation test platform based on the simplified LwM2M protocol stack. The user can select to connect the device management platform or other platforms of the invention through AT instructions. Meanwhile, the AT instruction set is simple and practical, is unified with other related platforms, and has good adaptability.

Description

Method for NB-IoT module to dock equipment management platform based on LwM2M protocol
Technical Field
The invention relates to a method for accessing a module to a test platform, in particular to a method for docking an equipment management platform by an NB-IoT module based on an LwM2M protocol.
Background
An NB-IoT (narrow-band Internet of things) module is developed based on the Huashi Boudica chipset, is a globally leading narrow-band Internet of things wireless communication module, and meets the frequency band requirement in the 3GPP standard. The device has the characteristics of small volume, low power consumption, long transmission distance, strong anti-interference capability and the like. By using the module, a user can conveniently and rapidly and flexibly design products.
The LwM2M protocol is a lightweight M2M protocol established by OMA organization, mainly faces to the application of the Internet of things under a narrow-band Internet of things NB-IoT scene based on honeycomb, focuses on the low power consumption wide coverage (LPWA) Internet of things (IoT) market, and is an emerging technology which can be widely applied in the global scope. The method has the characteristics of wide coverage, multiple connections, low speed, low cost, low power consumption, excellent architecture and the like.
The NB-IoT module is accessed to a test platform, firstly, basic access requirements are met, data receiving and sending are stable, and secondly, load balancing requirements during mass access are met; and the requirements of module upgrading and data security are met.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: how to quickly adapt to a test platform or other platforms, a method for an NB-IoT module to interface a device management platform based on LwM2M protocol is provided.
The invention solves the technical problems through the following technical scheme, and the invention comprises the following steps:
(1) the module is connected to a test platform after being electrified and connected to a network;
(2) using an AT + QIOTSEND instruction to send data;
(3) after receiving the data, the module directly outputs the data according to the configuration or reads the data by an AT + QIOTRD instruction;
(4) inquiring the state of the module docking platform through an AT + QIOTSTATE instruction;
(5) and the module initiates a logout request after receiving the AT + QIOTREG ═ 0 instruction.
The specific process of the step (1) is as follows:
(11) the module is electrified, and the network access is successful;
(12) judging whether the test platform needs to be accessed according to the AT + QIOTREG set value;
(13) initiating a registration request, receiving a response of the platform to the successful resource creation response code of the module registration request, indicating that the registration is successful, and outputting a corresponding URC; otherwise, receiving other replies to indicate that the registration fails, outputting the corresponding URC, and ending the registration process;
(14) if no response of the registration request is received, judging whether overtime registration fails, outputting a corresponding URC, and ending registration;
(15) after the registration is successful, waiting for the platform to issue an observe request, if the platform receives the observe request, outputting a URC for successful data channel subscription, and ending the registration process; otherwise, continuing to wait until the overtime output subscription fails URC, and ending the registration process.
The specific process of the step (2) is as follows:
(21) using an AT + QIOTSEND instruction to send data;
(22) judging whether the instruction is CON data or not according to the instruction incoming parameters, and if the instruction is NON data, finishing the process after transmission; if the message is the CON message, waiting for response after sending;
(23) and outputting the URC with failed transmission if the response error or overtime does not return, otherwise outputting the URC with successful transmission, and ending the transmission flow.
In the step (22), the data parameters comprise data length, data and sending mode;
wherein the data length is maximum 512 bytes;
the data is in a hexstring format;
0x0000 transmits a NON message,
0x0001 sends a NON message and carries a RELEASE flag,
0x0100 transmits the CON message,
0x0101 sends a CON message and carries a RELEASE _ AFTER _ REPLY flag.
The specific process of the step (3) is as follows:
(31) after receiving the data, the module firstly judges whether the data is in a buffer mode, if the data is in a non-buffer mode, the URC containing the data length and the data is directly output, the receiving process is finished, otherwise, the length of the received data is output;
(32) and reading the data of the buffer by using an AT + QIOTRD instruction until the length of the residual data is 0, and ending the receiving process.
The specific process of the step (5) is as follows:
(51) the module receives an AT + QIOTREG ═ 0 instruction and then initiates a logout request;
(52) if the module receives the response code of the platform to the logout request, reporting the successful logout of the URC;
(53) if the module receives other replies, reporting a logout failure URC, otherwise, reporting a logout overtime URC after waiting for reply overtime.
Compared with the prior art, the invention has the following advantages: the invention optimizes the logic adaptation test platform based on the simplified LwM2M protocol stack. The user can select to connect the device management platform or other platforms of the invention through AT instructions. Meanwhile, the AT instruction set is simple and practical, is unified with other related platforms, and has good adaptability.
Drawings
FIG. 1 is a flow chart of the registration of the present invention;
FIG. 2 is a flow chart of logoff of the present invention;
FIG. 3 is a flow chart of the present invention for transmitting data;
fig. 4 is a flow chart of the present invention for receiving data.
Detailed Description
The following examples are given for the detailed implementation and specific operation of the present invention, but the scope of the present invention is not limited to the following examples.
In this embodiment, all instructions beginning with QIOT are instructions related to the device management platform.
The specific process of this example is as follows:
(1) the module is connected to a test platform after being electrified and connected to a network;
(2) using an AT + QIOTSEND instruction to send data;
(3) after receiving the data, the module directly outputs the data according to the configuration or reads the data by an AT + QIOTRD instruction;
(4) inquiring the state of the module docking platform through an AT + QIOTSTATE instruction;
(5) and the module initiates a logout request after receiving the AT + QIOTREG ═ 0 instruction.
As shown in fig. 1, the specific process of step (1) in this embodiment is as follows:
(11) the module is electrified, and the network access is successful;
(12) judging whether the test platform needs to be accessed according to the AT + QIOTREG set value, wherein the set value is 0, and logging off and closing the function of accessing the test platform; setting the value to be 1, automatically registering to the test platform, and storing the parameters in the module;
(13) initiating a registration request, receiving a 2.01 reply (2.01 is a resource creation success response code of the platform to the module registration request, which indicates that the resource creation on the platform is successful) to indicate that the registration is successful, and outputting a corresponding URC; otherwise, receiving other replies to indicate that the registration fails, outputting the corresponding URC, and ending the registration process;
(14) if no response of the registration request is received, judging whether overtime registration fails, outputting a corresponding URC, and ending registration;
(15) after the registration is successful, waiting for the platform to issue an observe request, if the platform receives the observe request, outputting a URC for successful data channel subscription, and ending the registration process; otherwise, continuing to wait until the overtime output subscription fails URC, and ending the registration process.
Inquiring the registration state of the module through an AT + QIOTSTATE instruction:
0UNINITIALISED, uninitialized;
1MISSING _ CONFIG, configuration loss;
2INIITIALISING, being initialized;
3INIITIALISED, initialization is completed;
4INIT _ FAILED, initialization fails;
5REGISTERING, registering;
6 REGISTERED;
7DEREGISTERED, logged off;
8MO _ DATA _ ENABLED, DATA can be sent;
9NO _ UE _ IP, failure to acquire IP;
10REJECTED _ BY _ SERVER, SERVER reject;
11TIMEOUT _ AND _ retry, TIMEOUT retry;
12REG _ FAILED, registration FAILED;
13DEREG _ FAILED, deregistration fails.
As shown in fig. 2, the step (2) of this embodiment specifically includes the following steps:
(21) using an AT + QIOTSEND instruction to send data;
(22) judging whether the instruction is CON data or not according to the instruction incoming parameters, and if the instruction is NON data, finishing the process after transmission; if the message is the CON message, waiting for response after sending;
(23) and outputting the URC with failed transmission if the response error or overtime does not return, otherwise outputting the URC with successful transmission, and ending the transmission flow.
In the step (22), the data parameters include length data length, data and mode sending mode;
wherein the data length is maximum 512 bytes;
the data is in a hexstring format;
0x0000 transmits a NON message,
0x0001 sends a NON message and carries a RELEASE flag,
0x0100 transmits the CON message,
0x0101 sends a CON message and carries a RELEASE _ AFTER _ REPLY flag.
The AT + qiotsenstatus instruction is used to query the data transmission status:
0 is not sent;
1 sent, waiting for platform response;
2, the sending is failed;
3, sending overtime;
4, the transmission is successful;
and 5, receiving a reset message.
As shown in fig. 3, the step (3) of this embodiment specifically includes the following steps:
(31) after receiving the data, the module firstly judges whether the data is in a buffer mode, if the data is in a non-buffer mode, the URC containing the data length and the data is directly output, the receiving process is finished, otherwise, the length of the received data is output;
(32) and reading the data of the buffer by using an AT + QIOTRD instruction until the length of the residual data is 0, and ending the receiving process.
In FIG. 3, the number of bytes read by req _ length is 1-1024;
cur _ len returns byte number;
data read by the data, in hexstring format or string format;
remaining _ len number of bytes.
As shown in fig. 4, the step (5) of this embodiment specifically includes the following steps:
(51) the module receives an AT + QIOTREG ═ 0 instruction and then initiates a logout request;
(52) if the module receives a 2.02 reply (2.02 is a response code of the platform to the logout request, which indicates that the resource requested by the module is deleted on the platform), reporting a successful logout URC;
(53) if the module receives other replies, reporting a logout failure URC, otherwise, reporting a logout overtime URC after waiting for reply overtime.
In fig. 1 to 4, + QIOTEVT has the following specific meanings:
0 registration failure;
1, successfully registering;
2 register overtime;
3, the subscription is successful;
4, the subscription fails;
5, logging off successfully;
6 logout fails;
7 logging out overtime;
8, the data is successfully sent;
9, data transmission fails;
10 receive the data.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (2)

1. A method for an NB-IoT module to interface a device management platform based on LwM2M protocol is characterized by comprising the following steps:
(1) the module is connected to a test platform after being electrified and connected to a network;
(2) using an AT + QIOTSEND instruction to send data;
(3) after receiving the data, the module directly outputs the data according to the configuration or reads the data by an AT + QIOTRD instruction;
(4) inquiring the state of the module docking platform through an AT + QIOTSTATE instruction;
(5) the module receives an AT + QIOTREG ═ 0 instruction and then initiates a logout request;
wherein the specific process of the step (1) is as follows:
(11) the module is electrified, and the network access is successful;
(12) judging whether the test platform needs to be accessed according to the AT + QIOTREG set value;
(13) initiating a registration request, receiving a response of the platform to the successful resource creation response code of the module registration request, indicating that the registration is successful, and outputting a corresponding URC; otherwise, receiving other replies to indicate that the registration fails, outputting the corresponding URC, and ending the registration process;
(14) if no response of the registration request is received, judging whether overtime registration fails, outputting a corresponding URC, and ending the registration process;
(15) after the registration is successful, waiting for the platform to issue an observe request, if the platform receives the observe request, outputting a URC for successful data channel subscription, and ending the registration process; otherwise, continuing to wait until the overtime output subscription fails URC, and ending the registration process;
the specific process of the step (2) is as follows:
(21) using an AT + QIOTSEND instruction to send data;
(22) judging whether the instruction is CON data or not according to the instruction incoming parameters, and if the instruction is NON data, finishing the process after transmission; if the message is the CON message, waiting for response after sending;
(23) outputting the sending failure URC if the response error or overtime does not return, otherwise outputting the sending success URC, and ending the sending process; the specific process of the step (3) is as follows:
(31) after receiving the data, the module firstly judges whether the data is in a buffer mode, if the data is in a non-buffer mode, the URC containing the data length and the data is directly output, the receiving process is finished, otherwise, the length of the received data is output;
(32) reading the data of the buffer by using an AT + QIOTRD instruction until the length of the residual data is 0, and ending the receiving process;
the specific process of the step (5) is as follows:
(51) the module receives an AT + QIOTREG ═ 0 instruction and then initiates a logout request;
(52) if the module receives the response code of the platform to the logout request, reporting the successful logout of the URC;
(53) if the module receives other replies, reporting a logout failure URC, otherwise, reporting a logout overtime URC after waiting for reply overtime.
2. The method for an NB-IoT module to interface with a device management platform based on LwM2M protocol as claimed in claim 1, wherein the data parameters in step (22) include data length, data, and transmission mode;
wherein the data length is maximum 512 bytes;
the data is in a hexstring format;
0x0000 transmits a NON message,
0x0001 sends a NON message and carries a RELEASE flag,
0x0100 transmits the CON message,
0x0101 sends a CON message and carries a RELEASE _ AFTER _ REPLY flag.
CN201910234710.3A 2019-03-26 2019-03-26 Method for NB-IoT module to dock equipment management platform based on LwM2M protocol Active CN109996263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910234710.3A CN109996263B (en) 2019-03-26 2019-03-26 Method for NB-IoT module to dock equipment management platform based on LwM2M protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910234710.3A CN109996263B (en) 2019-03-26 2019-03-26 Method for NB-IoT module to dock equipment management platform based on LwM2M protocol

Publications (2)

Publication Number Publication Date
CN109996263A CN109996263A (en) 2019-07-09
CN109996263B true CN109996263B (en) 2022-04-05

Family

ID=67131624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910234710.3A Active CN109996263B (en) 2019-03-26 2019-03-26 Method for NB-IoT module to dock equipment management platform based on LwM2M protocol

Country Status (1)

Country Link
CN (1) CN109996263B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112838938B (en) * 2019-11-25 2022-06-14 中移物联网有限公司 Test system of Internet of things platform
CN111092948A (en) * 2019-12-20 2020-05-01 深圳前海达闼云端智能科技有限公司 Guiding method, guiding server, server and storage medium
CN114095221A (en) * 2021-11-11 2022-02-25 合肥移瑞通信技术有限公司 Security verification method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871629A (en) * 2016-05-30 2016-08-17 自连电子科技(上海)有限公司 Method and system for transmitting data through internet of things device
CN107240247A (en) * 2017-07-14 2017-10-10 杭州钛比科技有限公司 A kind of ammeter data acquisition system based on NB IoT
CN108337308A (en) * 2018-01-31 2018-07-27 深圳市中兴物联科技有限公司 LWM2M clients and host computer data communications method, device and its system
CN109215315A (en) * 2018-08-31 2019-01-15 杭州海兴电力科技股份有限公司 The remote meter reading method and system of dual mode communication
CN109451021A (en) * 2018-11-09 2019-03-08 吾诺瑟斯科技(天津)有限公司 The more heterogeneous network access systems of Internet of Things edge side and cut-in method
CN109495524A (en) * 2017-09-11 2019-03-19 华为技术有限公司 A kind of method, apparatus and system of Internet of Things resource subscription
GB201901417D0 (en) * 2019-02-01 2019-03-20 Arm Ip Ltd Device registration mechanism

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015013685A1 (en) * 2013-07-25 2015-01-29 Convida Wireless, Llc End-to-end m2m service layer sessions
US10433248B2 (en) * 2017-06-26 2019-10-01 Verizon Patent And Licensing Inc. Connection management for internet of things devices
US20190069221A1 (en) * 2017-08-31 2019-02-28 Definition Networks, Inc. Systems and methods for machine-type communication

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871629A (en) * 2016-05-30 2016-08-17 自连电子科技(上海)有限公司 Method and system for transmitting data through internet of things device
CN107240247A (en) * 2017-07-14 2017-10-10 杭州钛比科技有限公司 A kind of ammeter data acquisition system based on NB IoT
CN109495524A (en) * 2017-09-11 2019-03-19 华为技术有限公司 A kind of method, apparatus and system of Internet of Things resource subscription
CN108337308A (en) * 2018-01-31 2018-07-27 深圳市中兴物联科技有限公司 LWM2M clients and host computer data communications method, device and its system
CN109215315A (en) * 2018-08-31 2019-01-15 杭州海兴电力科技股份有限公司 The remote meter reading method and system of dual mode communication
CN109451021A (en) * 2018-11-09 2019-03-08 吾诺瑟斯科技(天津)有限公司 The more heterogeneous network access systems of Internet of Things edge side and cut-in method
GB201901417D0 (en) * 2019-02-01 2019-03-20 Arm Ip Ltd Device registration mechanism

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
《lwm2m协议》;thomas_blog;《https://www.cnblog.com/zhangxuechao/p/11709731.html》;20170421;全文 *
《学习LwM2M协议》;Qin孟丰;《https://blog.csdn.net/weixin_42673046/article/detail/82383271》;20180905;全文 *
amp ; 2: Extract NIMF as separate solution".《3GPP tsg_sa\WG2_Arch》.2018, *
Ericsson.S2-183215 "KI 1 amp *
S2-186354 "Completing solution 33";Qualcomm Incorporated;《3GPP tsg_sa\wg2_arch》;20180619;全文 *

Also Published As

Publication number Publication date
CN109996263A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN109996263B (en) Method for NB-IoT module to dock equipment management platform based on LwM2M protocol
US10970951B2 (en) Data management method, apparatus, device, system and storage medium for smart lock
US9177467B2 (en) Electrical gateway and communication method of electrical gateway
EP2339792A1 (en) Method for accessing USB device attached to home gateway, home gateway and terminal
US9942092B2 (en) Method and an apparatus for controlling messages between host and controller
CN112073922B (en) Transfer equipment, server, fusion system and method for narrow-band and broadband communication
WO2011076112A1 (en) Access device, network device, access system and data transmission method
US20230140769A1 (en) REMOTE RECONFIGURATION SYSTEM FOR INTERNET OF THINGS (IoT) INTELLIGENT SENSING TERMINAL
CA2917656A1 (en) Tag identification method and apparatus
CN106605371B (en) Method, device and system for adjusting length of data packet in Near Field Communication (NFC)
EP2905938B1 (en) Method for acquiring locating information, terminal and mobile broadband interface model (mbim) device
CN101237475A (en) Information push system, method and device
US8130653B2 (en) Deletion request after number of failed acknowledgements to addition requests
JP2009182459A (en) Communication device, communication system, communication method, and program
CN110620716B (en) Data transmission method, related device and system
CN106792828B (en) Method and tool for testing speed between outdoor wireless AP (access point) devices
US20210105590A1 (en) Variable volume data transmission in a mobile communication network
EP2515601B1 (en) Dial-up connection method and device of mobile data terminal
US10939374B2 (en) Method and apparatus for remotely waking up a device connected to a network
US11233540B2 (en) Apparatus and methods for G3-PLC bootstrap in a hybrid network
CN114697269A (en) Data communication method, apparatus, device and medium
US11044784B2 (en) Method and device for performing communication
US20200351819A1 (en) Method and apparatus for reporting information by terminal, and computer storage medium
CN102572802B (en) Method and system for accessing large-capacity SIM (subscriber identity module) card by network node
CN112019648A (en) Method and system for automatically configuring IP of wireless communication network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant