A secondary development method and device for narrowband Internet of Things NB-IoT communication module

By obtaining and creating APIs for processing AT commands, generating SDK and transplanting MCU function programs, using virtual AT channels for OpenCPU development of NB-IoT communication modules, it solves the high cost and long time of NB-IoT communication module development. problems, achieving the effects of reducing costs and improving efficiency.

CN115509153BActive Publication Date: 2024-09-27CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110697429.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-23
Publication Date
2024-09-27
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

Existing NB-IoT communication modules have high development costs and long development times, and the MCU has insufficient hardware resources to meet the needs of complex IoT applications. The API interface design is not reasonable enough, which affects CPU operating efficiency.

Method used

Provide a secondary development method for the narrowband Internet of Things NB-IoT communication module. By obtaining the functional program for processing AT commands and creating an application program interface API, the processing and transmission of AT commands are realized, and a software development tool kit SDK is generated. Port the MCU function program and use the virtual AT channel on the NB-IoT communication module for OpenCPU development.

Benefits of technology

It reduces MCU development costs and development time, reduces equipment costs, improves development efficiency, achieves rapid market launch, and saves the use of MCUs and circuit design complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115509153B
    Figure CN115509153B
Patent Text Reader

Abstract

The present invention provides a method and device for secondary development of a narrowband Internet of Things (NB‑IoT) communication module, the method comprising: obtaining a function program for processing AT instructions, and creating an application program interface (API) for calling AT instructions; receiving a first AT instruction sent by a second terminal through the API; and performing related processing of the first AT instruction based on the function program. The solution of the present invention can achieve secondary development using AT instructions in the NB‑IoT communication module by obtaining a function program for processing AT instructions and creating an application program interface (API) for calling AT instructions, receiving the first AT instruction sent by the second terminal through the API, and performing related processing of the first AT instruction based on the function program, thereby reducing development costs and development time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a secondary development method and device for a narrowband Internet of Things (NB-IoT) communication module. Background Art

[0002] With the rapid development of IoT technology, cellular-based Narrow Band Internet of Things (NB-IoT) has become an important branch of the Internet of Everything. As users' needs change when using NB-IoT communication modules, it is necessary to conduct secondary development of NB-IoT communication modules to make them more in line with user needs.

[0003] The operation process of connecting the single-chip microcomputer with the NB-IoT communication module is complicated, and the connection of the single-chip microcomputer will inevitably occupy more space, and the peripheral circuit is complicated. In addition, the use of the single-chip microcomputer also increases the cost of secondary development. With the increase in the complexity of IoT applications, the hardware resources of the low-cost microcontroller unit (MCU), also known as the single-chip microcomputer, can no longer meet the development needs, and it is necessary to replace the more expensive MCU, which increases the cost of the equipment; and in the prior art, for the development of the NB-IoT communication module, the program is translated into machine language in the virtual machine, but it affects the operating efficiency of the central processing unit (CPU), and people who are accustomed to using the MCU development mode generally do not have the ability to develop in an interpretive language. Due to the short history of the baseband manufacturer designing the OpenCPU solution, on the one hand, the application programming interface (API) provided is not rich enough, and the API interface design is not reasonable enough. On the other hand, for users who are accustomed to using MCU development, they already have a mature AT (Attention) processing framework. It takes a long time to learn to replace it with a complex API method, which is not conducive to the rapid listing of products.

[0004] Therefore, it is necessary to design a secondary development method for NB-IoT communication modules to reduce the cost and development time of MCU and enable products to be launched quickly. Summary of the invention

[0005] The embodiments of the present invention provide a secondary development method and device for a narrowband Internet of Things (NB-IoT) communication module, so as to solve the problems of high development cost and long development time of MCU in the prior art.

[0006] In order to solve the above technical problems, the embodiments of the present invention provide the following technical solutions:

[0007] An embodiment of the present invention provides a secondary development method of a narrowband Internet of Things (NB-IoT) communication module, which is applied to a first terminal and includes:

[0008] Obtain a function program for processing AT commands, and create an application program interface API for calling AT commands;

[0009] Receiving a first AT command sent by a second terminal through the API;

[0010] Based on the functional program, relevant processing of the first AT command is performed.

