CN111132097A - Wireless module driving method and device, wireless module, terminal and storage medium - Google Patents

Wireless module driving method and device, wireless module, terminal and storage medium Download PDF

Info

Publication number
CN111132097A
CN111132097A CN201911402786.9A CN201911402786A CN111132097A CN 111132097 A CN111132097 A CN 111132097A CN 201911402786 A CN201911402786 A CN 201911402786A CN 111132097 A CN111132097 A CN 111132097A
Authority
CN
China
Prior art keywords
state
wireless module
module
configuration
setting
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.)
Granted
Application number
CN201911402786.9A
Other languages
Chinese (zh)
Other versions
CN111132097B (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.)
Shenzhen Queclink Communication Technology Co ltd
Original Assignee
Shenzhen Queclink Communication Technology 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 Shenzhen Queclink Communication Technology Co ltd filed Critical Shenzhen Queclink Communication Technology Co ltd
Priority to CN201911402786.9A priority Critical patent/CN111132097B/en
Publication of CN111132097A publication Critical patent/CN111132097A/en
Application granted granted Critical
Publication of CN111132097B publication Critical patent/CN111132097B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a driving method and a driving device of a wireless module, the wireless module, a terminal and a storage medium, wherein the method comprises the following steps: determining the working state of the wireless module; and calling a corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module. Through the mode, the wireless module management of different systems and different manufacturers can be compatible, and a uniform control interface drive is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and the transportability of the drive are improved.

Description

