WO2018072640A1 - Interface control command processing method and modem equipment - Google Patents

Interface control command processing method and modem equipment Download PDF

Info

Publication number
WO2018072640A1
WO2018072640A1 PCT/CN2017/105864 CN2017105864W WO2018072640A1 WO 2018072640 A1 WO2018072640 A1 WO 2018072640A1 CN 2017105864 W CN2017105864 W CN 2017105864W WO 2018072640 A1 WO2018072640 A1 WO 2018072640A1
Authority
WO
WIPO (PCT)
Prior art keywords
command
processing
processed
modem
modem device
Prior art date
Application number
PCT/CN2017/105864
Other languages
French (fr)
Chinese (zh)
Inventor
汤卫东
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018072640A1 publication Critical patent/WO2018072640A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M11/00Telephonic communication systems specially adapted for combination with other electrical systems
    • H04M11/06Simultaneous speech and data transmission, e.g. telegraphic transmission over the same conductors

Definitions

  • the present disclosure relates to the field of communications technologies, and in particular, to a method for processing interface control commands and a modem Modem device.
  • the AT command refers to the interface control command between the terminal equipment (TE, Terminal Equipment) and the Modem equipment (ME, Modem Equipment).
  • TE Terminal Equipment
  • ME Modem Equipment
  • the TE initiates an AT command request to the ME, and the ME requests the request to be parsed and executed. Then return the response to the AT command.
  • the AT command is generally completed through serial communication.
  • the processing of an AT command includes a request and a response, and the entire process can be regarded as a session.
  • the user's terminal device is previously adapted to the Modem of the company's Qualcomm chip. Due to the discontinuation of the chip, company A plans to provide the modem to the new MTK chip, but because of During the test of the Modem of the MTK chip, the customer found that the partial AT command of the Modem using the MTK chip is not common to the Modem of the previous Qualcomm chip. If the customer selects the Modem of the MTK chip, the client must modify the code of the terminal device side. However, the customer is a manufacturer in the medical industry. The terminal equipment mentioned has passed the relevant certification of the medical industry. If the code is modified, the relevant certification of the industry must be re-established. The cost and time required are unacceptable to the customer. of.
  • the related terminal device TE is connected to the Modem device ME through a USB interface, and a chip B is integrated in the Modem device ME, and the chip B has a built-in AT command processing module.
  • the AT command exchange process between the terminal device TE and the Modem device ME is that the terminal device TE outputs an AT command request according to its internal logic requirement, and the AT command request is sent to the Modem device ME through the USB interface, and the Modem device TE requests the AT command. Directly forwarded to the AT command processing module inside the chip B. After the AT command processing module inside the chip B parses and processes the command, the AT command response is returned to the Modem device ME, and the Modem device ME returns the AT command response through the USB interface. After receiving the AT command response from the Modem device ME, the terminal device TE can know the execution result of the AT command, and then perform the next processing according to its own logic.
  • the terminal device TE and the modem device integrated with a chip need to be one-to-one. If the terminal device TE needs to replace the modem integrated with other chips, it needs to re-make the new modem. Test and modify the code of the terminal device TE.
  • the application scenario of the Modem device ME adopting the related technical solution has certain limitations. If the terminal device TE is previously adapted to use the Modem device of the chip A, there are some non-standard AT commands that are not required by the chip. The terminal device TE uses the original control method to send these non-standard AT commands. When the Modem device ME using the chip B is used, the Modem device ME using the chip B cannot recognize and execute the command at this time. If adaptation is required, the terminal device TE must modify the code to send a new AT command that can be recognized by the Modem device ME using chip B. In some cases, the terminal device TE vendor, for some reason (the code needs to be re-authenticated as described above), is difficult to modify the terminal device TE code.
  • modifying the code on the ME side of the Modem device also takes some time to process, and sometimes it is not easy to modify the software version if it is already closed. That is to say, the versatility of the mode adaptation of the Modem device and the terminal device using the related technical solution is relatively poor.
  • An object of the present disclosure is to provide a method and a modem for processing an interface control command
  • the Modem device solves the problem of poor versatility of the Modem device ME and the terminal device TE adaptation in the related art.
  • an embodiment of the present disclosure provides a method for processing an interface control command, which is applied to a modem modem device, and the processing method includes:
  • the AT command is converted into a pending command that the modem device can directly perform response processing, and the response processing is performed according to the to-be-processed command.
  • the step of detecting whether the received interface controls the AT command is a command that the modem device can directly perform response processing includes:
  • the received interface control AT command is a general AT command
  • it is determined that the received interface control AT command is a command that the modem device can directly perform response processing
  • the received interface controls the AT command to be a non-universal AT command, detecting whether the chip type indicated by the received interface control AT command matches the chip type of the Modem device;
  • the received interface controls the chip type of the modem indicated by the AT command, and matches the chip type of the Modem device, determining that the received interface controls the AT command as a command that the Modem device can directly perform response processing;
  • the received interface control AT command indicates that the chip type of the modem does not match the chip type of the Modem device, it is determined that the received interface control AT command is a command that the Modem device cannot directly perform response processing.
  • the step of converting the AT command into a to-be-processed command that the Modem can directly perform response processing includes:
  • the step of performing response processing according to the to-be-processed command includes:
  • the pair of the to-be-processed commands are processed in response, and the N+1th to-be-processed command is processed or terminated according to the response result of the Nth to-be-processed command.
  • N is a positive integer greater than or equal to 1.
  • the step of responding or ending the N+1th to-be-processed command according to the response result of the Nth to-be-processed command includes:
  • the operation is ended, the processing result of constructing the AT command is converted, and the processing result is returned to the terminal device that sends the interface control AT command.
  • the present disclosure also provides a modem Modem device, where the Modem device includes:
  • the detecting module is configured to detect whether the received interface control AT command is a command that the modem device can directly perform response processing
  • the first processing module is configured to convert the AT command into a pending command that the modem device can directly perform response processing, and perform response processing according to the to-be-processed command.
  • the detecting module includes:
  • a first detecting submodule configured to detect whether the received interface controls whether the AT command is a general AT command
  • the first determining submodule is configured to determine that the received interface controls the AT command to directly respond to the Modem device when the received interface controls the AT command to be a general AT command. Processed command;
  • the second detecting submodule is configured to: when the received interface controls the AT command to be a non-universal AT command, detecting whether the chip type of the modem indicated by the received interface control AT command matches the chip type of the Modem device;
  • a second determining submodule configured to determine, when the received interface control AT command indicates that the chip type of the modem matches the chip type of the modem device, determining that the received interface control AT command is a command that the modem can directly perform response processing;
  • the third determining submodule is configured to: when the chip type of the modem indicated by the received interface control AT command does not match the chip type of the modem device, determine that the received interface controls the AT command to be unable to directly perform response processing on the modem device. command.
  • the first processing module includes:
  • the first processing submodule is configured to convert the AT command into a pending command that the modem device can directly perform response processing according to the chip type of the modem indicated by the AT command and the chip type of the Modem device.
  • the first processing module includes:
  • the second processing sub-module is configured to perform response processing according to the to-be-processed command directly when the number of the to-be-processed commands is equal to 1, and respond to the terminal device that sends the interface control AT command;
  • the third processing sub-module is configured to perform response processing on the pair of the to-be-processed commands one by one when the number of the to-be-processed commands is greater than 1, and to wait for the N+1th item according to the response result of the Nth to-be-processed command Processing the command for response processing or ending the operation;
  • N is a positive integer greater than or equal to 1.
  • the third processing submodule includes:
  • the first processing unit is configured to start responding to the (N+1)th pending processing command when the processing result of the Nth to-be-processed command is successful, and after all the processing results of the to-be-processed command are obtained, converting Constructing a processing result of the AT command, and responding the processing result to a terminal device that sends the interface control AT command;
  • the second processing unit is configured to, when the processing result of the Nth to-be-processed command is a processing failure, end the operation, convert the processing result of constructing the AT command, and respond to the sending of the interface control AT command by the processing result Terminal Equipment.
  • a storage medium is further provided, and the storage medium may store an execution instruction for executing a processing method of the interface control command in the foregoing embodiment.
  • the processing method of the interface control command can detect whether the AT command is a command that the modem device can directly perform response processing by detecting the received interface; if not, converting the AT command to a Modem device can directly respond Processing the pending command, and performing corresponding response processing according to the to-be-processed command; so that the Modem device ME can be universally adapted to different terminal devices, thereby reducing unnecessary re-development process; and solving the related technology in the Modem device ME and The problem of poor versatility of the terminal device TE adaptation, at the same time, improves the market competitiveness of the product and better meets the customer's needs.
  • FIG. 1 is a schematic diagram of a connection between a Modem device ME and a terminal device TE in the related art
  • FIG. 2 is a schematic flowchart of a method for processing an interface control command according to Embodiment 1 of the present disclosure
  • FIG. 3 is a schematic diagram of a connection between a Modem device ME and a terminal device TE according to Embodiment 1 of the present disclosure
  • FIG. 4 is a schematic structural diagram of a command adaptation module according to Embodiment 1 of the present disclosure.
  • FIG. 5 is a schematic flowchart of a command conversion process inside a command adaptation module according to Embodiment 1 of the present disclosure
  • FIG. 6 is a schematic structural diagram of a Modem device according to Embodiment 2 of the present disclosure.
  • the disclosure is directed to the adaptation of the Modem device ME and the terminal device TE in the related art.
  • the problem of poor usability provides a variety of solutions, as follows:
  • a method for processing an interface control command according to Embodiment 1 of the present disclosure is applied to a modem Modem device, where the processing method includes:
  • Step 21 Detect whether the received interface control AT command is a command that the modem device can directly perform response processing.
  • Step 22 In the case of No, the AT command is converted into a pending command that the Modem device can directly perform response processing, and the response processing is performed according to the to-be-processed command.
  • the AT command may be converted into a to-be-processed command that the modem device can directly perform response processing according to the command conversion table.
  • the command conversion table can be obtained according to the relevant command set of various chips, and will not be described in detail herein.
  • the method for processing the interface control command provided by the first embodiment of the present disclosure can detect whether the AT command is a command that the modem device can directly perform response processing by detecting the received interface; if not, converting the AT command to a Modem device can Directly performing the response processing of the pending command, and performing corresponding response processing according to the to-be-processed command; so that the Modem device ME can be universally adapted to different terminal devices, thereby reducing unnecessary re-development process; and solving the related technology Modem
  • the problem of poor versatility of the device ME and the terminal device TE adaptation improves the market competitiveness of the product and better satisfies the customer's needs.
  • the step of detecting whether the received interface control AT command is a command that the modem device can directly perform response processing includes: detecting whether the received interface control AT command is a general AT command; and when the received interface controls the AT command When the command is a general AT, it is determined that the received interface control AT command is a command that the modem device can directly perform response processing; when the received interface controls the AT command to be a non-universal AT command, detecting the received interface to control the AT command. Indicates the chip type of the modem, whether it matches the chip type of the Modem device;
  • the received interface controls the AT command to indicate that the chip type of the modem matches the chip type of the Modem device, it is determined that the received interface controls the AT command as a Modem device.
  • the command capable of directly performing response processing when the received interface controls the AT command to indicate that the chip type of the modem does not match the chip type of the Modem device, it is determined that the received interface controls the AT command to be unable to directly perform response processing on the Modem device. command.
  • the step of converting the AT command into a pending command that the modem device can directly perform response processing includes: converting the AT command to a Modem device according to a chip type of the modem indicated by the AT command and a chip type of the Modem device A pending command that can directly perform response processing.
  • the step of performing the response processing according to the to-be-processed command includes: the number of the to-be-processed commands When the value is equal to 1, the response processing is directly performed according to the to-be-processed command, and the processing result is sent to the terminal device that sends the interface control AT command;
  • the pair of the to-be-processed commands are processed in response, and the N+1th to-be-processed command is processed or terminated according to the response result of the Nth to-be-processed command. (After obtaining the processing result of a pending command, the response processing of another pending command is started); wherein N is a positive integer greater than or equal to 1.
  • the step of performing a response processing or an ending operation on the N+1th to-be-processed command according to the response result of the Nth to-be-processed command includes: when the processing result of the Nth to-be-processed command is successful, The response processing of the N+1th to-be-processed command is started. After all the processing results of the to-be-processed command are obtained, the processing result of the AT command is converted and the processing result is sent to the interface to control the AT command. Terminal Equipment;
  • the operation is ended, the processing result of constructing the AT command is converted, and the processing result is returned to the terminal device that sends the interface control AT command.
  • the solution provided by this embodiment further includes: when yes, directly responding to the AT command.
  • the received interface control AT command is a command that the modem device can directly perform response processing
  • the corresponding response processing is directly performed.
  • the solution provided by this embodiment further includes: buffering the received interface to control the AT command.
  • the solution provided by the first embodiment of the present disclosure can be implemented by using a Modem device as shown in FIG. 3, and a command adaptation module is added to the Modem device ME of the embodiment of the present disclosure; as shown in FIG. 4, the command adaptation module is The internal includes a command buffer, a command conversion table, and a command conversion algorithm module; wherein the command conversion algorithm module is the core.
  • the terminal device TE sends an AT command request to the USB interface.
  • the modem device ME After receiving the AT command request A from the USB interface, the modem device ME does not directly send the command processing module to the chip B, but first sends it to the Modem device ME.
  • Command adaptation module converts the AT command request A to form a new AT command request B, and sends the command to the command processing module of the chip B for processing.
  • the processing result that is, the AT command response B is returned to the command adaptation module
  • the command adaptation module converts the AT command response B into an AT adapted to the AT command request A.
  • the command responds to A, and then returns to the USB interface.
  • the terminal device TE receives the AT command response A, thereby obtaining the processing result, and then performing subsequent processing according to the processing result.
  • the command adaptation module first caches the command buffer; the command conversion algorithm module sequentially acquires the AT command request from the command buffer, and after obtaining the AT command request A, According to the internal algorithm processing result, to the command conversion table to query, obtain the corresponding converted AT command request B, and then the AT command request B output. After receiving the AT command response B, it also according to the internal algorithm processing result, to the command conversion table to query, obtain the corresponding converted AT command response A, and then send the AT command response A It is sent to the command buffer and is finally returned to the terminal device TE.
  • the processing flow of the command conversion algorithm module includes:
  • Step 51 According to the name of the input AT command request A, determine whether the AT command request A is a general protocol AT, and if yes, go to step 52, if no, go to step 53.
  • the command is a general-purpose protocol AT or a non-generic chip-specific AT command.
  • Step 52 The AT command request A does not need to be converted, and is directly sent to the command processing module of the chip B for processing, and returns after receiving the command response A (the command response B is equivalent to A and does not need to be converted).
  • Step 53 Acquire the chip A to which the AT command requests A belongs.
  • the AT commands sent by the terminal device TE can be used to know which chip the AT command is sent by the terminal device TE.
  • the AT command for setting the terminal to start is generally used by each chip manufacturer. Not the same, so the chip type of the current terminal device TE can be judged from the beginning. Subsequent commands are not required to be repeated.
  • the AT command requests A to belong to the dedicated AT command of chip A.
  • Step 54 Obtain the chip B inside the current Modem device ME.
  • Step 55 Determine whether the AT command request A needs to be converted according to the chip A and the chip B. If not (the chip A and the chip B are substantially the same chip), proceed to step 52; if (the chip A and the chip B are substantially different types of chips) ), proceed to step 56.
  • Step 56 Query the command conversion table, and convert the AT command request A into the AT command request B and output.
  • the query converts the chip A into the AT command request conversion table of the chip B.
  • Step 57 It is determined whether the number of AT command requests B is plural. If not, the process proceeds to step 58, and if yes, the process proceeds to step 510.
  • Step 58 The number of the AT command request B is one, and is sent to the command processing module of the chip B for processing.
  • Step 59 After receiving the command response B, the command response B is converted into the command response A, and returned to the terminal device TE.
  • the command conversion table is queried again, specifically, the query converts the chip B into the AT command response conversion table of the chip A, and the command response returned by the query is also one, for example, The command responds to A; the command responds to A to the command buffer; it waits for transmission to the terminal device TE.
  • Step 510 The number of the AT command request B is greater than 1, where two are used as an example, including the command request B1 and the command request B2; the command request B1 is first issued.
  • Step 511 After the chip B returns to the command response B1, it is determined whether the command response B1 is OK. If yes, the process proceeds to step 513. If no, the process proceeds to step 512.
  • the chip B returns the command response B1
  • the query and the operation returned to the terminal device TE are not performed first, but the result of the command response B1 is determined whether it is necessary to continue to issue the command request B2. If the command response B1 returns an error, go to step 512; if the command response B1 returns to normal, go to step 513.
  • Step 512 Perform the query of the command conversion table and the operation of the return command response A according to the command response B1, and no longer issue the command request B2.
  • Step 513 Continue to issue the command request B2.
  • Step 514 After receiving the command response B2, according to the command response B1 and the command response B2, the query of the command conversion table and the operation of the return command request A are performed.
  • the command conversion algorithm shown in FIG. 5 only needs to process the AT command conversion of one turn and one turn.
  • the present disclosure considers that the AT mechanism does not allow continuous delivery of AT commands, only the current AT command. After the request receives the AT command response, the new AT command request can be issued, so for the case of many-to-one, one by one can be processed.
  • the command conversion table mentioned above may be as shown in the following table, including parameters such as an AT command request, a terminal device TE chip type, a Modem device ME chip type, a converted AT command request number, and a converted AT command request.
  • the AT command correspondence of the table is obtained based on the analysis of the specific functions of the AT commands of different chips. Since the command set of each chip is well known, the technician can obtain it according to the needs, and no longer Narration.
  • the terminal device TE sends an AT command to request A to the USB interface; after receiving the AT command request A from the USB interface, the modem device ME sends the command to the command adaptation module; the command buffer in the command adaptation module first requests the A command from the AT command.
  • the cache is to be extracted by the command conversion algorithm module; after the command conversion algorithm module extracts, it is determined that the AT command request A belongs to the AT command request of the Qualcomm chip or the general AT command request; and the chip in the Modem device ME is determined to be a Qualcomm chip (may be The chip type in the Modem device ME is preset in the configuration item, and the configuration item can be read to determine the chip type. Therefore, the conversion of the AT command request is not performed, and is directly sent to the command processing module in the chip;
  • the AT command response A is returned; after receiving the AT command response A, the command conversion algorithm module returns to the terminal device TE through the USB interface; after the terminal device TE receives the AT command response A, the AT The command request is executed.
  • the AT command of the terminal device TE can be determined by extracting the names of the AT commands, and the chip type of the terminal device TE is recorded in the Modem. Equipment ME;
  • the terminal device TE is previously adapted to the Modem device ME of the Qualcomm chip, this time is adapted to the Modem device ME of the MTK chip, but the specific AT command is issued, and the processing procedure is the same as the example one. This is not repeated.
  • the terminal device TE is previously adapted to the Modem device ME of the Qualcomm chip, this time is adapted to the Modem device ME of the MTK chip.
  • the AT command of the Qualcomm chip needs to be converted into an AT command of one MTK chip.
  • the command needs to be converted to MTK's AT command +erat:
  • the terminal device TE sends an AT command request +premode to the USB interface; after receiving the AT command request +prefmode from the USB interface, the modem device ME sends the command to the command adaptation module; the command buffer in the command adaptation module first sends the AT command.
  • Request +prefmode cache to be extracted by the command conversion algorithm module;
  • the command conversion algorithm module extracts, according to the name prefmode of the AT command request, it is determined that the AT command request +prefmode is an AT command request belonging to the Qualcomm chip; the configuration item of the current Modem device ME is queried, and the chip in the Modem device ME is determined to be MTK. Chip, therefore need to perform the conversion of the AT command request, query the command conversion table shown above;
  • the command conversion algorithm module requests the name, the terminal device TE chip type, and the modem device ME chip type according to the AT command, and the query command conversion table can obtain the converted AT command request +erat, and sends the +erat to the command processing module in the chip. ;
  • the AT command response OK is returned; after receiving the AT command response OK, the command conversion algorithm module determines whether the AT command response conversion is needed. In this embodiment, no conversion is required (only Involving a simple response, such as whether it can be executed, communicated, etc., OK is universal, when it involves substantial communication content, it needs to be converted, because the parameters of various chips may be different);
  • the command conversion algorithm module returns the AT command to OK, and returns to the terminal device TE through the USB interface; after the terminal device TE receives the AT command response OK, the AT command request is completed.
  • the terminal device TE is previously adapted to the Modem device ME of the Qualcomm chip, this time is adapted to the Modem device ME of the MTK chip.
  • one AT command of the Qualcomm chip needs to be converted into an AT command of two MTK chips.
  • the command needs to be converted to +cops and +erat of MTK.
  • the main difference between this example and the above example is the processing of the command conversion algorithm module:
  • the terminal device TE sends an AT command request +cops to the USB interface; after receiving the AT command request +cops from the USB interface, the modem device ME sends the command to the command adaptation module; the command buffer in the command adaptation module first sends the AT command.
  • Request +cops cache to be extracted by the command conversion algorithm module;
  • the command conversion algorithm module extracts, according to the chip type of the current terminal device TE that is previously determined, it is determined that the AT command request +cops is an AT command request belonging to the Qualcomm chip (since the AT commands of different chips in the initialization phase are generally different, By extracting the names of the AT commands, the type of the currently adapted terminal device TE can be determined, and the type of the terminal device TE is recorded in the Modem device ME);
  • the command conversion algorithm module requests the name, the terminal device TE chip type, and the modem device ME chip type according to the AT command, and the query command conversion table can obtain the converted AT command request +cops and +erat, and first convert the first converted AT command.
  • the AT command After the execution of the command processing module in the chip, the AT command returns OK; after receiving the first AT command response OK, the command conversion algorithm module sends an AT command request +erat to the command processing module in the chip (if received)
  • the response of the first AT command is ERROR, then the AT command is not required to be sent +erat, but the ERROR is directly returned to the terminal device TE);
  • the command processing module in the chip After the execution of the command processing module in the chip, return the AT command response OK; command to After receiving the second AT command response OK, the algorithm module determines whether it is necessary to perform the conversion of the AT command response. In this embodiment, no conversion is required (the reason is the same as the content in the third example);
  • the command conversion algorithm module returns the AT command to OK, and returns to the terminal device TE through the USB interface; after the terminal device TE receives the AT command response OK, the AT command request is completed.
  • the solution of this embodiment provides an AT command matching conversion method on the relevant Modem, which allows the customer to ignore the difference of the control methods brought by different chips when using the Modem, and minimize the reduction to the client. The impact of this, thereby enhancing the competitiveness and flexibility of the product.
  • the solution proposed by the embodiment of the present disclosure can make the Modem device ME universally adapt to different terminal devices, reduce unnecessary re-development process, and improve user experience;
  • the terminal device is previously adapted to the Modem device ME of the Qualcomm chip. Therefore, part of the code execution in the terminal device is a dedicated AT command of the Qualcomm chip.
  • the Modem device ME using the MTK chip is to be adapted, then either modify the terminal device code, or re-develop the software version of the MTK chip Modem device ME, and these modifications are either laborious or impossible to receive by the customer;
  • the Modem device ME using the MTK chip can easily replace the Modem device ME of the Qualcomm chip without modifying the code of the terminal device, thereby improving the market competitiveness of the product and satisfying the customer's needs.
  • a second embodiment of the present disclosure provides a modem modem device, including:
  • the detecting module 61 is configured to detect whether the received interface control AT command is a command that the modem device can directly perform response processing;
  • the first processing module 62 is configured to convert the AT command into a pending command that the modem device can directly perform response processing, and correspondingly according to the to-be-processed command. Response processing.
  • the AT command may be converted into a to-be-processed command that the modem device can directly perform response processing according to the command conversion table.
  • the command conversion table can be obtained according to the relevant command set of various chips, and will not be described in detail herein.
  • the Modem device provided by Embodiment 2 of the present disclosure can detect whether the AT command is a command that the Modem device can directly perform response processing by detecting the received interface; if not, converting the AT command to a Modem device can directly perform response processing.
  • the pending command is processed according to the to-be-processed command; the modem device ME can be universally adapted to different terminal devices to reduce unnecessary re-development process; and the modem device ME and terminal in the related art are solved.
  • the problem of poor versatility of the device TE adaptation at the same time, improves the market competitiveness of the product and better meets the customer's needs.
  • the detecting module includes: a first detecting submodule configured to detect whether the received interface controls the AT command as a general AT command; and the first determining submodule is configured to: when the received interface controls the AT command as a universal AT When the command is executed, it is determined that the received interface control AT command is a command that the modem device can directly perform response processing; and the second detection submodule is configured to detect when the received interface controls the AT command to be a non-universal AT command.
  • the interface controls whether the chip type of the modem indicated by the AT command matches the chip type of the Modem device;
  • a second determining sub-module configured to: when the received interface control AT command indicates that the chip type of the modem matches the chip type of the modem device, determining that the received interface control AT command is a command that the modem device can directly perform response processing;
  • the third determining submodule is configured to: when the chip type of the modem indicated by the received interface control AT command does not match the chip type of the modem device, determine that the received interface controls the AT command to be unable to directly perform response processing on the modem device. command.
  • the chip type of the modem indicated by the AT command does not match the chip type of the modem device (not the same) when the AT command is converted to a command that the modem device cannot directly perform the response processing; therefore, in this embodiment,
  • the first processing module package The first processing sub-module is configured to convert the AT command into a pending command that the modem device can directly perform response processing according to the chip type of the modem indicated by the AT command and the chip type of the Modem device.
  • the first processing module includes: a second processing sub-module, which is set to be in the to-be-processed command, in the actual application, the number of the AT commands of the different chips may be different. When the number is equal to 1, the response processing is directly performed according to the to-be-processed command, and the processing result is sent to the terminal device that sends the interface control AT command;
  • the third processing sub-module is configured to perform response processing on the pair of the to-be-processed commands one by one when the number of the to-be-processed commands is greater than 1, and to wait for the N+1th item according to the response result of the Nth to-be-processed command
  • the processing command performs a response processing or an ending operation (after obtaining a processing result of a pending command, starting to respond to another pending processing command); wherein N is a positive integer greater than or equal to 1.
  • the third processing sub-module includes: a first processing unit, configured to start responding to the (N+1)th to-be-processed command when the processing result of the Nth to-be-processed command is processed successfully, After obtaining the processing result of all the to-be-processed commands, converting the processing result of the AT command, and responding the processing result to the terminal device that sends the interface control AT command;
  • the second processing unit is configured to, when the processing result of the Nth to-be-processed command is a processing failure, end the operation, convert the processing result of constructing the AT command, and respond to the sending of the interface control AT command by the processing result Terminal Equipment.
  • the solution provided by this embodiment further includes: a second processing module, configured to perform corresponding response processing on the AT command directly when yes.
  • the received interface control AT command is a command that the modem device can directly perform response processing
  • the corresponding response processing is directly performed.
  • modules/sub-modules may be implemented in software for execution by various types of processors.
  • an identified executable code module can comprise one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored in different bits that, when logically combined, constitute a module and implement the provisions of the module. purpose.
  • the executable code module can be a single instruction or a plurality of instructions, and can even be distributed across multiple different code segments, distributed among different programs, and distributed across multiple memory devices.
  • operational data may be identified within the modules and may be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed at different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
  • the module can be implemented by software, considering the level of the related hardware process, the module can be implemented in software, and the technician can construct the corresponding hardware circuit to realize the corresponding function without considering the cost.
  • the hardware circuits include conventional Very Large Scale Integration (VLSI) circuits or gate arrays and related semiconductors such as logic chips, transistors, or other discrete components.
  • VLSI Very Large Scale Integration
  • the modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.
  • Embodiments of the present disclosure also provide a storage medium.
  • the storage medium is arranged to store program code for performing the following steps:
  • the AT command is converted into a pending command that the modem device can directly perform response processing, and the response processing is performed according to the to-be-processed command.
  • the storage medium is further arranged to store program code for performing the following steps:
  • the storage medium is further arranged to store program code for performing the following steps:
  • S1 Convert the AT command to a pending command that the Modem device can directly perform response processing according to the chip type of the modem indicated by the AT command and the chip type of the Modem device.
  • the storage medium is further arranged to store program code for performing the following steps:
  • the storage medium is further arranged to store program code for performing the following steps:
  • the processing method of the interface control command can detect whether the AT command is a command that the modem device can directly perform response processing by detecting the received interface; in the case of no, converting the AT command into a Modem device can directly perform response processing.
  • the pending command is processed according to the pending command; the Modem device ME can be universally adapted to different terminal devices to reduce the unnecessary redevelopment process; and the Modem device ME and the terminal device TE in the related art are solved.
  • the problem of poor versatility of the adaptation at the same time, improves the market competitiveness of the product and better meets the needs of customers.

