Module configuration method and device and storage medium

By sending the AT instructions to the AT port of the communication module, the module information is automatically obtained and the adaptation is completed, which solves the problem of low configuration efficiency when the terminal device is replaced, and achieves a more efficient module configuration process.

CN119363580AActive Publication Date: 2025-01-24CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411426854.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-01-24
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

When a terminal device replaces a communication module, it needs to reset the module information, resulting in inefficient module configuration.

Method used

Sending the module information by sending the AT instructions to the initial AT port of the module to be prepared. If the response message is not received, send the AT instruction to other AT ports to determine the AT port that can transmit the response message to obtain the module information and complete the adaptation.

Benefits of technology

Improve the accuracy and efficiency of the module configuration, and reduce the operating amount of operation and maintenance personnel in the adaptation program.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363580A_ABST
    Figure CN119363580A_ABST
Patent Text Reader

Abstract

The invention discloses a module configuration method and device and a storage medium, relates to the technical field of communication, and is used for improving module configuration efficiency. The method comprises the following steps: sending an AT instruction to an initial AT port of a to-be-adapted module; the AT instruction is used for requesting module information of a to-be-adapted module; if a response message sent by the to-be-adapted module through the initial AT port is not received, sending an AT instruction to at least one AT port except the initial AT port in the to-be-adapted module; and receiving a response message sent by the to-be-adapted module through the first AT port, obtaining module information of the to-be-adapted module from the response message, and determining the first AT port as a target AT port of the to-be-adapted module. The method and device are applied to the module configuration process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a module configuration method, device and storage medium. Background Art

[0002] The communication module is a functional module that integrates baseband chips, memory, power amplifier devices, etc. on a circuit board and provides a standard interface. The terminal device can realize the communication function with the help of the communication module. Since communication modules from different manufacturers or with different functions have different module information (including module model and attention (AT) port), after obtaining the communication module, the terminal device manufacturer needs to adapt the terminal device to the communication module (specifically, set the module information provided by the communication module manufacturer in the adaptation program of the terminal device) so that the terminal device can use the communication module normally.

[0003] However, when the terminal device needs to replace the communication module, the original module information in the adapter program of the terminal device is no longer applicable, and the operation and maintenance personnel of the terminal device manufacturer need to set up a new communication module in the adapter program. Therefore, how to improve the module configuration efficiency is a technical problem that still needs to be solved. Summary of the invention

[0004] The present application provides a module configuration method, device and storage medium for improving module configuration efficiency.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a module configuration method, wherein a module configuration device sends an AT command to an initial AT port of a module to be adapted; the AT command is used to request module information of the module to be adapted; if a response message sent by the module to be adapted through the initial AT port is not received, the module configuration device sends an AT command to at least one AT port in the module to be adapted except the initial AT port; the module configuration device receives a response message sent by the module to be adapted through a first AT port, obtains module information of the module to be adapted from the response message, and determines the first AT port as a target AT port of the module to be adapted; the first AT port is a port among the at least one AT port.

[0007] In a possible implementation, if no response message is received from the module to be adapted through the initial AT within the first preset time period, an AT command is sent to at least one AT port through a preset method; the preset method includes: parallel sending method or asynchronous input and output IO method.

[0008] In one possible implementation, a module detection instruction is received; the module detection instruction is used to detect information of the module to be adapted; based on the module detection instruction, module detection information is generated; the module detection information is used to characterize the state of the module to be adapted; the identifier of the module to be adapted is obtained from the module detection message; the identifier of the module to be adapted includes a vendor identifier VID and a product identifier PID; based on the identifier of the module to be adapted, the initial AT port of the module to be adapted is determined.

[0009] In a possible implementation, a module mapping table is obtained; the module mapping table includes an identifier of at least one module and an AT port corresponding to the identifier of at least one module; based on the identifier of the module to be adapted and the module mapping table, an initial AT port of the module to be adapted is determined.

[0010] In a possible implementation, the state of each module in a module group in a terminal device is monitored; the module group includes a module to be adapted; when a first module in the module group is removed, the module dialing process of the first module is stopped.

[0011] In a possible implementation, when the second module is added to the module group, an identifier of the second module is obtained; and an AT port of the second module is determined according to the identifier of the second module.

