CN114422972B - Data interaction method, system, device and storage medium - Google Patents

Data interaction method, system, device and storage medium Download PDF

Info

Publication number
CN114422972B
CN114422972B CN202011092906.2A CN202011092906A CN114422972B CN 114422972 B CN114422972 B CN 114422972B CN 202011092906 A CN202011092906 A CN 202011092906A CN 114422972 B CN114422972 B CN 114422972B
Authority
CN
China
Prior art keywords
instruction
response
cellular communication
format
main control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011092906.2A
Other languages
Chinese (zh)
Other versions
CN114422972A (en
Inventor
陶震
成进
董帅甫
王�华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202011092906.2A priority Critical patent/CN114422972B/en
Publication of CN114422972A publication Critical patent/CN114422972A/en
Application granted granted Critical
Publication of CN114422972B publication Critical patent/CN114422972B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/18Information format or content conversion, e.g. adaptation by the network of the transmitted or received information for the purpose of wireless delivery to users or terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/20Services signaling; Auxiliary data signalling, i.e. transmitting data via a non-traffic channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Abstract

Disclosed herein are a data interaction method, system, apparatus and storage medium. The data interaction method comprises the following steps: receiving an AT instruction sent to a cellular communication module of the Internet of things equipment by a main control module of the Internet of things equipment, forwarding the AT instruction to the cellular communication module, and receiving a returned first response; if the first response indicates that the cellular communication module does not support the AT command, inquiring whether the AT command has a substitute command, if so, converting the format of the AT command into the format of a corresponding substitute command, sending the substitute command to the cellular communication module and receiving a returned second response; if the second response indicates that the cellular communication module supports the alternative instruction, converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module, and sending the converted second response to the main control module. The method can facilitate the main control module of the Internet of things equipment to automatically adapt to AT instructions of various types of cellular communication modules.

Description

Data interaction method, system, device and storage medium
Technical Field
The present disclosure relates to internet of things, and more particularly, to a method, a system, a device, and a storage medium for data interaction.
Background
The cellular module (abbreviated as cellular module) is a functional module which integrates a baseband chip, a memory, a power amplifier device and the like on a circuit board and provides a standard interface. A SIM (Subscriber Identity Module, subscriber identity card) or USIM (Universal Subscriber Identity Module, universal subscriber identity card) is typically integrated on a cellular module mounted on a handset. The cellular module installed on the internet of things device is typically integrated with an internet of things card. An internet of things card is a traffic card of a special number section specially designed for the internet of things, which is pushed out by an operator (such as telecom, mobile, unicom) and has the same appearance as a common SIM or USIM (generally used for mobile phones, tablet computers and the like) but has different network and other parameters from the common SIM card.
With the development of internet of things (Internet of Things, abbreviated as IoT) service, a main control module of an internet of things device needs to often send an AT (Attention) instruction to a cellular module.
In the internet of things, the AT command may be used to control or regulate the device, the communication module to access the internet, and so on. As shown in fig. 1, the AT command is used to control rules of interaction between TE (Terminal Equipment ) and MT (Mobile Terminal). In cellular communication networks, such as GSM (Global System for Mobile Communication, global system for mobile communications), control in terms of calls, messages, phonebooks, data services, faxes, etc., may be performed by AT commands. The AT command is a string that starts with the AT and ends with the character. Each of the AT instructions has a corresponding response return if execution of the instruction is successful.
Most cellular modules support the 3gpp ts27.007 AT command set, but different module vendors may use different commands to achieve the same functionality. Therefore, the main control module of the internet of things equipment must develop AT communication programs of different versions according to different cellular module types, and development tasks of the main control module are increased.
Disclosure of Invention
The invention provides a data interaction method, a system, a device and a storage medium, which can facilitate the main control module of the internet of things equipment to automatically adapt to AT instructions of various types of cellular communication modules.
In a first aspect, an embodiment of the present disclosure provides a data conversion method, applied to a conversion module, including:
receiving an AT instruction sent to a cellular communication module of the Internet of things equipment by a main control module of the Internet of things equipment, forwarding the AT instruction to the cellular communication module, and receiving a first response returned by the cellular communication module;
if the first response indicates that the cellular communication module does not support the AT command, inquiring whether the AT command has a substitute command, if so, converting the format of the AT command into a format of a corresponding substitute command, sending the substitute command of the AT command to the cellular communication module, and receiving a second response returned by the cellular communication module;
If the second response indicates that the cellular communication module supports the alternative instruction of the AT instruction, converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module, and sending the converted second response to the main control module.
In a second aspect, an embodiment of the present disclosure provides a data interaction system, disposed inside an internet of things device, including:
the main control module is configured to send an AT instruction to the cellular communication module through the conversion module and receive a response of the AT instruction forwarded by the conversion module;
the conversion module is configured to receive an AT instruction sent to the cellular communication module by the main control module, forward the AT instruction to the cellular communication module and receive a first response returned by the cellular communication module; if the first response indicates that the cellular communication module does not support the AT command, inquiring whether the AT command has a substitute command, if so, converting the format of the AT command into a format of a corresponding substitute command, sending the substitute command of the AT command to the cellular communication module, and receiving a second response returned by the cellular communication module; if the second response indicates that the cellular communication module supports the alternative instruction of the AT instruction, converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module, and sending the converted second response to the main control module;
The cellular communication module is configured to receive the AT instruction from the conversion module and to return a response to the conversion module.
In a third aspect, an embodiment of the present disclosure provides a data interaction device, including: the data interaction device comprises a memory and a processor, wherein the memory stores a computer program which realizes the steps of the data interaction method provided in the first aspect when being executed by the processor.
In a fourth aspect, an embodiment of the present disclosure provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the data interaction method provided in the first aspect.
According to the data interaction method, system, device and storage medium provided by the embodiment of the disclosure, a conversion module is added between the main control module and the cellular communication module of the Internet of things device, after the conversion module is added, the main control module can only develop one set of AT communication program, if an AT instruction sent by the main control module is not an AT instruction supported by the cellular communication module, the AT instruction is converted into a format of a substitute instruction through format conversion, the substitute instruction is sent to the cellular communication module, after a response of the cellular communication module to the substitute instruction is received, the response is converted into a response format of an original AT instruction, and the response format is sent to the main control module. Through instruction conversion processing of the conversion module, code development amount of the main control module can be saved, so that the main control module only needs to develop a set of unified AT communication program aiming AT various types of cellular communication modules.
Other aspects will become apparent upon reading and understanding the accompanying drawings and detailed description.
Drawings
The accompanying drawings are included to provide an understanding of the disclosed embodiments and are incorporated in and constitute a part of this specification, illustrate and do not limit the disclosed embodiments.
FIG. 1 is a schematic diagram of AT communication between TE and MT in the prior art;
FIG. 2 is a flow chart of a method of data interaction according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of a data interaction system according to an embodiment of the disclosure;
fig. 4 is a flowchart of a method for performing AT communication between a master control module and a cellular module (the master control module sends a CRSM instruction) according to an embodiment of the disclosure;
fig. 5 is a schematic diagram of a data conversion device according to an embodiment of the disclosure.
Detailed Description
The present disclosure describes several embodiments, but the description is illustrative and not limiting, and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described in the present disclosure. Although many possible combinations of features are shown in the drawings and discussed in the embodiments, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or in place of any other feature or element of any other embodiment unless specifically limited.
The present disclosure includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements of the present disclosure that have been disclosed may also be combined with any conventional features or elements to form a unique inventive arrangement as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive arrangements to form another unique inventive arrangement as defined in the claims. Thus, it should be understood that any of the features shown and/or discussed in this disclosure may be implemented alone or in any suitable combination. Accordingly, the embodiments are not to be restricted except in light of the attached claims and their equivalents. Further, various modifications and changes may be made within the scope of the appended claims.
Furthermore, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other sequences of steps are possible as will be appreciated by those of ordinary skill in the art. Accordingly, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Furthermore, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
Fig. 2 is a flowchart of a data interaction method provided by an embodiment of the present disclosure, where, as shown in fig. 2, the data interaction method is applied to a conversion module, and may include:
step S110, an AT instruction sent to a cellular communication module of the Internet of things equipment by a main control module of the Internet of things equipment is received, the AT instruction is forwarded to the cellular communication module, and a first response returned by the cellular communication module is received;
step S120, if the first response indicates that the cellular communication module does not support the AT instruction, querying whether the AT instruction has a substitute instruction, if so, converting the format of the AT instruction into a format of a corresponding substitute instruction, sending the substitute instruction of the AT instruction to the cellular communication module, and receiving a second response returned by the cellular communication module;
step S130, if the second response indicates that the cellular communication module supports the alternative instruction of the AT instruction, converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module, and sending the converted second response to the main control module.
In the related art, the main control module of the internet of things device must know the type of the AT instruction supported by the cellular communication module in advance, then can communicate with the cellular communication module, when the cellular communication module belongs to products of different models of different manufacturers, aiming AT the cellular communication modules of various models, the main control module must adopt AT communication programs matched with various models, so that the development workload of the main control module is definitely increased, and the diversity of software upgrading versions of the main control module is also caused when the internet of things device is used for service upgrading, so that clients are unwilling to upgrade the main control module, and the service propulsion of the internet of things device is influenced.
In the above embodiment of the present disclosure, a conversion module is added between a main control module and a cellular communication module of an internet of things device, after the conversion module is added, the main control module may develop only one set of AT communication program, if an AT instruction sent by the main control module is not an AT instruction supported by the cellular communication module, the AT instruction is converted into a format of a substitute instruction through format conversion, the substitute instruction is sent to the cellular communication module, after receiving a response of the cellular communication module to the substitute instruction, format conversion is performed on the response, and the response is converted into a response format of an original AT instruction, and is sent to the main control module. Through instruction conversion processing of the conversion module, code development amount of the main control module can be saved, so that the main control module only needs to develop a set of unified AT communication program aiming AT various types of cellular communication modules.
The main control module of the internet of things device may be a main control chip of the internet of things device. The cellular communication module of the internet of things equipment can be a cellular communication module which integrates a baseband chip, a memory, a power amplifier device and the like on a circuit board and provides a standard interface. The cellular communication module is a different chip than the master control module. Cellular mobile communication (cellular communication for short) adopts a cellular wireless networking mode, and is connected between a terminal and network equipment through a wireless channel, so that the mutual communication of users in the activities is realized. The method is mainly characterized by mobility of the terminal and has the functions of handover and automatic roaming across a local network. The cellular mobile communication service refers to services such as voice, data, video and image provided through a cellular mobile communication network composed of a base station subsystem, a mobile switching subsystem and the like.
The conversion module may be disposed on a chip on which the main control module is disposed, or on a chip different from the chip on which the main control module is disposed.
In an exemplary embodiment, after forwarding the AT command to the cellular communication module and receiving the first response returned by the cellular communication module, the method further includes:
and if the first response indicates that the cellular communication module supports the AT command, forwarding the first response to the main control module.
When the AT instruction sent to the cellular communication module by the main control module is exactly the AT instruction supported by the cellular communication module, the conversion module can receive the response normally returned by the cellular communication module and then directly forward the response to the main control module.
In an exemplary embodiment, if the first response is a normal response returned by the cellular communication module after executing the AT instruction, it is determined that the cellular communication module supports the AT instruction sent by the master control module. If the first response is an abnormal response which is returned by the cellular communication module and indicates the AT command type error, the cellular communication module is determined to not support the AT command sent by the main control module.
In an exemplary embodiment, after querying whether the AT instruction has a substitute instruction, the method further includes: and if the AT instruction does not have a substitute instruction, returning a notification message to the main control module, wherein the notification message is used for notifying the main control module that the cellular communication module does not support the AT instruction and the AT instruction does not have a substitute instruction.
An alternative instruction to an AT instruction is an AT instruction that is capable of performing the same function as the AT instruction but in a different instruction format.
In an exemplary embodiment, after receiving the second response returned by the cellular communication module, the method further includes:
if the second response indicates that the cellular communication module does not support the alternative instruction of the AT instruction, judging whether the AT instruction has an unused alternative instruction, if so, reselecting a new alternative instruction, converting the format of the AT instruction into the format of the new alternative instruction, sending the new alternative instruction to the cellular communication module, receiving a response returned by the cellular communication module, and if not, returning a notification message to the main control module, wherein the notification message is used for notifying the main control module that the cellular communication module does not support the AT instruction and the alternative instruction of the AT instruction.
In one exemplary embodiment, if the second response is a normal response returned by the cellular communication module after executing the alternate instruction of the AT instruction, it is determined that the cellular communication module supports the alternate instruction of the AT instruction. If the second response is an exception response returned by the cellular communication module indicating an AT command type error, it is determined that the cellular communication module does not support an alternate command to the AT command.
In an exemplary embodiment, when the AT instruction is a restricted SIM card access CRSM instruction, the substitute instruction of the AT instruction includes: the general SIM card accesses instructions in a CSIM instruction set; when the AT instruction is an instruction in a CSIM instruction set, the alternative instructions to the AT instruction include: CRSM instructions.
In one exemplary embodiment, the instructions in the CSIM instruction set include: the method comprises a step of reading a phonebook record instruction CPBR, a step of writing a phonebook record instruction CPBW, a step of selecting a phonebook storage type instruction CPBS and a step of searching the phonebook record instruction CPBF.
Different manufacturers or different models of cellular modules (cellular communication modules) of the same manufacturer have different capabilities to support AT commands. For example, the CRSM instruction may implement the function of a CPBR/CPBW instruction, and thus the CRSM instruction and the CPBR/CPBW instruction are alternate instructions to each other. When the AT instruction sent by the main control module is a CRSM instruction, the CRSM instruction can be converted into a CPBR instruction or a CPBW instruction through analyzing the content of the CRSM instruction. Similarly, when the AT instruction sent by the main control module is a CPBR instruction or a CPBW instruction, the CPBR instruction or the CPBW instruction may be converted into a corresponding CRSM instruction.
In an exemplary embodiment, the converting the format of the AT instruction into the format of the corresponding substitute instruction includes:
If the AT instruction sent by the main control module is a CPBR instruction or a CPBW instruction, converting the CPBR instruction or the CPBW instruction sent by the main control module into a corresponding CRSM instruction according to the format of the CRSM instruction.
In an exemplary embodiment, converting the format of the second response to a response format corresponding to the AT instruction sent by the main control module includes:
if the second response returned by the cellular communication module is the response of the CRSM instruction and the AT instruction sent by the main control module is the CPBR instruction, converting the response of the CRSM instruction into the response of the corresponding CPBR instruction according to the format of the response of the CPBR instruction;
if the second response returned by the cellular communication module is the response of the CRSM instruction and the AT instruction sent by the main control module is the CPBW instruction, converting the response of the CRSM instruction into the response of the corresponding CPBW instruction according to the format of the response of the CPBW instruction.
In an exemplary embodiment, the converting the format of the AT instruction into the format of the corresponding substitute instruction includes:
if the AT instruction sent by the main control module is a CRSM instruction, analyzing the content of the CRSM instruction; if the analysis result indicates that the phone book record is read, converting the CRSM instruction sent by the main control module into a corresponding CPBR instruction according to the format of the CPBR instruction; and if the analysis result indicates that the phone book record is written, converting the CRSM instruction sent by the main control module into a corresponding CPBW instruction according to the format of the CPBW instruction.
In an exemplary embodiment, converting the format of the second response to a response format corresponding to the AT instruction sent by the main control module includes:
if the second response returned by the cellular communication module is the response of the CPBR instruction and the AT instruction sent by the main control module is the CRSM instruction, converting the response of the CPBR instruction into the response of the corresponding CRSM instruction according to the format of the response of the CRSM instruction;
if the second response returned by the cellular communication module is the response of the CPBW instruction and the AT instruction sent by the main control module is the CRSM instruction, converting the response of the CPBW instruction into the response of the corresponding CRSM instruction according to the format of the response of the CRSM instruction.
In an exemplary embodiment, the querying whether the AT instruction has an alternative instruction includes:
searching the AT instruction from a substitute AT instruction set, determining that the AT instruction has a substitute instruction if the AT instruction is searched, and determining that the AT instruction does not have a substitute instruction if the AT instruction is not searched.
In an exemplary embodiment, the alternative AT instruction set may be pre-stored in the memory of the internet of things device or may be retrieved from a remote server upon networking of the internet of things device. The alternative AT instruction set may also be updated continuously from a remote server as the internet of things device is networked.
Fig. 3 is a schematic structural diagram of a data interaction system provided by an embodiment of the present disclosure, where, as shown in fig. 3, the data interaction system is disposed in an internet of things device, and may include:
the main control module 10 is configured to send an AT command to the cellular communication module through the conversion module and receive a response of the AT command forwarded by the conversion module;
a conversion module 20 configured to receive an AT instruction sent by the master control module to the cellular communication module, forward the AT instruction to the cellular communication module, and receive a first response returned by the cellular communication module; if the first response indicates that the cellular communication module does not support the AT command, inquiring whether the AT command has a substitute command, if so, converting the format of the AT command into a format of a corresponding substitute command, sending the substitute command of the AT command to the cellular communication module, and receiving a second response returned by the cellular communication module; if the second response indicates that the cellular communication module supports the alternative instruction of the AT instruction, converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module, and sending the converted second response to the main control module;
The cellular communication module 30 is configured to receive AT instructions from the conversion module and to return a response to the conversion module.
In the data interaction system, a conversion module is added between a main control module and a cellular module, the conversion module forwards an AT instruction of the main control module to the cellular communication module and receives a first response returned by the cellular communication module, if the first response indicates that the cellular communication module does not support the AT instruction, whether the AT instruction has a substitute instruction is inquired, if yes, the format of the AT instruction is converted into the format of the corresponding substitute instruction, the substitute instruction of the AT instruction is sent to the cellular communication module and a second response returned by the cellular communication module is received, if the second response indicates that the cellular communication module supports the substitute instruction of the AT instruction, the format of the second response is converted into a response format corresponding to the AT instruction sent by the main control module, and the converted second response is sent to the main control module. After the conversion module is added, the code development amount of the main control module can be saved through the instruction conversion processing of the conversion module, so that the main control module only needs to develop a set of unified AT communication programs aiming AT various types of cellular communication modules, and the development workload of the main control module is saved.
In an exemplary embodiment, the conversion module is further configured to forward the AT instruction to the cellular communication module and receive a first response returned by the cellular communication module, and if the first response indicates that the cellular communication module supports the AT instruction, forward the first response to the master control module.
In an exemplary embodiment, the conversion module is further configured to query whether the AT instruction has a substitute instruction, and if the AT instruction does not have a substitute instruction, return a notification message to the master module, where the notification message is used to notify the master module that the AT instruction is not supported by the cellular communication module and the AT instruction does not have a substitute instruction.
In an exemplary embodiment, the conversion module is further configured to, after receiving the second response returned by the cellular communication module, determine if the AT instruction has an unused alternative instruction if the second response indicates that the cellular communication module does not support the alternative instruction of the AT instruction, reselect a new alternative instruction if the unused alternative instruction has an unused alternative instruction, convert the format of the AT instruction to a format of the new alternative instruction, send the new alternative instruction to the cellular communication module and receive the response returned by the cellular communication module, and if the unused alternative instruction does not have an unused alternative instruction, return a notification message to the host module, where the notification message is used to notify the host module that the cellular communication module does not support the AT instruction and the alternative instruction of the AT instruction.
An alternative instruction to an AT instruction is an AT instruction that is capable of performing the same function as the AT instruction but in a different instruction format.
In an exemplary embodiment, when the AT instruction is a restricted SIM card access CRSM instruction, the substitute instruction of the AT instruction includes: the general SIM card accesses instructions in a CSIM instruction set; when the AT instruction is an instruction in a CSIM instruction set, the alternative instructions to the AT instruction include: CRSM instructions.
In one exemplary embodiment, the instructions in the CSIM instruction set include: the method comprises a step of reading a phonebook record instruction CPBR, a step of writing a phonebook record instruction CPBW, a step of selecting a phonebook storage type instruction CPBS and a step of searching the phonebook record instruction CPBF.
Different manufacturers or different models of cellular modules (cellular communication modules) of the same manufacturer have different capabilities to support AT commands. For example, the CRSM instruction may implement the function of a CPBR/CPBW instruction, and thus the CRSM instruction and the CPBR/CPBW instruction are alternate instructions to each other. When the AT instruction sent by the main control module is a CRSM instruction, the CRSM instruction can be converted into a CPBR instruction or a CPBW instruction through analyzing the content of the CRSM instruction. Similarly, when the AT instruction sent by the main control module is a CPBR instruction or a CPBW instruction, the CPBR instruction or the CPBW instruction may be converted into a corresponding CRSM instruction.
In an exemplary embodiment, the conversion module is configured to convert the format of the AT instruction into the format of the corresponding substitute instruction in the following manner:
if the AT instruction sent by the main control module is a CPBR instruction or a CPBW instruction, converting the CPBR instruction or the CPBW instruction sent by the main control module into a corresponding CRSM instruction according to the format of the CRSM instruction;
in an exemplary embodiment, the conversion module is configured to convert the format of the second response into a response format corresponding to the AT instruction sent by the master control module in the following manner:
if the second response returned by the cellular communication module is the response of the CRSM instruction and the AT instruction sent by the main control module is the CPBR instruction, converting the response of the CRSM instruction into the response of the corresponding CPBR instruction according to the format of the response of the CPBR instruction;
if the second response returned by the cellular communication module is the response of the CRSM instruction and the AT instruction sent by the main control module is the CPBW instruction, converting the response of the CRSM instruction into the response of the corresponding CPBW instruction according to the format of the response of the CPBW instruction.
In an exemplary embodiment, the conversion module is configured to convert the format of the AT instruction into the format of the corresponding substitute instruction in the following manner:
If the AT instruction sent by the main control module is a CRSM instruction, analyzing the content of the CRSM instruction; if the analysis result indicates that the phone book record is read, converting the CRSM instruction sent by the main control module into a corresponding CPBR instruction according to the format of the CPBR instruction; and if the analysis result indicates that the phone book record is written, converting the CRSM instruction sent by the main control module into a corresponding CPBW instruction according to the format of the CPBW instruction.
In an exemplary embodiment, the conversion module is configured to convert the format of the second response into a response format corresponding to the AT instruction sent by the master control module in the following manner:
if the second response returned by the cellular communication module is the response of the CPBR instruction and the AT instruction sent by the main control module is the CRSM instruction, converting the response of the CPBR instruction into the response of the corresponding CRSM instruction according to the format of the response of the CRSM instruction;
if the second response returned by the cellular communication module is the response of the CPBW instruction and the AT instruction sent by the main control module is the CRSM instruction, converting the response of the CPBW instruction into the response of the corresponding CRSM instruction according to the format of the response of the CRSM instruction.
In an exemplary embodiment, the conversion module is configured to query whether the AT instruction has a substitute instruction by:
Searching the AT instruction from a substitute AT instruction set, determining that the AT instruction has a substitute instruction if the AT instruction is searched, and determining that the AT instruction does not have a substitute instruction if the AT instruction is not searched.
In an exemplary embodiment, the alternative AT instruction set may be pre-stored in the memory of the internet of things device or may be retrieved from a remote server upon networking of the internet of things device. The alternative AT instruction set may also be updated continuously from a remote server as the internet of things device is networked.
Taking the main control module to send the CRSM instruction as an example, a process of how to perform AT instruction adaptation between the main control module and the cellular communication module (cellular module) through the conversion module is explained below.
As shown in fig. 4, a method for AT communication between a master control module and a cellular module may include the following steps:
step S101, a main control module sends an AT instruction (for example, a CRSM instruction) to a conversion module, wherein the CRSM instruction indicates to read a phonebook record;
step S102, a conversion module forwards an AT instruction of a main control module to a cellular module and receives a first response returned by the cellular module;
step S103, the conversion module determines whether the first response indicates that the cellular module supports the AT command, if yes, step S104 is executed, otherwise step S105 is executed;
If the first response is a normal response returned after the cellular module executes the CRSM instruction (e.g., a record of the phonebook is returned), it is determined that the cellular module supports the CRSM instruction. If the first response is an exception response returned by the cellular module indicating an AT instruction type error, it is determined that the cellular module does not support the CRSM instruction.
Step S104, the conversion module forwards the first response to the main control module and ends;
step S105, the conversion module inquires whether the AT instruction has a substitute instruction, if yes, the step S107 is executed, otherwise, the step S106 is executed;
the translation module may search for the AT instruction from a set of alternative AT instructions, determine that the AT instruction has an alternative instruction if the AT instruction is searched, and determine that the AT instruction does not have an alternative instruction if the AT instruction is not searched.
Step S106, the conversion module returns a notification message to the main control module, wherein the notification message is used for notifying the main control module that the cellular module does not support the AT instruction and the AT instruction does not replace the instruction, and the process is finished;
step S107, the conversion module analyzes the AT instruction (CRSM instruction) and finds a substitute instruction (such as CPBR instruction) from the substitute AT instruction set;
Step S108, the conversion module converts the AT instruction (CRSM instruction) sent by the main control module into a corresponding substitution instruction (CPBR instruction) according to the format of the substitution instruction (CPBR instruction) and sends the substitution instruction (CPBR instruction) to the cellular module;
step S109, the conversion module receives a second response returned by the cellular module;
step S110, the conversion module judges whether the second response indicates that the honeycomb module supports the replacement instruction, if yes, step S114 is executed, otherwise step S111 is executed;
if the second response is a normal response returned after the cellular module executes the alternative instruction (CPBR instruction) of the AT instruction, it is determined that the cellular communication module supports the CPBR instruction. If the second response is an exception response returned by the cellular module indicating an AT instruction type error, it is determined that the cellular module does not support an alternate instruction (CPBR instruction) for the AT instruction.
Step S111, judging whether the AT command (CRSM command for indicating the record of the phone book) has an unused substitution command, if yes, executing step S113, otherwise, executing step S112;
step S112, the conversion module returns a notification message to the main control module, wherein the notification message is used for notifying the main control module that the honeycomb module does not support the AT instruction and the alternative instruction of the AT instruction, and the process is finished;
Step S113, a conversion module selects a new replacement instruction from unused replacement instructions of AT instructions, converts the format of the AT instructions into the format of the new replacement instruction, sends the new replacement instruction to the cellular module, receives a response returned by the cellular module, and returns to step S109;
step S114, the conversion module converts the format of the second response into a response format corresponding to the AT instruction (CRSM instruction) sent by the master control module, and sends the converted second response to the master control module.
In the standard AT instruction set, the CRSM instructions are restricted SIM card access instructions for reading or writing the contents of the SIM card in a restricted situation. The CPBR command is a read phonebook record command, and when the CPBR command contains parameters index1 and index2, the command returns a phonebook entry between index1 and index2 in the currently selected phonebook memory, and if no phonebook entry exists in all positions between index1 and index2, only returns: OK; when the CPBR instruction only contains the parameter index1, only the phonebook record of the index1 position is returned. The CPBW instruction is a telephone book record writing instruction, and the CPBW instruction writes the telephone book entry in the position formulated by index in the currently selected telephone book memory. If the command parameter only contains index, the phonebook entry at the corresponding position of index is deleted. If the index field is omitted but the parameter contains a number field, then this phonebook entry will be written to the first empty location.
The following illustrates the conversion between CRSM instructions and CPBR/CPBW instructions, and the conversion between other AT instructions is similar and will not be described in detail herein.
1) With respect to read commands
If the read command is: reading the 6 th record of the SIM card phonebook, an example of a CRSM instruction may be as follows:
AT+CRSM=178,28474,6,4,28
examples of corresponding CPBR instructions are shown below:
AT+CPBR=6
2) Response to read command
If the response of the read command is: the number recorded in the 6 th piece of the SIM card phonebook is "3129000005", and the contact is "native", and then an example of the response of the CRSM instruction can be as follows:
+CRSM:144,0,80672C673AFFFFFFFFFFFFFFFFFF078113929000005F0FFFFFFFFFFF
examples of responses to corresponding CPBR instructions may be as follows:
+CPBR:6, "3129000005",129, "native" OK
3) With respect to write commands
If the write command is: the number "3129000005" and the contact "native" are written in the 6 th record of the SIM phonebook, and then an example of a CRSM instruction may be as follows:
AT+CRSM=220,28474,6,4,28,80672C673AFFFFFFFFFFFFFFFFFF078113929000005F0FFFFFFFFFFF
examples of corresponding CPBW instructions may be as follows:
at+cpbw=6, "13929000005",129, "native"
4) Response to write command
If the response of the write command is: an example of a response to a CRSM instruction may be as follows:
+CRSM:144,0
examples of responses to corresponding CPBW instructions may be as follows:
+CPBW:144,0
Fig. 5 is an exemplary diagram of a data interaction device according to an embodiment of the present disclosure. As shown in fig. 5, a data interaction device provided in this exemplary embodiment includes: a processor 100 and a memory 200; wherein the processor 100 and the memory 200 are connected by a bus, said memory 200 stores a computer program which, when executed by said processor 100, implements the steps of the data interaction method described above.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, simply CPU), but may also be other general purpose processors, digital Signal Processors (DSP), application Specific Integrated Circuits (ASIC), off-the-shelf programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type.
The buses may include, in addition to data buses, power buses, control buses, status signal buses, and the like.
In an implementation, the processing performed by the data interaction means may be performed by integrated logic circuitry in hardware in the processor or by instructions in the form of software. That is, the steps of the methods in the embodiments of the present disclosure may be embodied as hardware processor execution or as a combination of hardware and software modules in a processor. The software modules may be located in random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, and other storage media. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method. The details of the method are not described in detail here to avoid repetition.
The disclosed embodiments provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the data interaction method described above.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
It should be noted that various other embodiments of the present application are possible, and those skilled in the art can make various corresponding changes and modifications according to the present application without departing from the spirit and the essence of the present application, but these corresponding changes and modifications should fall within the scope of the claims appended hereto.