Abstract

The present disclosure provides an interface control command processing method and a modem equipment. The interface control command processing method comprises: detecting whether a received interface control AT command is a command capable of being directly responded and processed by a modem equipment; and if not, converting the AT command into a to-be-processed command capable of being directly responded and processed by the modem equipment, and responding to and processing the to-be-processed command. By means of the solution provided in the present disclosure, a modem equipment (ME) can be generally adapted to different terminal equipments, and accordingly unnecessary redevelopment processes are reduced; and the problem in the related art of poor generality in the adaption between the modem equipment (ME) and a terminal equipment (TE) is resolved, and the market competiveness of a product is improved, thereby better satisfying demands of a customer.

Description

接口控制命令的处理方法及调制解调器Modem设备Interface control command processing method and modem Modem device 技术领域Technical field
本公开涉及通信技术领域,特别是指一种接口控制命令的处理方法及调制解调器Modem设备。The present disclosure relates to the field of communications technologies, and in particular, to a method for processing interface control commands and a modem Modem device.
背景技术Background technique
AT命令(Attention Command)是指终端设备(TE,Terminal Equipment)和Modem设备(ME,Modem Equipment)之间的接口控制命令,一般由TE向ME发起一个AT命令请求,ME将命令请求解析、执行后返回对该AT命令的响应。AT命令一般通过串口通讯来完成,一条AT命令的处理过程包括请求和响应,整个过程可以看作一次会话。The AT command (Attention Command) refers to the interface control command between the terminal equipment (TE, Terminal Equipment) and the Modem equipment (ME, Modem Equipment). Generally, the TE initiates an AT command request to the ME, and the ME requests the request to be parsed and executed. Then return the response to the AT command. The AT command is generally completed through serial communication. The processing of an AT command includes a request and a response, and the entire process can be regarded as a session.
随着物联网的爆发式发展,市场上存在着多家芯片厂商,例如高通,联发科、海思、ZTE等。不同厂商的芯片在满足标准AT命令的同时,都会针对市场上一些非标准需求开发一些非标准AT命令,由于没有标准对其进行统一规定,为这些非标准需求而开发的非标准AT命令各个厂家又各不相同。With the explosive development of the Internet of Things, there are many chip manufacturers in the market, such as Qualcomm, MediaTek, HiSilicon, and ZTE. While the chips of different manufacturers meet the standard AT commands, they will develop some non-standard AT commands for some non-standard requirements in the market. Since there are no standards to stipulate them, non-standard AT commands developed for these non-standard requirements are various manufacturers. Different from each other.
这样在用户使用时,就会出现问题,比如:用户的终端设备此前适配的是A公司的高通芯片的Modem,由于该芯片停产,A公司计划提供给客户新的MTK芯片的Modem,但是由于客户在测试该MTK芯片的Modem的过程中发现,采用MTK芯片的Modem的部分AT命令和此前高通芯片的Modem不通用,如果客户选择该MTK芯片的Modem,那么客户必须修改终端设备侧的代码。然而,该客户是医疗行业的厂商,所提及的终端设备已经过了医疗行业的相关认证,如果修改代码,则必须重新过该行业的相关认证,所需要承担的费用和时间是客户难以接受的。In this way, when the user uses it, there will be problems. For example, the user's terminal device is previously adapted to the Modem of the company's Qualcomm chip. Due to the discontinuation of the chip, company A plans to provide the modem to the new MTK chip, but because of During the test of the Modem of the MTK chip, the customer found that the partial AT command of the Modem using the MTK chip is not common to the Modem of the previous Qualcomm chip. If the customer selects the Modem of the MTK chip, the client must modify the code of the terminal device side. However, the customer is a manufacturer in the medical industry. The terminal equipment mentioned has passed the relevant certification of the medical industry. If the code is modified, the relevant certification of the industry must be re-established. The cost and time required are unacceptable to the customer. of.
具体如图1所示,相关终端设备TE通过USB接口和Modem设备ME连接,在Modem设备ME内部集成有芯片B,该芯片B内部有一个 AT命令处理模块。终端设备TE和Modem设备ME的AT命令交互过程是,终端设备TE根据其内部逻辑需求,输出AT命令请求,该AT命令请求通过USB接口下发给Modem设备ME,Modem设备TE将该AT命令请求直接转发给芯片B内部的AT命令处理模块,芯片B内部的AT命令处理模块解析并且处理完该命令后,返回AT命令响应给Modem设备ME,Modem设备ME再将该AT命令响应通过USB接口返回给终端设备TE,终端设备TE接收到Modem设备ME的AT命令响应后,可以知道该AT命令的执行结果,进而根据其自身的逻辑进行下一步的处理。Specifically, as shown in FIG. 1 , the related terminal device TE is connected to the Modem device ME through a USB interface, and a chip B is integrated in the Modem device ME, and the chip B has a built-in AT command processing module. The AT command exchange process between the terminal device TE and the Modem device ME is that the terminal device TE outputs an AT command request according to its internal logic requirement, and the AT command request is sent to the Modem device ME through the USB interface, and the Modem device TE requests the AT command. Directly forwarded to the AT command processing module inside the chip B. After the AT command processing module inside the chip B parses and processes the command, the AT command response is returned to the Modem device ME, and the Modem device ME returns the AT command response through the USB interface. After receiving the AT command response from the Modem device ME, the terminal device TE can know the execution result of the AT command, and then perform the next processing according to its own logic.
在相关方案下,一般情况,终端设备TE和集成了某芯片的Modem设备都需要进行一对一的适配,终端设备TE如果需要更换集成了其它芯片的Modem,则需要重新对新的Modem进行测试和对终端设备TE的代码进行修改。Under the relevant schemes, in general, the terminal device TE and the modem device integrated with a chip need to be one-to-one. If the terminal device TE needs to replace the modem integrated with other chips, it needs to re-make the new modem. Test and modify the code of the terminal device TE.
由上可知,采用相关技术方案的Modem设备ME的应用场景有一定的局限性。如果终端设备TE此前适配的是采用芯片A的Modem设备,有一些非标准需求的非标准AT命令是芯片A所特有的,当终端设备TE沿用原来的控制方法,发送这些非标准的AT命令给采用芯片B的Modem设备ME时,采用芯片B的Modem设备ME此时是无法识别和执行该命令的。如果需要适配,那么终端设备TE则必须修改代码,发送新的采用芯片B的Modem设备ME可以识别的AT命令。而有些时候,终端设备TE厂商,因为一些原因(如前所述的修改了代码需要重新过认证),是难以修改终端设备TE的代码的。It can be seen from the above that the application scenario of the Modem device ME adopting the related technical solution has certain limitations. If the terminal device TE is previously adapted to use the Modem device of the chip A, there are some non-standard AT commands that are not required by the chip. The terminal device TE uses the original control method to send these non-standard AT commands. When the Modem device ME using the chip B is used, the Modem device ME using the chip B cannot recognize and execute the command at this time. If adaptation is required, the terminal device TE must modify the code to send a new AT command that can be recognized by the Modem device ME using chip B. In some cases, the terminal device TE vendor, for some reason (the code needs to be re-authenticated as described above), is difficult to modify the terminal device TE code.
另外,修改Modem设备ME侧的代码,同样需要一些时间来处理,并且有时候软件版本已经封闭的情况下,再进行修改也是不容易的。也就是说,采用相关技术方案的Modem设备和终端设备TE适配的通用性比较差。In addition, modifying the code on the ME side of the Modem device also takes some time to process, and sometimes it is not easy to modify the software version if it is already closed. That is to say, the versatility of the mode adaptation of the Modem device and the terminal device using the related technical solution is relatively poor.
发明内容Summary of the invention
本公开的目的在于提供一种接口控制命令的处理方法及调制解调器 Modem设备,解决相关技术中Modem设备ME和终端设备TE适配的通用性差的问题。An object of the present disclosure is to provide a method and a modem for processing an interface control command The Modem device solves the problem of poor versatility of the Modem device ME and the terminal device TE adaptation in the related art.
为了解决上述技术问题,本公开实施例提供一种接口控制命令的处理方法,应用于调制解调器Modem设备,所述处理方法包括:In order to solve the above technical problem, an embodiment of the present disclosure provides a method for processing an interface control command, which is applied to a modem modem device, and the processing method includes:
检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;Detecting whether the received interface control AT command is a command that the modem device can directly perform response processing;
在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行响应处理。In the case of no, the AT command is converted into a pending command that the modem device can directly perform response processing, and the response processing is performed according to the to-be-processed command.
可选的,所述检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令的步骤包括:Optionally, the step of detecting whether the received interface controls the AT command is a command that the modem device can directly perform response processing includes:
检测接收到的接口控制AT命令是否为通用AT命令;Detecting whether the received interface controls the AT command as a general AT command;
当接收到的接口控制AT命令为通用AT命令时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;When the received interface control AT command is a general AT command, it is determined that the received interface control AT command is a command that the modem device can directly perform response processing;
当接收到的接口控制AT命令为不通用的AT命令时检测接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型是否匹配;When the received interface controls the AT command to be a non-universal AT command, detecting whether the chip type indicated by the received interface control AT command matches the chip type of the Modem device;
当接收到的接口控制AT命令所指示调制解调器的芯片类型,与Modem设备的芯片类型匹配时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;When the received interface controls the chip type of the modem indicated by the AT command, and matches the chip type of the Modem device, determining that the received interface controls the AT command as a command that the Modem device can directly perform response processing;
当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型不匹配时,确定接收到的接口控制AT命令为Modem设备不能够直接进行响应处理的命令。When the received interface control AT command indicates that the chip type of the modem does not match the chip type of the Modem device, it is determined that the received interface control AT command is a command that the Modem device cannot directly perform response processing.
可选的,所述将所述AT命令转换为Modem能够直接进行响应处理的待处理命令的步骤包括:Optionally, the step of converting the AT command into a to-be-processed command that the Modem can directly perform response processing includes:
根据所述AT命令所指示调制解调器的芯片类型和Modem的芯片类型,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令。 And according to the chip type of the modem indicated by the AT command and the chip type of the Modem, converting the AT command into a pending command that the Modem device can directly perform response processing.
可选的,所述根据所述待处理命令进行响应处理的步骤包括:Optionally, the step of performing response processing according to the to-be-processed command includes:
在所述待处理命令的个数等于1时,直接根据所述待处理命令进行响应处理,并将处理结果响应给发送所述接口控制AT命令的终端设备;When the number of the to-be-processed commands is equal to 1, the response processing is directly performed according to the to-be-processed command, and the processing result is sent to the terminal device that sends the interface control AT command;
在所述待处理命令的个数大于1时,逐一对所述待处理命令进行响应处理,且根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作;When the number of the to-be-processed commands is greater than 1, the pair of the to-be-processed commands are processed in response, and the N+1th to-be-processed command is processed or terminated according to the response result of the Nth to-be-processed command. ;
其中,N为大于或等于1的正整数。Where N is a positive integer greater than or equal to 1.
可选的,所述根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作的步骤包括:Optionally, the step of responding or ending the N+1th to-be-processed command according to the response result of the Nth to-be-processed command includes:
在得到第N条待处理命令的处理结果为处理成功时,开始对第N+1条待处理命令进行响应处理,在得到所有的待处理命令的处理结果后,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备;When the processing result of the Nth to-be-processed command is successful, the response processing of the N+1th to-be-processed command is started, and after all the processing results of the to-be-processed command are obtained, the processing of converting the AT command is converted. Resulting, and responding to the terminal device that sends the interface control AT command;
在得到第N条待处理命令的处理结果为处理失败时,结束操作,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备。When the processing result of the Nth to-be-processed command is a processing failure, the operation is ended, the processing result of constructing the AT command is converted, and the processing result is returned to the terminal device that sends the interface control AT command.
本公开还提供了一种调制解调器Modem设备,所述Modem设备包括:The present disclosure also provides a modem Modem device, where the Modem device includes:
检测模块,设置为检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;The detecting module is configured to detect whether the received interface control AT command is a command that the modem device can directly perform response processing;
第一处理模块,设置为在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行响应处理。The first processing module is configured to convert the AT command into a pending command that the modem device can directly perform response processing, and perform response processing according to the to-be-processed command.
可选的,所述检测模块包括:Optionally, the detecting module includes:
第一检测子模块,设置为检测接收到的接口控制AT命令是否为通用AT命令;a first detecting submodule configured to detect whether the received interface controls whether the AT command is a general AT command;
第一确定子模块,设置为当接收到的接口控制AT命令为通用AT命令时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应 处理的命令;The first determining submodule is configured to determine that the received interface controls the AT command to directly respond to the Modem device when the received interface controls the AT command to be a general AT command. Processed command;
第二检测子模块,设置为当接收到的接口控制AT命令为不通用的AT命令时,检测接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型是否匹配;The second detecting submodule is configured to: when the received interface controls the AT command to be a non-universal AT command, detecting whether the chip type of the modem indicated by the received interface control AT command matches the chip type of the Modem device;
第二确定子模块,设置为当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型匹配时,确定接收到的接口控制AT命令为Modem能够直接进行响应处理的命令;a second determining submodule, configured to determine, when the received interface control AT command indicates that the chip type of the modem matches the chip type of the modem device, determining that the received interface control AT command is a command that the modem can directly perform response processing;
第三确定子模块,设置为当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型不匹配时,确定接收到的接口控制AT命令为Modem设备不能够直接进行响应处理的命令。The third determining submodule is configured to: when the chip type of the modem indicated by the received interface control AT command does not match the chip type of the modem device, determine that the received interface controls the AT command to be unable to directly perform response processing on the modem device. command.
可选的,所述第一处理模块包括:Optionally, the first processing module includes:
第一处理子模块,设置为根据所述AT命令所指示调制解调器的芯片类型和Modem设备的芯片类型,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令。The first processing submodule is configured to convert the AT command into a pending command that the modem device can directly perform response processing according to the chip type of the modem indicated by the AT command and the chip type of the Modem device.
可选的,所述第一处理模块包括:Optionally, the first processing module includes:
第二处理子模块,设置为在所述待处理命令的个数等于1时,直接根据所述待处理命令进行响应处理,并将处理结果响应给发送所述接口控制AT命令的终端设备;The second processing sub-module is configured to perform response processing according to the to-be-processed command directly when the number of the to-be-processed commands is equal to 1, and respond to the terminal device that sends the interface control AT command;
第三处理子模块,设置为在所述待处理命令的个数大于1时,逐一对所述待处理命令进行响应处理,且根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作;And the third processing sub-module is configured to perform response processing on the pair of the to-be-processed commands one by one when the number of the to-be-processed commands is greater than 1, and to wait for the N+1th item according to the response result of the Nth to-be-processed command Processing the command for response processing or ending the operation;
其中,N为大于或等于1的正整数。Where N is a positive integer greater than or equal to 1.
可选的,所述第三处理子模块包括:Optionally, the third processing submodule includes:
第一处理单元,设置为在得到第N条待处理命令的处理结果为处理成功时,开始对第N+1条待处理命令进行响应处理,在得到所有的待处理命令的处理结果后,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备; The first processing unit is configured to start responding to the (N+1)th pending processing command when the processing result of the Nth to-be-processed command is successful, and after all the processing results of the to-be-processed command are obtained, converting Constructing a processing result of the AT command, and responding the processing result to a terminal device that sends the interface control AT command;
第二处理单元,设置为在得到第N条待处理命令的处理结果为处理失败时,结束操作,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备。The second processing unit is configured to, when the processing result of the Nth to-be-processed command is a processing failure, end the operation, convert the processing result of constructing the AT command, and respond to the sending of the interface control AT command by the processing result Terminal Equipment.
在本公开实施例中,还提供了一种存储介质,该存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的接口控制命令的处理方法。In the embodiment of the present disclosure, a storage medium is further provided, and the storage medium may store an execution instruction for executing a processing method of the interface control command in the foregoing embodiment.
本公开的上述技术方案的有益效果如下:The beneficial effects of the above technical solutions of the present disclosure are as follows:
上述方案中,所述接口控制命令的处理方法通过检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行对应的响应处理;使得Modem设备ME,可以通用适配不同的终端设备,减少不必要的再开发过程;解决了相关技术中Modem设备ME和终端设备TE适配的通用性差的问题,同时,提高了产品的市场竞争力,更好的满足了客户需求。In the above solution, the processing method of the interface control command can detect whether the AT command is a command that the modem device can directly perform response processing by detecting the received interface; if not, converting the AT command to a Modem device can directly respond Processing the pending command, and performing corresponding response processing according to the to-be-processed command; so that the Modem device ME can be universally adapted to different terminal devices, thereby reducing unnecessary re-development process; and solving the related technology in the Modem device ME and The problem of poor versatility of the terminal device TE adaptation, at the same time, improves the market competitiveness of the product and better meets the customer's needs.
附图说明DRAWINGS
图1是相关技术中Modem设备ME与终端设备TE连接示意图;1 is a schematic diagram of a connection between a Modem device ME and a terminal device TE in the related art;
图2为本公开实施例一的接口控制命令的处理方法流程示意图;2 is a schematic flowchart of a method for processing an interface control command according to Embodiment 1 of the present disclosure;
图3为本公开实施例一的Modem设备ME与终端设备TE连接示意图;3 is a schematic diagram of a connection between a Modem device ME and a terminal device TE according to Embodiment 1 of the present disclosure;
图4为本公开实施例一的命令适配模块结构示意图;4 is a schematic structural diagram of a command adaptation module according to Embodiment 1 of the present disclosure;
图5为本公开实施例一中命令适配模块内部的命令转换流程示意图;FIG. 5 is a schematic flowchart of a command conversion process inside a command adaptation module according to Embodiment 1 of the present disclosure;
图6为本公开实施例二的Modem设备结构示意图。FIG. 6 is a schematic structural diagram of a Modem device according to Embodiment 2 of the present disclosure.
具体实施方式detailed description
为使本公开要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。The technical problems, the technical solutions, and the advantages of the present invention will be more clearly described in conjunction with the accompanying drawings and specific embodiments.
本公开针对相关的技术中Modem设备ME和终端设备TE适配的通 用性差的问题,提供了多种解决方案,具体如下:The disclosure is directed to the adaptation of the Modem device ME and the terminal device TE in the related art. The problem of poor usability provides a variety of solutions, as follows:
实施例一Embodiment 1
如图2所示,本公开实施例一提供的接口控制命令的处理方法,应用于调制解调器Modem设备,所述处理方法包括:As shown in FIG. 2, a method for processing an interface control command according to Embodiment 1 of the present disclosure is applied to a modem Modem device, where the processing method includes:
步骤21:检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;Step 21: Detect whether the received interface control AT command is a command that the modem device can directly perform response processing.
步骤22:在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行响应处理。Step 22: In the case of No, the AT command is converted into a pending command that the Modem device can directly perform response processing, and the response processing is performed according to the to-be-processed command.
可以是根据命令转换表将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令。命令转换表可根据相关的各种芯片的命令集得到,在此不再详述。The AT command may be converted into a to-be-processed command that the modem device can directly perform response processing according to the command conversion table. The command conversion table can be obtained according to the relevant command set of various chips, and will not be described in detail herein.
本公开实施例一提供的所述接口控制命令的处理方法通过检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行对应的响应处理;使得Modem设备ME,可以通用适配不同的终端设备,减少不必要的再开发过程;解决了相关技术中Modem设备ME和终端设备TE适配的通用性差的问题,同时,提高了产品的市场竞争力,更好的满足了客户需求。The method for processing the interface control command provided by the first embodiment of the present disclosure can detect whether the AT command is a command that the modem device can directly perform response processing by detecting the received interface; if not, converting the AT command to a Modem device can Directly performing the response processing of the pending command, and performing corresponding response processing according to the to-be-processed command; so that the Modem device ME can be universally adapted to different terminal devices, thereby reducing unnecessary re-development process; and solving the related technology Modem The problem of poor versatility of the device ME and the terminal device TE adaptation, at the same time, improves the market competitiveness of the product and better satisfies the customer's needs.
具体的,所述检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令的步骤包括:检测接收到的接口控制AT命令是否为通用AT命令;当接收到的接口控制AT命令为通用AT命令时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;当接收到的接口控制AT命令为不通用的AT命令时,检测接收到的接口控制AT命令所指示调制解调器的芯片类型,与Modem设备的芯片类型是否匹配;Specifically, the step of detecting whether the received interface control AT command is a command that the modem device can directly perform response processing includes: detecting whether the received interface control AT command is a general AT command; and when the received interface controls the AT command When the command is a general AT, it is determined that the received interface control AT command is a command that the modem device can directly perform response processing; when the received interface controls the AT command to be a non-universal AT command, detecting the received interface to control the AT command. Indicates the chip type of the modem, whether it matches the chip type of the Modem device;
当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型匹配时,确定接收到的接口控制AT命令为Modem设备 能够直接进行响应处理的命令;当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型不匹配时,确定接收到的接口控制AT命令为Modem设备不能够直接进行响应处理的命令。When the received interface controls the AT command to indicate that the chip type of the modem matches the chip type of the Modem device, it is determined that the received interface controls the AT command as a Modem device. The command capable of directly performing response processing; when the received interface controls the AT command to indicate that the chip type of the modem does not match the chip type of the Modem device, it is determined that the received interface controls the AT command to be unable to directly perform response processing on the Modem device. command.
其中,在AT命令为Modem设备不能直接进行响应处理的命令时,暗含着所述AT命令所指示调制解调器的芯片类型和Modem设备的芯片类型不匹配(不相同);所以,本实施例中,所述将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令的步骤包括:根据所述AT命令所指示调制解调器的芯片类型和Modem设备的芯片类型,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令。The chip type of the modem indicated by the AT command and the chip type of the modem device do not match (not the same) when the AT command is a command that the modem device cannot directly perform the response processing; therefore, in this embodiment, The step of converting the AT command into a pending command that the modem device can directly perform response processing includes: converting the AT command to a Modem device according to a chip type of the modem indicated by the AT command and a chip type of the Modem device A pending command that can directly perform response processing.
考虑到实际应用中,相对应的不同芯片的AT命令个数可能不同,所以,本实施例中,所述根据所述待处理命令进行响应处理的步骤包括:在所述待处理命令的个数等于1时,直接根据所述待处理命令进行响应处理,并将处理结果响应给发送所述接口控制AT命令的终端设备;In the actual application, the number of the AT commands of the different chips may be different. Therefore, in the embodiment, the step of performing the response processing according to the to-be-processed command includes: the number of the to-be-processed commands When the value is equal to 1, the response processing is directly performed according to the to-be-processed command, and the processing result is sent to the terminal device that sends the interface control AT command;
在所述待处理命令的个数大于1时,逐一对所述待处理命令进行响应处理,且根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作(在得到一个待处理命令的处理结果后,再开始对另一待处理命令进行响应处理);其中,N为大于或等于1的正整数。When the number of the to-be-processed commands is greater than 1, the pair of the to-be-processed commands are processed in response, and the N+1th to-be-processed command is processed or terminated according to the response result of the Nth to-be-processed command. (After obtaining the processing result of a pending command, the response processing of another pending command is started); wherein N is a positive integer greater than or equal to 1.
具体的,所述根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作的步骤包括:在得到第N条待处理命令的处理结果为处理成功时,开始对第N+1条待处理命令进行响应处理,在得到所有的待处理命令的处理结果后,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备;Specifically, the step of performing a response processing or an ending operation on the N+1th to-be-processed command according to the response result of the Nth to-be-processed command includes: when the processing result of the Nth to-be-processed command is successful, The response processing of the N+1th to-be-processed command is started. After all the processing results of the to-be-processed command are obtained, the processing result of the AT command is converted and the processing result is sent to the interface to control the AT command. Terminal Equipment;
在得到第N条待处理命令的处理结果为处理失败时,结束操作,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备。When the processing result of the Nth to-be-processed command is a processing failure, the operation is ended, the processing result of constructing the AT command is converted, and the processing result is returned to the terminal device that sends the interface control AT command.
也就是,在处理过程中,不管所有的待处理命令有没有处理完毕,只要出现有的待处理命令的处理结果为处理失败时,就结束操作,转换构建 AT命令的处理结果。That is, during the processing, regardless of whether all the pending commands have been processed, as long as there is a pending processing result of the pending processing, the operation ends, and the conversion is completed. The processing result of the AT command.
为了保证方案的完整性,本实施例提供的方案还包括:在是时,直接对所述AT命令进行对应的响应处理。In order to ensure the integrity of the solution, the solution provided by this embodiment further includes: when yes, directly responding to the AT command.
也就是接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令时,直接进行对应的响应处理。That is, when the received interface control AT command is a command that the modem device can directly perform response processing, the corresponding response processing is directly performed.
考虑到可能会出现短时间内接收到过多的AT命令,本实施例提供的方案还包括:缓存接收到的接口控制AT命令。Considering that an excessive number of AT commands may be received in a short time, the solution provided by this embodiment further includes: buffering the received interface to control the AT command.
下面对本公开实施例一提供的接口控制命令的处理方法进行说明。The method for processing the interface control command provided in the first embodiment of the present disclosure will be described below.
本公开实施例一提供的方案可通过如图3所示的Modem设备实现,本公开实施例的Modem设备ME内部,新增一个命令适配模块;如图4所示,该命令适配模块的内部包括命令缓冲区,命令转换表和命令转换算法模块;其中命令转换算法模块是核心。The solution provided by the first embodiment of the present disclosure can be implemented by using a Modem device as shown in FIG. 3, and a command adaptation module is added to the Modem device ME of the embodiment of the present disclosure; as shown in FIG. 4, the command adaptation module is The internal includes a command buffer, a command conversion table, and a command conversion algorithm module; wherein the command conversion algorithm module is the core.
如图3所示,终端设备TE发送AT命令请求到USB接口,Modem设备ME从USB接口接收到AT命令请求A后,不直接发送给芯片B的命令处理模块,而是先发送给Modem设备ME的命令适配模块。命令适配模块将该AT命令请求A转换后形成新的AT命令请求B,并下发给芯片B的命令处理模块进行处理。待芯片B的命令处理模块处理结束后,将处理结果,也就是AT命令响应B返回给命令适配模块,命令适配模块再将该AT命令响应B转换成与AT命令请求A相适应的AT命令响应A,再返回到USB接口,最终终端设备TE收到AT命令响应A,从而获取到处理结果,再根据该处理结果,进行后续处理。As shown in FIG. 3, the terminal device TE sends an AT command request to the USB interface. After receiving the AT command request A from the USB interface, the modem device ME does not directly send the command processing module to the chip B, but first sends it to the Modem device ME. Command adaptation module. The command adaptation module converts the AT command request A to form a new AT command request B, and sends the command to the command processing module of the chip B for processing. After the processing of the command processing module of the chip B is finished, the processing result, that is, the AT command response B is returned to the command adaptation module, and the command adaptation module converts the AT command response B into an AT adapted to the AT command request A. The command responds to A, and then returns to the USB interface. Finally, the terminal device TE receives the AT command response A, thereby obtaining the processing result, and then performing subsequent processing according to the processing result.
具体的,如图4所示,命令适配模块接收到AT命令请求A后,先缓存到命令缓冲区;命令转换算法模块依次从命令缓冲区获取AT命令请求,在获取到AT命令请求A后,根据内部算法处理结果,到命令转换表中去查询,获得相应的转换后的AT命令请求B,再将AT命令请求B输出。当收到AT命令响应B后,也是根据内部算法处理结果,到命令转换表中去查询,获得相应的转换后的AT命令响应A,再将该AT命令响应A发 送到命令缓冲区,待最后返回给终端设备TE。Specifically, as shown in FIG. 4, after receiving the AT command request A, the command adaptation module first caches the command buffer; the command conversion algorithm module sequentially acquires the AT command request from the command buffer, and after obtaining the AT command request A, According to the internal algorithm processing result, to the command conversion table to query, obtain the corresponding converted AT command request B, and then the AT command request B output. After receiving the AT command response B, it also according to the internal algorithm processing result, to the command conversion table to query, obtain the corresponding converted AT command response A, and then send the AT command response A It is sent to the command buffer and is finally returned to the terminal device TE.
如图5所示,命令转换算法模块的处理流程包括:As shown in FIG. 5, the processing flow of the command conversion algorithm module includes:
步骤51:根据输入的AT命令请求A的名称,判断该AT命令请求A是否是通用的协议AT,若是,进入步骤52,若否,进入步骤53。Step 51: According to the name of the input AT command request A, determine whether the AT command request A is a general protocol AT, and if yes, go to step 52, if no, go to step 53.
也就是判断该命令是通用的协议AT,还是非通用的芯片专用AT命令。That is, it is judged whether the command is a general-purpose protocol AT or a non-generic chip-specific AT command.
步骤52:该AT命令请求A不需要转换,直接下发给芯片B的命令处理模块进行处理,并在收到命令响应A(命令响应B与A等同,不需转换)后返回。Step 52: The AT command request A does not need to be converted, and is directly sent to the command processing module of the chip B for processing, and returns after receiving the command response A (the command response B is equivalent to A and does not need to be converted).
步骤53:获取该AT命令请求A所属的芯片A。Step 53: Acquire the chip A to which the AT command requests A belongs.
一般情况下,通过终端设备TE发的前几个AT命令请求就可以获知该终端设备TE下发的是属于哪个芯片的AT命令,例如设置终端设置进行启动的AT命令,一般各个芯片厂商都是不一样的,因此一开始就可以判断出当前的终端设备TE的芯片类型了。后续的命令下发就不需要再进行重复判断。例如,该AT命令请求A属于芯片A的专用AT命令。In general, the AT commands sent by the terminal device TE can be used to know which chip the AT command is sent by the terminal device TE. For example, the AT command for setting the terminal to start is generally used by each chip manufacturer. Not the same, so the chip type of the current terminal device TE can be judged from the beginning. Subsequent commands are not required to be repeated. For example, the AT command requests A to belong to the dedicated AT command of chip A.
步骤54:获取当前Modem设备ME内部的芯片B。Step 54: Obtain the chip B inside the current Modem device ME.
步骤55:根据芯片A和芯片B判断AT命令请求A是否需要转换,若否(芯片A和芯片B实质是同一种芯片),进入步骤52;若是(芯片A和芯片B实质是不同类型的芯片),进入步骤56。Step 55: Determine whether the AT command request A needs to be converted according to the chip A and the chip B. If not (the chip A and the chip B are substantially the same chip), proceed to step 52; if (the chip A and the chip B are substantially different types of chips) ), proceed to step 56.
步骤56:查询命令转换表,将AT命令请求A转换为AT命令请求B后输出。Step 56: Query the command conversion table, and convert the AT command request A into the AT command request B and output.
具体的,查询将芯片A转换为芯片B的AT命令请求转换表。Specifically, the query converts the chip A into the AT command request conversion table of the chip B.
步骤57:判断AT命令请求B的个数是否为多个,若否,进入步骤58,若是,进入步骤510。Step 57: It is determined whether the number of AT command requests B is plural. If not, the process proceeds to step 58, and if yes, the process proceeds to step 510.
步骤58:AT命令请求B的个数为一个,下发给芯片B的命令处理模块进行处理。Step 58: The number of the AT command request B is one, and is sent to the command processing module of the chip B for processing.
步骤59:在收到命令响应B后,将命令响应B转换为命令响应A,返回给终端设备TE。 Step 59: After receiving the command response B, the command response B is converted into the command response A, and returned to the terminal device TE.
待芯片B返回处理结果,也就是命令响应B后,再次查询命令转换表,具体的是查询将芯片B转换为芯片A的AT命令响应转换表,这个查询返回的命令响应也是1个,例如是命令响应A;将该命令响应A发送到命令缓冲区;等待传输给终端设备TE。After the chip B returns the processing result, that is, after the command response B, the command conversion table is queried again, specifically, the query converts the chip B into the AT command response conversion table of the chip A, and the command response returned by the query is also one, for example, The command responds to A; the command responds to A to the command buffer; it waits for transmission to the terminal device TE.
步骤510:AT命令请求B的个数大于1,这里以2个为例,包括命令请求B1和命令请求B2;先下发命令请求B1。Step 510: The number of the AT command request B is greater than 1, where two are used as an example, including the command request B1 and the command request B2; the command request B1 is first issued.
步骤511:待芯片B返回命令响应B1后,判断命令响应B1是否为OK,若是,进入步骤513,若否,进入步骤512。Step 511: After the chip B returns to the command response B1, it is determined whether the command response B1 is OK. If yes, the process proceeds to step 513. If no, the process proceeds to step 512.
也就是,待芯片B返回命令响应B1后,先不进行查询和向终端设备TE返回的操作,而是根据命令响应B1的结果判断是否需要继续下发命令请求B2。如果命令响应B1返回错误,进入步骤512;如果命令响应B1返回正常,进入步骤513。That is, after the chip B returns the command response B1, the query and the operation returned to the terminal device TE are not performed first, but the result of the command response B1 is determined whether it is necessary to continue to issue the command request B2. If the command response B1 returns an error, go to step 512; if the command response B1 returns to normal, go to step 513.
步骤512:根据命令响应B1进行命令转换表的查询和返回命令响应A的操作,不再下发命令请求B2。Step 512: Perform the query of the command conversion table and the operation of the return command response A according to the command response B1, and no longer issue the command request B2.
步骤513:继续下发命令请求B2。Step 513: Continue to issue the command request B2.
步骤514:待收到命令响应B2后,根据命令响应B1和命令响应B2,进行命令转换表的查询和返回命令请求A的操作。Step 514: After receiving the command response B2, according to the command response B1 and the command response B2, the query of the command conversion table and the operation of the return command request A are performed.
图5所示的命令转换算法仅需要处理一转一和一转多的AT命令转换,对于多对一的AT命令转换,本公开考虑到AT机制不允许连续下发AT命令,只有当前AT命令请求收到AT命令响应后,才可以下发新的AT命令请求,因此对于多对一的情况,逐一处理即可。The command conversion algorithm shown in FIG. 5 only needs to process the AT command conversion of one turn and one turn. For the many-to-one AT command conversion, the present disclosure considers that the AT mechanism does not allow continuous delivery of AT commands, only the current AT command. After the request receives the AT command response, the new AT command request can be issued, so for the case of many-to-one, one by one can be processed.
另外,上述提及的命令转换表可如下表所示,包含AT命令请求、终端设备TE芯片类型、Modem设备ME芯片类型、转换后的AT命令请求数目和转换后的AT命令请求等参数。该表的AT命令对应关系是根据对不同芯片的AT命令的具体功能进行分析后得出的,由于每个芯片的命令集是公知的,所以技术人员可根据所需自行获取,在此不再赘述。In addition, the command conversion table mentioned above may be as shown in the following table, including parameters such as an AT command request, a terminal device TE chip type, a Modem device ME chip type, a converted AT command request number, and a converted AT command request. The AT command correspondence of the table is obtained based on the analysis of the specific functions of the AT commands of different chips. Since the command set of each chip is well known, the technician can obtain it according to the needs, and no longer Narration.
下表以“+premode”和“+cops”这2个AT命令为例进行说明: The following table uses the two AT commands "+premode" and "+cops" as an example:
Figure PCTCN2017105864-appb-000001
Figure PCTCN2017105864-appb-000001
下面对本公开实施例提供的接口控制命令的处理方法进行具体应用举例说明。The specific application examples of the processing method of the interface control command provided by the embodiment of the present disclosure are described below.
举例一Example one
假设,终端设备TE此前适配的是高通芯片的Modem设备ME,本次适配的依然是高通芯片的Modem设备ME:Assume that the terminal device TE is previously adapted to the Modem device ME of the Qualcomm chip, and this time the adapter is still the Modem device ME of the Qualcomm chip:
终端设备TE下发AT命令请求A到USB接口;Modem设备ME从USB接口接收到AT命令请求A后,发送给命令适配模块;命令适配模块内的命令缓冲区先将该AT命令请求A缓存,待命令转换算法模块提取;命令转换算法模块提取后,判断该AT命令请求A属于高通芯片的AT命令请求或者通用AT命令请求;并且判断Modem设备ME内的芯片是高通芯片(可以将该Modem设备ME内的芯片类型预置在配置项中,读取该配置项即可判断芯片类型),因此不进行AT命令请求的转换,直接下发给芯片内的命令处理模块;The terminal device TE sends an AT command to request A to the USB interface; after receiving the AT command request A from the USB interface, the modem device ME sends the command to the command adaptation module; the command buffer in the command adaptation module first requests the A command from the AT command. The cache is to be extracted by the command conversion algorithm module; after the command conversion algorithm module extracts, it is determined that the AT command request A belongs to the AT command request of the Qualcomm chip or the general AT command request; and the chip in the Modem device ME is determined to be a Qualcomm chip (may be The chip type in the Modem device ME is preset in the configuration item, and the configuration item can be read to determine the chip type. Therefore, the conversion of the AT command request is not performed, and is directly sent to the command processing module in the chip;
芯片内的命令处理模块执行结束后,返回AT命令响应A;命令转换算法模块收到AT命令响应A后,通过USB接口返回给终端设备TE;终端设备TE收到AT命令响应A后,该AT命令请求执行完毕。After the execution of the command processing module in the chip, the AT command response A is returned; after receiving the AT command response A, the command conversion algorithm module returns to the terminal device TE through the USB interface; after the terminal device TE receives the AT command response A, the AT The command request is executed.
其中,由于不同芯片在初始化阶段的AT命令一般是不同的,通过提取这些AT命令的名称即可判断出当前所适配的终端设备TE的芯片类型,并将终端设备TE的芯片类型记录在Modem设备ME中;The AT command of the terminal device TE can be determined by extracting the names of the AT commands, and the chip type of the terminal device TE is recorded in the Modem. Equipment ME;
举例二 Example two
假如:终端设备TE此前适配的是高通芯片的Modem设备ME,本次适配的是MTK芯片的Modem设备ME,但是具体的下发的是通用的AT命令,则处理过程同举例一,在此不再复述。If the terminal device TE is previously adapted to the Modem device ME of the Qualcomm chip, this time is adapted to the Modem device ME of the MTK chip, but the specific AT command is issued, and the processing procedure is the same as the example one. This is not repeated.
举例三Example three
假如:终端设备TE此前适配的是高通芯片的Modem设备ME,本次适配的是MTK芯片的Modem设备ME,具体的需要将高通芯片的1个AT命令转换为1个MTK芯片的AT命令,这里以高通芯片的AT命令+prefmode为例,该命令需要转换为MTK的AT命令+erat:If the terminal device TE is previously adapted to the Modem device ME of the Qualcomm chip, this time is adapted to the Modem device ME of the MTK chip. Specifically, the AT command of the Qualcomm chip needs to be converted into an AT command of one MTK chip. Here, taking the AT command +prefmode of the Qualcomm chip as an example, the command needs to be converted to MTK's AT command +erat:
终端设备TE下发AT命令请求+premode到USB接口;Modem设备ME从USB接口接收到AT命令请求+prefmode后,发送给命令适配模块;命令适配模块内的命令缓冲区先将该AT命令请求+prefmode缓存,待命令转换算法模块提取;The terminal device TE sends an AT command request +premode to the USB interface; after receiving the AT command request +prefmode from the USB interface, the modem device ME sends the command to the command adaptation module; the command buffer in the command adaptation module first sends the AT command. Request +prefmode cache, to be extracted by the command conversion algorithm module;
命令转换算法模块提取后,根据该AT命令请求的名称prefmode,判断该AT命令请求+prefmode为属于高通芯片的AT命令请求;查询当前Modem设备ME的配置项,判断Modem设备ME内的芯片为MTK芯片,因此需要进行AT命令请求的转换,查询如上所示的命令转换表;After the command conversion algorithm module extracts, according to the name prefmode of the AT command request, it is determined that the AT command request +prefmode is an AT command request belonging to the Qualcomm chip; the configuration item of the current Modem device ME is queried, and the chip in the Modem device ME is determined to be MTK. Chip, therefore need to perform the conversion of the AT command request, query the command conversion table shown above;
命令转换算法模块根据AT命令请求名称、终端设备TE芯片类型和Modem设备ME芯片类型,查询命令转换表可以得到转换后的AT命令请求+erat,并将+erat下发给芯片内的命令处理模块;The command conversion algorithm module requests the name, the terminal device TE chip type, and the modem device ME chip type according to the AT command, and the query command conversion table can obtain the converted AT command request +erat, and sends the +erat to the command processing module in the chip. ;
芯片内的命令处理模块执行结束后,返回AT命令响应OK;命令转换算法模块收到AT命令响应OK后,判断是否需要进行AT命令响应的转换,在本具体实施例中,不需要转换(只是涉及简单的响应,比如是否能够执行、通信等,OK是通用的,当涉及实质通信内容时,需要转换,因为可能各种芯片的参数不同);After the execution of the command processing module in the chip, the AT command response OK is returned; after receiving the AT command response OK, the command conversion algorithm module determines whether the AT command response conversion is needed. In this embodiment, no conversion is required (only Involving a simple response, such as whether it can be executed, communicated, etc., OK is universal, when it involves substantial communication content, it needs to be converted, because the parameters of various chips may be different);
命令转换算法模块将AT命令响应OK,通过USB接口返回给终端设备TE;终端设备TE收到AT命令响应OK后,该AT命令请求执行完毕。The command conversion algorithm module returns the AT command to OK, and returns to the terminal device TE through the USB interface; after the terminal device TE receives the AT command response OK, the AT command request is completed.
举例四 Example four
假如:终端设备TE此前适配的是高通芯片的Modem设备ME,本次适配的是MTK芯片的Modem设备ME,具体的需要将高通芯片的1个AT命令转换为2个MTK芯片的AT命令,这里以高通芯片的AT命令+cops为例,该命令需要转换为MTK的+cops和+erat。该实例与上面实例的主要区别在于命令转换算法模块的处理:If the terminal device TE is previously adapted to the Modem device ME of the Qualcomm chip, this time is adapted to the Modem device ME of the MTK chip. Specifically, one AT command of the Qualcomm chip needs to be converted into an AT command of two MTK chips. Here, taking the AT command +cops of Qualcomm chip as an example, the command needs to be converted to +cops and +erat of MTK. The main difference between this example and the above example is the processing of the command conversion algorithm module:
终端设备TE下发AT命令请求+cops到USB接口;Modem设备ME从USB接口接收到AT命令请求+cops后,发送给命令适配模块;命令适配模块内的命令缓冲区先将该AT命令请求+cops缓存,待命令转换算法模块提取;The terminal device TE sends an AT command request +cops to the USB interface; after receiving the AT command request +cops from the USB interface, the modem device ME sends the command to the command adaptation module; the command buffer in the command adaptation module first sends the AT command. Request +cops cache, to be extracted by the command conversion algorithm module;
命令转换算法模块提取后,根据此前判断出的当前终端设备TE的芯片类型,判断该AT命令请求+cops是属于高通芯片的AT命令请求(由于不同芯片在初始化阶段的AT命令一般是不同的,通过提取这些AT命令的名称即可判断出当前所适配的终端设备TE的类型,并将终端设备TE的类型记录在Modem设备ME中);After the command conversion algorithm module extracts, according to the chip type of the current terminal device TE that is previously determined, it is determined that the AT command request +cops is an AT command request belonging to the Qualcomm chip (since the AT commands of different chips in the initialization phase are generally different, By extracting the names of the AT commands, the type of the currently adapted terminal device TE can be determined, and the type of the terminal device TE is recorded in the Modem device ME);
查询当前Modem设备ME类型的配置项,判断Modem设备ME内的芯片是MTK芯片,因此需要进行AT命令请求的转换,查询如上所示的命令转换表;Query the configuration item of the ME type of the current modem device, and determine that the chip in the Modem device ME is an MTK chip. Therefore, the conversion of the AT command request is required, and the command conversion table shown above is queried;
命令转换算法模块根据AT命令请求名称、终端设备TE芯片类型和Modem设备ME芯片类型,查询命令转换表可以得到转换后的AT命令请求+cops和+erat,先将第1个转换后的AT命令请求+cops下发给芯片内的命令处理模块;The command conversion algorithm module requests the name, the terminal device TE chip type, and the modem device ME chip type according to the AT command, and the query command conversion table can obtain the converted AT command request +cops and +erat, and first convert the first converted AT command. Request +cops to be sent to the command processing module in the chip;
芯片内的命令处理模块执行结束后,返回AT命令响应OK;命令转换算法模块收到第1个AT命令响应OK后,下发AT命令请求+erat给芯片内的命令处理模块(如果接收到的第1个AT命令响应是ERROR,那么不需要下发AT命令请求+erat,而是直接将该ERROR返回给终端设备TE);After the execution of the command processing module in the chip, the AT command returns OK; after receiving the first AT command response OK, the command conversion algorithm module sends an AT command request +erat to the command processing module in the chip (if received) The response of the first AT command is ERROR, then the AT command is not required to be sent +erat, but the ERROR is directly returned to the terminal device TE);
芯片内的命令处理模块执行结束后,返回AT命令响应OK;命令转 换算法模块收到第2个AT命令响应OK后,判断是否需要进行AT命令响应的转换,在本具体实施例中,不需要转换(理由同举例三中的相关内容);After the execution of the command processing module in the chip, return the AT command response OK; command to After receiving the second AT command response OK, the algorithm module determines whether it is necessary to perform the conversion of the AT command response. In this embodiment, no conversion is required (the reason is the same as the content in the third example);
命令转换算法模块将AT命令响应OK,通过USB接口返回给终端设备TE;终端设备TE收到AT命令响应OK后,该AT命令请求执行完毕。The command conversion algorithm module returns the AT command to OK, and returns to the terminal device TE through the USB interface; after the terminal device TE receives the AT command response OK, the AT command request is completed.
由上可知,本实施例的方案在相关Modem上提供一个AT命令的匹配转换方法,可以让客户在使用Modem的时候,忽视不同芯片所带来的控制方法的区别,最大程度的减小给客户带来的影响,从而提升产品的竞争力和灵活性。It can be seen from the above that the solution of this embodiment provides an AT command matching conversion method on the relevant Modem, which allows the customer to ignore the difference of the control methods brought by different chips when using the Modem, and minimize the reduction to the client. The impact of this, thereby enhancing the competitiveness and flexibility of the product.
综上所述,相对于相关方案,本公开实施例提出的方案,可以使得Modem设备ME通用的适配不同的终端设备,减少不必要的再开发过程,提高用户的使用感受;In summary, the solution proposed by the embodiment of the present disclosure can make the Modem device ME universally adapt to different terminal devices, reduce unnecessary re-development process, and improve user experience;
比如:终端设备此前适配的是高通芯片的Modem设备ME,因此终端设备中的代码执行的有一部分是高通芯片的专用AT命令,相关技术方案下,如果要适配采用MTK芯片的Modem设备ME,那么要么修改终端设备代码,要么重新开发MTK芯片Modem设备ME的软件版本,而这些修改要么费事费力,要么是根本不可能被客户接收;For example, the terminal device is previously adapted to the Modem device ME of the Qualcomm chip. Therefore, part of the code execution in the terminal device is a dedicated AT command of the Qualcomm chip. Under the related technical solution, if the Modem device ME using the MTK chip is to be adapted, , then either modify the terminal device code, or re-develop the software version of the MTK chip Modem device ME, and these modifications are either laborious or impossible to receive by the customer;
而采用本公开的方案,采用MTK芯片的Modem设备ME可以很容易的替换高通芯片的Modem设备ME,而不需要修改终端设备的代码,从而提高产品的市场竞争力,满足客户需求。With the solution of the present disclosure, the Modem device ME using the MTK chip can easily replace the Modem device ME of the Qualcomm chip without modifying the code of the terminal device, thereby improving the market competitiveness of the product and satisfying the customer's needs.
实施例二Embodiment 2
如图6所示,本公开实施例二提供一种调制解调器Modem设备,包括:As shown in FIG. 6, a second embodiment of the present disclosure provides a modem modem device, including:
检测模块61,设置为检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;The detecting module 61 is configured to detect whether the received interface control AT command is a command that the modem device can directly perform response processing;
第一处理模块62,设置为在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行对应 的响应处理。The first processing module 62 is configured to convert the AT command into a pending command that the modem device can directly perform response processing, and correspondingly according to the to-be-processed command. Response processing.
可以是根据命令转换表将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令。命令转换表可根据相关的各种芯片的命令集得到,在此不再详述。The AT command may be converted into a to-be-processed command that the modem device can directly perform response processing according to the command conversion table. The command conversion table can be obtained according to the relevant command set of various chips, and will not be described in detail herein.
本公开实施例二提供的所述Modem设备通过检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行对应的响应处理;使得Modem设备ME,可以通用适配不同的终端设备,减少不必要的再开发过程;解决了相关技术中Modem设备ME和终端设备TE适配的通用性差的问题,同时,提高了产品的市场竞争力,更好的满足了客户需求。The Modem device provided by Embodiment 2 of the present disclosure can detect whether the AT command is a command that the Modem device can directly perform response processing by detecting the received interface; if not, converting the AT command to a Modem device can directly perform response processing. The pending command is processed according to the to-be-processed command; the modem device ME can be universally adapted to different terminal devices to reduce unnecessary re-development process; and the modem device ME and terminal in the related art are solved. The problem of poor versatility of the device TE adaptation, at the same time, improves the market competitiveness of the product and better meets the customer's needs.
具体的,所述检测模块包括:第一检测子模块,设置为检测接收到的接口控制AT命令是否为通用AT命令;第一确定子模块,设置为当接收到的接口控制AT命令为通用AT命令时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;第二检测子模块,设置为当接收到的接口控制AT命令为不通用的AT命令时,检测接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型是否匹配;Specifically, the detecting module includes: a first detecting submodule configured to detect whether the received interface controls the AT command as a general AT command; and the first determining submodule is configured to: when the received interface controls the AT command as a universal AT When the command is executed, it is determined that the received interface control AT command is a command that the modem device can directly perform response processing; and the second detection submodule is configured to detect when the received interface controls the AT command to be a non-universal AT command. The interface controls whether the chip type of the modem indicated by the AT command matches the chip type of the Modem device;
第二确定子模块,设置为当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型匹配时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;第三确定子模块,设置为当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型不匹配时,确定接收到的接口控制AT命令为Modem设备不能够直接进行响应处理的命令。a second determining sub-module, configured to: when the received interface control AT command indicates that the chip type of the modem matches the chip type of the modem device, determining that the received interface control AT command is a command that the modem device can directly perform response processing; The third determining submodule is configured to: when the chip type of the modem indicated by the received interface control AT command does not match the chip type of the modem device, determine that the received interface controls the AT command to be unable to directly perform response processing on the modem device. command.
其中,在AT命令转换为Modem设备不能够直接进行响应处理的命令时,暗含着所述AT命令所指示调制解调器的芯片类型和Modem设备的芯片类型不匹配(不相同);所以,本实施例中,所述第一处理模块包 括:第一处理子模块,设置为根据所述AT命令所指示调制解调器的芯片类型和Modem设备的芯片类型,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令。The chip type of the modem indicated by the AT command does not match the chip type of the modem device (not the same) when the AT command is converted to a command that the modem device cannot directly perform the response processing; therefore, in this embodiment, The first processing module package The first processing sub-module is configured to convert the AT command into a pending command that the modem device can directly perform response processing according to the chip type of the modem indicated by the AT command and the chip type of the Modem device.
考虑到实际应用中,相对应的不同芯片的AT命令个数可能不同,所以,本实施例中,所述第一处理模块包括:第二处理子模块,设置为在所述待处理命令的个数等于1时,直接根据所述待处理命令进行响应处理,并将处理结果响应给发送所述接口控制AT命令的终端设备;In the embodiment, the first processing module includes: a second processing sub-module, which is set to be in the to-be-processed command, in the actual application, the number of the AT commands of the different chips may be different. When the number is equal to 1, the response processing is directly performed according to the to-be-processed command, and the processing result is sent to the terminal device that sends the interface control AT command;
第三处理子模块,设置为在所述待处理命令的个数大于1时,逐一对所述待处理命令进行响应处理,且根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作(在得到一个待处理命令的处理结果后,再开始对另一待处理命令进行响应处理);其中,N为大于或等于1的正整数。And the third processing sub-module is configured to perform response processing on the pair of the to-be-processed commands one by one when the number of the to-be-processed commands is greater than 1, and to wait for the N+1th item according to the response result of the Nth to-be-processed command The processing command performs a response processing or an ending operation (after obtaining a processing result of a pending command, starting to respond to another pending processing command); wherein N is a positive integer greater than or equal to 1.
具体的,所述第三处理子模块包括:第一处理单元,设置为在得到第N条待处理命令的处理结果为处理成功时,开始对第N+1条待处理命令进行响应处理,在得到所有的待处理命令的处理结果后,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备;Specifically, the third processing sub-module includes: a first processing unit, configured to start responding to the (N+1)th to-be-processed command when the processing result of the Nth to-be-processed command is processed successfully, After obtaining the processing result of all the to-be-processed commands, converting the processing result of the AT command, and responding the processing result to the terminal device that sends the interface control AT command;
第二处理单元,设置为在得到第N条待处理命令的处理结果为处理失败时,结束操作,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备。The second processing unit is configured to, when the processing result of the Nth to-be-processed command is a processing failure, end the operation, convert the processing result of constructing the AT command, and respond to the sending of the interface control AT command by the processing result Terminal Equipment.
也就是,在处理过程中,不管所有的待处理命令有没有处理完毕,只要出现有的待处理命令的处理结果为处理失败时,就结束操作,转换构建AT命令的处理结果。That is, in the processing, regardless of whether all the pending commands have been processed, as long as the processing result of the pending command is a processing failure, the operation is ended, and the processing result of the AT command is converted.
为了保证方案的完整性,本实施例提供的方案还包括:第二处理模块,设置为在是时,直接对所述AT命令进行对应的响应处理。In order to ensure the integrity of the solution, the solution provided by this embodiment further includes: a second processing module, configured to perform corresponding response processing on the AT command directly when yes.
也就是接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令时,直接进行对应的响应处理。 That is, when the received interface control AT command is a command that the modem device can directly perform response processing, the corresponding response processing is directly performed.
其中,上述接口控制命令的处理方法的所述实现实施例均适用于该Modem设备的实施例中,也能达到相同的技术效果。The implementation examples of the foregoing method for processing an interface control command are applicable to the embodiment of the modem device, and the same technical effects can be achieved.
需要说明的是,此说明书中所描述的许多功能部件都被称为模块/子模块,以便更加特别地强调其实现方式的独立性。It should be noted that many of the functional components described in this specification are referred to as modules/sub-modules to more particularly emphasize the independence of their implementation.
本公开实施例中,模块/子模块可以用软件实现,以便由各种类型的处理器执行。举例来说,一个标识的可执行代码模块可以包括计算机指令的一个或多个物理或者逻辑块,举例来说,其可以被构建为对象、过程或函数。尽管如此,所标识模块的可执行代码无需物理地位于一起,而是可以包括存储在不同位里上的不同的指令,当这些指令逻辑上结合在一起时,其构成模块并且实现该模块的规定目的。In embodiments of the present disclosure, modules/sub-modules may be implemented in software for execution by various types of processors. For example, an identified executable code module can comprise one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored in different bits that, when logically combined, constitute a module and implement the provisions of the module. purpose.
实际上,可执行代码模块可以是单条指令或者是许多条指令,并且甚至可以分布在多个不同的代码段上,分布在不同程序当中,以及跨越多个存储器设备分布。同样地,操作数据可以在模块内被识别,并且可以依照任何适当的形式实现并且被组织在任何适当类型的数据结构内。所述操作数据可以作为单个数据集被收集,或者可以分布在不同位置上(包括在不同存储设备上),并且至少部分地可以仅作为电子信号存在于系统或网络上。In practice, the executable code module can be a single instruction or a plurality of instructions, and can even be distributed across multiple different code segments, distributed among different programs, and distributed across multiple memory devices. As such, operational data may be identified within the modules and may be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed at different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
在模块可以利用软件实现时,考虑到相关硬件工艺的水平,所以可以以软件实现的模块,在不考虑成本的情况下,本领域技术人员都可以搭建对应的硬件电路来实现对应的功能,所述硬件电路包括常规的超大规模集成(VLSI)电路或者门阵列以及诸如逻辑芯片、晶体管之类的相关半导体或者是其它分立的元件。模块还可以用可编程硬件设备,诸如现场可编程门阵列、可编程阵列逻辑、可编程逻辑设备等实现。When the module can be implemented by software, considering the level of the related hardware process, the module can be implemented in software, and the technician can construct the corresponding hardware circuit to realize the corresponding function without considering the cost. The hardware circuits include conventional Very Large Scale Integration (VLSI) circuits or gate arrays and related semiconductors such as logic chips, transistors, or other discrete components. The modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.
实施例三Embodiment 3
本公开的实施例还提供了一种存储介质。可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:Embodiments of the present disclosure also provide a storage medium. Optionally, in the present embodiment, the storage medium is arranged to store program code for performing the following steps:
S1,检测接收到的接口控制AT命令是否为Modem设备能够直接进 行响应处理的命令;S1, detecting whether the received interface controls the AT command to be a modem device directly Line response processing command;
S2,在否时,将AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据待处理命令进行响应处理。S2. In the case of no, the AT command is converted into a pending command that the modem device can directly perform response processing, and the response processing is performed according to the to-be-processed command.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:Optionally, the storage medium is further arranged to store program code for performing the following steps:
S1,检测接收到的接口控制AT命令是否为通用AT命令;S1. Detect whether the received interface controls whether the AT command is a general AT command.
S2,当接收到的接口控制AT命令为通用AT命令时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;S2, when the received interface control AT command is a general AT command, determining that the received interface control AT command is a command that the Modem device can directly perform response processing;
S3,当接收到的接口控制AT命令为不通用的AT命令时检测接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型是否匹配;S3, when the received interface controls the AT command to be a non-universal AT command, detecting whether the received interface control AT command indicates that the chip type of the modem matches the chip type of the Modem device;
S4,当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型匹配时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;S4, when the received interface control AT command indicates that the chip type of the modem matches the chip type of the modem device, determining that the received interface control AT command is a command that the modem device can directly perform response processing;
S5,当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型不匹配时,确定接收到的接口控制AT命令为Modem设备不能够直接进行响应处理的命令。S5. When the received interface control AT command indicates that the chip type of the modem does not match the chip type of the modem device, determine that the received interface control AT command is a command that the modem device cannot directly perform response processing.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:Optionally, the storage medium is further arranged to store program code for performing the following steps:
S1,根据AT命令所指示调制解调器的芯片类型和Modem设备的芯片类型,将AT命令转换为Modem设备能够直接进行响应处理的待处理命令。S1: Convert the AT command to a pending command that the Modem device can directly perform response processing according to the chip type of the modem indicated by the AT command and the chip type of the Modem device.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:Optionally, the storage medium is further arranged to store program code for performing the following steps:
S1,在待处理命令的个数等于1时,直接根据待处理命令进行响应处理,并将处理结果响应给发送接口控制AT命令的终端设备;S1, when the number of the to-be-processed commands is equal to 1, the response processing is directly performed according to the to-be-processed command, and the processing result is sent to the terminal device of the sending interface to control the AT command;
S2,在待处理命令的个数大于1时,逐一对待处理命令进行响应处理,且根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作S2, when the number of the to-be-processed commands is greater than 1, the processing command is processed one by one, and the response processing of the Nth to-be-processed command is processed or terminated according to the response result of the Nth pending command.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码: Optionally, the storage medium is further arranged to store program code for performing the following steps:
S1,在得到第N条待处理命令的处理结果为处理成功时,开始对第N+1条待处理命令进行响应处理,在得到所有的待处理命令的处理结果后,转换构建AT命令的处理结果,并将处理结果响应给发送接口控制AT命令的终端设备;S1, when the processing result of the Nth to-be-processed command is successful, the response processing of the N+1th to-be-processed command is started, and after all the processing results of the to-be-processed command are obtained, the processing of converting the AT command is converted. Resulting, and responding to the terminal device of the sending interface control AT command;
S2,在得到第N条待处理命令的处理结果为处理失败时,结束操作,转换构建AT命令的处理结果,并将处理结果响应给发送接口控制AT命令的终端设备。S2. When the processing result of the Nth to-be-processed command is a processing failure, the operation ends, the processing result of the AT command is converted, and the processing result is sent to the terminal device of the sending interface control AT command.
以上的是本公开的可选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本公开原理前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本公开的保护范围。The above is an alternative embodiment of the present disclosure, and it should be noted that those skilled in the art can also make several improvements and refinements without departing from the principles of the present disclosure. These improvements and refinements should also be considered as the present disclosure. The scope of protection.
工业实用性Industrial applicability
在本公开实施例中,接口控制命令的处理方法通过检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;在否时,将AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据待处理命令进行对应的响应处理;使得Modem设备ME,可以通用适配不同的终端设备,减少不必要的再开发过程;解决了相关技术中Modem设备ME和终端设备TE适配的通用性差的问题,同时,提高了产品的市场竞争力,更好的满足了客户需求。 In the embodiment of the present disclosure, the processing method of the interface control command can detect whether the AT command is a command that the modem device can directly perform response processing by detecting the received interface; in the case of no, converting the AT command into a Modem device can directly perform response processing. The pending command is processed according to the pending command; the Modem device ME can be universally adapted to different terminal devices to reduce the unnecessary redevelopment process; and the Modem device ME and the terminal device TE in the related art are solved. The problem of poor versatility of the adaptation, at the same time, improves the market competitiveness of the product and better meets the needs of customers.