[0012] In the second aspect, the present application provides a module configuration device, including: a communication unit and a processing unit; a communication unit, used to send an AT instruction to the initial AT port of the module to be adapted; the AT instruction is used to request the module information of the module to be adapted; the communication unit, used to send the AT instruction to at least one AT port in the module to be adapted except the initial AT port if the response message sent by the module to be adapted through the initial AT port is not received; the communication unit, used to instruct the communication unit to receive the response message sent by the module to be adapted through the first AT port, and obtain the module information of the module to be adapted from the response message, and determine the first AT port as the target AT port of the module to be adapted; the first AT port is a port among the at least one AT port.

[0013] In a possible implementation, the processing unit is further used to instruct the communication unit to send an AT command to at least one AT port in a preset manner if no response message is received from the module to be adapted through the initial AT within a first preset time period; the preset manner includes: a parallel sending manner or an asynchronous input and output IO manner.

[0014] In a possible implementation, the communication unit is also used to receive a module detection instruction; the module detection instruction is used to detect information of the module to be adapted; the processing unit is also used to generate module detection information based on the module detection instruction; the module detection information is used to characterize the state of the module to be adapted; the processing unit is also used to obtain the identifier of the module to be adapted from the module detection message; the identifier of the module to be adapted includes a vendor identifier VID and a product identifier PID; the processing unit is also used to determine the initial AT port of the module to be adapted based on the identifier of the module to be adapted.

[0015] In a possible implementation, the processing unit is further used to: obtain a module mapping table; the module mapping table includes an identifier of at least one module and an AT port corresponding to the identifier of at least one module; and determine an initial AT port of the module to be adapted based on the identifier of the module to be adapted and the module mapping table.

[0016] In a possible implementation, the processing unit is further used to monitor the status of each module in a module group in the terminal device; the module group includes a module to be adapted; when the first module in the module group is removed, the module dialing process of the first module is stopped.

[0017] In a possible implementation manner, the processing unit is further configured to: when the second module is added to the module group, obtain an identifier of the second module; and determine an AT port of the second module according to the identifier of the second module.

[0018] In a third aspect, the present application provides a module configuration device, which includes: a processor and a memory; wherein the memory is used to store computer execution instructions, and when the module configuration device is running, the processor executes the computer execution instructions stored in the memory to enable the module configuration device to perform the module configuration method described in the first aspect and any possible implementation method of the first aspect.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions in the computer-readable storage medium are executed by a processor of a module configuration device, the module configuration device is enabled to execute the module configuration method described in the first aspect and any possible implementation of the first aspect.

[0020] In the fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the module configuration method described in the above-mentioned first aspect and any possible implementation method of the first aspect.

[0021] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the module configuration method described in the first aspect and any possible implementation manner of the first aspect.

[0022] These and other aspects of the present application will become more apparent from the following description.

[0023] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, the module configuration device sends an AT instruction to the initial AT port. Since the AT instruction is used to request the module information of the module to be adapted, the module configuration device can configure the communication module of the terminal device based on the response information of the initial AT port. In the case where the response message sent by the module to be adapted through the initial AT port is not received, the module configuration device sends an AT instruction to at least one AT port in the module to be adapted except the initial AT port. In this way, when the module configuration device cannot obtain the AT port of the module to be adapted through the identifier of the module to be adapted, the module configuration device can determine the first AT port that can transmit the response message from at least one AT port. The module configuration device obtains the module information of the module to be adapted from the response message, and determines the target AT port of the module to be adapted, and completes the adaptation of the terminal device and the module. In this way, the terminal device can normally use the module to be adapted based on the module information and the target AT port. Therefore, the embodiment of the present application can improve the accuracy of the module configuration, thereby improving the efficiency of the module configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A schematic diagram of the structure of a module configuration system provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of the structure of a module configuration device provided in an embodiment of the present application;

[0027] Figure 3 A flowchart of a module configuration method provided in an embodiment of the present application;

[0028] Figure 4 A flowchart of a module configuration method provided in an embodiment of the present application;

[0029] Figure 5 A flowchart of a module configuration method provided in an embodiment of the present application;

[0030] Figure 6 A flowchart of a module configuration method provided in an embodiment of the present application;

[0031] Figure 7 A flowchart of a module configuration method provided in an embodiment of the present application;

[0032] Figure 8 A flowchart of a module configuration method provided in an embodiment of the present application;

[0033] Fig. 9 A flowchart of a module configuration method provided in an embodiment of the present application;

[0034] Fig.10 A schematic diagram of the structure of a module configuration device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0036] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0037] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0038] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0039] In the description of the present application, unless otherwise specified, “plurality” means two or more.