[0011] Optionally, the acquiring of a functional program for processing an AT command includes:

[0012] Generate a software development kit SDK based on the resource configuration of the NB-IoT communication module;

[0013] The functional program for processing AT commands is obtained through the SDK.

[0014] Optionally, obtaining the functional program for processing the AT command through the SDK includes:

[0015] Transplanting the functional program of the microcontroller unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;

[0016] and / or,

[0017] The functional program is created through the SDK.

[0018] Optionally, before generating a software development kit SDK according to the resource configuration of the NB-IoT communication module, the method further includes:

[0019] Receiving a configuration operation on a graphical configuration interface of the NB-IoT communication module;

[0020] In response to the configuration operation, the resource configuration of the NB-IoT communication module is determined.

[0021] Optionally, the performing related processing of the first AT command based on the functional program includes:

[0022] Based on the functional program, formatting the first AT command to obtain a formatted first AT command;

[0023] According to the formatted first AT command, relevant processing of the first AT command is performed.

[0024] Optionally, the related processing of executing the first AT command includes:

[0025] Acquire target data corresponding to the first AT command;

[0026] The target data is sent to the second terminal through the API.

[0027] Optionally, sending the target data to the second terminal through the API includes:

[0028] When the NB-IoT communication module is in standard mode, the target data is transmitted to a first physical serial port through the API, where the first physical serial port is a serial port for communication between the first terminal and the second terminal;

[0029] When the NB-IoT communication module is in OpenCPU mode, the target data is transmitted to a first AT command thread through the API, and the first AT command thread is a thread through which the first terminal sends the AT command to the second terminal.

[0030] Optionally, after acquiring the target data corresponding to the first AT command, the method further includes:

[0031] When the NB-IoT communication module is connected to the log tool, the first AT command and the target data are transmitted to the log tool through the NB-IoT communication module;

[0032] The AT command and the target data are stored by the log tool.

[0033] The 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:

[0034] A processing module, used for obtaining a function program for processing AT commands, and creating an application program interface API for calling AT commands;

[0035] A sending module, used for receiving a first AT command sent by a second terminal through the API;

[0036] An execution module is used to execute related processing of the first AT instruction based on the functional program.

[0037] Optionally, the processing module includes:

[0038] A generating unit, used for generating a software development kit SDK according to resource configuration of the NB-IoT communication module;

[0039] The first acquisition unit is used to acquire the functional program for processing AT commands through the SDK.

[0040] Optionally, the acquiring unit is specifically used for:

[0041] Transplanting the functional program of the microcontroller unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;

[0042] and / or,

[0043] The functional program is created through the SDK.

[0044] Optionally, the processing module further includes:

[0045] A receiving unit, configured to receive a configuration operation on a graphical configuration interface of the NB-IoT communication module;

[0046] A determination unit is used to determine the resource configuration of the NB-IoT communication module in response to the configuration operation.

[0047] Optionally, the execution module includes:

[0048] A processing unit, configured to format the first AT command based on the functional program to obtain a formatted first AT command;

[0049] The execution unit is used to execute related processing of the first AT instruction according to the formatted first AT instruction.

[0050] Optionally, the processing module further includes:

[0051] A second acquisition unit, used to acquire target data corresponding to the first AT command;

[0052] A sending unit is used to send the target data to the second terminal through the API.

[0053] Optionally, the sending unit is specifically configured to:

[0054] When the NB-IoT communication module is in standard mode, the target data is transmitted to a first physical serial port through the API, where the first physical serial port is a serial port for communication between the first terminal and the second terminal;

[0055] When the NB-IoT communication module is in OpenCPU mode, the target data is transmitted to a first AT command thread through the API, and the first AT command thread is a thread through which the first terminal sends the AT command to the second terminal.

[0056] Optionally, the processing module further includes:

[0057] A transmission unit, configured to transmit the first AT command and the target data to the log tool through the NB-IoT communication module when the NB-IoT communication module is connected to the log tool;

[0058] A storage unit is used to store the AT command and the target data through the log tool.

[0059] An embodiment of the present invention also provides a terminal device, which is a first terminal, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the secondary development method of the narrowband Internet of Things NB-IoT communication module as described in any one of the above items.

