[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115843078B - Intelligent switching method and device for embedded modules and electronic equipment - Google Patents

Intelligent switching method and device for embedded modules and electronic equipment Download PDF

Info

Publication number
CN115843078B
CN115843078B CN202310120008.0A CN202310120008A CN115843078B CN 115843078 B CN115843078 B CN 115843078B CN 202310120008 A CN202310120008 A CN 202310120008A CN 115843078 B CN115843078 B CN 115843078B
Authority
CN
China
Prior art keywords
module
embedded
user identification
candidate
identification card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310120008.0A
Other languages
Chinese (zh)
Other versions
CN115843078A (en
Inventor
杨扬
刘涛
刘友恒
张金磊
朱建国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yonglian Technology Changshu Co ltd
Original Assignee
Yonglian Smart Energy Technology Changshu Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yonglian Smart Energy Technology Changshu Co ltd filed Critical Yonglian Smart Energy Technology Changshu Co ltd
Priority to CN202310120008.0A priority Critical patent/CN115843078B/en
Publication of CN115843078A publication Critical patent/CN115843078A/en
Application granted granted Critical
Publication of CN115843078B publication Critical patent/CN115843078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention relates to an intelligent switching method and device for an embedded module and electronic equipment, wherein the method comprises the following steps: under the condition that the electronic equipment meets the preset embedded module selection condition, determining a module for candidate from a plurality of types of embedded modules; powering on the candidate use module and traversing the control switch to close so that the link between the candidate use module and any user identification card is successfully linked to determine a target user identification card from a plurality of user identification cards; based on the target user identification card, the candidate module is used as a target dialing embedded module to dial, so that the electronic equipment is registered on the network corresponding to the target user identification card. According to the stability of different embedded modules in different environments, different operators are matched and switched with the network states of different embedded modules in different areas, so that users, maintainers and developers can be facilitated, and the stability and reliability of mobile communication of electronic equipment, and the applicability and compatibility of products are improved.

Description

Intelligent switching method and device for embedded modules and electronic equipment
Technical Field
The present invention relates to the field of network switching technologies, and in particular, to an intelligent switching method and apparatus for an embedded module, and an electronic device.
Background
The high-speed development of wireless communication enables the Internet of things and artificial intelligent equipment to be possible, the premise of realizing the Internet of things is that the equipment can carry out wireless communication, and mobile communication is one of the most common technologies in wireless communication, and the mobile communication is developed from the exploration of a first generation mobile communication network to a current stable and high-speed fifth generation mobile communication network, so that the mobile network has the advantages of high speed and high coverage, real-time communication can be realized, and communication and life are greatly facilitated.
Currently, a fourth generation mobile communication network 4G or a fifth generation mobile communication network 5G embedded module is usually configured on the device, and a SIM card (Subscriber Identity Module, subscriber identity card) of the corresponding network can be installed on the embedded module. However, because of different dialing modes of different embedded modules, when the embedded modules of the equipment are damaged, only the embedded modules can be replaced, and when other embedded modules are replaced, the program needs to be set or updated again, so that the convenience is low; meanwhile, because different operators have different signal coverage in different areas, when the equipment cannot normally use the equipment due to the fact that the signal coverage of the network of one operator is poor, the SIM cards of other operators can be replaced, at the moment, if the embedded module is not universal, the SIM cards need to be replaced, so that not only are programs upgraded, but also re-registration is needed, great trouble is caused to the use of users, and meanwhile, larger maintenance workload is caused to maintainers, and in addition, a plurality of programs need to be developed in the development process, so that the development workload is increased.
Disclosure of Invention
In order to overcome the problems in the related art, the invention provides an intelligent switching method and device for an embedded module and electronic equipment.
In a first aspect of the embodiments of the present invention, an intelligent switching method of an embedded module is provided, and the intelligent switching method is applied to an electronic device, where the electronic device is configured with a plurality of types of embedded modules, each of the embedded modules is connected to a plurality of subscriber identity cards through a switch, and the method includes:
under the condition that the electronic equipment meets the preset embedded module selection condition, determining a candidate module from the plurality of types of embedded modules;
powering up the module for candidate and traversing and controlling the switch to be closed so as to enable the link between the module for candidate and any user identification card to be successfully linked, thereby determining a target user identification card from a plurality of user identification cards;
and based on the target user identification card, the candidate module is used as a target dialing embedded module for dialing so as to register the electronic equipment on a network corresponding to the target user identification card.
In a preferred embodiment, the determining a candidate module from the plurality of types of embedded modules when the electronic device meets a preset embedded module selection condition includes:
Reading designated parameters of the electronic equipment, wherein the designated parameters comprise network card name parameters and routing table modification mode parameters;
under the condition that the appointed parameters are successfully read, serial port information of the electronic equipment is obtained, wherein the serial port information comprises serial port numbers of each serial port;
opening the serial ports according to the serial port numbers and a preset sequence;
after any serial port is successfully opened, a detection command is sent to the embedded modules of the multiple types through the serial port;
under the condition that any one of the embedded modules receives reply information replied by the detection command, sending a query command to the embedded module corresponding to the reply information through the serial port;
and determining whether the corresponding embedded module is the candidate module according to the received embedded module information sent by the embedded module aiming at the query command.
In a preferred embodiment, the determining, according to the received embedded module information sent by the embedded module for the query command, whether the corresponding embedded module is the candidate module includes:
classifying the embedded modules according to the received dialing modes characterized in the embedded module information sent by the embedded modules aiming at the query command;
Sending a user identification card inquiry instruction to the classified embedded module;
and determining whether the corresponding embedded module is the candidate module according to whether the classified information of the user identification card returned by the embedded module is received.
In a preferred embodiment, the powering up the candidate module and traversing the switch to control the switch to be closed, so that the candidate module links successfully with any one of the subscriber identity cards, so as to determine a target subscriber identity card from a plurality of the subscriber identity cards, including:
powering up the candidate module and controlling any switch to be closed;
under the condition that the link between the candidate module and any user identification card is successful, determining whether the user identification card meets networking communication conditions;
and determining the user identification card as the target user identification card under the condition that the user identification card meets the networking communication condition.
In a preferred embodiment, the determining whether the subscriber identity card satisfies a networking communication condition if the candidate module is successfully linked to any subscriber identity card, includes:
Under the condition that the link between the candidate module and any user identification card is successful, dialing is carried out in a dialing mode corresponding to the candidate module;
after dialing, inquiring the current network state according to the routing table modification mode parameters;
and determining whether the user identification card meets networking communication conditions according to the current network state.
In a preferred embodiment, the method further comprises:
under the condition that dialing is unsuccessful, determining that the user identification card does not meet the networking communication condition, and controlling a switch corresponding to the user identification card to be disconnected so as to disconnect a link between the user identification card and the candidate module;
controlling the switch corresponding to any one of the rest user identification cards to be closed, and executing the step of dialing in a dialing mode corresponding to the candidate module under the condition that the link between the candidate module and any one of the user identification cards is successful, until the user identification card meets networking communication conditions according to the current network state;
if dialing is unsuccessful after all the user identification cards are switched, switching the embedded module connected with the serial port;
And sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
In a preferred embodiment, the method further comprises:
repeatedly sending the detection command according to preset times under the condition that reply information sent by any serial port for the detection command is not received;
if the detection command is repeatedly sent according to the preset times and the reply information is not received yet, switching the embedded module connected with the serial port;
and sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
In a preferred embodiment, the method further comprises:
recording alarm information representing that the electronic equipment cannot dial under the condition that all the embedded modules cannot be used as the target dialing embedded module;
and alarming according to the alarming information, and reporting the alarming information based on the mqtt protocol.
In a second aspect of the embodiment of the present invention, an intelligent switching device for an embedded module is provided, and the intelligent switching device is applied to an electronic device, where the electronic device is configured with a plurality of types of embedded modules, each of the embedded modules is connected to a plurality of subscriber identity cards through a switch, and the device includes:
A determining module configured to determine a module for candidate from among the plurality of types of embedded modules, if the electronic device satisfies a preset embedded module selection condition;
the control module is configured to power up the candidate module and control the switch to be closed in a traversing way so that the candidate module is successfully linked with a link of any user identification card, and a target user identification card is determined from a plurality of user identification cards;
and the dialing module is configured to dial the candidate module serving as a target dialing embedded module based on the target user identification card so as to register the electronic equipment on a network corresponding to the target user identification card.
In a preferred embodiment, the determining module is configured to:
reading designated parameters of the electronic equipment, wherein the designated parameters comprise network card name parameters and routing table modification mode parameters;
under the condition that the appointed parameters are successfully read, serial port information of the electronic equipment is obtained, wherein the serial port information comprises serial port numbers of each serial port;
opening the serial ports according to the serial port numbers and a preset sequence;
After any serial port is successfully opened, a detection command is sent to the embedded modules of the multiple types through the serial port;
under the condition that any one of the embedded modules receives reply information replied by the detection command, sending a query command to the embedded module corresponding to the reply information through the serial port;
and determining whether the corresponding embedded module is the candidate module according to the received embedded module information sent by the embedded module aiming at the query command.
In a preferred embodiment, the determining module is configured to:
classifying the embedded modules according to the received dialing modes characterized in the embedded module information sent by the embedded modules aiming at the query command;
sending a user identification card inquiry instruction to the classified embedded module;
and determining whether the corresponding embedded module is the candidate module according to whether the classified information of the user identification card returned by the embedded module is received.
In a preferred embodiment, the control module is configured to:
powering up the candidate module and controlling any switch to be closed;
Under the condition that the link between the candidate module and any user identification card is successful, determining whether the user identification card meets networking communication conditions;
and determining the user identification card as the target user identification card under the condition that the user identification card meets the networking communication condition.
In a preferred embodiment, the control module is configured to:
under the condition that the link between the candidate module and any user identification card is successful, dialing is carried out in a dialing mode corresponding to the candidate module;
after dialing, inquiring the current network state according to the routing table modification mode parameters;
and determining whether the user identification card meets networking communication conditions according to the current network state.
In a preferred embodiment, the control module is configured to:
under the condition that dialing is unsuccessful, determining that the user identification card does not meet the networking communication condition, and controlling a switch corresponding to the user identification card to be disconnected so as to disconnect a link between the user identification card and the candidate module;
controlling the switch corresponding to any one of the rest user identification cards to be closed, and executing the step of dialing in a dialing mode corresponding to the candidate module under the condition that the link between the candidate module and any one of the user identification cards is successful, until the user identification card meets networking communication conditions according to the current network state;
If dialing is unsuccessful after all the user identification cards are switched, switching the embedded module connected with the serial port;
and sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
In a preferred embodiment, the apparatus further comprises: a switching module configured to:
repeatedly sending the detection command according to preset times under the condition that reply information sent by any serial port for the detection command is not received;
if the detection command is repeatedly sent according to the preset times and the reply information is not received yet, switching the embedded module connected with the serial port;
and sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
In a preferred embodiment, the apparatus further comprises: a recording module configured to:
recording alarm information representing that the electronic equipment cannot dial under the condition that all the embedded modules cannot be used as the target dialing embedded module;
And alarming according to the alarming information, and reporting the alarming information based on the mqtt protocol.
In a third aspect of an embodiment of the present invention, there is provided an electronic device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the executable instructions stored by the memory to implement the method of any one of the first aspects.
The technical scheme provided by the embodiment of the invention can comprise the following beneficial effects: the technical scheme can be compatible with a plurality of embedded modules for use, the embedded modules of different manufacturers are changed without programming programs and setting parameters, the restriction of different signal strengths of different operators can be avoided, the algorithm is automatically matched and switched with the network states of different embedded modules in different areas according to the stability of different embedded modules in different environments, and therefore users, maintainers and developers are greatly facilitated and experienced, and the network stability, reliability, product applicability and compatibility of electronic equipment needing mobile communication are improved. Therefore, the user experience is greatly improved, the workload of maintenance personnel is reduced, the development personnel has better development architecture, and the workload of maintenance in the later development period is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flow chart illustrating an intelligent switching method of an embedded module according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating an electronic device including multiple types of embedded modules, according to an example embodiment.
Fig. 3 is a flow chart illustrating one implementation of step S11 in fig. 1 according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating one implementation of step S12 of fig. 1 according to an exemplary embodiment.
Fig. 5 is a block diagram illustrating an embedded modular intelligent switching apparatus, according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
Fig. 1 is a flowchart of an intelligent switching method of an embedded module, according to an exemplary embodiment, applied to an electronic device, where the electronic device is configured with multiple types of embedded modules, each of the embedded modules is connected to multiple subscriber identity cards through a switch, as shown in fig. 2, the electronic device may be configured with 4 types of embedded modules, each of the embedded modules may be a 4G or 5G embedded module, each of the embedded modules may be connected to the electronic device through a switch, for example, as shown in fig. 2, a type 4G and 5G embedded modules are connected to the electronic device through a switch S1, B type 4G and 5G embedded modules are connected to the electronic device through a switch S2, C type 4G and 5G embedded modules are connected to the electronic device through a switch S3, and D type 4G and 5G embedded modules are connected to the electronic device through a switch S4, as shown in fig. 1, and the method includes:
step S11, determining a candidate module from the plurality of types of embedded modules under the condition that the electronic equipment meets the preset embedded module selection condition.
And step S12, powering up the module for candidate and traversing and controlling the switch to be closed so as to enable the link between the module for candidate and any user identification card to be successfully linked, thereby determining a target user identification card from a plurality of user identification cards.
And step S13, based on the target user identification card, the candidate module is used as a target dialing embedded module for dialing so as to register the electronic equipment on a network corresponding to the target user identification card.
In the embodiment of the invention, on the hardware connection, the electronic equipment is connected with a plurality of 4G and 5G embedded modules through a switch, the switch is controlled by a CPU of the electronic equipment, an optimal set of embedded modules is selected to be combined with a user identification card for use according to the network conditions of different embedded modules and SIM cards, when the equipment is started or the network fluctuation is large and the network quality is poor, the electronic equipment automatically switches, the same 4G and 5G embedded modules respectively carry out signal and network matching selection on the SIM cards of three operators, and if the same embedded module is not matched, for example: the embedded module is damaged, the embedded module cannot work in the current environment and the like, the next model of embedded module is switched, the SIM card is matched again, the log is recorded until the network is stable or all the network attempts are possibly unusable, the current algorithm is exited, and the application program is entered.
The technical scheme can be compatible with a plurality of embedded modules for use, the embedded modules of different manufacturers are changed without programming programs and setting parameters, the restriction of different signal strengths of different operators can be avoided, the algorithm is automatically matched and switched with the network states of different embedded modules in different areas according to the stability of different embedded modules in different environments, and therefore users, maintainers and developers are greatly facilitated and experienced, and the network stability, reliability, product applicability and compatibility of electronic equipment needing mobile communication are improved. Therefore, the user experience is greatly improved, the workload of maintenance personnel is reduced, the development personnel has better development architecture, and the workload of maintenance in the later development period is reduced.
In a preferred embodiment, referring to fig. 3, in step S11, when the electronic device meets a preset embedded module selection condition, determining a candidate module from the multiple types of embedded modules includes:
step S111, reading specified parameters of the electronic device, where the specified parameters include a network card name parameter and a routing table modification mode parameter.
Step S112, under the condition that the reading of the specified parameter is successful, obtaining serial port information of the electronic device, where the serial port information includes a serial port number of each serial port.
Step S113, according to the serial number, opening the serial port according to a preset sequence.
Step S114, after any serial port is successfully opened, sending a detection command to the multiple types of embedded modules through the serial port.
Step S115, when receiving reply information replied by any one of the embedded modules for the probe command, sending a query command to the embedded module corresponding to the reply information through the serial port.
Step S116, determining whether the corresponding embedded module is the candidate module according to the received embedded module information sent by the embedded module for the query command.
In a preferred embodiment, step S116, the determining, according to the received embedded module information sent by the embedded module for the query command, whether the corresponding embedded module is the candidate module includes:
and classifying the embedded modules according to the received dialing modes characterized in the embedded module information sent by the embedded modules aiming at the query command.
And sending a user identification card inquiry instruction to the classified embedded module.
And determining whether the corresponding embedded module is the candidate module according to whether the classified information of the user identification card returned by the embedded module is received.
In a preferred embodiment, referring to fig. 4, step S12, powering up the candidate module and controlling the switch to be closed in a traversing manner, so that the candidate module links with any one of the subscriber identity cards successfully, so as to determine a target subscriber identity card from a plurality of the subscriber identity cards, includes:
step S121, powering up the candidate module and controlling any one of the switches to be closed.
Step S122, determining whether the user identification card meets networking communication conditions or not under the condition that the candidate module is successfully linked with any user identification card.
And step S123, determining the user identification card as the target user identification card in the case that the user identification card meets the networking communication condition.
In a preferred embodiment, step S122, where the link linking between the candidate module and any of the subscriber identity cards is successful, the determining whether the subscriber identity card meets the networking communication condition includes:
and under the condition that the link between the module for candidate and any user identification card is successfully linked, dialing is carried out in a dialing mode corresponding to the module for candidate.
After dialing, the current network state is inquired according to the modified mode parameters of the routing table.
And determining whether the user identification card meets networking communication conditions according to the current network state.
In a preferred embodiment, the method further comprises:
and under the condition that dialing is unsuccessful, determining that the user identification card does not meet the networking communication condition, and controlling a switch corresponding to the user identification card to be disconnected so as to disconnect a link between the user identification card and the candidate module.
And controlling the switch corresponding to any one of the remaining subscriber identity cards to be closed, and executing the step of dialing in a dialing mode corresponding to the candidate module under the condition that the link between the candidate module and any one of the subscriber identity cards is successful, until the subscriber identity card meets the networking communication condition according to the current network state.
If dialing is unsuccessful after switching all the user identification cards, switching the embedded modules connected by the serial ports.
And sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
In a preferred embodiment, the method further comprises:
and repeatedly sending the detection command according to preset times under the condition that reply information sent by any serial port for the detection command is not received.
And if the detection command is repeatedly sent according to the preset times and the reply information is not received yet, switching the embedded module connected with the serial port.
And sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
In a preferred embodiment, the method further comprises:
and recording alarm information representing that the electronic equipment cannot dial under the condition that all the embedded modules cannot be used as the target dialing embedded module.
And alarming according to the alarming information, and reporting the alarming information based on the mqtt protocol.
In the following, the technical scheme of the present invention is explained by a specific embodiment, step 1, the system powers on the 4G and 5G embedded modules, and the SIM switch of the subscriber identity module card is turned off by default, and after the program starts to be executed, the system turns on any embedded module, for example, the embedded module and the SIM switch can be numbered, so that the default number embedded module and the SIM switch are turned on, and the default number embedded module and the default number SIM switch can be defined as the first number embedded module and the default number corresponding embedded module and SIM switch.
And 2, after power-on, the electronic equipment is communicated with the embedded module, the electronic equipment sends an instruction to the embedded module through a serial port to determine the type of the embedded module, and after the electronic equipment determines the type of the embedded module, the electronic equipment performs signal inspection and internet dialing in a corresponding mode of the embedded module.
And 3, when the electronic equipment sends an instruction to the embedded module through the serial port to perform signal checking signal is poor, the embedded module fails to dial on the internet or the network is poor, the current embedded module is used continuously, but the next SIM card is switched, and the internet dialing is repeated. After all SIM cards of the current embedded module fail to try, the current embedded module can be switched for 5 times, if the current embedded module continuously tries to dial with all SIM cards for 5 times, the current embedded module still cannot be connected with the network, and the next embedded module is switched at the moment.
And 4, switching to the next embedded module, and repeating the processes in the step 2 and the step 3 until switching to the last embedded module.
And 5, after all the embedded modules are failed to be switched, switching for multiple rounds, namely repeating the processes in the steps 2-4, wherein the switching round can be tentatively set for 5 times, when the embedded modules are not networked after switching for 5 rounds, the electronic equipment records a log and gives an alarm, the current algorithm is exited, and related data is sent to the cloud platform for monitoring through the mqtt protocol after successful networking.
Step 6, the intelligent matching switching algorithm is further described in detail below.
Step 7, the electronic device starts to execute the algorithm, firstly reads two parameters required by the electronic device program, the first is the name of the network card, the first is whether the network driver of the electronic device is ready, if the network driver is ready, the correct name of the network card is transmitted, and the second is the parameter of the modification mode of the routing table, so that the specific operation mode of the routing table of the electronic device is determined. The two parameters are transmitted by a caller calling the algorithm, the algorithm reserves a parameter transmission interface for the caller to transmit, the network card is a necessary parameter, the algorithm is exited when the parameter is not transmitted or transmitted in error, the route table modification mode is a selected parameter, and the parameter can be modified according to a default operation mode if the parameter is not transmitted or transmitted in error.
And 8, after receiving the parameters, the electronic equipment firstly executes the algorithm to judge the network card, if the network card does not exist, records error information to a log and sends out alarm information, the electronic equipment receives the error information, the current algorithm exits, and the network card is determined to exist.
Step 9, the electronic device executes the algorithm to start counting the serial port number of the electronic device, and records the serial port number (in the invention, the electronic device and the embedded module adopt serial port communication mode, and one device may have multiple peripheral devices to use serial port communication).
And 10, counting the serial number, starting from the serial port with the lowest serial number, opening the serial port, switching to open the next serial port if the serial port fails to be opened, recording error information to a log and sending alarm information if all the serial ports are not opened, receiving by the electronic equipment, and exiting the current algorithm.
And 11, after the serial port is successfully opened, the electronic equipment executes the algorithm to send an AT instruction to the embedded modules through the serial port, wherein the AT is a detection command, and all the embedded modules can uniformly reply to OK after receiving the detection command.
In step 12, if the "AT" is sent and the embedded module is not recovered, the method is continuously sent for five times, and if the "AT" is not recovered for five times, the next embedded module is switched (because the embedded module is not recovered and is irrelevant to the SIM card, the SIM card is not required to be switched), and after the embedded module is switched, the electronic device executes the algorithm to return to the process described in step 9 to start execution. Until the embedded module fails to switch for 5 rounds (record error information to log and send out alarm information, received by the electronic device, current algorithm exits) or successfully replies "OK".
And 13, after the AT command is sent and the embedded module replies OK, the electronic equipment executes the algorithm and sends the ATI command to the embedded module through the serial port for inquiring the product information of the embedded module, wherein the information is defined by manufacturers, but the information contains the name of the manufacturer of the module and the model of the embedded module and is used for distinguishing different embedded modules.
Step 14, if the "ATI" is sent, the embedded module is not replied, it is sent five times continuously, if the "ATI" is not replied five times continuously, then the next embedded module is switched (because the embedded module is not replied and is not related to the SIM card, the SIM card is not required to be switched), after the embedded module is switched, the electronic device executes the algorithm to return to the procedure described in step 9 again. Until the embedded module is switched for 5 rounds, the error information is recorded to the log and the alarm information is sent out, the current algorithm is received by the electronic equipment, and the embedded module information is successfully recovered.
Step 15, each embedded module has own dialing mode, basically different, after the information of the embedded module is recovered, different types of the embedded modules are classified according to the name of each manufacturer and the different types of the embedded modules, wherein the embedded modules in the same dialing mode are classified into one type, each type is arranged according to the sequence number, for example, the embedded modules are classified into A, B, C, D types in advance in a program according to the name, and after the current embedded module is identified, the embedded modules are waited for to dial according to the corresponding dialing mode.
And step 16, after the embedded module is identified, recording the model number of the embedded module into the MODE file.
Step 17, after determining the type of the embedded module, inquiring whether the SIM card exists according to a corresponding mode, wherein the embedded module is currently generally an "at+cpin.
And step 18, after sending the command for inquiring the existence of the SIM card, if the command for inquiring the existence is not returned, detecting for 5 times, executing the algorithm by the electronic equipment to switch the SIM card after 5 times, and repeating the detection command.
Step 19, until all SIM cards are switched 5 times or detected. If the SIM card is still not found after switching all the SIM cards 5, switching the embedded module, and executing the algorithm by the electronic equipment, returning to the process in the step 9 again to start execution.
And 20, after the SIM card is determined to exist, the algorithm dials in a corresponding mode according to the model of the embedded module, and after the dialing is completed, the algorithm operates in a corresponding mode for the routing table according to the parameter II transferred by the function call in the step 7.
Step 21, after dialing and operating the routing table in a corresponding manner, the electronic device executes the algorithm to send a network state query command to query the current network state through the electronic device (generally an "at+cereg.
Step 22, if the network registration connection is queried to fail, the electronic device continuously sends the network query command for 5 times at intervals of 1s, if the network registration connection is replied successfully, a successful networking log is recorded and an application program starts to run, and the current state is transferred to the cloud platform for monitoring through the mqtt protocol. Otherwise, if the process does not reply, the program switches the SIM card, and returns to step 19, and the process starts to be executed.
The embodiment of the invention also provides an intelligent switching device of an embedded module, which is applied to electronic equipment, wherein the electronic equipment is configured with a plurality of types of embedded modules, each embedded module is connected with a plurality of user identification cards through a switch, and referring to fig. 5, the device 500 comprises:
a determining module 510 configured to determine a module for candidate from the plurality of types of embedded modules, if the electronic device satisfies a preset embedded module selection condition;
a control module 520 configured to power up the candidate module and traverse and control the switch to be closed, so that the candidate module and any one of the subscriber identity cards are successfully linked to determine a target subscriber identity card from a plurality of the subscriber identity cards;
And the dialing module 530 is configured to dial the candidate module as a target dialing embedded module based on the target subscriber identity card, so as to register the electronic equipment on a network corresponding to the target subscriber identity card.
In a preferred embodiment, the determining module 510 is configured to:
reading designated parameters of the electronic equipment, wherein the designated parameters comprise network card name parameters and routing table modification mode parameters;
under the condition that the appointed parameters are successfully read, serial port information of the electronic equipment is obtained, wherein the serial port information comprises serial port numbers of each serial port;
opening the serial ports according to the serial port numbers and a preset sequence;
after any serial port is successfully opened, a detection command is sent to the embedded modules of the multiple types through the serial port;
under the condition that any one of the embedded modules receives reply information replied by the detection command, sending a query command to the embedded module corresponding to the reply information through the serial port;
and determining whether the corresponding embedded module is the candidate module according to the received embedded module information sent by the embedded module aiming at the query command.
In a preferred embodiment, the determining module 510 is configured to:
classifying the embedded modules according to the received dialing modes characterized in the embedded module information sent by the embedded modules aiming at the query command;
sending a user identification card inquiry instruction to the classified embedded module;
and determining whether the corresponding embedded module is the candidate module according to whether the classified information of the user identification card returned by the embedded module is received.
In a preferred embodiment, the control module 520 is configured to:
powering up the candidate module and controlling any switch to be closed;
under the condition that the link between the candidate module and any user identification card is successful, determining whether the user identification card meets networking communication conditions;
and determining the user identification card as the target user identification card under the condition that the user identification card meets the networking communication condition.
In a preferred embodiment, the control module 520 is configured to:
under the condition that the link between the candidate module and any user identification card is successful, dialing is carried out in a dialing mode corresponding to the candidate module;
After dialing, inquiring the current network state according to the routing table modification mode parameters;
and determining whether the user identification card meets networking communication conditions according to the current network state.
In a preferred embodiment, the control module 520 is configured to:
under the condition that dialing is unsuccessful, determining that the user identification card does not meet the networking communication condition, and controlling a switch corresponding to the user identification card to be disconnected so as to disconnect a link between the user identification card and the candidate module;
controlling the switch corresponding to any one of the rest user identification cards to be closed, and executing the step of dialing in a dialing mode corresponding to the candidate module under the condition that the link between the candidate module and any one of the user identification cards is successful, until the user identification card meets networking communication conditions according to the current network state;
if dialing is unsuccessful after all the user identification cards are switched, switching the embedded module connected with the serial port;
and sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
In a preferred embodiment, the apparatus 500 further comprises: a switching module configured to:
repeatedly sending the detection command according to preset times under the condition that reply information sent by any serial port for the detection command is not received;
if the detection command is repeatedly sent according to the preset times and the reply information is not received yet, switching the embedded module connected with the serial port;
and sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
In a preferred embodiment, the apparatus 500 further comprises: a recording module configured to:
recording alarm information representing that the electronic equipment cannot dial under the condition that all the embedded modules cannot be used as the target dialing embedded module;
and alarming according to the alarming information, and reporting the alarming information based on the mqtt protocol.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The embodiment of the invention also provides electronic equipment, which comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the executable instructions stored by the memory to implement the method of any one of the preceding embodiments.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (8)

1. An intelligent switching method of an embedded module, which is characterized by being applied to electronic equipment, wherein the electronic equipment is configured with a plurality of types of embedded modules, each embedded module is connected with a plurality of user identification cards through a switch, and the method comprises the following steps:
Under the condition that the electronic equipment meets the preset embedded module selection condition, determining a candidate module from the plurality of types of embedded modules;
powering up the module for candidate and traversing and controlling the switch to be closed so as to enable the link between the module for candidate and any user identification card to be successfully linked, thereby determining a target user identification card from a plurality of user identification cards;
based on the target user identification card, the candidate module is used as a target dialing embedded module for dialing so as to register the electronic equipment on a network corresponding to the target user identification card;
and determining a candidate module from the plurality of types of embedded modules under the condition that the electronic equipment meets a preset embedded module selection condition, wherein the candidate module comprises:
reading designated parameters of the electronic equipment, wherein the designated parameters comprise network card name parameters and routing table modification mode parameters;
under the condition that the appointed parameters are successfully read, serial port information of the electronic equipment is obtained, wherein the serial port information comprises serial port numbers of each serial port;
opening the serial ports according to the serial port numbers and a preset sequence;
After any serial port is successfully opened, a detection command is sent to the embedded modules of the multiple types through the serial port;
under the condition that any one of the embedded modules receives reply information replied by the detection command, sending a query command to the embedded module corresponding to the reply information through the serial port;
determining whether the corresponding embedded module is the candidate module according to the received embedded module information sent by the embedded module aiming at the query command;
the step of powering up the module for candidate and traversing and controlling the switch to be closed so as to enable the link between the module for candidate and any user identification card to be successful, so as to determine a target user identification card from a plurality of user identification cards, and the step of determining the target user identification card comprises the following steps:
powering up the candidate module and controlling any switch to be closed;
under the condition that the link between the candidate module and any user identification card is successful, determining whether the user identification card meets networking communication conditions;
and determining the user identification card as the target user identification card under the condition that the user identification card meets the networking communication condition.
2. The method according to claim 1, wherein the determining whether the corresponding embedded module is the candidate module according to the received embedded module information sent by the embedded module for the query command includes:
classifying the embedded modules according to the received dialing modes characterized in the embedded module information sent by the embedded modules aiming at the query command;
sending a user identification card inquiry instruction to the classified embedded module;
and determining whether the corresponding embedded module is the candidate module according to whether the classified information of the user identification card returned by the embedded module is received.
3. The method according to claim 2, wherein determining whether the subscriber identity card satisfies networking communication conditions in the case that the link linking between the candidate module and any of the subscriber identity cards is successful, comprises:
under the condition that the link between the candidate module and any user identification card is successful, dialing is carried out in a dialing mode corresponding to the candidate module;
after dialing, inquiring the current network state according to the routing table modification mode parameters;
And determining whether the user identification card meets networking communication conditions according to the current network state.
4. A method according to claim 3, characterized in that the method further comprises:
under the condition that dialing is unsuccessful, determining that the user identification card does not meet the networking communication condition, and controlling a switch corresponding to the user identification card to be disconnected so as to disconnect a link between the user identification card and the candidate module;
controlling the switch corresponding to any one of the rest user identification cards to be closed, and executing the step of dialing in a dialing mode corresponding to the candidate module under the condition that the link between the candidate module and any one of the user identification cards is successful, until the user identification card meets networking communication conditions according to the current network state;
if dialing is unsuccessful after all the user identification cards are switched, switching the embedded module connected with the serial port;
and sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
5. The method according to claim 1, wherein the method further comprises:
Repeatedly sending the detection command according to preset times under the condition that reply information sent by any serial port for the detection command is not received;
if the detection command is repeatedly sent according to the preset times and the reply information is not received yet, switching the embedded module connected with the serial port;
and sending the detection command to the switched embedded module through the serial port to determine whether the switched embedded module is the candidate module.
6. The method of claim 5, wherein the method further comprises:
recording alarm information representing that the electronic equipment cannot dial under the condition that all the embedded modules cannot be used as the target dialing embedded module;
and alarming according to the alarming information, and reporting the alarming information based on the mqtt protocol.
7. An embedded module intelligent switching device, characterized in that is applied to electronic equipment, electronic equipment is configured with a plurality of types of embedded modules, every embedded module all is connected with a plurality of user identification cards through the switch, and the device includes:
a determining module configured to determine a module for candidate from among the plurality of types of embedded modules, if the electronic device satisfies a preset embedded module selection condition;
The control module is configured to power up the candidate module and control the switch to be closed in a traversing way so that the candidate module is successfully linked with a link of any user identification card, and a target user identification card is determined from a plurality of user identification cards;
the dialing module is configured to dial the candidate module serving as a target dialing embedded module based on the target user identification card so as to register the electronic equipment on a network corresponding to the target user identification card;
and determining a candidate module from the plurality of types of embedded modules under the condition that the electronic equipment meets a preset embedded module selection condition, wherein the candidate module comprises:
reading designated parameters of the electronic equipment, wherein the designated parameters comprise network card name parameters and routing table modification mode parameters;
under the condition that the appointed parameters are successfully read, serial port information of the electronic equipment is obtained, wherein the serial port information comprises serial port numbers of each serial port;
opening the serial ports according to the serial port numbers and a preset sequence;
after any serial port is successfully opened, a detection command is sent to the embedded modules of the multiple types through the serial port;
Under the condition that any one of the embedded modules receives reply information replied by the detection command, sending a query command to the embedded module corresponding to the reply information through the serial port;
determining whether the corresponding embedded module is the candidate module according to the received embedded module information sent by the embedded module aiming at the query command;
the step of powering up the module for candidate and traversing and controlling the switch to be closed so as to enable the link between the module for candidate and any user identification card to be successful, so as to determine a target user identification card from a plurality of user identification cards, and the step of determining the target user identification card comprises the following steps:
powering up the candidate module and controlling any switch to be closed;
under the condition that the link between the candidate module and any user identification card is successful, determining whether the user identification card meets networking communication conditions;
and determining the user identification card as the target user identification card under the condition that the user identification card meets the networking communication condition.
8. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
Wherein the processor is configured to execute the executable instructions stored by the memory to implement the method of any one of claims 1-6.
CN202310120008.0A 2023-02-16 2023-02-16 Intelligent switching method and device for embedded modules and electronic equipment Active CN115843078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310120008.0A CN115843078B (en) 2023-02-16 2023-02-16 Intelligent switching method and device for embedded modules and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310120008.0A CN115843078B (en) 2023-02-16 2023-02-16 Intelligent switching method and device for embedded modules and electronic equipment

Publications (2)

Publication Number Publication Date
CN115843078A CN115843078A (en) 2023-03-24
CN115843078B true CN115843078B (en) 2023-05-05

Family

ID=85579744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310120008.0A Active CN115843078B (en) 2023-02-16 2023-02-16 Intelligent switching method and device for embedded modules and electronic equipment

Country Status (1)

Country Link
CN (1) CN115843078B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118870473A (en) * 2024-08-19 2024-10-29 重庆杰速高科技有限公司 Embedded wireless network system and method for accessing wireless network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021162146A1 (en) * 2020-02-13 2021-08-19 엘지전자 주식회사 Electronic device having sim card
CN111541809B (en) * 2020-05-16 2021-06-22 北京联众智芯科技有限公司 Double 4G module dialing method of industrial personal computer
CN114071523A (en) * 2021-10-14 2022-02-18 深圳市有方科技股份有限公司 Communication terminal and communication method based on double wireless communication modules
CN114928833A (en) * 2022-05-16 2022-08-19 宁波三星医疗电气股份有限公司 Network link login method and device, power terminal and storage medium
CN115442864B (en) * 2022-08-09 2024-03-29 广州通康创智软件有限公司 Gateway link switching control method, device and system based on multiple modules

Also Published As

Publication number Publication date
CN115843078A (en) 2023-03-24

Similar Documents

Publication Publication Date Title
US7650205B2 (en) Process for controlling industrial robots, and related robots, systems and computer programs
US7783387B2 (en) Process for controlling industrial robots, and related robots, systems and computer programs
CN115843078B (en) Intelligent switching method and device for embedded modules and electronic equipment
US11240068B2 (en) Method for detecting and identifying items of equipment communicating according to a Modbus protocol and communication controller for the implementation of such a method
KR100788851B1 (en) System and method for determining a designated connection between components of computing devices
CN102246469A (en) Data transfer device
CN114244686B (en) Communication fault detection method, device and system
CN109246166A (en) Communication means, device and unmanned plane
CN116955232A (en) Hardware identification method and device based on control system
EP3869739B1 (en) Method for monitoring apparatus
CN116133021A (en) Wireless network card self-management flow based on LINUX board card
JP2001320754A (en) Mobile communication system with automatic registration function of radio base station installed position, and automatic registration method for radio base station installed position
CN112383437A (en) Intelligent household appliance network distribution method, storage medium, network distribution terminal and intelligent household appliance
CN110532012B (en) Distributed system software upgrading method and device
CN114554466A (en) Equipment detection method and device
US6721558B1 (en) Method and apparatus for determining the configuration of hardware installed on remote equipment
CN115524957B (en) Intelligent wireless launching control system and method applied to rocket wireless launching detection
US6922143B2 (en) Serial bus type configuration recognition and alarm apparatus
CN115733736B (en) Fault switching method, computer readable storage medium, system and device
CN112654059B (en) Method and device for determining reason of abnormal transmission communication of base station
CN111526087B (en) Automatic access method for various gateways based on platform of Internet of things
US7610063B2 (en) System for determining information for circuit packs connected by a single line bus
US7197551B2 (en) Method and system for implementing supervision in a telecommunication system
CN108718326B (en) Intelligent data exchange system of sensor of internet of things based on complex network environment
CN117528464A (en) Multi-device Bluetooth pairing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 215500 no.1150, Southeast Avenue, Southeast street, Changshu City, Suzhou City, Jiangsu Province

Patentee after: Yonglian Technology (Changshu) Co.,Ltd.

Address before: 215500 no.1150, Southeast Avenue, Southeast street, Changshu City, Suzhou City, Jiangsu Province

Patentee before: Yonglian smart energy technology (Changshu) Co.,Ltd.

CP01 Change in the name or title of a patent holder