[0040] The communication module is a functional module that integrates baseband chips, memory, power amplifier devices, etc. on a circuit board and provides a standard interface. The terminal device can realize the communication function with the help of the communication module. Since communication modules from different manufacturers or with different functions have different module information (including module model and AT port), after obtaining the communication module, the terminal device manufacturer needs to adapt the terminal device to the communication module (specifically, set the module information provided by the communication module manufacturer in the adaptation program of the terminal device) so that the terminal device can use the communication module normally.

[0041] However, when the terminal device needs to replace the communication module, the original module information in the adapter program of the terminal device is no longer applicable, and the operation and maintenance personnel of the terminal device manufacturer need to set up a new communication module in the adapter program. Therefore, how to improve the module configuration efficiency is a technical problem that still needs to be solved.

[0042] In order to solve the technical problems existing in the related art, in the embodiment of the present application, the module configuration device sends an AT command to the initial AT port. Since the AT command is used to request the module information of the module to be adapted, the module configuration device can configure the communication module of the terminal device based on the response information of the initial AT port. In the case of not receiving the response message sent by the module to be adapted through the initial AT port, the module configuration device sends an AT command to at least one AT port in the module to be adapted except the initial AT port. In this way, when the module configuration device cannot obtain the AT port of the module to be adapted through the identifier of the module to be adapted, the module configuration device can determine the first AT port that can transmit the response message from at least one AT port. The module configuration device obtains the module information of the module to be adapted from the response message, and determines the target AT port of the module to be adapted, and completes the adaptation of the terminal device and the module. In this way, the terminal device can normally use the module to be adapted based on the module information and the target AT port. Therefore, the embodiment of the present application can improve the accuracy of module configuration, thereby improving the efficiency of module configuration.

[0043] Below, combined with the attached Figure 1 A module configuration system 10 provided in an embodiment of the present application is described in detail. Figure 1 As shown, the module configuration system 10 includes: a module configuration device 11 and a module to be adapted 12 .

[0044] Among them, the module configuration device 11 is configured to: send an AT command to the initial AT port of the module to be adapted 12; the AT command is used to request the module information of the module to be adapted 12; if the response message sent by the module to be adapted 12 through the initial AT port is not received, send the AT command to at least one AT port in the module to be adapted 12 except the initial AT port; receive the response message sent by the module to be adapted 12 through the first AT port, and obtain the module information of the module to be adapted 12 from the response message, and determine the first AT port as the target AT port of the module to be adapted 12; the first AT port is a port among the at least one AT port.

[0045] The module to be adapted 12 is configured to include multiple AT interfaces and to send response messages through AT ports.

[0046] It should be noted that the module configuration device 11 is a device with wireless communication function, which can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted. It can also be deployed on the water surface (such as ships, etc.). It can also be deployed in the air (for example, on airplanes, balloons and satellites, etc.). User terminal equipment is also called mobile station (MS), terminal equipment (MT) and terminal equipment, etc., which is a device that provides voice and / or data connectivity to users. For example, terminal equipment includes handheld devices with wireless connection function, vehicle-mounted equipment, etc. At present, the terminal device can be: a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a wearable device (such as a smart watch, a smart bracelet, a pedometer, etc.), an in-vehicle device (such as a car, a bicycle, an electric car, an airplane, a ship, a train, a high-speed train, etc.), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal device in industrial control, a smart home device (such as a refrigerator, a television, an air conditioner, an electric meter, etc.), an intelligent robot, a workshop device, a wireless terminal device in self-driving, a wireless terminal device in remote medical surgery, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, a flying device (such as an intelligent robot, a hot air balloon, a drone, an airplane), etc. In one possible application scenario of the present application, the module configuration device 11 is a terminal device that often works on the ground, such as a vehicle-mounted device. In the present application, for the convenience of description, the chip deployed in the above-mentioned device, such as a system-on-a-chip (SOC), a baseband chip, etc., or other chips with communication functions can also be referred to as user terminal devices.

[0047] Optionally, the module configuration device 11 may be an embedded communication device or a user's handheld communication device, including a mobile phone, a tablet computer, etc.

[0048] As an example, in an embodiment of the present application, the module configuration device 11 can also be a wearable device. Wearable devices can also be called wearable smart devices, which are a general term for wearable devices that use wearable technology to intelligently design and develop wearable devices for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also realize powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and independent of smartphones to achieve complete or partial functions, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0049] The embodiment of the present application provides a module configuration device, which is used to execute the module configuration system provided in the embodiment of the present application. Figure 2 This is a schematic diagram of the structure of a module configuration device provided in an embodiment of the present application. Figure 2 As shown, the module configuration device 200 includes at least one processor 201, a communication line 202, and at least one communication interface 204, and may also include a memory 203. The processor 201, the memory 203 and the communication interface 204 may be connected via the communication line 202.