[0060] An embodiment of the present invention also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the secondary development method of the narrowband Internet of Things NB-IoT communication module as described in any of the above items are implemented.

[0061] The beneficial effects of the present invention are:

[0062] The solution of the present invention can realize secondary development using AT commands in the NB-IoT communication module by acquiring a functional program for processing AT commands and creating an application program interface API for calling AT commands. The first AT command sent by the second terminal is received through the API, and related processing of the first AT command is executed based on the functional program, thereby reducing development costs and development time. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A flowchart showing a secondary development method of a narrowband Internet of Things NB-IoT communication module provided by an embodiment of the present invention;

[0064] Figure 2 A component architecture diagram of an NB-IoT communication module provided in an embodiment of the present invention is shown;

[0065] Figure 3 A flowchart showing an OpenCPU development mode of a NB-IoT communication module provided by an embodiment of the present invention;

[0066] Figure 4 A schematic diagram showing the hardware structure of the NB-IoT communication module provided in an embodiment of the present invention;

[0067] Figure 5A schematic diagram showing the structure of a secondary development device for a narrowband Internet of Things NB-IoT communication module provided by an embodiment of the present invention;

[0068] Figure 6 A schematic diagram showing the structure of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0069] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] In view of the problems of high development cost and long development time of MCU in the prior art, the present invention provides a secondary development method and device of a narrowband Internet of Things NB-IoT communication module.

[0071] like Figure 1 As shown, an embodiment of the present invention provides a secondary development method of a narrowband Internet of Things NB-IoT communication module, which is applied to a first terminal and includes:

[0072] Step 101: Obtain a function program for processing AT commands, and create an application program interface API for calling AT commands.

[0073] It should be noted that the terminal device can be an electronic device, which can be a smart terminal that can receive and send data and communicate with other devices, such as a mobile phone, tablet computer, PDA, etc., or a processor with data receiving and processing functions.

[0074] In an embodiment of the present invention, an AT virtual channel is provided, and an API interface for processing and transmitting AT commands is added.

[0075] It should be noted that the step of obtaining a functional program for processing AT commands and the step of creating an application program interface API for calling AT commands in the embodiment of the present invention can be performed simultaneously or successively, and the order of performing is not limited in the embodiment of the present invention.

[0076] The embodiment of the present invention provides a set of virtual AT channels and proposes a method of using AT commands for OpenCPU development on an NB-IoT communication module.

[0077] Step 102: Receive a first AT command sent by the second terminal through the API.

[0078] In the embodiment of the present invention, the first AT command sent by the terminal is received through the API interface. The embodiment of the present invention can implement calling the AT command through the virtual AT channel.

[0079] Step 103: Based on the functional program, execute relevant processing of the first AT command.

[0080] In an embodiment of the present invention, based on the functional program, the relevant processing of the first AT instruction is performed, and the setting function program module on the NB-IoT communication module can be realized, the AT instruction is called through the virtual AT channel, and the relevant processing of the AT instruction is performed, thereby reducing development costs and development time.

[0081] Optionally, the acquiring of a functional program for processing an AT command includes:

[0082] Generate a software development kit SDK based on the resource configuration of the NB-IoT communication module;

[0083] The functional program for processing AT commands is obtained through the SDK.

[0084] In an embodiment of the present invention, resources are configured for the NB-IoT communication module to form a dedicated SDK that meets user needs, and the functional program is transplanted to the APP directory of the SDK of the NB-IoT communication module.

[0085] Optionally, obtaining the functional program for processing the AT command through the SDK includes:

[0086] Transplanting the functional program of the microcontroller unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;

[0087] and / or,

[0088] The functional program is created through the SDK.

[0089] In an embodiment of the present invention, the functional program originally running in the MCU in the first terminal can be simply transplanted, and / or the functional program can be created directly through the SDK, and the construction system provided by the NB-IoT communication module can be used to manage the functional program.

[0090] In the embodiment of the present invention, the interface for calling AT commands in the original MCU is replaced with a virtual AT channel API provided by the NB-IoT communication module, and the functional program of the original MCU is quickly and consistently constructed, which can save an MCU for terminal manufacturers, reduce the complexity of circuit design, reduce development costs, and reduce development time.