Claims (12)

1. A data interaction method is applied to a conversion module and comprises the following steps:
receiving an AT instruction sent to a cellular communication module of the Internet of things equipment by a main control module of the Internet of things equipment, forwarding the AT instruction to the cellular communication module, and receiving a first response returned by the cellular communication module;
if the first response indicates that the cellular communication module does not support the AT command, inquiring whether the AT command has a substitute command, if so, converting the format of the AT command into a format of a corresponding substitute command, sending the substitute command of the AT command to the cellular communication module, and receiving a second response returned by the cellular communication module;
if the second response indicates that the cellular communication module supports the alternative instruction of the AT instruction, converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module, and sending the converted second response to the main control module;
When the AT instruction is a restricted SIM card access CRSM instruction, the alternative instructions of the AT instruction include: the general SIM card accesses instructions in a CSIM instruction set; when the AT instruction is an instruction in a CSIM instruction set, the alternative instructions to the AT instruction include: CRSM instructions; the converting the format of the AT instruction into the format of the corresponding alternative instruction includes: if the AT instruction sent by the main control module is a CPBR instruction or a CPBW instruction, converting the CPBR instruction or the CPBW instruction sent by the main control module into a corresponding CRSM instruction according to the format of the CRSM instruction.
2. The method according to claim 1, characterized in that:
the CSIM instruction set includes: the method comprises a step of reading a phonebook record instruction CPBR, a step of writing a phonebook record instruction CPBW, a step of selecting a phonebook storage type instruction CPBS and a step of searching the phonebook record instruction CPBF.
3. The method according to claim 2, characterized in that:
converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module, including:
if the second response returned by the cellular communication module is the response of the CRSM instruction and the AT instruction sent by the main control module is the CPBR instruction, converting the response of the CRSM instruction into the response of the corresponding CPBR instruction according to the format of the response of the CPBR instruction;
If the second response returned by the cellular communication module is the response of the CRSM instruction and the AT instruction sent by the main control module is the CPBW instruction, converting the response of the CRSM instruction into the response of the corresponding CPBW instruction according to the format of the response of the CPBW instruction.
4. The method according to claim 2, characterized in that:
the converting the format of the AT instruction into the format of the corresponding alternative instruction includes:
if the AT instruction sent by the main control module is a CRSM instruction, analyzing the content of the CRSM instruction; if the analysis result indicates that the phone book record is read, converting the CRSM instruction sent by the main control module into a corresponding CPBR instruction according to the format of the CPBR instruction; and if the analysis result indicates that the phone book record is written, converting the CRSM instruction sent by the main control module into a corresponding CPBW instruction according to the format of the CPBW instruction.
5. The method according to claim 2, characterized in that:
the converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module includes:
if the second response returned by the cellular communication module is the response of the CPBR instruction and the AT instruction sent by the main control module is the CRSM instruction, converting the response of the CPBR instruction into the response of the corresponding CRSM instruction according to the format of the response of the CRSM instruction;
If the second response returned by the cellular communication module is the response of the CPBW instruction and the AT instruction sent by the main control module is the CRSM instruction, converting the response of the CPBW instruction into the response of the corresponding CRSM instruction according to the format of the response of the CRSM instruction.
6. The method according to claim 1, characterized in that:
the querying whether the AT instruction has a substitute instruction includes:
searching the AT instruction from a substitute AT instruction set, determining that the AT instruction has a substitute instruction if the AT instruction is searched, and determining that the AT instruction does not have a substitute instruction if the AT instruction is not searched.
7. The method of claim 1, wherein after forwarding the AT command to the cellular communication module and receiving the first response returned by the cellular communication module, the method further comprises:
and if the first response indicates that the cellular communication module supports the AT command, forwarding the first response to the main control module.
8. The method of claim 1, wherein after querying whether the AT instruction has a substitute instruction, the method further comprises:
and if the AT instruction does not have a substitute instruction, returning a notification message to the main control module, wherein the notification message is used for notifying the main control module that the cellular communication module does not support the AT instruction and the AT instruction does not have a substitute instruction.
9. The method of claim 1, wherein upon receiving a second response returned by the cellular communication module, the method further comprises:
if the second response indicates that the cellular communication module does not support the alternative instruction of the AT instruction, judging whether the AT instruction has an unused alternative instruction, if so, reselecting a new alternative instruction, converting the format of the AT instruction into the format of the new alternative instruction, sending the new alternative instruction to the cellular communication module, receiving a response returned by the cellular communication module, and if not, returning a notification message to the main control module, wherein the notification message is used for notifying the main control module that the cellular communication module does not support the AT instruction and the alternative instruction of the AT instruction.
10. A data interaction system, disposed within an internet of things device, comprising:
the main control module is configured to send an AT instruction to the cellular communication module through the conversion module and receive a response of the AT instruction forwarded by the conversion module;
the conversion module is configured to receive an AT instruction sent to the cellular communication module by the main control module, forward the AT instruction to the cellular communication module and receive a first response returned by the cellular communication module; if the first response indicates that the cellular communication module does not support the AT command, inquiring whether the AT command has a substitute command, if so, converting the format of the AT command into a format of a corresponding substitute command, sending the substitute command of the AT command to the cellular communication module, and receiving a second response returned by the cellular communication module; if the second response indicates that the cellular communication module supports the alternative instruction of the AT instruction, converting the format of the second response into a response format corresponding to the AT instruction sent by the main control module, and sending the converted second response to the main control module; when the AT instruction is a restricted SIM card access CRSM instruction, the alternative instructions of the AT instruction include: the general SIM card accesses instructions in a CSIM instruction set; when the AT instruction is an instruction in a CSIM instruction set, the alternative instructions to the AT instruction include: CRSM instructions; the converting the format of the AT instruction into the format of the corresponding alternative instruction includes: if the AT instruction sent by the main control module is a CPBR instruction or a CPBW instruction, converting the CPBR instruction or the CPBW instruction sent by the main control module into a corresponding CRSM instruction according to the format of the CRSM instruction;
The cellular communication module is configured to receive the AT instruction from the conversion module and to return a response to the conversion module.
11. A data interaction device, comprising: a memory and a processor, the memory storing a computer program which, when executed by the processor, implements the steps of the data interaction method of any of the preceding claims 1-9.
12. A computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the data interaction method of any of the preceding claims 1-9.
CN202011092906.2A 2020-10-13 2020-10-13 Data interaction method, system, device and storage medium Active CN114422972B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011092906.2A CN114422972B (en) 2020-10-13 2020-10-13 Data interaction method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011092906.2A CN114422972B (en) 2020-10-13 2020-10-13 Data interaction method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN114422972A CN114422972A (en) 2022-04-29
CN114422972B true CN114422972B (en) 2024-03-26