[0050] The processor 201 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA).

[0051] The communication link 202 may include a pathway for transmitting information between the above-mentioned components.

[0052] The communication interface 204 is used to communicate with other devices or communication networks, and can use any transceiver-like device, such as Ethernet, radio access network (RAN), WLAN, etc.

[0053] The memory 203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to include or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0054] In one possible design, the memory 203 can exist independently of the processor 201, that is, the memory 203 can be a memory outside the processor 201. In this case, the memory 203 can be connected to the processor 201 through the communication line 202, and is used to store execution instructions or application code, and the processor 201 controls the execution to implement the module configuration method provided in the following embodiment of the present application. In another possible design, the memory 203 can also be integrated with the processor 201, that is, the memory 203 can be the internal memory of the processor 201, for example, the memory 203 is a high-speed cache, which can be used to temporarily store some data and instruction information.

[0055] As an implementation method, the processor 201 may include one or more CPUs, for example Figure 2 As another implementation, the module configuration device 200 may include multiple processors, such as Figure 2 As another implementation, the module configuration device 200 may further include an output device 205 and an input device 206.

[0056] Below, combined with the attached Figure 3 The module configuration method provided in the embodiment of the present application is described in detail. Figure 3 As shown, the module configuration method includes S301-S303.

[0057] S301: The module configuration device sends an AT command to the initial AT port of the module to be adapted.

[0058] The AT command is used to request the module information of the module to be adapted.

[0059] In a possible implementation, the module configuration device sends an AT command to the initial AT port based on the number of the initial AT port.

[0060] In another possible implementation, the module configuration device sends an AT command to the initial AT port based on the address information of the initial AT port.

[0061] Optionally, the AT command is an ATI command.

[0062] It should be noted that the AT command is pre-set in the terminal for the operation and maintenance personnel, and the AT command is a standard command in the 3rd Generation Partnership Project (3GPP), and the communication module of any manufacturer can recognize and respond.

[0063] S302: If no response message is received from the module to be adapted through the initial AT port, the module configuration apparatus sends an AT command to at least one AT port of the module to be adapted except the initial AT port.

[0064] Optionally, at least one AT port is a ttyUSB port.

[0065] It should be explained that after the module configuration device sends the AT command to the initial AT port, within the second preset time period, the module configuration device determines whether the response reception file is empty; if it is empty, the module configuration device has not received the response message; if it is not empty, the module configuration device determines that the response message has been received.

[0066] Optionally, the response receiving file is pre-set in the terminal by the operation and maintenance personnel, and is used to receive the response message sent by the module to be adapted through the AT port.

[0067] It should be explained that if a response message is received from the module to be adapted through the initial AT port, the module configuration device obtains the module information of the module to be adapted from the response message, and determines the initial AT port as the target AT port of the module to be adapted.

[0068] S303: The module configuration apparatus receives a response message sent by the module to be adapted through the first AT port, obtains module information of the module to be adapted from the response message, and determines the first AT port as a target AT port of the module to be adapted.

[0069] The first AT port is a port in the at least one AT port.

[0070] In a possible implementation, if the module configuration device receives a response message sent by the module to be adapted through the first AT port, the module configuration device reads the response message in the response reception file, obtains the module information of the module to be adapted from the response message, and determines the first AT port as the AT port of the module to be adapted. Afterwards, the module configuration device stores the module information and the AT port in the adaptation program, so that the module configuration device can realize the communication function with the module to be adapted based on the module information number and the AT port.

[0071] Optionally, after the module configuration device determines the target AT port of the module to be adapted, the first AT port of the module to be adapted, the module information of the module to be adapted, and the identification of the module to be adapted are saved in the memory, so that the module configuration device can directly obtain the first AT port of the module to be adapted and the module information of the module to be adapted based on the identification of the module to be adapted.

[0072] For example, the response message of the ATI command is: root@LHZ04_Redcap:~#

[0073] root@LHZ04_Redcap:~#sendat ati

[0074] port= / dev / ttyUSB1,cmd=ati

[0075] Manufacturer:TD Tech Ltd.

[0076] Model:MT5710-CN

[0077] Revision:V100R001C00B068

[0078] IMEI:863495060196274

[0079] +GCAP:+CGSM,+DS,+ES.