[0091] For example, before the functional program is transplanted, there is an MCU in the first terminal. After the functional program is transplanted and the API is created, the MCU can be removed.

[0092] Optionally, before generating a software development kit SDK according to the resource configuration of the NB-IoT communication module, the method further includes:

[0093] Receiving a configuration operation on a graphical configuration interface of the NB-IoT communication module;

[0094] In response to the configuration operation, the resource configuration of the NB-IoT communication module is determined.

[0095] In an embodiment of the present invention, when secondary development is performed on the NB-IoT communication module, configuration and tailoring are first performed according to the resources of the NB-IoT communication module.

[0096] A graphical configuration interface is added to the secondary development method of the NB-IoT communication module. The graphical configuration interface is used to select components required for the service, including but not limited to:

[0097] Communication protocol components: Lightweight Machine-To-Machine (LwM2M) protocol, Network Time Protocol (NTP), Constrained Application Protocol (CoAP), Domain Name System (DNS), etc.

[0098] Driver framework components: Inter-Integrated Circuit (I2C), Serial Peripheral Interface (SPI), Secure Digital Input and Output (SDIO), Flash (FLASH), Pulse Width Modulation (PWM), etc.

[0099] Other application components: Over-the-Air Technology (OTA), JavaScript Object Notation (JSON), computer troubleshooting (Debug), channel tracing (BankTrace), etc.

[0100] The components supported by this NB-IoT communication module are as follows: Figure 2 shown.

[0101] The graphical configuration interface can be used to configure the parameters of the module's functions to achieve customization according to user needs, and can also be used to tailor the components provided by the module to reduce the size of the firmware and save FLASH space.

[0102] Specifically, some components require parameter configuration, for example: OTA communication module supports download protocol, detection cycle, number of retries, etc. After the user configuration and tailoring are completed, the system generates a customized configuration header file config.h according to the configuration, which contains the macro switches and macro configuration parameters of each component.

[0103] Optionally, the performing related processing of the first AT command based on the functional program includes:

[0104] Based on the functional program, formatting the first AT command to obtain a formatted first AT command;

[0105] According to the formatted first AT command, relevant processing of the first AT command is performed.

[0106] In the embodiment of the present invention, based on the functional program, the provided API interface is used to format and transmit AT commands. The formatting of AT commands includes: syntax detection and format verification of AT commands, removal of spaces in the commands, and line break processing at the end. The formatted AT commands are passed to the AT functional module, which is then distributed to the corresponding application by the AT functional module.

[0107] It should be noted that the AT function module is a module for processing and distributing AT commands.

[0108] Optionally, the related processing of executing the first AT command includes:

[0109] Acquire target data corresponding to the first AT command;

[0110] The target data is sent to the second terminal through the API.

[0111] In the embodiment of the present invention, based on the functional program, in the task of triggering the AT instruction, the processing data returned by the AT functional module through the API is waited for and intercepted.

[0112] Optionally, sending the target data to the second terminal through the API includes:

[0113] When the NB-IoT communication module is in standard mode, the target data is transmitted to a first physical serial port through the API, where the first physical serial port is a serial port for communication between the first terminal and the second terminal;

[0114] When the NB-IoT communication module is in OpenCPU mode, the target data is transmitted to a first AT command thread through the API, and the first AT command thread is a thread through which the first terminal sends the AT command to the second terminal.

[0115] In the embodiment of the present invention, in the process of intercepting the processed data returned by the AT function module through the API, a judgment is added at the position of data processing. If it is judged that the NB-IoT communication module is in the standard mode, the process operation of sending data remains unchanged, and the data is directly transmitted to the first physical serial port through the API;

[0116] If it is determined that the NB-IoT communication module is in OpenCPU mode, the data is transmitted to the thread that sends the first AT command through the API in an event manner.

[0117] Optionally, after acquiring the target data corresponding to the first AT command, the method further includes:

[0118] When the NB-IoT communication module is connected to the log tool, the first AT command and the target data are transmitted to the log tool through the NB-IoT communication module;

[0119] The AT command and the target data are stored by the log tool.

