CN115509153B - Secondary development method and device for narrow-band internet of things (NB-IoT) communication module - Google Patents
Secondary development method and device for narrow-band internet of things (NB-IoT) communication module Download PDFInfo
- Publication number
- CN115509153B CN115509153B CN202110697429.0A CN202110697429A CN115509153B CN 115509153 B CN115509153 B CN 115509153B CN 202110697429 A CN202110697429 A CN 202110697429A CN 115509153 B CN115509153 B CN 115509153B
- Authority
- CN
- China
- Prior art keywords
- instruction
- communication module
- terminal
- iot communication
- api
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 125
- 238000011161 development Methods 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000012545 processing Methods 0.000 claims abstract description 75
- 230000006870 function Effects 0.000 claims description 28
- 238000003860 storage Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 11
- 230000006855 networking Effects 0.000 claims 1
- 230000018109 developmental process Effects 0.000 description 49
- 230000002093 peripheral effect Effects 0.000 description 8
- 238000010276 construction Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000005012 migration Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000005520 cutting process Methods 0.000 description 3
- 238000013508 migration Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000000354 decomposition reaction Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 230000006798 recombination Effects 0.000 description 2
- 238000005215 recombination Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000008140 language development Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24215—Scada supervisory control and data acquisition
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Stored Programmes (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a secondary development method and device of a narrow-band internet of things (NB-IoT) communication module, wherein the method comprises the following steps: acquiring a functional program for processing the AT instruction, and creating an application program interface API for calling the AT instruction; receiving a first AT instruction sent by a second terminal through the API; based on the functional program, the related processing of the first AT instruction is performed. According to the scheme, the functional program for processing the AT instruction is obtained, and the application program interface API for calling the AT instruction is created, so that secondary development can be realized by using the AT instruction in the NB-IoT communication module, the first AT instruction sent by the second terminal is received through the API, and the related processing of the first AT instruction is executed based on the functional program, so that development cost and development duration are reduced.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a secondary development method and device of a narrow-band internet of things (NB-IoT) communication module.
Background
With the rapid development and progress of the internet of things technology, the cellular-based narrowband internet of things (Narrow Band Internet of Things, NB-IoT) becomes an important branch of the internet of everything. Because the user will generate the change of the demand in the process of using the NB-IoT communication module, the NB-IoT communication module needs to be developed again, so that the NB-IoT communication module is more suitable for the demand of the user.
The existing NB-IoT communication module is complex in operation process of connecting the singlechip with the NB-IoT communication module, the connecting singlechip is necessary to occupy more space, peripheral circuits are complicated, the cost for secondary development is increased due to the use of the singlechip, and along with the improvement of the application complexity of the internet of things, the hardware resources of the low-price micro control unit (Microcontroller Unit, MCU), also called the singlechip, cannot meet the development requirement, and the MCU with higher price needs to be replaced, so that the equipment cost is increased; in addition, in the prior art, the NB-IoT communication module is developed to translate the program into a machine language in the virtual machine, but it affects the running efficiency of the central processing unit (central processing unit, CPU), and at the same time, the personnel who are used to use the MCU development mode generally do not have the capability of interpreted language development. Because the history of baseband manufacturer design OpenCPU scheme is shorter, on one hand, the application program interface (Application Programming Interface, API) provided is not abundant enough, and the API interface design is also not reasonable enough, on the other hand, for the user who originally uses MCU development, already has a set of mature AT (Attention) processing framework, and a long learning time is required for changing into a complex API mode, which is unfavorable for the quick marketing of products.
Therefore, a secondary development method of the NB-IoT communication module needs to be designed, so that the cost of the MCU and the development time cost are reduced, and the product is rapidly marketed.
Disclosure of Invention
The embodiment of the invention provides a secondary development method and device of a narrow-band internet of things (NB-IoT) communication module, which are used for solving the problems of high development cost and long development time of an MCU in the prior art.
In order to solve the technical problems, the embodiment of the invention provides the following technical scheme:
the embodiment of the invention provides a secondary development method of a narrowband internet of things (NB-IoT) communication module, which is applied to a first terminal and comprises the following steps:
Acquiring a functional program for processing the AT instruction, and creating an application program interface API for calling the AT instruction;
Receiving a first AT instruction sent by a second terminal through the API;
based on the functional program, the related processing of the first AT instruction is performed.
Optionally, the acquiring the functional program for processing the AT instruction includes:
generating a Software Development Kit (SDK) according to the resource configuration of the NB-IoT communication module;
and acquiring the functional program for processing the AT instruction through the SDK.
Optionally, the acquiring, by the SDK, the function program for processing AT instructions includes:
Transplanting the functional program of the micro control unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;
And/or the number of the groups of groups,
And creating the functional program through the SDK.
Optionally, before generating the software development kit SDK according to the resource configuration of the NB-IoT communication module, the method further includes:
Receiving configuration operation of a graphical configuration interface of the NB-IoT communication module;
Responsive to the configuration operation, a resource configuration of the NB-IoT communication module is determined.
Optionally, the performing, based on the functional program, the related processing of the first AT instruction includes:
formatting the first AT command based on the functional program to obtain a formatted first AT command;
And executing the related processing of the first AT instruction according to the formatted first AT instruction.
Optionally, the performing the related processing of the first AT instruction includes:
acquiring target data corresponding to the first AT instruction;
and sending the target data to the second terminal through the API.
Optionally, the sending the target data to the second terminal through the API includes:
Transmitting the target data to a first physical serial port through the API under the condition that the NB-IoT communication module is in a standard mode, wherein the first physical serial port is a serial port for communication between a first terminal and the second terminal;
And under the condition that the NB-IoT communication module is in OpenCPU modes, transmitting the target data to a first AT instruction thread through the API, wherein the first AT instruction thread is a thread for the first terminal to send the AT instruction to the second terminal.
Optionally, after the acquiring the target data corresponding to the first AT instruction, the method further includes:
transmitting, by the NB-IoT communication module, the first AT instruction and the target data to a logging tool if the NB-IoT communication module is connected to the logging tool;
and storing the AT instruction and the target data through the log tool.
The embodiment of the invention also provides a secondary development device of the narrow-band internet of things (NB-IoT) communication module, which is applied to the first terminal and comprises:
The processing module is used for acquiring a functional program for processing the AT instruction and creating an application program interface API for calling the AT instruction;
The sending module is used for receiving a first AT instruction sent by the second terminal through the API;
And the execution module is used for executing the related processing of the first AT instruction based on the functional program.
Optionally, the processing module includes:
the generating unit is used for generating a Software Development Kit (SDK) according to the resource configuration of the NB-IoT communication module;
And the first acquisition unit is used for acquiring the functional program for processing the AT instruction through the SDK.
Optionally, the acquiring unit is specifically configured to:
Transplanting the functional program of the micro control unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;
And/or the number of the groups of groups,
And creating the functional program through the SDK.
Optionally, the processing module further includes:
A receiving unit, configured to receive a configuration operation of a graphical configuration interface of the NB-IoT communication module;
And the determining unit is used for determining the resource configuration of the NB-IoT communication module in response to the configuration operation.
Optionally, the execution module includes:
the processing unit is used for formatting the first AT instruction based on the functional program to obtain a formatted first AT instruction;
And the execution unit is used for executing the related processing of the first AT instruction according to the formatted first AT instruction.
Optionally, the processing module further includes:
a second acquiring unit, configured to acquire target data corresponding to the first AT instruction;
and the sending unit is used for sending the target data to the second terminal through the API.
Optionally, the sending unit is specifically configured to:
Transmitting the target data to a first physical serial port through the API under the condition that the NB-IoT communication module is in a standard mode, wherein the first physical serial port is a serial port for communication between a first terminal and the second terminal;
And under the condition that the NB-IoT communication module is in OpenCPU modes, transmitting the target data to a first AT instruction thread through the API, wherein the first AT instruction thread is a thread for the first terminal to send the AT instruction to the second terminal.
Optionally, the processing module further includes:
A transmission unit configured to transmit, when the NB-IoT communication module is connected to a logging tool, the first AT instruction and the target data to the logging tool through the NB-IoT communication module;
and the storage unit is used for storing the AT instruction and the target data through the log tool.
The embodiment of the invention also provides a terminal device, which is a first terminal and comprises: a processor, a memory, and a program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the method of secondary development of a narrowband internet of things, NB-IoT, communication module as in any of the above.
The embodiment of the invention also provides a readable storage medium, wherein a program or an instruction is stored on the readable storage medium, and the program or the instruction realizes the steps of the secondary development method of the narrow-band internet of things (NB-IoT) communication module set in any one of the above steps when being executed by a processor.
The beneficial effects of the invention are as follows:
According to the scheme, the functional program for processing the AT instruction is obtained, and the application program interface API for calling the AT instruction is created, so that secondary development can be realized by using the AT instruction in the NB-IoT communication module, the first AT instruction sent by the second terminal is received through the API, and the related processing of the first AT instruction is executed based on the functional program, so that development cost and development duration are reduced.
Drawings
Fig. 1 shows a flowchart of a secondary development method of a narrowband internet of things NB-IoT communication module provided by an embodiment of the present invention;
Fig. 2 shows a component architecture diagram of an NB-IoT communication module according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a OpenCPU development mode of an NB-IoT communication module according to an embodiment of the present invention;
Fig. 4 is a schematic hardware structure diagram of an NB-IoT communication module according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a secondary development device of a narrowband internet of things NB-IoT communication module according to an embodiment of the present invention;
fig. 6 shows a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the drawings and the specific embodiments thereof in order to make the objects, technical solutions and advantages of the present invention more apparent.
Aiming at the problems of high development cost and long development time of MCU in the prior art, the invention provides a secondary development method and device of a narrow-band Internet of things NB-IoT communication module.
As shown in fig. 1, an embodiment of the present invention provides a secondary development method of a narrowband internet of things NB-IoT communication module, applied to a first terminal, including:
Step 101: a function program for processing AT instructions is obtained and an application program interface API for invoking AT instructions is created.
It should be noted that, the terminal device may be an electronic device, which may be an intelligent terminal capable of receiving and transmitting data and communicating with other devices, such as a mobile phone, a tablet computer, a palm computer, and the like, or may be a processor with functions of data receiving, transmitting and processing.
In the embodiment of the invention, an AT virtual channel is provided, and an API interface for processing and transmitting AT instructions is added.
It should be noted that, the steps of acquiring the functional program for processing the AT instruction and creating the application program interface API for calling the AT instruction in the embodiment of the present invention may be performed simultaneously or sequentially, and the order of performing the steps is not limited in the embodiment of the present invention.
The embodiment of the invention provides a set of virtual AT channels and provides a developing mode of using AT instructions to make OpenCPU on an NB-IoT communication module.
Step 102: and receiving a first AT instruction sent by the second terminal through the API.
In the embodiment of the invention, a first AT instruction sent by a terminal is received through an API interface. The embodiment of the invention can realize the call of the AT instruction through the virtual AT channel.
Step 103: based on the functional program, the related processing of the first AT instruction is performed.
In the embodiment of the invention, based on the function program, the related processing of the first AT instruction is executed, so that the function program module can be arranged on the NB-IoT communication module, the AT instruction is called through the virtual AT channel, the related processing of the AT instruction is executed, and the development cost and the development time are reduced.
Optionally, the acquiring the functional program for processing the AT instruction includes:
generating a Software Development Kit (SDK) according to the resource configuration of the NB-IoT communication module;
and acquiring the functional program for processing the AT instruction through the SDK.
In the embodiment of the invention, the resource configuration is carried out on the NB-IoT communication module, so that a special SDK meeting the user requirement is formed, and the function program is transplanted to the APP catalog of the SDK of the NB-IoT communication module.
Optionally, the acquiring, by the SDK, the function program for processing AT instructions includes:
Transplanting the functional program of the micro control unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;
And/or the number of the groups of groups,
And creating the functional program through the SDK.
In the embodiment of the invention, the functional program in the MCU originally running in the first terminal can be simply transplanted, and/or the functional program can be directly created through the SDK, and the functional program is managed by using the construction system provided by the NB-IoT communication module.
In the embodiment of the invention, the interface for calling the AT instruction in the original MCU is replaced by the virtual AT channel API provided by the NB-IoT communication module, the functional program of the original MCU is quickly constructed all the time, and the paying-off can save one MCU for a terminal manufacturer, reduce the complexity of circuit design, reduce the development cost and reduce the development time.
For example, before the migration of the function program, there is an MCU in the first terminal, which may be removed after the migration of the function program and creation of the API.
Optionally, before generating the software development kit SDK according to the resource configuration of the NB-IoT communication module, the method further includes:
Receiving configuration operation of a graphical configuration interface of the NB-IoT communication module;
Responsive to the configuration operation, a resource configuration of the NB-IoT communication module is determined.
In the embodiment of the invention, when the NB-IoT communication module is secondarily developed, firstly, the configuration and the clipping are carried out according to the resources of the NB-IoT communication module.
Adding a graphical configuration interface to the secondary development method of the NB-IoT communication module, and selecting components required by the service by utilizing the graphical configuration interface, including but not limited to:
a communication protocol component: lightweight Machine-To-Machine (LwM 2M) protocol, network time protocol (Network Time Protocol, NTP), restricted application protocol (Constrained Application Protocol, coAP), domain name system (Domain NAME SYSTEM, DNS), and the like;
Drive frame assembly: an interconnect integrated circuit (Inter-INTEGRATED CIRCUIT, I2C), a serial peripheral interface (SERIAL PERIPHERAL INTERFACE, SPI), secure digital input output (Secure Digital Input and Output, SDIO), FLASH memory (FLASH), pulse width modulation (Pulse width modulation, PWM), etc.;
Other application components: over-the-Air Technology (OTA), programming language JS object profile (JavaScript Object Notation, JSON), computer troubleshooting (Debug), channel tracking (BankTrace), and the like.
The supported components of the present NB-IoT communication module are shown in fig. 2.
The graphic configuration interface can realize parameter configuration on functions of the module so as to achieve customization of user requirements, and can realize clipping on components provided by the module so as to reduce the size of firmware and save FLASH space.
In particular, some components require configuration of parameters, such as: the OTA communication module supports downloading protocol, detection period, retry times and the like. After the user configuration and cutting are completed, the system generates a customized configuration header file config.h header file according to the configuration, wherein the header file contains macro switches and macro configuration parameters of all components.
Optionally, the performing, based on the functional program, the related processing of the first AT instruction includes:
formatting the first AT command based on the functional program to obtain a formatted first AT command;
And executing the related processing of the first AT instruction according to the formatted first AT instruction.
In an embodiment of the present invention, based on a function program, an API interface is provided for formatting and transmitting an AT instruction, where the formatting of the AT instruction includes: and carrying out grammar detection, format verification and space removal in the instruction on the AT instruction, processing a line feed AT the tail, transmitting the formatted AT instruction into an AT functional module, and distributing the AT functional module to a corresponding application program.
The AT function module is a module for processing and distributing AT instructions.
Optionally, the performing the related processing of the first AT instruction includes:
acquiring target data corresponding to the first AT instruction;
and sending the target data to the second terminal through the API.
In the embodiment of the invention, based on the function program, in the task of triggering the AT instruction, the processing data returned by the AT function module through the API is waited and intercepted.
Optionally, the sending the target data to the second terminal through the API includes:
Transmitting the target data to a first physical serial port through the API under the condition that the NB-IoT communication module is in a standard mode, wherein the first physical serial port is a serial port for communication between a first terminal and the second terminal;
And under the condition that the NB-IoT communication module is in OpenCPU modes, transmitting the target data to a first AT instruction thread through the API, wherein the first AT instruction thread is a thread for the first terminal to send the AT instruction to the second terminal.
In the embodiment of the invention, in the process of intercepting the processing data returned by the AT functional module through the API, the judgment is added AT the data processing position, if the NB-IoT communication module is judged to be in the standard mode, the operation of the process of sending the data is unchanged, and the data is directly transmitted to the first physical serial port through the API;
If the NB-IoT communication module is determined to be in OpenCPU mode, transmitting the data to the thread sending the first AT instruction through the API in an event mode.
Optionally, after the acquiring the target data corresponding to the first AT instruction, the method further includes:
transmitting, by the NB-IoT communication module, the first AT instruction and the target data to a logging tool if the NB-IoT communication module is connected to the logging tool;
and storing the AT instruction and the target data through the log tool.
In the embodiment of the invention, when the NB-IoT communication module is connected with the log tool, the received AT command and the data returned by the AT function module are transmitted to the log tool in real time, so that the development process of a user is facilitated, and meanwhile, the information is stored into the log partition through an offline log function, so that the user can conveniently locate and analyze the problem.
The following describes a method for developing OpenCPU a fast migration of MCU programs to NB-IoT communication modules in detail with reference to fig. 3.
Firstly, configuring and cutting according to resources of an NB-IoT communication module, selecting required components by using a graphical configuration interface, configuring some components mainly performing parameter configuration, and completing user configuration and cutting of the components, wherein a system completes customized config.h header files according to configuration. The original MCU function program is transplanted to an APP catalog of an SDK of the NB-IoT communication module, and a construction script is written according to a SCONS construction mode provided by the NB-IoT communication module.
The NB-IoT communication module is provided with a microcontroller software interface standard (Cortex Microcontroller Software INTERFACE STANDARD, CMSIS) interface, a portable operating system interface (Portable Operating SYSTEM INTERFACE, POSIX), a Free Real-time operating system (Free Real-time Operation System, freeRTOS) interface and a Real-time operating system (Micro-Controller Operating System, uCOS) interface, and can adapt to most MCU application programs, after program migration, the system call does not need to be modified, only an original called AT instruction sending interface is replaced with a virtual AT channel sending interface provided by the NB-IoT communication module, and after the second terminal sends an AT instruction to the first terminal, the first terminal blocks data waiting for the AT function module to process and finish returning. The NB-IoT communication module is provided with a unified driving framework, and a developer needs to replace the call of the peripheral driver on the original MCU with an interface of the driving framework. The driving interface part is simple to realize and easy to replace.
After the service function is transplanted, code compiling can be performed by using SCONS construction modes provided by the NB-IoT communication module to generate executable firmware. The secondary development method of the NB-IoT communication module further provides compiled link checking, and errors such as programming grammar abnormality of a developer can be eliminated.
After the firmware is generated, the firmware can be written into a memory provided by the NB-IoT communication module through a serial port writing tool, and the processor executes the firmware. In the execution process, if the debugging serial port is connected to the real-time log tool, the log related to the AT call is output to the tool, and the user can perform function verification and debugging according to the log output. Meanwhile, related information called by the AT can be recorded in a log partition on the FLASH, so that the method is convenient for post-examination and analysis.
According to the embodiment of the invention, the AT command is transmitted and processed through the virtual AT channel, so that the functional program of the MCU is quickly transplanted and constructed, on one hand, the cost of one MCU is saved for a terminal manufacturer, and the complexity of circuit design is reduced; on the other hand, the development cost is reduced, the existing business program is reused, and the quick marketing of products is accelerated.
The embodiment of the present invention further provides an NB-IoT communication module, as shown in fig. 4, including a memory 401, a processor 402, a radio frequency chip 403, and a peripheral controller 404, where the memory 401 is configured to store an executable computer program, the processor 402 is configured to execute the computer program in the present NB-IoT communication module, the radio frequency chip 403 is configured to control performance of a power amplifier, and the peripheral controller 404 is configured to connect peripheral sensors, etc.
It should be noted that, in the embodiment of the present application, the memory 401 is firmware manufactured by OpenCPU methods for storing NB-IoT communication modules; processor 402 is firmware for executing the OpenCPU method fabrication of the NB-IoT communication module.
As shown in fig. 5, an embodiment of the present invention further provides a secondary development device of a narrowband internet of things NB-IoT communication module, which is applied to a first terminal, and includes:
A processing module 501, configured to obtain a function program for processing an AT instruction, and create an application program interface API for calling the AT instruction;
a sending module 502, configured to receive, through the API, a first AT instruction sent by the second terminal;
An execution module 503, configured to execute, based on the function program, related processing of the first AT instruction.
According to the embodiment of the invention, by acquiring the functional program for processing the AT instruction and creating the application program interface API for calling the AT instruction, the second development by using the AT instruction in the NB-IoT communication module can be realized, the first AT instruction sent by the second terminal is received through the API, and the related processing of the first AT instruction is executed based on the functional program, so that the development cost and the development duration are reduced.
Optionally, the processing module includes:
the generating unit is used for generating a Software Development Kit (SDK) according to the resource configuration of the NB-IoT communication module;
And the first acquisition unit is used for acquiring the functional program for processing the AT instruction through the SDK.
Optionally, the acquiring unit is specifically configured to:
Transplanting the functional program of the micro control unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;
And/or the number of the groups of groups,
And creating the functional program through the SDK.
Optionally, the processing module further includes:
A receiving unit, configured to receive a configuration operation of a graphical configuration interface of the NB-IoT communication module;
And the determining unit is used for determining the resource configuration of the NB-IoT communication module in response to the configuration operation.
Optionally, the execution module includes:
the processing unit is used for formatting the first AT instruction based on the functional program to obtain a formatted first AT instruction;
And the execution unit is used for executing the related processing of the first AT instruction according to the formatted first AT instruction.
Optionally, the processing module further includes:
a second acquiring unit, configured to acquire target data corresponding to the first AT instruction;
and the sending unit is used for sending the target data to the second terminal through the API.
Optionally, the sending unit is specifically configured to:
Transmitting the target data to a first physical serial port through the API under the condition that the NB-IoT communication module is in a standard mode, wherein the first physical serial port is a serial port for communication between a first terminal and the second terminal;
And under the condition that the NB-IoT communication module is in OpenCPU modes, transmitting the target data to a first AT instruction thread through the API, wherein the first AT instruction thread is a thread for the first terminal to send the AT instruction to the second terminal.
Optionally, the processing module further includes:
A transmission unit configured to transmit, when the NB-IoT communication module is connected to a logging tool, the first AT instruction and the target data to the logging tool through the NB-IoT communication module;
and the storage unit is used for storing the AT instruction and the target data through the log tool.
It should be noted that, the secondary development device of the narrowband internet of things NB-IoT communication module provided by the embodiment of the present invention is a device capable of executing the secondary development method of the narrowband internet of things NB-IoT communication module, so all embodiments of the secondary development method of the narrowband internet of things NB-IoT communication module are applicable to the device, and the same or similar technical effects can be achieved.
As shown in fig. 6, an embodiment of the present invention further provides a terminal device, where the terminal device is a first terminal, and includes: a processor 600; and a memory 610 connected to the processor 600 through a bus interface, the memory 610 storing programs and data used by the processor 600 in performing operations, the processor 600 calling and executing the programs and data stored in the memory 610.
Wherein the terminal device further comprises a transceiver 620, the transceiver 620 being connected to the bus interface for receiving and transmitting data under the control of the processor 600; the processor 600 is used to read a program in the memory 610.
Specifically, the processor 600 is configured to obtain a function program for processing AT instructions, and create an application program interface API for calling AT instructions;
the transceiver 620 is configured to receive, through the API, a first AT instruction sent by the second terminal;
The processor 600 is configured to perform, based on the functional program, a related process of the first AT instruction.
Optionally, the processor 600 is specifically configured to generate a software development kit SDK according to the resource configuration of the NB-IoT communication module;
The transceiver 620 is specifically configured to obtain, through the SDK, the function program for processing AT instructions.
Optionally, the processor 600 is specifically configured to migrate, through the SDK, the functional program of the MCU in the first terminal; wherein the NB-IoT communication module belongs to the first terminal; and/or creating the function program through the SDK.
Optionally, the processor 600 is specifically further configured to receive a configuration operation for a graphical configuration interface of the NB-IoT communication module; and, in response to the configuration operation, determining a resource configuration of the NB-IoT communication module.
Optionally, the processor 600 is specifically configured to perform formatting processing on the first AT instruction based on the function program, to obtain a formatted first AT instruction; and executing the related processing of the first AT instruction according to the formatted first AT instruction.
Optionally, the processor 600 is specifically configured to obtain target data corresponding to the first AT instruction;
Transceiver 620 is specifically configured to send the target data to the second terminal through the API.
Optionally, the transceiver 620 is specifically configured to transmit, when the NB-IoT communication module is in a standard mode, the target data to a first physical serial port through the API, where the first physical serial port is a serial port for communicating between a first terminal and the second terminal; and transmitting the target data to a first AT instruction thread through the API under the condition that the NB-IoT communication module is in OpenCPU mode, wherein the first AT instruction thread is a thread for the first terminal to send the AT instruction to the second terminal.
Optionally, the processor 600 is specifically configured to, in a case where the NB-IoT communication module is connected to a logging tool, transmit, by the NB-IoT communication module, the first AT instruction and the target data to the logging tool; and storing, by the logging tool, the AT instruction and the target data.
Wherein in fig. 6, a bus architecture may comprise any number of interconnected buses and bridges, and in particular, one or more processors represented by processor 600 and various circuits of a memory represented by memory 610, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 620 may be a number of elements, including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The user interface 630 may also be an interface capable of interfacing with an inscribed desired device for different terminals, including but not limited to a keypad, display, speaker, microphone, joystick, etc. The processor 600 is responsible for managing the bus architecture and general processing, and the memory 610 may store data used by the processor 600 in performing operations.
The embodiment of the invention also provides a readable storage medium, wherein a program or an instruction is stored on the readable storage medium, and the program or the instruction realizes the steps of the secondary development method of the narrow-band internet of things (NB-IoT) communication module set in any one of the above steps when being executed by a processor.
Furthermore, it should be noted that in the apparatus and method of the present invention, it is apparent that the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent aspects of the present invention. Also, the steps of performing the series of processes described above may naturally be performed in chronological order in the order of description, but are not necessarily performed in chronological order, and some steps may be performed in parallel or independently of each other. It will be appreciated by those of ordinary skill in the art that all or any of the steps or components of the methods and apparatus of the present invention may be implemented in hardware, firmware, software, or a combination thereof in any computing device (including processors, storage media, etc.) or network of computing devices, as would be apparent to one of ordinary skill in the art after reading this description of the invention.
The object of the invention can thus also be achieved by running a program or a set of programs on any computing device. The computing device may be a well-known general purpose device. The object of the invention can thus also be achieved by merely providing a program product containing program code for implementing said method or apparatus. That is, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. It is apparent that the storage medium may be any known storage medium or any storage medium developed in the future. It should also be noted that in the apparatus and method of the present invention, it is apparent that the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent aspects of the present invention. The steps of executing the series of processes may naturally be executed in chronological order in the order described, but are not necessarily executed in chronological order. Some steps may be performed in parallel or independently of each other.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and changes can be made without departing from the principles of the present invention, and such modifications and changes are intended to be within the scope of the present invention.
Claims (10)
1. The secondary development method of the narrow-band internet of things (NB-IoT) communication module, which is applied to a first terminal, is characterized by comprising the following steps:
Acquiring a functional program for processing the AT instruction, and creating an application program interface API for calling the AT instruction;
Receiving a first AT instruction sent by a second terminal through the API;
Based on the functional program, executing the related processing of the first AT instruction;
Wherein the performing the related processing of the first AT instruction includes:
acquiring target data corresponding to the first AT instruction;
transmitting the target data to the second terminal through the API;
wherein the sending the target data to the second terminal through the API includes:
Transmitting the target data to a first physical serial port through the API under the condition that the NB-IoT communication module is in a standard mode, wherein the first physical serial port is a serial port for communication between a first terminal and the second terminal;
And under the condition that the NB-IoT communication module is in OpenCPU modes, transmitting the target data to a first AT instruction thread through the API, wherein the first AT instruction thread is a thread for the first terminal to send the AT instruction to the second terminal.
2. The method of claim 1, wherein the retrieving the functional program for processing AT instructions comprises:
generating a Software Development Kit (SDK) according to the resource configuration of the NB-IoT communication module;
and acquiring the functional program for processing the AT instruction through the SDK.
3. The method of claim 2, wherein the obtaining, by the SDK, the function program for processing AT instructions comprises:
Transplanting the functional program of the micro control unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;
And/or the number of the groups of groups,
And creating the functional program through the SDK.
4. The method of claim 2, wherein prior to generating the software development kit, SDK, from the resource configuration of the NB-IoT communication module, the method further comprises:
Receiving configuration operation of a graphical configuration interface of the NB-IoT communication module;
Responsive to the configuration operation, a resource configuration of the NB-IoT communication module is determined.
5. The method of claim 1, wherein said performing the processing of the first AT instruction based on the function comprises:
formatting the first AT command based on the functional program to obtain a formatted first AT command;
And executing the related processing of the first AT instruction according to the formatted first AT instruction.
6. The method of claim 1, wherein after the obtaining the target data corresponding to the first AT instruction, the method further comprises:
transmitting, by the NB-IoT communication module, the first AT instruction and the target data to a logging tool if the NB-IoT communication module is connected to the logging tool;
and storing the AT instruction and the target data through the log tool.
7. The utility model provides a secondary development device of narrowband thing networking NB-IoT communication module, is applied to first terminal, its characterized in that includes:
The processing module is used for acquiring a functional program for processing the AT instruction and creating an application program interface API for calling the AT instruction;
The sending module is used for receiving a first AT instruction sent by the second terminal through the API;
An execution module, configured to execute, based on the function program, a related process of the first AT instruction;
Wherein the processing module further comprises:
a second acquiring unit, configured to acquire target data corresponding to the first AT instruction;
A transmitting unit configured to transmit the target data to the second terminal through the API;
the sending unit is specifically configured to:
Transmitting the target data to a first physical serial port through the API under the condition that the NB-IoT communication module is in a standard mode, wherein the first physical serial port is a serial port for communication between a first terminal and the second terminal;
And under the condition that the NB-IoT communication module is in OpenCPU modes, transmitting the target data to a first AT instruction thread through the API, wherein the first AT instruction thread is a thread for the first terminal to send the AT instruction to the second terminal.
8. The apparatus of claim 7, wherein the processing module comprises:
the generating unit is used for generating a Software Development Kit (SDK) according to the resource configuration of the NB-IoT communication module;
and the acquisition unit is used for acquiring the functional program for processing the AT instruction through the SDK.
9. A terminal device, the terminal device being a first terminal, comprising: a processor, a memory, and a program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the secondary development method of the narrowband internet of things NB-IoT communication module in accordance with any of claims 1 to 6.
10. A readable storage medium having stored thereon a program or instructions that when executed by a processor implement the steps of the secondary development method of a narrowband internet of things NB-IoT communication module in accordance with any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110697429.0A CN115509153B (en) | 2021-06-23 | 2021-06-23 | Secondary development method and device for narrow-band internet of things (NB-IoT) communication module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110697429.0A CN115509153B (en) | 2021-06-23 | 2021-06-23 | Secondary development method and device for narrow-band internet of things (NB-IoT) communication module |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115509153A CN115509153A (en) | 2022-12-23 |
CN115509153B true CN115509153B (en) | 2024-09-27 |
Family
ID=84500127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110697429.0A Active CN115509153B (en) | 2021-06-23 | 2021-06-23 | Secondary development method and device for narrow-band internet of things (NB-IoT) communication module |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115509153B (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108121310A (en) * | 2017-11-07 | 2018-06-05 | 安徽诺安信息科技有限公司 | It is a kind of that the tele-control system for realizing cigarette stove batch jobs is instructed based on AT |
US11412558B2 (en) * | 2018-06-01 | 2022-08-09 | T-Mobile Usa, Inc. | IoT module adaptor |
CN108711251B (en) * | 2018-07-26 | 2023-09-22 | 福州大学 | Intelligent smoke alarm system based on NB-IoT and implementation method thereof |
US11516263B2 (en) * | 2019-03-14 | 2022-11-29 | T-Mobile Usa, Inc. | Secure and transparent transport of application level protocols to non-IP data delivery communication channels |
CN110324409A (en) * | 2019-06-11 | 2019-10-11 | 厦门骐俊物联科技股份有限公司 | A kind of OpenCPU development platform for intelligent electric power concentrator |
CN111225434B (en) * | 2019-12-09 | 2021-04-09 | 厦门骐俊物联科技股份有限公司 | Application response method, system, storage medium and communication module |
CN112583794B (en) * | 2020-11-23 | 2022-12-09 | 深圳市有方科技股份有限公司 | Interface calling method and device, computer equipment and storage medium |
-
2021
- 2021-06-23 CN CN202110697429.0A patent/CN115509153B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN115509153A (en) | 2022-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109933522B (en) | Test method, test system and storage medium for automatic case | |
CN107592238B (en) | Automatic test method and system of interface, service terminal and memory | |
CN102722440A (en) | Debugging device of executive codes of embedded system, debugging method and embedded system | |
CN110362490B (en) | Automatic testing method and system for integrating iOS and Android mobile applications | |
CN109445323B (en) | WEB-based distributed intelligent measurement and control software platform design method | |
CN111522727B (en) | Simulation object test method, device and system | |
CN108874677A (en) | A kind of android terminal and its test method and system | |
US11740997B2 (en) | Method and apparatus for debugging a device | |
CN114510452B (en) | SOC (system on chip) integration method and device and electronic equipment | |
CN111611121A (en) | Hardware simulation test method, device and equipment | |
WO2017113848A1 (en) | Testing method, testing platform and simulated testing device for test case | |
CN110119282A (en) | A kind of internet-of-things terminal and system based on general-purpose built-in type computer | |
CN113722020A (en) | Interface calling method, device and computer readable storage medium | |
CN111159047A (en) | Android equipment auxiliary debugging device with visual interface and operation method thereof | |
CN106713011B (en) | Method and system for obtaining test data | |
CN107566480B (en) | User activity information acquisition method and device for mobile terminal application and storage medium | |
CN110750453B (en) | HTML 5-based intelligent mobile terminal testing method, system, server and storage medium | |
CN115509153B (en) | Secondary development method and device for narrow-band internet of things (NB-IoT) communication module | |
US11223961B2 (en) | Configuration method of wireless network system, configuration terminal and configuration system | |
CN107172013B (en) | Data transmission method and system | |
CN113126961B (en) | Pipeline processing method, device and storage medium | |
CN113590593A (en) | Method and device for generating data table information, storage medium and electronic device | |
CN116795752B (en) | Interface communication method, device and server | |
CN110297748A (en) | The method, apparatus and computer readable storage medium of error are called in a kind of positioning | |
CN117041111A (en) | Vehicle cloud function test method and device, electronic equipment and storage medium |
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 |