[0080] It needs to be explained that the AT port is: root@LHZ04_Redcap:~#sendat ati; the specific command is: port= / dev / ttyUSB1,cmd=ati; the module information in the response message is: Model:MT5710-CN.

[0081] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, the module configuration device sends an AT instruction to the initial AT port. Since the AT instruction is used to request the module information of the module to be adapted, the module configuration device can configure the communication module of the terminal device based on the response information of the initial AT port. In the case where the response message sent by the module to be adapted through the initial AT port is not received, the module configuration device sends an AT instruction to at least one AT port in the module to be adapted except the initial AT port. In this way, when the module configuration device cannot obtain the AT port of the module to be adapted through the identifier of the module to be adapted, the module configuration device can determine the first AT port that can transmit the response message from at least one AT port. The module configuration device obtains the module information of the module to be adapted from the response message, and determines the target AT port of the module to be adapted, and completes the adaptation of the terminal device and the module. In this way, the terminal device can normally use the module to be adapted based on the module information and the target AT port. Therefore, the embodiment of the present application can improve the accuracy of the module configuration, thereby improving the efficiency of the module configuration.

[0082] In one possible implementation, combining Figure 3 ,like Figure 4 As shown, S302, if no response message is received from the module to be adapted through the initial AT port, the module configuration device sends an AT command to at least one AT port in the module to be adapted except the initial AT port, which can be specifically implemented by the following S401.

[0083] S401: If no response message is received from the module to be adapted through the initial AT within a first preset time period, the module configuration device sends an AT command to at least one AT port in a preset manner.

[0084] The preset mode includes: a parallel transmission mode or an asynchronous input / output (IO) mode.

[0085] Optionally, the first preset time period is pre-set in the terminal by an operation and maintenance personnel.

[0086] It should be explained that, in the process of sending AT instructions to at least one AT port, the module configuration device will not wait for the current sending task to be completed, but will continue to execute the next sending task. In this way, the efficiency of the module configuration device in sending AT instructions to at least one AT port can be improved, so as to receive response information in time.

[0087] Exemplarily, at least one AT port of the module to be adapted is ttyUSB0, ttyUSB1, and ttyUSB2. If no response message is received from the module to be adapted through the initial AT port within 20ms, the module configuration device sends AT commands to ttyUSB0, ttyUSB1, and ttyUSB2 simultaneously in parallel.

[0088] For example, if no response message is received from the module to be adapted through the initial AT port within 20ms, it takes 5ms for the module configuration device to complete sending the AT command to ttyUSB0. The module configuration device sends the AT command to ttyUSB0 at 0ms, sends the AT command to ttyUSB1 at 2ms, and sends the AT command to ttyUSB2 at 4ms.

[0089] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, if the response message sent by the module to be adapted through the initial AT port is not received within the first preset time period, the module configuration device sends an AT command to at least one AT port in a preset manner. This can improve the efficiency of the module configuration device in sending AT commands, and then the module configuration device can receive the response message sent by the module to be adapted through the AT port in a timely manner, thereby improving the module configuration efficiency.

[0090] In one possible implementation, combining Figure 3 ,like Figure 5 As shown, in S301, before the module configuration device sends an AT command to the initial AT port of the module to be adapted, the module configuration device determines the initial AT port of the module to be adapted. The process of the module configuration device determining the initial AT port of the module to be adapted can be specifically implemented through the following S501-S504.

[0091] S501: The module configuration device receives a module detection instruction.

[0092] The module detection instruction is used to detect the information of the module to be adapted.

[0093] In a possible implementation manner, the module configuration apparatus receives a module detection instruction from a terminal device.

[0094] It is understandable that the user can select and press a control on the module configuration device to trigger the module configuration device to receive a module detection instruction.

[0095] Optionally, the module detection command is the lsusb command.

[0096] It should be noted that the module detection command is pre-set in the terminal by the operation and maintenance personnel.

[0097] S502: The module configuration device generates module detection information based on the module detection instruction.

[0098] The module detection information is used to characterize the status of the module to be adapted.

[0099] In a possible implementation manner, the module configuration device continuously executes a preset module detection instruction, and generates module detection information after the module configuration device detects a newly added module.

[0100] It should be explained that when the module configuration device detects a newly added module, it means that the module configuration device has successfully adapted the Universal Serial Bus (USB) driver of the module.

[0101] S503: The module configuration apparatus obtains the identifier of the module to be adapted from the module detection message.

[0102] The identification of the module to be adapted includes a vendor identity document (VID) and a product identity document (PID).

[0103] Optionally, the identifier of the module to be adapted also includes a control instruction.