Wireless module driving method and device, wireless module, terminal and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a driving method and device of a wireless module, the wireless module, a terminal and a storage medium.
Background
With the rapid development of the internet of things industry, the wireless communication module is used as an indispensable component of the internet of things terminal, and the function of the wireless communication module is more and more powerful.
In the prior art, a wireless communication module is usually connected with other serial devices, and wireless communication is realized through an internal driver of the wireless communication module. However, manufacturers for manufacturing wireless communication modules are numerous, and the driving modes of the wireless communication modules of different standards and different manufacturers are not uniform, so that the universality of the driving model of the internet of things terminal is poor.
Disclosure of Invention
The embodiment of the invention provides a driving method and device of a wireless module, the wireless module, a terminal and a storage medium, and aims to solve the problem that the driving model of the wireless module in the prior art is poor in universality.
The invention provides a driving method of a wireless module, which is applied to an internet of things terminal comprising the wireless module, and the method comprises the following steps:
determining the working state of the wireless module;
and calling a corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module.
In one possible design, the operating state of the radio module includes: the system comprises one or more of an initialization state, a configuration network state, a normal working state, an outgoing call state, a telephone access state, a PDP reset state, a restarting state and a shutdown state.
In a possible design, the calling the corresponding driver through a preset interface according to the working state includes:
if the wireless module is in an initialization state, calling an initialization driver, and executing one or more operations of setting baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, initializing before checking the SIM card, detecting the SIM card, initializing the SIM card, setting short message configuration, setting grid system configuration and setting enabling low power consumption.
In a possible design, the calling the corresponding driver through a preset interface according to the working state includes:
if the wireless module is in the network configuration state, calling a network configuration driver, and executing any one or more operations of APN configuration, network registration and PDP activation.
In a possible design, the calling the corresponding driver through a preset interface according to the working state includes:
if the wireless module is in a normal working state, executing abnormal detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality;
if no abnormity exists, initiating data service.
In a possible design, the calling the corresponding driver through a preset interface according to the working state includes:
if the wireless module is in a calling state or a telephone access state, controlling the wireless module to enter a call mode, wherein the call mode is independent of other data services;
checking whether the call state is finished;
and if the call state is finished, exiting the call mode.
In a possible design, the calling the corresponding driver through a preset interface according to the working state includes:
if the wireless module is in a PDP reset state, executing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; wherein the preset trigger condition comprises: any one or any more of PDP loss, registration loss, socket creation successive failures, network loss.
In a possible design, the calling the corresponding driver through a preset interface according to the working state includes:
if the wireless module is in a restarting state, cleaning a socket link table and an environment variable, and jumping to the initialization state after shutdown is completed;
and if the wireless module is in a shutdown state, cleaning the socket linked list and the environment variable, and closing the power supply.
A second aspect of the present invention provides a driving apparatus for a wireless module, including: a memory and a processor; the memory is used for storing a driving program;
the processor is used for determining the working state of the wireless module; and calling a corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module.
In one possible design, the operating state of the radio module includes: initialization state, configuration network state, normal working state, outgoing call state, telephone access state, PDP reset state, restart state and shutdown state.
In one possible design, the processor is specifically configured to:
when the wireless module is in an initialization state, calling an initialization driver, and executing one or more operations of setting baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, initializing before checking the SIM card, detecting the SIM card, initializing the SIM card, setting short message configuration, setting grid system configuration and setting enabling low power consumption.
In one possible design, the processor is specifically configured to:
and when the wireless module is in a network configuration state, calling a network configuration driver, and executing any one or more operations of APN configuration, network registration and PDP activation.
In one possible design, the processor is specifically configured to:
when the wireless module is in a normal working state, executing abnormal detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality; if no abnormity exists, initiating data service.
In one possible design, the processor is specifically configured to:
when the wireless module is in a calling state or a telephone access state, controlling the wireless module to enter a call mode, wherein the call mode is independent of other data services;
checking whether the call state is finished; and if the call state is finished, exiting the call mode.
In one possible design, the processor is specifically configured to:
when the wireless module is in a PDP reset state, executing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; wherein the preset trigger condition comprises: any one or any more of PDP loss, registration loss, socket creation successive failures, network loss.
In one possible design, the processor is specifically configured to:
when the wireless module is in a restarting state, cleaning a socket link table and an environment variable, and jumping to the initialization state after shutdown is completed;
and when the wireless module is in a power-off state, cleaning the socket linked list and the environment variable, and closing the power supply.
A third aspect of the present invention provides a wireless module, comprising: the device comprises a wireless communication module, a functional module and a processor; the processor is connected with the communication module and the functional module; the processor comprises a driving program corresponding to the working state of the processor; and the processor calls a corresponding driving program through a preset interface according to the working state of the processor so as to execute the control of the wireless communication module and the functional module.
In one possible design, the operating state of the radio module includes: the system comprises one or more of an initialization state, a configuration network state, a normal working state, an outgoing call state, a telephone access state, a PDP reset state, a restarting state and a shutdown state.
A fourth aspect of the present invention provides a terminal, comprising: a wireless module, and an apparatus as in any of the second aspects.
A fifth aspect of the present invention provides a storage medium having stored thereon a computer program for executing the method of the first aspect.
The driving method and device of the wireless module, the terminal and the storage medium provided by the invention are applied to the terminal of the Internet of things comprising the wireless module, and the working state of the wireless module is determined; and calling a corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module. Through the mode, the wireless module management of different systems and different manufacturers can be compatible, and a uniform control interface drive is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and the transportability of the drive are improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the following briefly introduces the drawings needed to be used in the description of the embodiments or the prior art, and obviously, the drawings in the following description are some embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without inventive labor.
FIG. 1 illustrates a prior art wireless communication module driver model;
fig. 2 is a driving model of a wireless communication module according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a driving method of a wireless module according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of configuring a network state according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a normal operating state according to an embodiment of the present application;
FIG. 6 is a schematic flow chart illustrating an outgoing call state provided by an embodiment of the present application;
fig. 7 is a schematic flowchart of a telephone access state provided in an embodiment of the present application;
fig. 8 is a schematic flow chart illustrating a PDP reset state according to an embodiment of the present application;
fig. 9 is a schematic flowchart of a restart state according to an embodiment of the present application;
fig. 10 is a schematic flow chart of a shutdown state according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of a driving apparatus of a wireless module according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the rapid development of the internet of things industry, the wireless communication module is used as an indispensable component of the internet of things terminal, and the function of the wireless communication module is more and more powerful. The wireless cellular communication module integrates a radio frequency chip, a baseband processing chip, a memory, a power amplifier device and the like on a circuit board, and has a function module which has an independent operating system, radio frequency processing and baseband processing and provides a standard interface. The wireless cellular communication module has all basic functions of sending SMS short messages, voice communication, GPRS data transmission and the like, and the communication is carried out based on a cellular network. In brief, the wireless communication module is a mobile phone with a keyboard, a display screen and a battery. The wireless communication module is used as a core component of the communication of the Internet of things and directly related to the quality and performance of the terminal equipment, and a universal, reasonable, stable and reliable module management drive is designed and is a necessary step for the Internet of things equipment to realize the terminal communication.
The wireless communication module is used as a basic communication component and has a great amount of application in various fields, and is a bridge for communication between terminals of the internet of things. In the prior art, a wireless communication module is usually connected with other serial devices, and wireless communication is realized through an internal driver of the wireless communication module. The wireless communication module replaces the original wired RS232 and RS485 communication and the like. The wireless communication module does not need construction and wiring, can greatly save materials and labor cost, and is very widely used. Such as an electronic platform scale, wireless meter reading, wireless data acquisition, a wireless attendance access control system, wireless queuing, a wireless LED display screen, wireless pan-tilt control and the like.
However, manufacturers for manufacturing wireless communication modules are numerous, and the driving modes of the wireless communication modules of different standards and different manufacturers are not uniform, so that the universality of the driving model of the internet of things terminal is poor.
In order to solve the above problem, embodiments of the present application provide a method and an apparatus for driving a wireless module, a terminal, and a storage medium, so as to solve the problem in the prior art that a driving model of a wireless module is poor in universality.
Fig. 1 is a driving model of a wireless communication module in the prior art, and as shown in fig. 1, the driving model of the wireless communication module in the prior art does not design a driver independently, and the control and application programs of the whole module are mixed together, and the application has high coupling performance, which is not beneficial to transplantation and expansion. Fig. 2 is a wireless communication module driver model provided in this embodiment of the present application, and as shown in fig. 2, the driver model first separates the entire wireless communication module driver (for example, may include GPIO driver, serial port driver, and the like), designs an interface unified for an application, and has almost no coupling with the application, and is completely an independent component. On the basis of the driving model, the state division is carried out on the communication module, so that the unified management of different modules can be realized, the module management driving of different systems and different manufacturers is compatible, and the driving of a unified control interface is provided for an application layer. In actual use, due to the complex and variable network environment, the wireless device is often abnormal, and if the wireless device does not have the strong abnormal processing energy and recovery capability, the wireless device cannot stably work for a long time. Thus, the main functions implemented are: TCP/UDP data receiving and sending, TXT/PDU message receiving and sending, telephone dialing/answering, exception handling, exception recovery and the like. Finally, the method provided by this embodiment adopts a state machine driving model design, divides the state of the wireless module into different working states, and calls a corresponding driving program through a preset interface according to the working state of the wireless module to perform state management on the wireless module.
The method can be compatible with the management of the wireless modules of different systems and different manufacturers, and provides a uniform control interface drive for an application layer, thereby realizing the state management of different wireless modules and improving the compatibility and transportability of the drive.
The following describes in detail the technical solutions of the embodiments of the present application with specific embodiments, taking a terminal device integrated or installed with a relevant execution code as an example. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 3 is a schematic flowchart of a driving method of a wireless module according to an embodiment of the present disclosure, and as shown in fig. 3, the method in this embodiment includes:
s101, determining the working state of the wireless module.
In this embodiment, the operating state of the invalid module is first determined. Wherein, the operating condition of wireless module includes: initialization state, configuration network state, normal working state, outgoing call state, telephone access state, PDP reset state, restart state and shutdown state.
Specifically, a state machine driving model design is adopted, and the state of the wireless module is divided into different working states, including an initialization state (STAT _ INITI), a configuration network state (STAT _ CTX _ SET), a normal working state (STAT _ normal), a calling state (STAT _ call), a telephone access state (STAT _ call), a PDP RESET state (STAT _ CTX _ RESET), a restart state (STAT _ REBOOT), and a power off state (STAT _ power). These operating states macroscopically cover the main operating states of the wireless communication module.
And S102, calling a corresponding driving program through a preset interface according to the working state so as to execute state management of the wireless module.
In this embodiment, the corresponding driver may be called through a preset interface according to the working state, so as to perform state management on the wireless module. Therefore, the wireless module management system can be compatible with wireless module management of different systems and different manufacturers, and provides a uniform control interface drive for an application layer, thereby realizing state management of different wireless modules and improving the compatibility and transportability of the drive. Next, a driving method in each operation state will be described in detail.
Preferably, if the wireless module is in the initialization state, the initialization driver is called, and any one or any more of baud rate setting, environment configuration setting, SIM card format configuration setting, enabling radio frequency setting, initialization before checking the SIM card, SIM card detection, SIM card initialization after the SIM card is completely prepared (Ready), short message configuration setting, grid system configuration setting, and enabling low power consumption setting are performed.
Specifically, the module initialization main operation means that each module is started and basic parameters of the module are initialized, and before the wireless module really starts to operate, an initialization driver is called to set the basic parameters and check hardware, specifically including power-off, power-on, baud rate setting, environment configuration setting, SIM card format configuration setting, enabled radio frequency setting, initialization before SIM card checking, SIM card detection, SIM card initialization, short message configuration setting, grid system configuration setting, enabled low power consumption setting and the like.
Preferably, if the wireless module is in the network configuration state, a network configuration driver is called to perform any one or more operations of APN configuration, network registration, PDP activation.
Specifically, the main task of configuring the network environment state is to establish a complete communication environment and to establish a reliable and effective environment for subsequent socket communication. The configuration network environment roughly contains: configuring APN, registering network and activating PDP. Fig. 4 is a schematic flowchart of a process of configuring a network state according to an embodiment of the present application, and as shown in fig. 4, a reliable and effective environment is established by configuring an APN, registering a network, activating a PDP, checking a state, and the like. If successful, the status of the wireless module is set to a normal operational status (STAT _ NORMALT). And if the failure times exceed a preset threshold, setting the state of the wireless module as a restart state (STAT _ REBOOT). Specifically, referring to fig. 4, first, an APN is preset, AT + COPS is set as a number, a CSQ is queried, whether registration is successful is queried, and if registration is queried to be failed, manual registration is selected; if the manual registration is not started, entering a network searching interval for waiting; if the manual registration is started, manually searching the network; if the manual network searching fails, entering a network searching interval for waiting, and if the manual network searching succeeds, returning to query the CSQ. If the registration is successfully inquired, whether the registration is successful is checked again, and if the registration is failed, AT + COPS is reset to be a number; if the registration is successful, initializing a POP environment, deactivating the PDP and configuring the APN. Judging whether the network attachment is successful; if the network attachment is successful, activating the PDP, if the activation is successful, reading all unread short messages, replying the SOCKET, and entering a normal working state; if the network attachment fails, the registration is checked again for success. If the activation fails, whether the failure frequency exceeds a preset threshold value is judged, if so, a restarting state is entered, and if not, whether the registration is successful is checked again.
Preferably, if the wireless module is in a normal working state, performing abnormal detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality; if no abnormity exists, initiating data service.
Specifically, the normal operating state refers to a state in which all network environments are ready, including network registration, PDP activation, and the like. And is also the only state that can initiate data traffic, all socket data traffic being conducted in this state. The normal working state comprises a plurality of abnormal checks, and when the abnormal checks are detected, the corresponding state can be immediately jumped until the network environment is restored to the normal working state again. Fig. 5 is a schematic flow chart of a normal operating state according to an embodiment of the present application. Specifically, as shown in fig. 5, in the normal operating state, if an exception check is performed, if any one or more of a failure in creating a continuous socket, a failure in connecting a server continuously, a failure in transmitting data continuously, a too frequent socket deletion, a PDP disconnection, a network registration loss is found by a timed inquiry registration (for example, 3min each time), the state of the wireless module is set to be a PDP RESET state (STAT _ CTX _ RESET). When the abnormal condition is checked, if any one or more conditions such as the CSQ is found to be weak continuously and the SMS is read continuously (for example, every time of 3min), the state of the wireless module is set to be a restart state (STAT _ REBOOT).
Preferably, if the wireless module is in a calling state or a telephone access state, the wireless module is controlled to enter a call mode, wherein the call mode is independent of other data services; checking whether the call state is finished; and if the call state is finished, exiting the call mode.
Specifically, when a telephone call is made, it is not desired to be disturbed by other services, and other services may not be performed normally, so that the call state can be separated for better processing the telephone service, and the stability and reliability of the call can be ensured. The call working state is mainly used for processing the telephone function service, and the call state is withdrawn after the service is finished. Fig. 6 is a schematic flow chart of a calling state provided in the embodiment of the present application, and fig. 7 is a schematic flow chart of a phone access state provided in the embodiment of the present application, and as shown in fig. 6 and fig. 7, when the calling state or the phone access state is in the calling state, a call state check is performed to ensure stability and reliability of a call. Only after the call state is finished, the state of the wireless module is set to a normal operation state (STAT _ normal) for allowing other services to be received. Specifically, as shown in fig. 6, when the mobile phone is in the outgoing call state, the mobile phone is accessed to determine whether the user answers the call, and if the user answers the call, the mobile phone circularly determines whether the user is still in the call state; if the call is not answered or the call is hung up, the process is ended. At this time, the state of the wireless module enters a restart state from the outgoing call state. As shown in fig. 7, when the mobile phone is in the phone access state, the phone is accessed to determine whether the user answers the phone, and if the user answers the phone, the mobile phone circularly determines whether the mobile phone is still in the call state; if the call is not answered or the call is hung up, the process is ended. At this point the state of the wireless module enters a restart state from the phone access state.
Preferably, if the wireless module is in the PDP reset state, the PDP deactivation operation is executed according to a preset trigger condition, and the wireless module jumps to the configuration network state; the preset trigger conditions include: any one or any more of PDP loss, registration loss, socket creation successive failures, network loss.
Specifically, the primary role of the PDP reset state is to restore the network environment to reset the PDP. In an actual environment, along with the movement of equipment, the change of a network environment and the like, the current network environment is abnormal, such as PDP loss, registration loss and socket creation continuous failure. Some network causes and some modules may work abnormally, and a special state is needed to restore the network environment at this time, which is the design purpose of the PDP resetting state. The main contents are: and the PDP is deactivated and jumps to the network configuration state again. The trigger conditions are: and in a normal working state, the socket is failed to continuously establish, the PDP is lost, the network is lost and the like. Fig. 8 is a schematic flow chart illustrating a PDP reset state according to an embodiment of the present application. Specifically, as shown in fig. 8, if the wireless module is in the PDP reset state, the following steps may be sequentially performed: deleting all sockets, deleting all HTTP, deleting all HTTPS, deactivating PDP, etc. And if the deactivation is successful, setting the state of the wireless module as a configuration network state (STAT _ CTX _ SET). If the deactivation fails, the wireless module is powered off, and at this time, the state of the wireless module is set to be an initialization state (STAT _ INITI).
Preferably, if the wireless module is in a restart state, the socket link table and the environment variable are cleaned, and the wireless module jumps to an initialization state after shutdown is completed; and if the wireless module is in a shutdown state, cleaning the socket linked list and the environment variable, and closing the power supply.
In particular, the main function of the restart state is to restart the module. And the module is required to be restarted when the service is required and the exception is processed. The restarting state operation is mainly to make the module release resources safely, store important data and restart the module after the important data is saved. Fig. 9 is a schematic flowchart of a restart state provided in this embodiment, and as shown in fig. 9, if the wireless module is in the restart state, the command linked list check, the socket linked list cleaning, the environment variable cleaning, setting AT + COPS to 0, turning off the radio frequency, turning off the wireless module, and setting the state of the wireless module to an initialization state (STAT _ INITI) are performed in sequence. Specifically, as shown in fig. 9, when the system is in a restart state, the command linked list is checked, and if the command linked list is empty, the socket linked list is cleared; if the command chain table is not empty, the command is waited to be executed completely (for example, the longest waiting time may be set to be 3 min). Further, after the socket linked list is cleaned, the environment variable is cleaned in sequence, the AT + COPS is set to be 0, the radio frequency is closed, and the machine is shut down. After shutdown, the state of the wireless module enters the initialization state (STAT INITI).
The shutdown state is the shutdown of the module. Shutdown operations are designed because long-term shutdown of module operation may be required to conserve power depending on business needs. The main task of the shutdown state is to safely release program resources, normally shut down the module and then cut off the power supply. Fig. 10 is a schematic flow chart of a power-off state provided in this embodiment, and as shown in fig. 10, if the wireless module is in the power-off state, the checking of the command linked list, the cleaning of the socket linked list, the cleaning of the environment variable, the setting of AT + COPS as 0, the turning off of the radio frequency, the power-off, and the turning off of the power supply are sequentially performed, and the state of the wireless module is set to the power-off state (STAT _ powered off). Specifically, as shown in fig. 10, when the system is in the shutdown state, the command linked list is checked, and if the command linked list is empty, the socket linked list is cleared; if the command chain table is not empty, the command is waited to be executed completely (for example, the longest waiting time may be set to be 3 min). Further, after the socket linked list is cleaned, the environment variable is cleaned in sequence, the AT + COPS is set to be 0, the radio frequency is closed, and the machine is shut down. After power down, the state of the wireless module enters a power off state (STAT _ POWEROFF).
The embodiment can be applied to the terminal of the internet of things comprising the wireless module, and the working state of the wireless module is determined; and calling the corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module. Through the mode, the wireless module management of different systems and different manufacturers can be compatible, and a uniform control interface drive is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and the transportability of the drive are improved.
Fig. 11 is a schematic structural diagram of a driving apparatus of a wireless module according to an embodiment of the present disclosure. The driving device of the wireless module can be realized by software, hardware or a combination of the two, and can be the terminal device.
As shown in fig. 11, the driving apparatus of the wireless module includes: a memory 31 and a processor 32.
A memory 31 for storing a driver;
processor 32 is configured to determine an operating state of the wireless module; and calling the corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module.
In one possible design, the operating state of the radio module includes: initialization state, configuration network state, normal working state, outgoing call state, telephone access state, PDP reset state, restart state and shutdown state.
In one possible design, processor 32 is specifically configured to:
when the wireless module is in an initialization state, an initialization driver is called, and any one or more operations of setting baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, initializing before checking the SIM card, detecting the SIM card, initializing the SIM card, setting short message configuration, setting grid system configuration and setting enabling low power consumption are executed.
In one possible design, processor 32 is specifically configured to:
when the wireless module is in the network configuration state, a network configuration driver is called to execute any one or more operations of APN configuration, network registration and PDP activation.
In one possible design, processor 32 is specifically configured to:
when the wireless module is in a normal working state, executing abnormal detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality; if no abnormity exists, initiating data service.
In one possible design, processor 32 is specifically configured to:
when the wireless module is in a calling state or a telephone access state, controlling the wireless module to enter a call mode, wherein the call mode is independent of other data services;
checking whether the call state is finished; and if the call state is finished, exiting the call mode.
In one possible design, processor 32 is specifically configured to:
when the wireless module is in a PDP reset state, executing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; the preset trigger conditions include: any one or any more of PDP loss, registration loss, socket creation successive failures, network loss.
In one possible design, processor 32 is specifically configured to:
when the wireless module is in a restarting state, cleaning a socket link table and an environment variable, and jumping to an initialization state after shutdown is completed;
and when the wireless module is in a power-off state, cleaning the socket linked list and the environment variable, and closing the power supply.
The driving apparatus of the wireless module provided in the embodiment of the present application can execute the driving method of the wireless module in the above method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment can be applied to the terminal of the internet of things comprising the wireless module, and the working state of the wireless module is determined; and calling the corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module. Through the mode, the wireless module management of different systems and different manufacturers can be compatible, and a uniform control interface drive is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and the transportability of the drive are improved.
An embodiment of the present application further provides a wireless module, including: the device comprises a wireless communication module, a functional module and a processor; the processor is connected with the communication module and the functional module; the processor comprises a driving program corresponding to the working state of the processor; and the processor calls the corresponding driving program through a preset interface according to the working state of the processor so as to execute the control of the wireless communication module and the functional module.
In one possible design, the operating state of the radio module includes: the system comprises one or more of an initialization state, a configuration network state, a normal working state, an outgoing call state, a telephone access state, a PDP reset state, a restarting state and a shutdown state.
In this embodiment, the functional module may be a sensor (e.g., a temperature and humidity sensor, an infrared sensor, an acceleration sensor, etc.), a microphone, an SIM card, a memory, etc.; the wireless module can comprise a radio frequency chip, a power amplifier device and the like.
An electronic device provided in an embodiment of the present application may include: at least one processor and a memory.
And the memory is used for storing programs. In particular, the program may include program code including computer operating instructions.
The memory may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor is used for executing computer execution instructions stored by the memory so as to realize the method;
the processor 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.
Optionally, in a specific implementation, if the communication interface, the memory, and the processor are implemented independently, the communication interface, the memory, and the processor may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (enhanced Industry Standard Architecture) bus, or the like. Buses may be classified as address buses, data buses, control buses, etc., but do not represent only one bus or type of bus.
Optionally, in a specific implementation, if the communication interface, the memory and the processor are integrated into a chip, the communication interface, the memory and the processor may complete communication through an internal interface.
The present invention also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and in particular, the computer-readable storage medium stores program instructions, and the program instructions are used in the method in the foregoing embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A driving method of a wireless module is applied to a terminal of an Internet of things comprising the wireless module, and the method comprises the following steps:
determining the working state of the wireless module;
and calling a corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module.
2. The method of claim 1, wherein the operating state of the radio module comprises: the system comprises one or more of an initialization state, a configuration network state, a normal working state, an outgoing call state, a telephone access state, a PDP reset state, a restarting state and a shutdown state.
3. The method according to claim 2, wherein the calling the corresponding driver through a preset interface according to the working state includes:
if the wireless module is in an initialization state, calling an initialization driver, and executing one or more operations of setting baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, initializing before checking the SIM card, detecting the SIM card, initializing the SIM card, setting short message configuration, setting grid system configuration and setting enabling low power consumption;
if the wireless module is in a configuration network state, calling a configuration network driver, and executing any one or more operations of APN configuration, network registration and PDP activation;
if the wireless module is in a normal working state, executing abnormal detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality;
if no abnormity exists, initiating a data service;
if the wireless module is in a calling state or a telephone access state, controlling the wireless module to enter a call mode, wherein the call mode is independent of other data services;
checking whether the call state is finished;
if the call state is finished, exiting the call mode;
if the wireless module is in a PDP reset state, executing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; wherein the preset trigger condition comprises: any one or more of PDP loss, registration loss, socket creation continuous failure and network loss;
if the wireless module is in a restarting state, cleaning a socket link table and an environment variable, and jumping to the initialization state after shutdown is completed;
and if the wireless module is in a shutdown state, cleaning the socket linked list and the environment variable, and closing the power supply.
4. A driving apparatus of a wireless module, comprising: a memory and a processor; the memory is used for storing a driving program;
the processor is used for determining the working state of the wireless module; and calling a corresponding driving program through a preset interface according to the working state so as to execute state management on the wireless module.
5. The apparatus of claim 4, wherein the operating state of the wireless module comprises: the system comprises one or more of an initialization state, a configuration network state, a normal working state, an outgoing call state, a telephone access state, a PDP reset state, a restarting state and a shutdown state.
6. The apparatus of claim 5, wherein the processor is specifically configured to:
when the wireless module is in an initialization state, calling an initialization driver, and executing one or more operations of setting a baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, initializing before checking the SIM card, detecting the SIM card, initializing the SIM card, setting short message configuration, setting grid system configuration and setting enabling low power consumption;
when the wireless module is in a configuration network state, calling a configuration network driver, and executing any one or more operations of APN configuration, network registration and PDP activation;
when the wireless module is in a normal working state, executing abnormal detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality; if no abnormity exists, initiating a data service;
when the wireless module is in a calling state or a telephone access state, controlling the wireless module to enter a call mode, wherein the call mode is independent of other data services;
checking whether the call state is finished; if the call state is finished, exiting the call mode;
when the wireless module is in a PDP reset state, executing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; wherein the preset trigger condition comprises: any one or more of PDP loss, registration loss, socket creation continuous failure and network loss;
when the wireless module is in a restarting state, cleaning a socket link table and an environment variable, and jumping to the initialization state after shutdown is completed;
and when the wireless module is in a power-off state, cleaning the socket linked list and the environment variable, and closing the power supply.
7. A wireless module, comprising a wireless communication module, a functional module, and a processor; the processor is connected with the communication module and the functional module; the processor comprises a driving program corresponding to the working state of the processor; and the processor calls a corresponding driving program through a preset interface according to the working state of the processor so as to execute the control of the wireless communication module and the functional module.
8. The wireless module of claim 7, wherein the operating state of the wireless module comprises: the system comprises one or more of an initialization state, a configuration network state, a normal working state, an outgoing call state, a telephone access state, a PDP reset state, a restarting state and a shutdown state.
9. A terminal, comprising: a wireless module, and an apparatus as claimed in any one of claims 4 to 6.
10. A storage medium having a computer program stored thereon, comprising: the program when executed by a processor implementing the method of any one of claims 1 to 3.
CN201911402786.9A 2019-12-31 2019-12-31 Wireless module driving method and device, wireless module, terminal and storage medium Active CN111132097B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911402786.9A CN111132097B (en) 2019-12-31 2019-12-31 Wireless module driving method and device, wireless module, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911402786.9A CN111132097B (en) 2019-12-31 2019-12-31 Wireless module driving method and device, wireless module, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111132097A true CN111132097A (en) 2020-05-08
CN111132097B CN111132097B (en) 2023-09-26