[0120] In an embodiment of the present invention, when the NB-IoT communication module is connected to the log tool, the received AT commands and the data returned by the AT function module are transmitted to the log tool in real time, which is convenient for the user's development process. At the same time, this information is stored in the log partition through the offline log function, which is convenient for the user to locate and analyze the problem.

[0121] Combine the following Figure 3 , specifically explains how to quickly port the MCU program to the NB-IoT communication module for OpenCPU development.

[0122] First, configure and trim the NB-IoT communication module resources. Use the graphical configuration interface to select the required components, and then configure some components that mainly configure parameters. After the user configures and trims the components, the system completes the customized config.h header file according to the configuration. Transplant the original MCU function program to the APP directory of the SDK of this NB-IoT communication module, and write the build script according to the SCONS build method provided by this NB-IoT communication module.

[0123] This NB-IoT communication module provides the Cortex Microcontroller Software Interface Standard (CMSIS) interface, the Portable Operating System Interface (POSIX), the Free Real-time Operation System (FreeRTOS) interface, and the Micro-Controller Operating System (uCOS) interface, which can adapt to most MCU applications. After the program is transplanted, there is no need to modify the system call. You only need to replace the original AT command sending interface with the sending interface of the virtual AT channel provided by this NB-IoT communication module. After the second terminal sends the AT command to the first terminal, the first terminal blocks and waits for the AT function module to process the returned data. This NB-IoT communication module provides a unified driver framework. Developers need to replace the calls of the peripheral drivers on the original MCU with the interfaces of the driver framework. The driver interface part is simple to implement and easy to replace.

[0124] After the service function is transplanted, the SCONS construction method provided by this NB-IoT communication module can be used to compile the code to generate executable firmware. The secondary development method of this NB-IoT communication module also provides compilation link checking, which can troubleshoot errors such as abnormal programming syntax of developers.

[0125] After the firmware is generated, it can be burned into the memory provided by this NB-IoT communication module through the serial port burning tool and executed by the processor. During the execution process, if the debug serial port is connected to the real-time log tool, the logs related to the AT call will be output to the tool, and the user can perform function verification and debugging based on the log output. At the same time, the relevant information of the AT call will also be recorded in the log partition on the FLASH, which is convenient for subsequent review and analysis.

[0126] The embodiment of the present invention transmits and processes AT commands through a virtual AT channel, thereby realizing rapid transplantation and construction of MCU function programs. On the one hand, it saves the cost of an MCU for terminal manufacturers and reduces the complexity of circuit design; on the other hand, it reduces development costs, reuses existing business programs, and accelerates the rapid launch of products.

[0127] The embodiment of the present invention also provides a NB-IoT communication module, such as Figure 4As shown, it includes a memory 401, a processor 402, a radio frequency chip 403, and a peripheral controller 404. The memory 401 is used to store executable computer programs, the processor 402 is used to execute computer programs in this NB-IoT communication module, the radio frequency chip 403 is used to control the performance of the power amplifier, and the peripheral controller 404 is used to connect peripheral sensors, etc.

[0128] It should be noted that in the embodiment of the present application, the memory 401 is used to store the firmware produced by the OpenCPU method of the NB-IoT communication module; the processor 402 is used to execute the firmware produced by the OpenCPU method of the NB-IoT communication module.

[0129] like Figure 5 As shown, 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:

[0130] The processing module 501 is used to obtain a function program for processing AT commands and create an application program interface API for calling AT commands;

[0131] The sending module 502 is used to receive a first AT command sent by the second terminal through the API;

[0132] The execution module 503 is used to execute related processing of the first AT command based on the functional program.

[0133] In an embodiment of the present invention, by acquiring a functional program for processing AT commands and creating an application program interface API for calling AT commands, secondary development using AT commands can be achieved in an NB-IoT communication module. A first AT command sent by a second terminal is received through the API, and related processing of the first AT command is performed based on the functional program, thereby reducing development costs and development time.

[0134] Optionally, the processing module includes:

[0135] A generating unit, used for generating a software development kit SDK according to resource configuration of the NB-IoT communication module;

[0136] The first acquisition unit is used to acquire the functional program for processing AT commands through the SDK.

[0137] Optionally, the acquiring unit is specifically used for:

[0138] Transplanting the functional program of the microcontroller unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal;

[0139] and / or,