[0104] In a possible implementation, the module configuration device continuously executes the lsusb command, generates a lsusb command message after the terminal detects a newly added module, and obtains the VID and PID of the module to be adapted from the lsusb command message.

[0105] S504: The module configuration apparatus determines an initial AT port of the module to be adapted based on the identifier of the module to be adapted.

[0106] In a possible implementation manner, the module configuration device determines the number and / or address information of the initial AT port of the module to be adapted based on the identifier of the module to be adapted.

[0107] The above scheme brings at least the following beneficial effects: in the embodiment of the present application, after the module configuration device receives the module detection instruction, it generates a module detection message based on the module detection instruction, and obtains the identifier of the module to be adapted from the module detection message. In this way, the module configuration device can quickly and accurately obtain the identifier of the module to be adapted, so that the module configuration device determines the initial AT port of the module to be adapted based on the identifier of the module to be adapted.

[0108] In one possible implementation, combining Figure 5 ,like Figure 6As shown, S504, the process in which the module configuration device determines the initial AT port of the module to be adapted based on the identifier of the module to be adapted can be specifically implemented through the following S601-S602.

[0109] S601: The module configuration device obtains a module mapping table.

[0110] The module mapping table includes an identifier of at least one module and an AT port corresponding to the identifier of at least one module.

[0111] In a possible implementation manner, the module configuration device generates a module mapping table based on the association information between the module identifier and the AT port.

[0112] Optionally, the module mapping table also includes a processing file corresponding to an identifier of at least one module.

[0113] For example, as shown in Table 1, the identifier of module 1 in the module mapping table is VID1 / PID1, which corresponds to processing file 1 and AT port 1; the identifier of module 2 is VID2 / PID2, which corresponds to processing file 2 and AT port 2; the identifier of module n is VIDn / PIDn, which corresponds to processing file n and AT port n.

[0114] Table 1. Module mapping table

[0115]

[0116] S602: The module configuration apparatus determines an initial AT port of the module to be adapted based on the identifier of the module to be adapted and the module mapping table.

[0117] In a possible implementation, the module configuration device obtains the second port corresponding to the identifier of the module to be adapted in the module mapping table, and determines the second port as the initial AT port of the module to be adapted.

[0118] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, the module configuration device generates a module mapping table based on the association information between the module identification and the port, and then based on the identification of the module to be adapted and the module mapping table, the initial AT port of the module to be adapted can be determined quickly and accurately.

[0119] In one possible implementation, combining Figure 3 ,like Figure 7 As shown, in S303, the module configuration device receives a response message sent by the module to be adapted through the first AT port, obtains the module information of the module to be adapted from the response message, and after determining the first AT port as the target AT port of the module to be adapted, the module configuration device monitors the module. The process of the module configuration device monitoring the module can be specifically implemented through the following S701-S702.

[0120] S701. The module configuration device monitors the status of each module in the module group in the module configuration device.

[0121] The module group includes modules to be adapted.

[0122] In a possible implementation, after the module configuration device is powered on, the status of each module in the module group in the module configuration device can be actively monitored through a hotplug mechanism.

[0123] It needs to be explained that hotplug is a mechanism used to handle device hot plug events in the Linux system.

[0124] S702: When the first module in the module group is removed, the module configuration device stops the module dialing process of the first module.

[0125] Optionally, the module dialing process includes sending and receiving a series of AT commands, which are used to configure the module, detect network status, and establish a connection.

[0126] It should be explained that when it is detected that the first module is unplugged from the module group, the module dialing and information query process is stopped to avoid unnecessary continuous sending of AT commands.

[0127] The above solution brings at least the following beneficial effects: In the embodiment of the present application, when the first module is unplugged from the module group, the module configuration device stops the module dialing process of the first module, thereby avoiding waste of resources.

[0128] In one possible implementation, combining Figure 7 ,like Figure 8 As shown, in S701, after the module configuration device monitors the status of each module in the module group in the module configuration device, the module configuration device adapts the AT port for the second module. The process of the module configuration device adapting the AT port for the second module can be specifically implemented through the following S801-S802.

[0129] S801: When a second module is added to the module group, the module configuration apparatus obtains an identifier of the second module.

[0130] In a possible implementation manner, the module configuration device executes the lsusb command to generate module detection information of the second module, and obtains the identifier of the second module based on the module detection information of the second module.

[0131] S802: The module configuration apparatus determines the AT port of the second module according to the identifier of the second module.

