CN111132097B - 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
CN111132097B
CN111132097B CN201911402786.9A CN201911402786A CN111132097B CN 111132097 B CN111132097 B CN 111132097B CN 201911402786 A CN201911402786 A CN 201911402786A CN 111132097 B CN111132097 B CN 111132097B
Authority
CN
China
Prior art keywords
state
wireless module
configuration
network
module
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
CN201911402786.9A
Other languages
Chinese (zh)
Other versions
CN111132097A (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

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

Abstract

The application provides a driving method and 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 a wireless module; and calling a corresponding driving program through a preset interface according to the working state so as to execute state management of the wireless module. By the mode, the wireless module management of different systems and different manufacturers can be compatible, and unified control interface driving is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and portability of the driving are improved.

Description

Wireless module driving method and device, wireless module, terminal and storage medium
Technical Field
The embodiment of the application 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
Along with the rapid development of the internet of things industry, the wireless communication module is used as an indispensable component device of the internet of things terminal, and the functions of the wireless communication module are more and more powerful.
In the prior art, a wireless communication module is generally connected with other serial devices, and wireless communication is realized through an internal driver of the wireless communication module. However, the manufacturers for manufacturing the 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 driving model of the terminal of the internet of things has poor universality.
Disclosure of Invention
The embodiment of the application provides a driving method and device of a wireless module, the wireless module, a terminal and a storage medium, which are used for solving the problem of poor universality of a driving model of the wireless module in the prior art.
The first aspect of the present application provides a driving method of a wireless module, which is applied to an internet of things terminal including the wireless module, and the method includes:
determining the working state of a wireless module;
and 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 one possible design, the operating state of the wireless module includes: one or more of an initialization state, a configuration network state, a normal operation state, an outgoing call state, a call access state, a PDP reset state, a restart state, and a shutdown state.
In one possible design, the calling, according to the working state, the corresponding driver through a preset interface includes:
and if the wireless module is in an initialized state, calling an initialization driver program, and executing one or more operations of setting baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, checking initialization before the SIM card, SIM card detection, SIM card initialization, setting short message configuration, setting grid system configuration and setting enabling low power consumption.
In one possible design, the calling, according to the working state, the corresponding driver through a preset interface includes:
and if the wireless module is in the network configuration state, calling a network configuration driver to execute any one or more operations of configuring APN, registering network and activating PDP.
In one possible design, the calling, according to the working state, the corresponding driver through a preset interface includes:
if the wireless module is in a normal working state, executing abnormality detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality;
and if no abnormality exists, initiating data service.
In one possible design, the calling, according to the working state, the corresponding driver through a preset interface includes:
if the wireless module is in an outgoing call 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 ended;
and if the call state is ended, exiting the call mode.
In one possible design, the calling, according to the working state, the corresponding driver through a preset interface includes:
if the wireless module is in the PDP reset state, performing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; the preset triggering conditions comprise: any one or more of PDP loss, registration loss, socket creation consecutive failures, network loss.
In one possible design, the calling, according to the working state, the corresponding driver through a preset interface includes:
if the wireless module is in a restarting state, cleaning a socket linked list and an environment variable, and jumping to the initializing state after shutdown is completed;
and if the wireless module is in a shutdown state, cleaning a socket linked list and an environment variable, and closing a power supply.
A second aspect of the present application 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 of the wireless module.
In one possible design, the operating state of the wireless module includes: an initialization state, a configuration network state, a normal operation state, an outgoing call state, a telephone access state, a PDP reset state, a restart state, and a shutdown state.
In one possible design, the processor is specifically configured to:
when the wireless module is in an initialization state, an initialization driver is called, and one or more operations of setting baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, checking initialization before the SIM card, SIM card detection, SIM card initialization, setting short message configuration, setting grid system configuration and setting enabling low power consumption are executed.
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 to execute 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, performing abnormality detection, and if abnormality exists, jumping to a working state corresponding to the abnormality; and if no abnormality exists, initiating data service.
In one possible design, the processor is specifically configured to:
when the wireless module is in an outgoing call 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 ended; and if the call state is ended, exiting the call mode.
In one possible design, the processor is specifically configured to:
when the wireless module is in a PDP reset state, performing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; the preset triggering conditions comprise: any one or more of PDP loss, registration loss, socket creation consecutive 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 linked list and an environment variable, and jumping to the initializing state after shutdown is completed;
when the wireless module is in a shutdown state, cleaning a socket linked list and environment variables, and closing a power supply.
A third aspect of the present application provides 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.
In one possible design, the operating state of the wireless module includes: one or more of an initialization state, a configuration network state, a normal operation state, an outgoing call state, a call access state, a PDP reset state, a restart state, and a shutdown state.
A fourth aspect of the present application provides a terminal comprising: a wireless module, and an apparatus as in any of the second aspects.
A fifth aspect of the present application provides a storage medium having stored therein 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 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 of the wireless module. By the mode, the wireless module management of different systems and different manufacturers can be compatible, and unified control interface driving is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and portability of the driving are improved.
Drawings
In order to more clearly illustrate the application or the technical solutions of the prior art, the following description of the embodiments or the drawings used in the description of the prior art will be given in brief, it being obvious that the drawings in the description below are some embodiments of the application and that other drawings can be obtained from them without inventive effort for a person skilled in the art.
FIG. 1 is a prior art wireless communication module driving model;
fig. 2 is a driving model of a wireless communication module according to an embodiment of the present application;
fig. 3 is a flow chart of a driving method of a wireless module according to an embodiment of the present application;
fig. 4 is a schematic flow chart of configuring a network state according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a normal working state according to an embodiment of the present application;
fig. 6 is a schematic flow chart of an outgoing call state provided in an embodiment of the present application;
fig. 7 is a schematic flow chart of a phone access state according to an embodiment of the present application;
FIG. 8 is a schematic flow chart of a PDP reset state according to an embodiment of the present application;
FIG. 9 is a flowchart illustrating a restarting 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 application;
fig. 11 is a schematic structural diagram of a driving device of a wireless module according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Along with the rapid development of the internet of things industry, the wireless communication module is used as an indispensable component device of the internet of things terminal, and the functions of the wireless communication module are 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 independent operating systems, radio frequency processing and baseband processing and provides a standard interface. The wireless cellular communication module has all basic functions of sending SMS messages, voice calls, GPRS data transmission and the like for communication based on a cellular network. In short, 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 the design of a universal, reasonable, stable and reliable module management drive is a necessary step for the terminal equipment to realize the terminal communication.
The wireless communication module is used as a basic communication component and has a large number of applications in various fields, and is more a bridge for communication between terminals of the Internet of things. In the prior art, a wireless communication module is generally 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 or wiring, can greatly save materials and labor cost, and is quite widely used. Such as electronic platform balance, wireless meter reading, wireless data acquisition, wireless attendance access control system, wireless queuing, wireless LED display screen, wireless cloud deck control, etc.
However, the manufacturers for manufacturing the 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 driving model of the terminal of the internet of things has poor universality.
In order to solve the problems, the embodiment of the application provides a driving method, a device, a terminal and a storage medium of a wireless module, which are used for solving the problem that a driving model of the wireless module in the prior art is poor in universality.
Fig. 1 is a wireless communication module driving model in the prior art, as shown in fig. 1, the wireless module driving model in the prior art does not have independent design on driving, and control and application programs of the whole module are mixed together, and the application has high coupling property, so that the wireless communication module driving model is not beneficial to transplanting and expansion. Fig. 2 is a schematic diagram of a driving model of a wireless communication module according to an embodiment of the present application, as shown in fig. 2, the driving model first enables the whole wireless communication module to be driven independently (for example, GPIO driving, serial port driving, etc.), and the driving model is designed to be a unified interface for application and almost no coupling for application, and is an independent component. On the basis of the driving model, the communication module is subjected to state division, so that unified management on different modules can be realized, module management driving of different systems and different manufacturers is compatible, and unified control interface driving is provided for an application layer. In actual use, the network environment is complex and changeable, so that the wireless device is often abnormal, and if the wireless device does not have the abnormal processing capability and the recovery capability of intensity, the wireless device cannot stably work for a long time. Thus, the main functions realized are: TCP/UDP data receiving and transmitting, TXT/PDU short message receiving and transmitting, telephone dialing/answering, exception handling, exception recovery and the like. Finally, the method provided by the embodiment adopts a state machine driving model design to divide the state of the wireless module into different working states, and invokes a corresponding driving program through a preset interface according to the working state of the wireless module so as to execute state management of the wireless module.
By applying the method, the wireless module management of different standards and different manufacturers can be compatible, and unified control interface driving is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and portability of the driving are improved.
The following takes a terminal device integrated with or installed with related execution codes as an example, and specific embodiments are used for describing the technical scheme of the embodiment of the present application in detail. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 3 is a flow chart of a driving method of a wireless module according to an embodiment of the present application, as shown in fig. 3, the method in this embodiment includes:
s101, determining the working state of the wireless module.
In this embodiment, the operation state of the invalidation module is first determined. The working state of the wireless module comprises the following steps: an initialization state, a configuration network state, a normal operation state, an outgoing call state, a telephone access state, a PDP reset state, a restart state, and a shutdown state.
Specifically, the state machine driving model design is adopted to divide the states of the wireless module into different working states, including an initialization state (stat_initi), a configuration network state (stat_ctx_set), a normal working state (stat_normal), an outgoing call state (stat_callto), a telephone access state (stat_charged), a PDP RESET state (stat_ctx_reset), a restart state (stat_reboot), and a shutdown state (stat_power). These operating states macroscopically cover the main operating states of the wireless communication module.
S102, calling a corresponding driver through a preset interface according to the working state so as to execute state management of the wireless module.
In this embodiment, according to the working state, a corresponding driver may be called through a preset interface to perform state management on the wireless module. Therefore, the system can be compatible with the management of wireless modules of different systems and different manufacturers, and uniform control interface driving is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and portability of driving are improved. Next, the driving method in each operation state will be described in detail.
Preferably, if the wireless module is in an initialized state, the initialization driver is invoked to perform any one or more operations of setting a baud rate, setting an environment configuration, setting a SIM card format configuration, setting an enabling radio frequency, checking an initialization before a SIM card, detecting the SIM card, initializing the SIM card after the SIM card is Ready (Ready), setting a short message configuration, setting a grid format configuration, and setting an enabling low power consumption.
Specifically, the main operation of module initialization refers to starting each module and initializing basic parameters of the module, and before the wireless module actually starts to operate, the initialization driver is called to set basic parameters and check hardware, including power-off, power-on, baud rate setting, environment configuration setting, SIM card format configuration setting, enabling radio frequency setting, SIM card pre-initialization checking, SIM card detection, SIM card initialization, short message configuration setting, grid system configuration setting, enabling low power consumption setting, etc.
Preferably, if the wireless module is in a configured network state, a configured network driver is invoked to perform any one or more of configuring an APN, registering a network, activating a PDP.
Specifically, the main task of configuring the network environment state is to establish a complete communication environment and establish a reliable and effective environment for the subsequent socket communication. The configuration network environment is roughly as follows: configuring APN, registering network, activating PDP. Fig. 4 is a schematic flow chart of configuring network states, as shown in fig. 4, according to an embodiment of the present application, by configuring an APN, registering a network, activating a PDP, checking a state, and the like, a reliable and efficient environment is established. If successful, the status of the wireless module is set to normal operating status (STAT_NORMALT). If the number of failures exceeds a preset threshold, the state of the wireless module is set to a restart state (STAT_REBOOT). Specifically, referring to fig. 4, firstly presetting an APN, setting at+cops as a number, querying CSQ, querying whether registration is successful, and selecting manual registration if registration failure is queried; if the manual registration is not started, entering a network searching interval for waiting; if the manual registration is started, performing manual network searching; if the manual network searching fails, entering a network searching interval for waiting, and if the manual network searching succeeds, returning to query CSQ. If the registration is found to be successful, checking whether the registration is successful again, and if the registration is failed, resetting AT+COPS to be a number; if the registration is successful, initializing the POP environment, performing PDP deactivation and configuring the APN. Judging whether the network attachment is successful or not; if the network attachment is successful, activating the PDP, if the activation is successful, reading all unread short messages, replying to the SOCKET, and entering a normal working state; if the network attachment fails, it is checked again whether the registration is successful. If the activation fails, judging whether the failure times exceed a preset threshold value, if so, entering a restarting state, and if not, checking whether the registration is successful again.
Preferably, if the wireless module is in a normal working state, performing abnormality detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality; and if no abnormality exists, initiating data service.
Specifically, the normal operation state refers to a state in which all network environments are ready, including network registration, PDP activation, and the like. And the system is also the only state capable of initiating the data service, and all socket data services are performed in the state. The normal operation state comprises a plurality of abnormal checks, and the detected abnormality can jump to the corresponding state immediately until the network environment is restored to the normal operation state again. Fig. 5 is a flow chart of a normal working state according to an embodiment of the present application. Specifically, as shown in fig. 5, in the normal operation state, if any one or more of continuous socket creation failure, continuous connection server failure, continuous data transmission failure, socket deletion too frequently, PDP disconnection, and regular query registration (for example, every 3 min) is found when the anomaly check is performed, the state of the wireless module is set to a PDP RESET state (stat_ctx_reset). If the anomaly check is performed, the timing query CSQ (for example, each time for 3 min) finds any one or more of continuous weak CSQ, continuous read SMS error, and the like, the state of the wireless module is set to a restart state (stat_reboot).
Preferably, if the wireless module is in an outgoing call 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 ended; if the call state is ended, the call mode is exited.
In particular, the telephone call is not hoped to be disturbed by other services, other services can not be normally performed, and the call state can be independently separated for better processing the telephone service, so that the stability and reliability of the call can be ensured. The call state is mainly used for processing telephone function service, and the call state is exited after the service is completed. Fig. 6 is a schematic flow chart of an outgoing call state provided by an embodiment of the present application, and fig. 7 is a schematic flow chart of a phone access state provided by an embodiment of the present application, as shown in fig. 6 and fig. 7, when in the outgoing call state or the phone access state, a call state check is performed to ensure the stability and reliability of a call. Only after the call state is ended, the state of the wireless module is set to the normal operating state (stat_normal) for receiving other traffic. Specifically, as shown in fig. 6, when in an outgoing call state, the phone is accessed, whether the user answers the phone is judged, and if the user answers the phone, the loop judgment is carried out to judge whether the phone is still in a call state; if the call is not received or hung up, the process is ended. The state of the wireless module is now changed from the outgoing call state to the restart state. As shown in fig. 7, when in the phone access state, the phone accesses to determine whether the user answers the phone, and if the user answers the phone, the loop determines whether the phone is still in the call state; if the call is not received or hung up, the process is ended. The state of the wireless module is then changed from the phone access state to the restart state.
Preferably, if the wireless module is in a PDP reset state, performing a PDP deactivation operation according to a preset trigger condition, and jumping to a configured network state; the preset triggering conditions comprise: any one or more of PDP loss, registration loss, socket creation consecutive failures, network loss.
Specifically, the PDP reset state is mainly used to restore the network environment to reset the PDP. In the actual environment, the current network environment is abnormal along with the movement of the equipment, the change of the network environment and the like, such as PDP loss, registration loss and socket creation continuous failure. Some networks may cause abnormal operation of modules, and a state is needed to restore the network environment, which is the design purpose of the reset state of the PDP. The main contents are as follows: the PDP is deactivated and re-jumped to the network configuration state. The triggering conditions are as follows: socket continuous creation failure, PDP loss, network loss, etc. under normal operation state. Fig. 8 is a schematic flow chart of 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: delete all sockets, delete all HTTP, delete all HTTPs, PDP deactivate, etc. If the deactivation is successful, the state of the wireless module is SET to the configured network state (STAT_CTX_SET). If the deactivation fails, the power is turned off, and at this time, the state of the wireless module is set to an initialization state (stat_initi).
Preferably, if the wireless module is in a restarting state, cleaning a socket linked list and an environment variable, and jumping to an initializing state after shutdown is completed; if the wireless module is in a shutdown state, cleaning a socket linked list and environment variables, and closing a power supply.
Specifically, the main function of the restart state is to restart the module. The module is required to restart both when the service is needed and when the exception is handled. The restarting state works as releasing resources mainly for the module to safely, and restarting the module after saving important data. Fig. 9 is a schematic flow chart of a restarting state provided in an embodiment of the present application, as shown in fig. 9, if a wireless module is in the restarting state, sequentially performing command list checking, socket list cleaning, environment variable cleaning, at+cops=0 setting, radio frequency closing, and power off, and setting the state of the wireless module to be an initialization state (stat_initi). Specifically, as shown in fig. 9, when in a restarting state, checking a command linked list, and if the command linked list is empty, cleaning a socket linked list; if the command linked list is not empty, the command execution is waited for (e.g., the longest waiting time can be set to 3 min). Further, after cleaning the socket linked list, cleaning environment variables, setting at+cops=0, closing radio frequency, and shutting down. After shutdown, the state of the wireless module enters an initialization state (stat_initi).
The shutdown state is the shutdown module. The shutdown operation is designed because the module is likely to be stopped for a long time according to the service requirement to save electricity. The main task of the shutdown state is to safely release program resources, and normally shut down the module and then cut off the power supply. Fig. 10 is a schematic flow chart of a shutdown state provided in an embodiment of the present application, as shown in fig. 10, if a wireless module is in the shutdown state, sequentially performing command list checking, socket list cleaning, environment variable cleaning, at+cops=0 setting, radio frequency shutdown, power shutdown, and state setting of the wireless module as the shutdown state (stat_powerff). Specifically, as shown in fig. 10, when in a shutdown state, checking a command linked list, and if the command linked list is empty, cleaning a socket linked list; if the command linked list is not empty, the command execution is waited for (e.g., the longest waiting time can be set to 3 min). Further, after cleaning the socket linked list, cleaning environment variables, setting at+cops=0, closing radio frequency, and shutting down. After shutdown, the state of the wireless module enters a shutdown state (stat_powerff).
The embodiment can be applied to an Internet of things terminal comprising a 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 of the wireless module. By the mode, the wireless module management of different systems and different manufacturers can be compatible, and unified control interface driving is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and portability of the driving are improved.
Fig. 11 is a schematic structural diagram of a driving device of a wireless module according to an embodiment of the present application. The driving device of the wireless module may be implemented by software, hardware or a combination of the two, and may be the aforementioned terminal device.
As shown in fig. 11, the driving device of the wireless module includes: a memory 31 and a processor 32.
A memory 31 for storing a driver;
the processor 32 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 of the wireless module.
In one possible design, the operating state of the wireless module includes: an initialization state, a configuration network state, a normal operation state, an outgoing call state, a telephone access state, a PDP reset state, a restart state, and a 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, checking SIM card pre-initialization, SIM card detection, SIM card initialization, 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 a 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 abnormality detection, and if the abnormality exists, jumping to a working state corresponding to the abnormality; and if no abnormality exists, initiating data service.
In one possible design, processor 32 is specifically configured to:
when the wireless module is in an outgoing call 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 ended; if the call state is ended, the call mode is exited.
In one possible design, processor 32 is specifically configured to:
when the wireless module is in a PDP reset state, performing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; the preset triggering conditions comprise: any one or more of PDP loss, registration loss, socket creation consecutive 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 linked list and an environment variable, and jumping to an initializing state after shutdown is completed;
when the wireless module is in a shutdown state, cleaning a socket linked list and environment variables, and closing a power supply.
The driving device for the wireless module provided by the embodiment of the application can execute the driving method for the wireless module in the method embodiment, and the implementation principle and the technical effect are similar, and are not repeated here.
The embodiment can be applied to an Internet of things terminal comprising a 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 of the wireless module. By the mode, the wireless module management of different systems and different manufacturers can be compatible, and unified control interface driving is provided for an application layer, so that the state management of different wireless modules is realized, and the compatibility and portability of the driving are improved.
The embodiment of the application also provides a wireless module, which 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 wireless module includes: one or more of an initialization state, a configuration network state, a normal operation state, an outgoing call state, a call access state, a PDP reset state, a restart state, and a shutdown state.
In this embodiment, the functional module may be a sensor (such as a temperature and humidity sensor, an infrared sensor, an acceleration sensor, etc.), a microphone, a SIM card, a memory, etc.; the wireless module may include a radio frequency chip, a power amplifier device, etc.
The electronic device provided by the embodiment of the application can comprise: 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 or may further comprise non-volatile memory, such as at least one disk memory.
The processor is used for executing computer-executable instructions stored in the memory to realize the method;
the processor may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
Alternatively, 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 and perform communication with each other through a bus. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (Peripheral Component, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface, the memory, and the processor are integrated on a chip, the communication interface, the memory, and the processor may complete communication through an internal interface.
The present application also provides a computer-readable storage medium, which may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc., in which program codes may be stored, and in particular, the computer-readable storage medium stores program instructions for the methods in the above embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (7)

1. The driving method of the wireless module is characterized by being applied to an internet of things terminal comprising the wireless module, and comprises the following steps:
determining the working state of a wireless module;
according to the working state, calling a corresponding driving program through a preset interface to execute state management of the wireless module;
the working state of the wireless module comprises the following steps: one or more of an initialization state, a configuration network state, a normal operation state, an outgoing call state, a call access state, a PDP reset state, a restart state, and a shutdown state.
2. The method according to claim 1, wherein the calling the corresponding driver through the preset interface according to the working state includes:
if the wireless module is in an initialized state, an initialization driver is called, and one or more operations of setting baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, checking initialization before the SIM card, SIM card detection, SIM card initialization, setting short message configuration, setting grid system configuration and enabling low power consumption are executed;
if the wireless module is in a network configuration state, calling a network configuration driver to execute any one or more operations of APN configuration, network registration and PDP activation;
if the wireless module is in a normal working state, executing abnormality detection, and if the wireless module is abnormal, jumping to a working state corresponding to the abnormality;
if no abnormality exists, initiating a data service;
if the wireless module is in an outgoing call 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 ended;
if the call state is ended, exiting the call mode;
if the wireless module is in the PDP reset state, performing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; the preset triggering conditions comprise: 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 linked list and an environment variable, and jumping to the initializing state after shutdown is completed;
and if the wireless module is in a shutdown state, cleaning a socket linked list and an environment variable, and closing a power supply.
3. A driving device 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; according to the working state, calling a corresponding driving program through a preset interface to execute state management of the wireless module;
the working state of the wireless module comprises the following steps: one or more of an initialization state, a configuration network state, a normal operation state, an outgoing call state, a call access state, a PDP reset state, a restart state, and a shutdown state.
4. The apparatus of claim 3, wherein the processor is specifically configured to:
when the wireless module is in an initialization state, an initialization driver is called, and one or more operations of setting baud rate, setting environment configuration, setting SIM card format configuration, setting enabling radio frequency, checking initialization before the SIM card, SIM card detection, SIM card initialization, setting short message configuration, setting grid system configuration and enabling low power consumption are executed;
when the wireless module is in a network configuration state, calling a network configuration driver to execute any one or more operations of APN configuration, network registration and PDP activation;
when the wireless module is in a normal working state, performing abnormality detection, and if abnormality exists, jumping to a working state corresponding to the abnormality; if no abnormality exists, initiating a data service;
when the wireless module is in an outgoing call 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 ended; if the call state is ended, exiting the call mode;
when the wireless module is in a PDP reset state, performing PDP deactivation operation according to a preset trigger condition, and jumping to a configuration network state; the preset triggering conditions comprise: 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 linked list and an environment variable, and jumping to the initializing state after shutdown is completed;
when the wireless module is in a shutdown state, cleaning a socket linked list and environment variables, and closing a power supply.
5. 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; the processor calls a corresponding driving program through a preset interface according to the working state of the processor so as to control the wireless communication module and the functional module;
the working state of the wireless module comprises the following steps: one or more of an initialization state, a configuration network state, a normal operation state, an outgoing call state, a call access state, a PDP reset state, a restart state, and a shutdown state.
6. A terminal, comprising: a wireless module, and an apparatus as claimed in claim 3 or 4.
7. A storage medium having a computer program stored thereon, comprising: which when executed by a processor implements the method of claim 1 or 2.
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 CN111132097A (en) 2020-05-08
CN111132097B true 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)

Families Citing this family (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

Also Published As

Publication number Publication date
CN111132097A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN101911790B (en) Mobile network device battery conservation system and methods
US20090204845A1 (en) Communication device and a method of self-healing thereof
CN110708696B (en) Network data recovery method and device, storage medium and electronic equipment
CN110166994B (en) Data time-sharing transmission interoperability method, system, mobile terminal and storage medium
US8868065B2 (en) System and method for reducing power consumption for push messaging
US8838187B2 (en) Detecting circuit for electric quantity, processing device and method for state detection of mobile telephone in standby
EP1834236A2 (en) Management of persistent software applications
CN110457154B (en) Abnormal service processing method and device, storage medium and communication terminal
CN114727275B (en) Method and related device for processing active command
KR20080000476A (en) System and method for debugging
CN111132097B (en) Wireless module driving method and device, wireless module, terminal and storage medium
CN102547665A (en) Communication processing method and communication processing device
CN105227606A (en) Application program adaptation method and device
EP1895743A1 (en) A method for implementing a wireless personal communication protocol for an IC Card
CN108419258B (en) Processing method for network communication function abnormity, modem and mobile terminal
CN111541629A (en) Mode self-adaption method, device, equipment and computer readable storage medium
CN110545309B (en) Internet of things terminal eUICC card management method, device and system
KR101012216B1 (en) System and method for software download to wireless communication device
CN111478817A (en) Network fault processing method and device, storage medium and mobile device
KR101572060B1 (en) Apparatus and method for power saving using predictive polling in portable terminal
CN115484343A (en) Method for preventing data transmission loss of android mobile phone and Bluetooth device based on WeChat applet
CN103235728B (en) The installation method of preset third-party application and device in Android terminal
CN112866983B (en) Control method, control device and electronic equipment
CN115795477A (en) Server starting method and device, computer equipment and storage medium
CN111328031A (en) Message forwarding method and 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