[0140] The functional program is created through the SDK.

[0141] Optionally, the processing module further includes:

[0142] A receiving unit, configured to receive a configuration operation on a graphical configuration interface of the NB-IoT communication module;

[0143] A determination unit is used to determine the resource configuration of the NB-IoT communication module in response to the configuration operation.

[0144] Optionally, the execution module includes:

[0145] A processing unit, configured to format the first AT command based on the functional program to obtain a formatted first AT command;

[0146] The execution unit is used to execute related processing of the first AT instruction according to the formatted first AT instruction.

[0147] Optionally, the processing module further includes:

[0148] A second acquisition unit, used to acquire target data corresponding to the first AT command;

[0149] A sending unit is used to send the target data to the second terminal through the API.

[0150] Optionally, the sending unit is specifically configured to:

[0151] When the NB-IoT communication module is in standard mode, the target data is transmitted to a first physical serial port through the API, where the first physical serial port is a serial port for communication between the first terminal and the second terminal;

[0152] When the NB-IoT communication module is in OpenCPU mode, the target data is transmitted to a first AT command thread through the API, and the first AT command thread is a thread through which the first terminal sends the AT command to the second terminal.

[0153] Optionally, the processing module further includes:

[0154] A transmission unit, configured to transmit the first AT command and the target data to the log tool through the NB-IoT communication module when the NB-IoT communication module is connected to the log tool;

[0155] A storage unit is used to store the AT command and the target data through the log tool.

[0156] It should be noted that the secondary development device of the narrowband Internet of Things NB-IoT communication module provided in the embodiment of the present invention is a device capable of executing the above-mentioned secondary development method of the narrowband Internet of Things NB-IoT communication module. All embodiments of the above-mentioned secondary development method of the narrowband Internet of Things NB-IoT communication module are applicable to the device and can achieve the same or similar technical effects.

[0157] like Figure 6 As shown, an embodiment of the present invention also provides a terminal device, which is a first terminal, including: a processor 600; and a memory 610 connected to the processor 600 through a bus interface, wherein the memory 610 is used to store programs and data used by the processor 600 when performing operations, and the processor 600 calls and executes the programs and data stored in the memory 610.

[0158] The terminal device further includes a transceiver 620 , which is connected to the bus interface and is used to receive and send data under the control of the processor 600 ; the processor 600 is used to read the program in the memory 610 .

[0159] Specifically, the processor 600 is used to obtain a function program for processing an AT command, and to create an application program interface API for calling the AT command;

[0160] The transceiver 620 is used to receive a first AT command sent by the second terminal through the API;

[0161] The processor 600 is used to execute related processing of the first AT command based on the functional program.

[0162] Optionally, the processor 600 is specifically configured to generate a software development kit SDK according to resource configuration of the NB-IoT communication module;

[0163] The transceiver 620 is specifically used to obtain the functional program for processing AT commands through the SDK.

[0164] Optionally, the processor 600 is specifically used to transplant the functional program of the microcontroller unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal; and / or, to create the functional program through the SDK.

[0165] Optionally, the processor 600 is also specifically used to receive a configuration operation on a graphical configuration interface of the NB-IoT communication module; and, in response to the configuration operation, determine a resource configuration of the NB-IoT communication module.

[0166] Optionally, the processor 600 is specifically configured to format the first AT instruction based on the functional program to obtain a formatted first AT instruction; and, according to the formatted first AT instruction, perform related processing of the first AT instruction.

[0167] Optionally, the processor 600 is specifically configured to obtain target data corresponding to the first AT command;

[0168] The transceiver 620 is specifically configured to send the target data to the second terminal via the API.

[0169] Optionally, the transceiver 620 is specifically used to, when the NB-IoT communication module is in standard mode, transmit the target data to a first physical serial port through the API, wherein the first physical serial port is a serial port for communication between the first terminal and the second terminal; and, when the NB-IoT communication module is in OpenCPU mode, transmit the target data to a first AT command thread through the API, wherein the first AT command thread is a thread for the first terminal to send the AT command to the second terminal.

[0170] Optionally, the processor 600 is specifically used to, when the NB-IoT communication module is connected to the log tool, transmit the first AT command and the target data to the log tool through the NB-IoT communication module; and store the AT command and the target data through the log tool.