[0132] In a possible implementation, the module configuration device determines the initial AT port of the second module according to the identifier of the second module, sends an AT command to the initial AT port of the second module, receives a response message sent by the initial AT port of the second module, and determines the AT port of the second module based on the response message.

[0133] In another possible implementation, the module configuration device sends an AT command to all AT ports of the second module; when the module configuration device receives a response message sent by any AT port among all AT ports of the second module, the module configuration device determines the AT port of the second module based on the response message.

[0134] It should be explained that when the second module is inserted into the module group, the module configuration device automatically executes the identification and configuration process of the corresponding second module to ensure a smooth transition of the system.

[0135] For example, Fig. 9 As shown: After the terminal device is turned on, the module configuration device detects the module to be adapted, and reads the VID / PID of the module to be adapted through the lsusb command. The module configuration device determines whether the VID / PID of the module to be adapted is in the module mapping table. When the VID / PID of the module to be adapted is in the module mapping table, the preset VID / PID file of the module to be adapted in the memory is read. When the preset VID / PID file is the same as the VID / PID of the module to be adapted, the VID / PID of the module to be adapted is saved, and an AT command is sent to the initial AT port of the module to be adapted; when the preset VID / PID file is different from the VID / PID of the module to be adapted, the module configuration device copies the initial AT port of a module similar to the module to be adapted, and sends an AT command to the initial AT port of the module to be adapted.

[0136] If the initial AT port returns a response message, the module configuration device saves the module information and IMEI information in the response message, otherwise it scans all AT ports of the module to be adapted in parallel. The module configuration device detects the target AT port of the module to be adapted, saves the target AT port, and then starts the module dialing of the module to be adapted, and the AT application interacts with the module to be adapted. The interactive operation includes: signal query and dialing.

[0137] It should be explained that the embodiment of the present application can also monitor the status of the module by running the hotplug mechanism, and obtain the VID / PID information of the module to determine the target AT port of the module.

[0138] For example, Fig. 9As shown: the terminal device runs the hotplug mechanism. When it is detected that the second module is added to the terminal device, the VID / PID information of the second module is read to determine the target AT port of the second module; when it is detected that the first module is removed from the terminal device, the VID / PID information of the second module is read, the module dialing process of the first module is stopped, and the AT command is notified to be sent.

[0139] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, by real-time monitoring of the status of the modules in the module group, when a newly added second module is issued, the module configuration device automatically executes the identification and configuration process of the corresponding second module.

[0140] It can be seen that the technical solution provided by the embodiment of the present application is introduced above mainly from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should be easily aware that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0141] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the method flow shown in the above method embodiment.

[0142] like Fig.10 FIG. 1 is a schematic diagram of a module configuration device provided in an embodiment of the present application. The module configuration device can be used to perform Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 , Fig. 9 The module configuration method shown. Fig.10 The module configuration device 100 shown includes: a communication unit 1001 and a processing unit 1002 .

[0143] The communication unit 1001 is used to send an AT instruction to the initial AT port of the module to be adapted; the AT instruction is used to request the module information of the module to be adapted; the communication unit 1001 is used to send the AT instruction to at least one AT port in the module to be adapted except the initial AT port if the response message sent by the module to be adapted through the initial AT port is not received; the communication unit 1001 is used to instruct the communication unit 1001 to receive the response message sent by the module to be adapted through the first AT port, obtain the module information of the module to be adapted from the response message, and determine the first AT port as the target AT port of the module to be adapted; the first AT port is a port among the at least one AT port.

[0144] Optionally, the processing unit 1002 is further used to instruct the communication unit 1001 to send an AT command to at least one AT port in a preset manner if no response message is received from the module to be adapted through the initial AT within a first preset time period; the preset manner includes: parallel sending manner or asynchronous IO manner.

[0145] Optionally, the communication unit 1001 is also used to receive a module detection instruction; the module detection instruction is used to detect information of the module to be adapted; the processing unit 1002 is also used to generate module detection information based on the module detection instruction; the module detection information is used to characterize the state of the module to be adapted; the processing unit 1002 is also used to obtain the identifier of the module to be adapted from the module detection message; the identifier of the module to be adapted includes a vendor identifier VID and a product identifier PID; the processing unit 1002 is also used to determine the initial AT port of the module to be adapted based on the identifier of the module to be adapted.

[0146] Optionally, the processing unit 1002 is further used to: obtain a module mapping table; the module mapping table includes an identifier of at least one module and an AT port corresponding to the identifier of at least one module; and determine an initial AT port of the module to be adapted based on the identifier of the module to be adapted and the module mapping table.