Claims (11)

  1. 一种接口控制命令的处理方法,应用于调制解调器Modem设备,所述处理方法包括:A method for processing an interface control command is applied to a modem modem device, and the processing method includes:
    检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;Detecting whether the received interface control AT command is a command that the modem device can directly perform response processing;
    在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行响应处理。In the case of no, the AT command is converted into a pending command that the modem device can directly perform response processing, and the response processing is performed according to the to-be-processed command.
  2. 根据权利要求1所述的处理方法,其中,所述检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令包括:The processing method according to claim 1, wherein the detecting whether the received interface control AT command is a command that the modem device can directly perform response processing comprises:
    检测接收到的接口控制AT命令是否为通用AT命令;Detecting whether the received interface controls the AT command as a general AT command;
    当接收到的接口控制AT命令为通用AT命令时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;When the received interface control AT command is a general AT command, it is determined that the received interface control AT command is a command that the modem device can directly perform response processing;
    当接收到的接口控制AT命令为不通用的AT命令时检测接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型是否匹配;When the received interface controls the AT command to be a non-universal AT command, detecting whether the chip type indicated by the received interface control AT command matches the chip type of the Modem device;
    当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型匹配时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;When the received interface controls the AT command to indicate that the chip type of the modem matches the chip type of the Modem device, determining that the received interface controls the AT command as a command that the Modem device can directly perform response processing;
    当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型不匹配时,确定接收到的接口控制AT命令为Modem设备不能够直接进行响应处理的命令。When the received interface control AT command indicates that the chip type of the modem does not match the chip type of the Modem device, it is determined that the received interface control AT command is a command that the Modem device cannot directly perform response processing.
  3. 根据权利要求1所述的处理方法,其中,所述将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令包括: The processing method according to claim 1, wherein the to-be-processed command that converts the AT command into a modem device capable of directly performing response processing includes:
    根据所述AT命令所指示调制解调器的芯片类型和Modem设备的芯片类型,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令。And according to the chip type of the modem indicated by the AT command and the chip type of the Modem device, converting the AT command into a pending command that the Modem device can directly perform response processing.
  4. 根据权利要求1所述的处理方法,其中,所述根据所述待处理命令进行响应处理包括:The processing method according to claim 1, wherein the responding processing according to the to-be-processed command comprises:
    在所述待处理命令的个数等于1时,直接根据所述待处理命令进行响应处理,并将处理结果响应给发送所述接口控制AT命令的终端设备;When the number of the to-be-processed commands is equal to 1, the response processing is directly performed according to the to-be-processed command, and the processing result is sent to the terminal device that sends the interface control AT command;
    在所述待处理命令的个数大于1时,逐一对所述待处理命令进行响应处理,且根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作;When the number of the to-be-processed commands is greater than 1, the pair of the to-be-processed commands are processed in response, and the N+1th to-be-processed command is processed or terminated according to the response result of the Nth to-be-processed command. ;
    其中,N为大于或等于1的正整数。Where N is a positive integer greater than or equal to 1.
  5. 根据权利要求4所述的处理方法,其中,所述根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作包括:The processing method according to claim 4, wherein the responding to or processing the N+1th to-be-processed command according to the response result of the Nth to-be-processed command comprises:
    在得到第N条待处理命令的处理结果为处理成功时,开始对第N+1条待处理命令进行响应处理,在得到所有的待处理命令的处理结果后,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备;When the processing result of the Nth to-be-processed command is successful, the response processing of the N+1th to-be-processed command is started, and after all the processing results of the to-be-processed command are obtained, the processing of converting the AT command is converted. Resulting, and responding to the terminal device that sends the interface control AT command;
    在得到第N条待处理命令的处理结果为处理失败时,结束操作,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备。When the processing result of the Nth to-be-processed command is a processing failure, the operation is ended, the processing result of constructing the AT command is converted, and the processing result is returned to the terminal device that sends the interface control AT command.
  6. 一种调制解调器Modem设备,所述Modem设备包括: A modem Modem device, the Modem device includes:
    检测模块,设置为检测接收到的接口控制AT命令是否为Modem设备能够直接进行响应处理的命令;The detecting module is configured to detect whether the received interface control AT command is a command that the modem device can directly perform response processing;
    第一处理模块,设置为在否时,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令,并根据所述待处理命令进行响应处理。The first processing module is configured to convert the AT command into a pending command that the modem device can directly perform response processing, and perform response processing according to the to-be-processed command.
  7. 根据权利要求6所述的Modem设备,其中,所述检测模块包括:The modem device of claim 6, wherein the detecting module comprises:
    第一检测子模块,设置为检测接收到的接口控制AT命令是否为通用AT命令;a first detecting submodule configured to detect whether the received interface controls whether the AT command is a general AT command;
    第一确定子模块,设置为当接收到的接口控制AT命令为通用AT命令时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;The first determining submodule is configured to: when the received interface control AT command is a general AT command, determine that the received interface controls the AT command to be a command that the modem device can directly perform response processing;
    第二检测子模块,设置为当接收到的接口控制AT命令为不通用的AT命令时,检测接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型是否匹配;The second detecting submodule is configured to: when the received interface controls the AT command to be a non-universal AT command, detecting whether the chip type of the modem indicated by the received interface control AT command matches the chip type of the Modem device;
    第二确定子模块,设置为当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型匹配时,确定接收到的接口控制AT命令为Modem设备能够直接进行响应处理的命令;a second determining sub-module, configured to: when the received interface control AT command indicates that the chip type of the modem matches the chip type of the modem device, determining that the received interface control AT command is a command that the modem device can directly perform response processing;
    第三确定子模块,设置为当接收到的接口控制AT命令所指示调制解调器的芯片类型与Modem设备的芯片类型不匹配时,确定接收到的接口控制AT命令为Modem设备不能够直接进行响应处理的命令。The third determining submodule is configured to: when the chip type of the modem indicated by the received interface control AT command does not match the chip type of the modem device, determine that the received interface controls the AT command to be unable to directly perform response processing on the modem device. command.
  8. 根据权利要求6所述的Modem设备,其中,所述第一处理模块包括: The modem device of claim 6, wherein the first processing module comprises:
    第一处理子模块,设置为根据所述AT命令所指示调制解调器的芯片类型和Modem设备的芯片类型,将所述AT命令转换为Modem设备能够直接进行响应处理的待处理命令。The first processing submodule is configured to convert the AT command into a pending command that the modem device can directly perform response processing according to the chip type of the modem indicated by the AT command and the chip type of the Modem device.
  9. 根据权利要求6所述的Modem设备,其中,所述第一处理模块包括:The modem device of claim 6, wherein the first processing module comprises:
    第二处理子模块,设置为在所述待处理命令的个数等于1时,直接根据所述待处理命令进行响应处理,并将处理结果响应给发送所述接口控制AT命令的终端设备;The second processing sub-module is configured to perform response processing according to the to-be-processed command directly when the number of the to-be-processed commands is equal to 1, and respond to the terminal device that sends the interface control AT command;
    第三处理子模块,设置为在所述待处理命令的个数大于1时,逐一对所述待处理命令进行响应处理,且根据第N条待处理命令的响应结果对第N+1条待处理命令进行响应处理或结束操作;And the third processing sub-module is configured to perform response processing on the pair of the to-be-processed commands one by one when the number of the to-be-processed commands is greater than 1, and to wait for the N+1th item according to the response result of the Nth to-be-processed command Processing the command for response processing or ending the operation;
    其中,N为大于或等于1的正整数。Where N is a positive integer greater than or equal to 1.
  10. 根据权利要求9所述的Modem设备,其中,所述第三处理子模块包括:The modem device according to claim 9, wherein the third processing submodule comprises:
    第一处理单元,设置为在得到第N条待处理命令的处理结果为处理成功时,开始对第N+1条待处理命令进行响应处理,在得到所有的待处理命令的处理结果后,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备;The first processing unit is configured to start responding to the (N+1)th pending processing command when the processing result of the Nth to-be-processed command is successful, and after all the processing results of the to-be-processed command are obtained, converting Constructing a processing result of the AT command, and responding the processing result to a terminal device that sends the interface control AT command;
    第二处理单元,设置为在得到第N条待处理命令的处理结果为处理失败时,结束操作,转换构建所述AT命令的处理结果,并将处理结果响应给发送所述接口控制AT命令的终端设备。The second processing unit is configured to, when the processing result of the Nth to-be-processed command is a processing failure, end the operation, convert the processing result of constructing the AT command, and respond to the sending of the interface control AT command by the processing result Terminal Equipment.
  11. 一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至5任一项中所述的方法。 A storage medium comprising a stored program, wherein the program is executed to perform the method of any of the preceding claims 1 to 5.