[0171] Among them, Figure 6 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 600 and various circuits of memory represented by memory 610 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 620 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. For different terminals, the user interface 630 may also be an interface capable of externally connecting or internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like. 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 when performing operations.

[0172] An embodiment of the present invention also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the secondary development method of the narrowband Internet of Things NB-IoT communication module as described in any of the above items are implemented.

[0173] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.

[0174] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.

[0175] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles described in the present invention. These improvements and modifications are also within the scope of protection of the present invention.

Claims

1. A secondary development method of a narrowband Internet of Things NB-IoT communication module, applied to a first terminal, It is characterized in that include: Obtain a function program for processing AT commands, and create an application program interface API for calling AT commands; Receiving a first AT command sent by a second terminal through the API; Based on the functional program, executing related processing of the first AT command; The related processing of executing the first AT command includes: Acquire target data corresponding to the first AT command; Sending the target data to the second terminal through the API; The sending the target data to the second terminal through the API includes: When the NB-IoT communication module is in standard mode, the target data is transmitted to a first physical serial port through the API, where the first physical serial port is a serial port for communication between the first terminal and the second terminal; When the NB-IoT communication module is in OpenCPU mode, the target data is transmitted to a first AT command thread through the API, and the first AT command thread is a thread through which the first terminal sends the AT command to the second terminal.

2. The method according to claim 1, It is characterized in that The step of obtaining a functional program for processing an AT command includes: Generate a software development kit SDK based on the resource configuration of the NB-IoT communication module; The functional program for processing AT commands is obtained through the SDK.

3. The method according to claim 2, It is characterized in that The step of obtaining the functional program for processing the AT command through the SDK includes: Transplanting the functional program of the microcontroller unit MCU in the first terminal through the SDK; wherein the NB-IoT communication module belongs to the first terminal; and / or, The functional program is created through the SDK.

4. The method according to claim 2, It is characterized in that Before generating a software development kit SDK according to the resource configuration of the NB-IoT communication module, the method further includes: Receiving a configuration operation on a graphical configuration interface of the NB-IoT communication module; In response to the configuration operation, the resource configuration of the NB-IoT communication module is determined.

5. The method according to claim 1, It is characterized in that The performing of the related processing of the first AT command based on the functional program includes: Based on the functional program, formatting the first AT command to obtain a formatted first AT command; According to the formatted first AT command, relevant processing of the first AT command is performed.

6. The method according to claim 1, It is characterized in that After acquiring the target data corresponding to the first AT command, the method further includes: When the NB-IoT communication module is connected to the log tool, the first AT command and the target data are transmitted to the log tool through the NB-IoT communication module; The AT command and the target data are stored by the log tool.

7. A secondary development device for a narrowband Internet of Things (NB-IoT) communication module, applied to a first terminal, It is characterized in that include: A processing module, used for obtaining a function program for processing AT commands, and creating an application program interface API for calling AT commands; A sending module, used for receiving a first AT command sent by a second terminal through the API; An execution module, used for executing related processing of the first AT command based on the functional program; Wherein, the processing module further includes: A second acquisition unit, used to acquire target data corresponding to the first AT command; A sending unit, configured to send the target data to the second terminal through the API; Wherein, the sending unit is specifically used for: When the NB-IoT communication module is in standard mode, the target data is transmitted to a first physical serial port through the API, where the first physical serial port is a serial port for communication between the first terminal and the second terminal; When the NB-IoT communication module is in OpenCPU mode, the target data is transmitted to a first AT command thread through the API, and the first AT command thread is a thread through which the first terminal sends the AT command to the second terminal.

8. The device according to claim 7, It is characterized in that The processing module comprises: A generating unit, used for generating a software development kit SDK according to resource configuration of the NB-IoT communication module; The acquisition unit is used to acquire the functional program for processing AT commands through the SDK.

9. A terminal device, the terminal device being a first terminal, It is characterized in that include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the secondary development method of a narrowband Internet of Things (NB-IoT) communication module as described in any one of claims 1 to 6 are implemented.

10. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the secondary development method of the narrowband Internet of Things NB-IoT communication module as described in any one of claims 1 to 6 are implemented.