[0147] Optionally, the processing unit 1002 is further used to monitor the status of each module in a module group in the terminal device; the module group includes a module to be adapted; when the first module in the module group is removed, the module dialing process of the first module is stopped.

[0148] Optionally, the processing unit 1002 is further configured to: when the second module is added to the module group, obtain an identifier of the second module; and determine an AT port of the second module according to the identifier of the second module.

[0149] An embodiment of the present application also provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instruction to implement the module configuration method in the above method embodiment.

[0150] An embodiment of the present application provides a computer program product including instructions. When the instructions are executed on a computer, the computer executes the module configuration method in the above method embodiment.

[0151] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, and a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any other form of computer-readable storage medium in a suitable combination of the above, or numerical values ​​in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuit (ASIC). In embodiments of the present invention, computer-readable storage media may be any tangible media that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0152] Since the apparatus, device, computer-readable storage medium, and computer program product in the embodiments of the present invention can be applied to the above-mentioned method, the technical effects that can be obtained can also refer to the above-mentioned method embodiments, and the embodiments of the present application will not be repeated here.

[0153] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A module configuration method, characterized in that: The method comprises: Sending an AT command to the initial AT port of the module to be adapted; the AT command is used to request module information of the module to be adapted; If no response message is received from the module to be adapted through the initial AT port, sending the AT command to at least one AT port in the module to be adapted except the initial AT port; Receive the response message sent by the module to be adapted through the first AT port, obtain the module information of the module to be adapted from the response message, and determine the first AT port as the target AT port of the module to be adapted; the first AT port is a port among the at least one AT port.

2. The method according to claim 1, characterized in that If no response message is received from the module to be adapted through the initial AT port, sending the AT command to at least one AT port in the module to be adapted except the initial AT port includes: If the response message sent by the module to be adapted through the initial AT is not received within the first preset time period, the AT command is sent to the at least one AT port in a preset manner; the preset manner includes: parallel sending manner or asynchronous input and output IO manner.

3. The method according to claim 1, characterized in that Before sending the AT command to the initial AT port of the module to be adapted, the method further includes: Receiving a module detection instruction; the module detection instruction is used to detect information of the module to be adapted; Based on the module detection instruction, generate module detection information; the module detection information is used to characterize the state of the module to be adapted; Acquire the identifier of the module to be adapted from the module detection message; the identifier of the module to be adapted includes a vendor identifier VID and a product identifier PID; Based on the identifier of the module to be adapted, an initial AT port of the module to be adapted is determined.

4. The method according to claim 3, characterized in that The determining, based on the identifier of the module to be adapted, the initial AT port of the module to be adapted includes: Acquire a module mapping table; the module mapping table includes an identifier of at least one module and an AT port corresponding to the identifier of the at least one module; Based on the identifier of the module to be adapted and the module mapping table, an initial AT port of the module to be adapted is determined.

5. The method according to claim 1, characterized in that The method further comprises: Monitoring the status of each module in a module group in the terminal device; the module group includes the module to be adapted; When the first module in the module group is removed, the module dialing process of the first module is stopped.

6. The method according to claim 5, characterized in that The method further comprises: When a second module is added to the module group, acquiring an identifier of the second module; An AT port of the second module is determined according to the identifier of the second module.

7. A module configuration device, characterized in that: The device comprises: a communication unit and a processing unit; The communication unit is used to send an AT command to the initial AT port of the module to be adapted; the AT command is used to request module information of the module to be adapted; The communication unit is configured to send the AT command to at least one AT port in the module to be adapted except the initial AT port if no response message sent by the module to be adapted through the initial AT port is received; The communication unit is used to instruct the communication unit to receive the response message sent by the module to be adapted through the first AT port, obtain the module information of the module to be adapted from the response message, and determine the first AT port as the target AT port of the module to be adapted; the first AT port is a port among the at least one AT port.

8. A module configuration device, characterized in that: include: A processor and a memory; wherein the memory is used to store computer-executable instructions, and when the module configuration device is running, the processor executes the computer-executable instructions stored in the memory, so that the module configuration device executes the module configuration method described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, which, when executed by a module configuration device, enable the computer to perform the module configuration method according to any one of claims 1 to 6.

10. A computer program product, comprising computer instructions, characterized in that: When the computer instruction is executed by a processor, the module configuration method described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Module information determination method, terminal and storage medium

    CN114070721A

  • 5G communication device based on controller architecture

    CN114520971A

  • Distributed communication and control system using concurrent multi-channel master unit

    US20240340361A1