Family

ID=81260221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011092906.2A Active CN114422972B (en) 2020-10-13 2020-10-13 Data interaction method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN114422972B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107968717A (en) * 2016-10-19 2018-04-27 中兴通讯股份有限公司 The processing method and modem Modem equipment of a kind of Interface Controller order
CN111447093A (en) * 2020-03-27 2020-07-24 四川爱联科技有限公司 System and method for unified configuration of Internet of things equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130344885A1 (en) * 2012-06-26 2013-12-26 PearTrack America, LLC Electronic tracking device with wireless communications protocol translation circuitry and associated methods

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107968717A (en) * 2016-10-19 2018-04-27 中兴通讯股份有限公司 The processing method and modem Modem equipment of a kind of Interface Controller order
CN111447093A (en) * 2020-03-27 2020-07-24 四川爱联科技有限公司 System and method for unified configuration of Internet of things equipment

Also Published As

Publication number Publication date
CN114422972A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
KR100855495B1 (en) Apparatus and method for automatic pre-configuration of network parameters in portable terminal
US8306532B2 (en) System and method for using multiple subscriber identities to provide differentiated services to subscribers
EP1704737B1 (en) Method and network for detection of device information of mobile stations
US20110021212A1 (en) Method, device and system for implementing location-based service
US8755361B2 (en) Method, system and signaling gateway for enabling message intercommunication between GSM and CDMA
CN105359562B (en) Control device, control method, communication system, and computer-readable storage medium
US20010014603A1 (en) Software reconfiguration of communications apparatus
CN111225074A (en) Network service system and network service method
US20220322069A1 (en) Establishing and maintaining cellular data communication using remote subscriber identification module profile
US10224972B2 (en) Systems, methods, and computer-readable media for tracking updates and loading data
CN100442889C (en) Method for optimizing roaming
CN103581889A (en) Method and system for automatically updating network configuration parameters
EP2629556A1 (en) Improved set up and configuration of a mobile communications terminal
CN101204106A (en) Mehtod, apparatus and computer program providing network-associated system priority list for multimode system selection
KR101042526B1 (en) Method and Apparatus for Automatically Updating Change of Preferred Business Network to Mobile Station
CN101401459B (en) Call center enabler
WO2012065492A1 (en) Method for sending imsi and terminal
CN114422972B (en) Data interaction method, system, device and storage medium
WO2022208138A1 (en) Establishing and maintaining cellular data communication using remote subscriber identification module profile
KR100929000B1 (en) Firmware management method, a method of providing a firmware management service, a terminal capable of firmware management and a server providing a firmware management service
US20050245259A1 (en) Associating subscriber information between protocols
WO2017201806A1 (en) Method and device for switching between embedded subscriber identity modules, terminal, and server
US20210227381A1 (en) Method, apparatus, computer program, and computer readable medium for managing subscription profile
US20190215881A1 (en) Method for increasing possibility of a successful call-setup and a communications apparatus utilizing the same
US20220322068A1 (en) Establishing and maintaining cellular data communication using remote subscriber identification module profile

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