PCT/CN2017/105864 2016-10-19 2017-10-12 Interface control command processing method and modem equipment WO2018072640A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610910715.X 2016-10-19
CN201610910715.XA CN107968717B (en) 2016-10-19 2016-10-19 Processing method of interface control command and Modem device

Publications (1)

Publication Number Publication Date
WO2018072640A1 true WO2018072640A1 (en) 2018-04-26

Family

ID=61996316

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/105864 WO2018072640A1 (en) 2016-10-19 2017-10-12 Interface control command processing method and modem equipment

Country Status (2)

Country Link
CN (1) CN107968717B (en)
WO (1) WO2018072640A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109587363B (en) * 2018-11-30 2021-06-22 京信通信系统(中国)有限公司 Modem
CN111447093A (en) * 2020-03-27 2020-07-24 四川爱联科技有限公司 System and method for unified configuration of Internet of things equipment
CN114422972B (en) * 2020-10-13 2024-03-26 阿里巴巴集团控股有限公司 Data interaction method, system, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155184A (en) * 2006-09-25 2008-04-02 中兴通讯股份有限公司 Method for implementing AT command commutation
CN101193366A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 A standard AT command conversion device
CN101287226A (en) * 2008-05-22 2008-10-15 德信无线通讯科技(北京)有限公司 Controlling method and system for mobile communication terminal
CN101742701A (en) * 2009-12-15 2010-06-16 中兴通讯股份有限公司 Device, method and system for treating AT command

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3565730B2 (en) * 1999-01-13 2004-09-15 株式会社リコー AT command analyzer
CN100448226C (en) * 2005-08-11 2008-12-31 杭州华三通信技术有限公司 Asymmetrical digital loop routing equipment and interface card

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155184A (en) * 2006-09-25 2008-04-02 中兴通讯股份有限公司 Method for implementing AT command commutation
CN101193366A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 A standard AT command conversion device
CN101287226A (en) * 2008-05-22 2008-10-15 德信无线通讯科技(北京)有限公司 Controlling method and system for mobile communication terminal
CN101742701A (en) * 2009-12-15 2010-06-16 中兴通讯股份有限公司 Device, method and system for treating AT command