Family

ID=70505813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911402786.9A Active CN111132097B (en) 2019-12-31 2019-12-31 Wireless module driving method and device, wireless module, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111132097B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112698814A (en) * 2020-12-30 2021-04-23 深圳酷派技术有限公司 Electronic device, drive development method, and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958807A (en) * 2017-05-17 2018-12-07 华为技术有限公司 A kind of terminal system starting method and terminal
CN109548051A (en) * 2019-01-17 2019-03-29 泰华智慧产业集团股份有限公司 Wireless data transmission of internet of things method and terminal
CN109871244A (en) * 2019-02-26 2019-06-11 深圳和而泰数据资源与云技术有限公司 Hard drive device, method, chip and non-transient computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958807A (en) * 2017-05-17 2018-12-07 华为技术有限公司 A kind of terminal system starting method and terminal
CN109548051A (en) * 2019-01-17 2019-03-29 泰华智慧产业集团股份有限公司 Wireless data transmission of internet of things method and terminal
CN109871244A (en) * 2019-02-26 2019-06-11 深圳和而泰数据资源与云技术有限公司 Hard drive device, method, chip and non-transient computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112698814A (en) * 2020-12-30 2021-04-23 深圳酷派技术有限公司 Electronic device, drive development method, and computer-readable storage medium

Also Published As

Publication number Publication date
CN111132097B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
US11886282B2 (en) Recovery method for terminal device startup failure and terminal device
US9256479B2 (en) App icon processing method and communication terminal
CN107948744B (en) Interface detection method, interface detection device, and computer-readable storage medium
CN101925098B (en) Mobile terminal and failure recovering method thereof
US8868065B2 (en) System and method for reducing power consumption for push messaging
EP3972202A1 (en) Smart home system control method and apparatus, electronic device and storage medium
CN107329778B (en) System updating method and related product
CN110708696A (en) Network data recovery method and device, storage medium and electronic equipment
CN102547665A (en) Communication processing method and communication processing device
CN105263181A (en) WIFI-based file downloading method and WIFI-based file downloading system of mobile terminal
CN101404792A (en) Mobile phone message backup method and system
CN111132097A (en) Wireless module driving method and device, wireless module, terminal and storage medium
CN112486733B (en) System restoration method, device, terminal and storage medium
CN101860852A (en) Method and system for updating software and method for updating software of mobile terminal
US8032163B2 (en) System and method for performing quick short message functions for a mobile phone
KR101012216B1 (en) System and method for software download to wireless communication device
CN111541629A (en) Mode self-adaption method, device, equipment and computer readable storage medium
CN103729283A (en) System log output method and device and terminal device
CN106792583B (en) Multimedia message sending method, terminal and computer readable storage medium
CN108347740B (en) Processing method for network communication function abnormity and application processor
CN110177364B (en) Bluetooth device pairing connection method and device, storage medium and electronic device
CN108599987B (en) Processing method for network communication function abnormity, application processor and user terminal
CN108282804B (en) Processing method for network communication function abnormity, application processor and mobile terminal
CN115776666A (en) Network parameter configuration method and related equipment
CN104516803A (en) Electronic device information monitoring method and system and electronic device

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