Also Published As

Publication number Publication date
CN107968717A (en) 2018-04-27
CN107968717B (en) 2022-05-24

Similar Documents

Publication Publication Date Title
TWI731200B (en) A slave device connnected to host by 12c bus and its communication method
WO2018072640A1 (en) Interface control command processing method and modem equipment
US8239708B2 (en) System on chip (SoC) device verification system using memory interface
CN108803577B (en) Diagnosis method, upper computer and lower computer
US20080162764A1 (en) Processing method and processing device for a hardware interrupt
US20180131595A1 (en) System For Using Kernel To Perform Pressure Test On Communication Port And Method
JP5073799B2 (en) System and method for customizing a SCSI error response received from a SCSI target in a storage network environment
US20160077986A1 (en) Electronic apparatus providing real-time switching and sharing of usb electronic devices among hosts
CN109471818B (en) Bus structure implementation method and device
US20070156934A1 (en) High-speed PCI Interface System and A Reset Method Thereof
CN111309667A (en) Dynamic reconfigurable method of heterogeneous multiprocessor platform based on real-time bus
WO2018018607A1 (en) Method and device for fixed conversion of transmission protocol based on message protocol identification
CN104850518A (en) Method for remotely logging in computer
TWI546676B (en) Master electronic device and communication method of the same
CN115134427B (en) Communication protocol coordination method, device, computer equipment and storage medium
CN109164874B (en) Information processing method and electronic equipment
US20150100759A1 (en) Pipelined finite state machine
WO2017190544A1 (en) Data transmission cable and data transmission method
WO2021136099A1 (en) Data transmission method, apparatus, and device, and storage medium
WO2014036725A1 (en) Method, device and equipment for pcie port configuration
CN114328357A (en) Interconnection communication method and system for bare chip and integrated package chip
US10795848B2 (en) Dual way communication method, system, and master device thereof
TWM494348U (en) Electronic device providing real-time switching and sharing of USB electronic apparatuses among hosts
TWI637177B (en) System and method for testing semiconductor elements
US11216398B2 (en) USB device and data transfer method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17862016

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17862016

Country of ref document: EP

Kind code of ref document: A1