CN106603526B - WiFi/hotspot starting method and device - Google Patents

WiFi/hotspot starting method and device Download PDF

Info

Publication number
CN106603526B
CN106603526B CN201611143063.8A CN201611143063A CN106603526B CN 106603526 B CN106603526 B CN 106603526B CN 201611143063 A CN201611143063 A CN 201611143063A CN 106603526 B CN106603526 B CN 106603526B
Authority
CN
China
Prior art keywords
wifi
loading
target firmware
hotspot
socket connection
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
CN201611143063.8A
Other languages
Chinese (zh)
Other versions
CN106603526A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201611143063.8A priority Critical patent/CN106603526B/en
Publication of CN106603526A publication Critical patent/CN106603526A/en
Application granted granted Critical
Publication of CN106603526B publication Critical patent/CN106603526B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Abstract

The embodiment of the invention discloses a WiFi/hotspot starting method, which comprises the following steps: receiving a WiFi/hotspot starting instruction, reading a configuration file corresponding to the WiFi/hotspot starting instruction, determining a target firmware corresponding to the WiFi/hotspot starting instruction, and loading; creating a process, wherein the process is used for establishing socket connection with the target firmware and setting the process state of the process to be a dormant state; and detecting whether the target firmware loading is finished, if so, awakening the dormant process, and executing the socket connection between the target firmware and the dormant process through the process. In addition, the embodiment of the invention also discloses a WiFi/hotspot starting device. By adopting the embodiment of the invention, the opening speed of the WiFi/hot spot can be improved.

Description

WiFi/hotspot starting method and device
Technical Field
The invention relates to the technical field of computers, in particular to a WiFi/hotspot starting method and device.
Background
At present, most mobile terminal platforms (ISO platform or Android platform, etc.) are equipped with Wifi chips, and simultaneously support to connect with a router to surf the internet (i.e. STA mode) or serve as Wifi hotspots for others to connect (i.e. AP mode, access point).
In the Android system, after receiving a WiFi/hotspot turn-on command, the firmware is loaded, and then a socket is created for monitoring, where the monitoring module is a WiFi network monitor (WiFi network monitor), and the WiFi monitor is used to establish message communication with the firmware. In the process of establishing the socket, if the corresponding firmware is not loaded completely, the establishment of the socket fails; in the event of a failed socket setup, the wifimonitor periodically attempts to establish a socket connection with the firmware until a timeout occurs or the connection setup is successful. In general, the period of this periodic attempt in the Android system is a fixed value, that is, the period of the wifi monitor attempting to establish a socket connection with the firmware is the same and fixed for different hardware devices. However, for different hardware devices, the speed of loading the firmware is not the same, if the speed is too fast, the system is burdened, and if the speed is too slow, the wifi or hotspot opening speed is affected, so that the setting of the period of the same fixed and unchangeable wifi monitor trying to establish a socket connection with the firmware is not reasonable.
Disclosure of Invention
Based on this, in order to solve the technical problem that the opening speed of the WiFi and/or the hotspot is too slow due to the period that the same fixed and unchangeable WiFi monitor is set to try to establish the socket connection with the firmware in the traditional technology, a WiFi/hotspot opening method is particularly provided.
A WiFi/hotspot switching method comprises the following steps:
receiving a WiFi/hotspot starting instruction, reading a configuration file corresponding to the WiFi/hotspot starting instruction, determining a target firmware corresponding to the WiFi/hotspot starting instruction, and loading;
creating a process, wherein the process is used for establishing socket connection with the target firmware and setting the process state of the process to be a dormant state;
and detecting whether the target firmware loading is finished, if so, awakening the dormant process, and executing the socket connection between the target firmware and the dormant process through the process.
Optionally, in one embodiment, after the setting the process state of the process to the hibernation state, the method further includes:
and detecting the continuous dormancy duration of the process state set as the dormancy state, generating and displaying a prompt message of WiFi/hotspot starting failure when the continuous dormancy duration exceeds a preset threshold value, and logging off the process.
Optionally, in one embodiment, the detecting whether the target firmware loading is completed further includes:
and acquiring a preset detection period, and detecting whether the target firmware is loaded completely according to the detection period.
Optionally, in one embodiment, before waking up the sleeping process, the method further includes:
acquiring historical loading duration corresponding to the loading of the target firmware, and determining awakening time for awakening the dormant process according to the historical loading duration;
and executing the process of waking up the sleep when the wake-up time is up.
Optionally, in one embodiment, after the establishing, by the process, a socket connection with the target firmware further includes:
and monitoring whether the socket connection is successfully established, if not, executing the socket connection established with the target firmware through the process.
In addition, in order to solve the technical problem that the opening speed of the WiFi and/or the hot spot is too slow due to the period of trying to establish the socket connection with the firmware by setting the same fixed and unchangeable WiFi monitor in the traditional technology, a WiFi/hot spot opening device is particularly provided.
An opening device of a WiFi/hotspot comprises:
the target firmware loading module is used for receiving a WiFi/hotspot starting instruction, reading a configuration file corresponding to the WiFi/hotspot starting instruction, determining target firmware corresponding to the WiFi/hotspot starting instruction and loading;
the process creation module is used for creating a process, and the process is used for establishing socket connection with the target firmware and setting the process state of the process to be a dormant state;
the target firmware loading detection module is used for detecting whether the target firmware loading is finished;
and the process execution module is used for awakening the dormant process when the target firmware is loaded, and executing the socket connection established between the dormant process and the target firmware through the process.
Optionally, in one embodiment, the apparatus further includes a dormancy duration detection module, configured to detect a continuous dormancy duration in which the process state of the process is set to the dormancy state, and when the continuous dormancy duration exceeds a preset threshold, generate and display a prompt message indicating that the WiFi/hotspot startup fails, and logout the process.
Optionally, in one embodiment, the target firmware loading detection module is further configured to acquire a preset detection period, and detect whether the target firmware is loaded completely according to the detection period.
Optionally, in one embodiment, the apparatus further includes a wake-up time determining module, configured to obtain a historical loading duration corresponding to the loading of the target firmware, and determine, according to the historical loading duration, a wake-up time for waking up the sleeping process; and calling the process execution module when the awakening time is up.
Optionally, in one embodiment, the process execution module is further configured to monitor whether the socket connection is successfully established, and if not, execute the socket connection established with the target firmware through the process.
Further, in order to solve the technical problem that the opening speed of the WiFi and/or the hotspot is too slow due to the period that the same fixed and unchangeable widget is set to try to establish the socket connection with the firmware in the traditional technology, a mobile terminal is also provided.
A mobile terminal, comprising:
a processor and a memory; wherein the processor executes the WiFi/hotspot turn-on method as described above by invoking code or instructions in the memory.
The embodiment of the invention has the following beneficial effects:
after the WiFi/hotspot starting method and the WiFi/hotspot starting device are adopted, corresponding firmware for starting the WiFi/hotspot is loaded after a WiFi/hotspot starting instruction is received, and message communication with the firmware is established by establishing socket connection with the firmware through process processing; however, because the loading of the firmware is not completed, the process state of the process is set to the sleep state, and whether the firmware loading is completed is detected, and the process is waken to execute socket connection establishment when the firmware loading is completed. Compared with the technical scheme that the socket connection is tried to be established according to the fixed period after the first socket connection is failed to be established in the traditional technology, the process for establishing the socket connection is dormant, the time for awakening the process is directly determined by detecting whether the loading of the firmware is completed, the corresponding execution time for establishing the socket connection is accurately mastered, the condition that the opening speed of the WiFi/hot spot is influenced by the overlarge period duration is avoided, the condition that the burden of the terminal system is increased by the overlong period duration is also avoided, the opening speed of the WiFi/hot spot is increased, the burden of the terminal system is reduced, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a flowchart illustrating a WiFi/hotspot activation method according to an embodiment;
FIG. 2 is a schematic interface diagram of a hotspot setting interface in one embodiment;
FIG. 3 is an interface diagram of a WiFi setup interface in one embodiment;
FIG. 4 is a schematic diagram illustrating an exemplary embodiment of a WiFi/hotspot switching device;
fig. 5 is a schematic structural diagram of a computer device operating the foregoing WiFi/hotspot turning-on method in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
In order to solve the technical problem that the opening speed of the WiFi and/or the hotspot is too slow due to the period of trying to establish a socket connection with the firmware by setting the same fixed and unchangeable WiFi monitor in the conventional technology, in this embodiment, a WiFi/hotspot opening method is especially proposed, and the implementation of the method may depend on a computer program, and the computer program may run on a computer system based on a von neumann system, where the computer system may be a computer device supporting an AP mode and an STA mode, such as a smart phone, a notebook computer, a tablet computer, and the like, which is installed with a wireless network card or a Wi-Fi chip. The computer program can be a Wi-Fi connection management program or a hotspot management program on an intelligent terminal such as a smart phone or a tablet computer. Specifically, as shown in fig. 1, the WiFi/hotspot turning-on method includes the following steps S102 to S108:
step S102: and receiving a WiFi/hotspot starting instruction, reading a configuration file corresponding to the WiFi/hotspot starting instruction, determining a target firmware corresponding to the WiFi/hotspot starting instruction, and loading.
In this embodiment, a user may input a hotspot opening request through a corresponding hotspot opening button or control in a hotspot setting interface, for example, in a hotspot setting page as shown in fig. 2, the user may input the hotspot opening request through a button shown by a number a.
In another embodiment, the user may input a WiFi on request or a WiFi connection request through a corresponding WiFi on button or control in the WiFi setting page, for example, in the hotspot setting page shown in fig. 3, the user may input a WiFi on request through a button shown by number B, turn on WiFi and scan WiFi in the surrounding environment; or, the wireless WiFi corresponding to the WiFi identifier may be connected by selecting a plurality of WiFi identifiers shown in the area indicated by the number C.
After receiving a WiFi/hotspot opening request input by a user, first reading configuration file information corresponding to the WiFi hotspot, then loading all firmware related to the opening of the WiFi hotspot, that is, target firmware, according to the configuration file information, and loading the target firmware.
Step S104: and creating a process, wherein the process is used for establishing socket connection with the target firmware and setting the process state of the process to be a dormant state.
In the present embodiment, after receiving the WiFi/hotspot opening instruction in step S102, a process for establishing a socket connection with the target firmware is created.
In this embodiment, in the process of starting a WiFi/hotspot, a socket needs to be created for monitoring, in an Android system, the module for monitoring is a WiFi monitor, that is, message communication between an application layer and loaded firmware corresponding to the WiFi or hotspot is established. Generally, after receiving a WiFi/hotspot opening instruction, a process is created for establishing a socket connection between the application layer and the target firmware to monitor message communication of the terminal. However, if the target firmware loaded in step S102 is not loaded successfully, the establishment fails in the process of establishing the socket connection with the target firmware; otherwise, if the target firmware is loaded successfully before the process created in step S104 is executed, the socket connection is established successfully in the process of executing the process in this step, and if the socket connection is established successfully, it indicates that all processes for opening the WiFi/hotspot are executed completely, and the WiFi/hotspot is opened successfully.
In this embodiment, in order to avoid wasting system resources by executing the above process to establish a socket connection that cannot be successfully established before the target firmware is successfully loaded, the process state of the process is set to the sleep state after the target firmware is not completely loaded; the process in the sleep state exists in the terminal, but is not executed because it is in the sleep state, and is executed only after the process is awakened.
Step S106: detecting whether the target firmware loading is completed, and executing the step S108 when the target firmware loading is completed: awakening the dormant process, and executing the socket connection established between the dormant process and the target firmware through the process; when the target firmware loading is not completed, step S106 is performed. Specifically, in the Android system, the loading of the firmware in the WiFi starting process or the hotspot starting process is carried out through ctl.start of the attribute system, and after the firmware loading is completed, the firmware loading state is set through the attribute in the attribute system, so that when the attribute is set, the corresponding firmware loading state can be obtained, that is, whether the firmware is completely loaded or not is known. In this embodiment, whether the target firmware has been completely loaded is determined by detecting the attribute setting corresponding to the target firmware in the attribute system, and when the target firmware is completely loaded, the foregoing sleeping process is awakened. Specifically, according to the foregoing, the process is used to establish a socket connection with the target firmware, and therefore, the process is executed after being woken up, that is, the process is executed to establish a socket connection with the target firmware.
In another embodiment, the detection of whether the target firmware is loaded completely is not real-time and uninterrupted, but is performed intermittently according to a preset rule, so as to save the occupation of system resources.
Specifically, in an optional embodiment, the detecting whether the target firmware loading is completed further includes: and acquiring a preset detection period, and detecting whether the target firmware is loaded completely according to the detection period.
That is, a detection cycle of detection of whether the loading of the target firmware is completed is set in advance, for example, 1 s; in the step of detecting whether the target firmware is loaded completely, the step is executed according to the preset detection period, that is, whether the target firmware is loaded completely is periodically detected according to the preset detection period.
Optionally, in another embodiment, the wakeup time for the process that has been put to sleep may be determined not only by detecting that the loading of the target firmware is completed, but also according to an estimated loading duration of the target firmware.
Specifically, the waking up the dormant process further includes, before the waking up the dormant process: acquiring historical loading duration corresponding to the loading of the target firmware, and determining awakening time for awakening the dormant process according to the historical loading duration; and executing the process of waking up the sleep when the wake-up time is up.
In this embodiment, a history record of loading the firmware in the process of connecting with the WiFi or opening the hotspot stored or cached in the terminal is obtained, where the history record of loading the firmware includes a loading duration of each time the firmware is loaded. The history record and the loading time length of each firmware loading contained in the history record represent the condition of the current terminal history loading firmware, and reflect the capability and the processing speed of the terminal loading firmware.
In this embodiment, an average loading duration corresponding to a historical loading duration is calculated according to the historical record and the loading duration (i.e., the historical loading duration) of each time the firmware is loaded, which is included in the historical record; namely, the average value of the loading time length of each firmware loading contained in the history record is used as the average loading time length, and the average loading time length reflects the average capability of the terminal for firmware loading.
It should be noted that, in this embodiment, the obtained historical loading duration may also be within a certain time range, because the processing capability of the terminal system changes with the passage of time due to the loss of the terminal system and the change of the application installed on the terminal, and therefore, the loading duration of the target firmware before the past time does not have reliability for determining the evaluation of the current firmware loading speed of the terminal, and therefore, in this embodiment, the obtained historical loading duration is the historical loading duration within the preset time or the historical loading duration within the preset number of times of loading.
And determining the wake-up time of the wake-up process according to the average loading time length, namely determining the execution time of the process. For example, in one embodiment, the wake-up time for the wake-up process is determined based on the start time of the firmware load and the average load duration. And when the wake-up time is up, the corresponding process is woken up and executed, namely, the socket connection with the target firmware is established.
In this embodiment, there may be a case where the socket connection establishment is unsuccessful in performing the above-described process to establish the socket connection, and in this case, the process needs to be repeatedly performed to complete the establishment of the socket connection.
Specifically, in an embodiment, after the establishing, by the process, a socket connection with the target firmware further includes: and monitoring whether the socket connection is successfully established, if not, executing the socket connection established with the target firmware through the process.
That is to say, in the process of executing the process to establish the socket connection each time, it is required to monitor whether the socket connection is successfully established, so as to execute the corresponding processing mechanism in the case that the socket connection is unsuccessfully established. In this embodiment, in the loading process of the target firmware, whether the target firmware is successfully loaded is influenced by how much convenience is received, and if the target firmware fails to be loaded for some reason, the process created in step S104 is always in a sleep state, and occupies system resources. For this situation, in an optional embodiment, after the setting the process state of the process to the hibernation state, the method further includes: and detecting the continuous dormancy duration of the process state set as the dormancy state, generating and displaying a prompt message of WiFi/hotspot starting failure when the continuous dormancy duration exceeds a preset threshold value, and logging off the process. That is, after a process is created and set to a sleep state, if the process is not woken up for a long time, it may be that the loading of the corresponding target firmware is problematic and the loading cannot be successful, and in this case, the created process is logged off, thereby reducing the occupation of system resources.
In addition, in order to solve the technical problem in the conventional technology that the opening speed of the WiFi and/or the hotspot is too slow due to the period of attempting to establish a socket connection with the firmware by setting the same fixed and unchangeable WiFi monitor, in an embodiment, as shown in fig. 4, a WiFi/hotspot opening device is further provided, which includes a target firmware loading module 102, a process creation module 104, a target firmware loading detection module 106, and a process execution module 108, wherein:
the target firmware loading module 102 is configured to receive a WiFi/hotspot starting instruction, read a configuration file corresponding to the WiFi/hotspot starting instruction, determine a target firmware corresponding to the WiFi/hotspot starting instruction, and load the target firmware;
a process creating module 104, configured to create a process, where the process is configured to establish a socket connection with the target firmware, and set a process state of the process to a dormant state;
a target firmware loading detection module 106, configured to detect whether the target firmware loading is completed;
and a process execution module 108, configured to wake up the dormant process when the target firmware is loaded, and execute, through the process, the socket connection established with the target firmware.
Optionally, in this embodiment, as shown in fig. 4, the apparatus further includes a dormancy duration detection module 110, configured to detect a continuous dormancy duration in which the process state of the process is set to the dormancy state, and when the continuous dormancy duration exceeds a preset threshold, generate and display a prompt message indicating that the WiFi/hotspot opening fails, and logout the process.
Optionally, in this embodiment, the target firmware loading detection module 106 is further configured to acquire a preset detection period, and detect whether the target firmware is loaded completely according to the detection period.
Optionally, in this embodiment, as shown in fig. 4, the apparatus further includes a wakeup time determining module 112, configured to obtain a historical loading duration corresponding to the loading of the target firmware, and determine a wakeup time for waking up the dormant process according to the historical loading duration; when the wake-up time is reached, the process execution module 108 is invoked.
Optionally, in this embodiment, the process execution module 108 is further configured to monitor whether the socket connection is successfully established, and if not, execute the socket connection established with the target firmware through the process.
The embodiment of the invention has the following beneficial effects:
after the WiFi/hotspot starting method and the WiFi/hotspot starting device are adopted, corresponding firmware for starting the WiFi/hotspot is loaded after a WiFi/hotspot starting instruction is received, and message communication with the firmware is established by establishing socket connection with the firmware through process processing; however, because the loading of the firmware is not completed, the process state of the process is set to the sleep state, and whether the firmware loading is completed is detected, and the process is waken to execute socket connection establishment when the firmware loading is completed. Compared with the technical scheme that the socket connection is tried to be established according to the fixed period after the first socket connection is failed to be established in the traditional technology, the process for establishing the socket connection is dormant, the time for awakening the process is directly determined by detecting whether the loading of the firmware is completed, the corresponding execution time for establishing the socket connection is accurately mastered, the condition that the opening speed of the WiFi/hot spot is influenced by the overlarge period duration is avoided, the condition that the burden of the terminal system is increased by the overlong period duration is also avoided, the opening speed of the WiFi/hot spot is increased, the burden of the terminal system is reduced, and the user experience is improved.
In one embodiment, as shown in fig. 5, fig. 5 illustrates a terminal of a computer system based on von neumann architecture running the above-described WiFi/hotspot booting method. The computer system can be a terminal device which comprises a WiFi chip and can be connected with a WiFi hotspot, such as a smart phone, a tablet computer, a palm computer, a notebook computer or a personal computer. Specifically, an external input interface 1001, a processor 1002, a memory 1003, and an output interface 1004 connected through a system bus may be included. The external input interface 1001 may optionally include at least a network interface 10012 (in this embodiment, a WiFi chip). Memory 1003 can include external memory 10032 (e.g., a hard disk, optical or floppy disk, etc.) and internal memory 10034. The output interface 1004 may include at least a display 10042 or the like.
In this embodiment, the method is executed based on a computer program, a program file of the computer program is stored in the external memory 10032 of the computer system based on the von neumann system, and is loaded into the internal memory 10034 at the time of execution, and then is transferred to the processor 1002 to be executed after being compiled into machine code, so that the logical target firmware loading module 102, the process creation module 104, the target firmware loading detection module 106, the process execution module 108, the sleep duration detection module 110, and the wake-up time determination module 112 are formed in the computer system based on the von neumann system. In the process of executing the WiFi/hotspot starting method, the input parameters are all received through the external input interface 1001, and are transferred to the memory 1003 for caching, and then are input into the processor 1002 for processing, and the processed result data is either cached in the memory 1003 for subsequent processing, or is transferred to the output interface 1004 for outputting.
Specifically, in this embodiment, the processor 1002 is specifically configured to perform the following operations:
receiving a WiFi/hotspot starting instruction, reading a configuration file corresponding to the WiFi/hotspot starting instruction, determining a target firmware corresponding to the WiFi/hotspot starting instruction, and loading;
creating a process, wherein the process is used for establishing socket connection with the target firmware and setting the process state of the process to be a dormant state;
and detecting whether the target firmware loading is finished, if so, awakening the dormant process, and executing the socket connection between the target firmware and the dormant process through the process.
Optionally, in an embodiment, the processor 1002 is further configured to detect a continuous sleep duration in which the process state of the process is set to the sleep state, generate and display a prompt message indicating that the WiFi/hotspot opening fails when the continuous sleep duration exceeds a preset threshold, and log off the process.
Optionally, in an embodiment, the processor 1002 is further configured to obtain a preset detection period, and detect whether the target firmware is loaded completely according to the detection period.
Optionally, in an embodiment, the processor 1002 is further configured to obtain a historical loading duration corresponding to the loading of the target firmware, and determine a wake-up time for waking up the dormant process according to the historical loading duration; and executing the process of waking up the sleep when the wake-up time is up.
Optionally, in an embodiment, the processor 1002 is further configured to monitor whether the socket connection is successfully established, and if not, execute the socket connection between the socket connection and the target firmware through the process.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (7)

1. A WiFi/hotspot starting method is characterized by comprising the following steps:
receiving a WiFi/hotspot starting instruction, reading a configuration file corresponding to the WiFi/hotspot starting instruction, determining a target firmware corresponding to the WiFi/hotspot starting instruction, and loading;
creating a process, wherein the process is used for establishing socket connection with the target firmware and setting the process state of the process to be a dormant state;
detecting whether the target firmware loading is finished, if so, awakening the dormant process, and executing the socket connection between the target firmware and the dormant process through the process;
the waking up the dormant process further comprises:
acquiring historical loading duration corresponding to the loading of the target firmware, and determining awakening time for awakening the dormant process according to the historical loading duration; the historical loading duration is the historical loading duration within preset time or the historical loading duration within preset loading times;
when the wake-up time is up, executing the process for waking up the sleep;
after the setting the process state of the process to the sleep state, the method further includes:
and detecting the continuous dormancy duration of the process state set as the dormancy state, generating and displaying a prompt message of WiFi/hotspot starting failure when the continuous dormancy duration exceeds a preset threshold value, and logging off the process.
2. The WiFi/hotspot turning on method of claim 1, wherein the detecting whether the target firmware loading is complete further comprises:
and acquiring a preset detection period, and detecting whether the target firmware is loaded completely according to the detection period.
3. The method for opening a WiFi/hotspot of any of claims 1 to 2, wherein after the performing the establishing the socket connection with the target firmware by the process further comprises:
and monitoring whether the socket connection is successfully established, and if not, executing the socket connection established with the target firmware through the process.
4. An opening device of a WiFi/hotspot comprises:
the target firmware loading module is used for receiving a WiFi/hotspot starting instruction, reading a configuration file corresponding to the WiFi/hotspot starting instruction, determining target firmware corresponding to the WiFi/hotspot starting instruction and loading;
the process creation module is used for creating a process, and the process is used for establishing socket connection with the target firmware and setting the process state of the process to be a dormant state;
the target firmware loading detection module is used for detecting whether the target firmware loading is finished;
the process execution module is used for awakening the dormant process when the target firmware is loaded, and executing the socket connection established between the dormant process and the target firmware through the process;
a wake-up time determining module, configured to acquire a historical loading duration corresponding to the loading of the target firmware, and determine, according to the historical loading duration, a wake-up time for waking up the dormant process; when the awakening time is up, calling the process execution module; the historical loading duration is the historical loading duration within preset time or the historical loading duration within preset loading times;
and the dormancy duration detection module is used for detecting the continuous dormancy duration of which the process state is set to be the dormancy state, generating and displaying a prompt message of WiFi/hotspot starting failure when the continuous dormancy duration exceeds a preset threshold value, and logging off the process.
5. The WiFi/hotspot starting device according to claim 4, wherein the target firmware loading detection module is further configured to obtain a preset detection period, and detect whether the target firmware is completely loaded according to the detection period.
6. The WiFi/hotspot opening device according to any one of claims 4 to 5, wherein the process executing module is further configured to monitor whether the socket connection is successfully established, and if not, execute the socket connection between the process executing module and the target firmware.
7. A mobile terminal, comprising:
a processor and a memory; wherein the processor executes the WiFi/hotspot opening method of any one of claims 1 to 3 by calling code or instructions in the memory.
CN201611143063.8A 2016-12-07 2016-12-07 WiFi/hotspot starting method and device Active CN106603526B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611143063.8A CN106603526B (en) 2016-12-07 2016-12-07 WiFi/hotspot starting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611143063.8A CN106603526B (en) 2016-12-07 2016-12-07 WiFi/hotspot starting method and device

Publications (2)

Publication Number Publication Date
CN106603526A CN106603526A (en) 2017-04-26
CN106603526B true CN106603526B (en) 2020-03-24

Family

ID=58597702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611143063.8A Active CN106603526B (en) 2016-12-07 2016-12-07 WiFi/hotspot starting method and device

Country Status (1)

Country Link
CN (1) CN106603526B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647597B (en) * 2018-06-11 2022-04-08 百度在线网络技术(北京)有限公司 Rendering method and device of electronic map
CN111356209B (en) * 2020-02-17 2022-04-26 Oppo广东移动通信有限公司 Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment
CN111867143A (en) * 2020-04-27 2020-10-30 广州朗国电子科技有限公司 Communication method and device among multiple devices in education whiteboard and education whiteboard

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188975A1 (en) * 2009-01-28 2010-07-29 Gregory G. Raleigh Verifiable device assisted service policy implementation
CN102098761A (en) * 2009-12-10 2011-06-15 华为终端有限公司 Mobile communication terminal and network access method thereof
CN104702608A (en) * 2015-03-13 2015-06-10 吴培希 WiFi sharing system
CN105873191A (en) * 2015-11-02 2016-08-17 乐视致新电子科技(天津)有限公司 WIFI dormancy control method and system, and router
CN106020942A (en) * 2016-05-05 2016-10-12 四川安嵌科技有限公司 Multi-system based WiFi device reuse method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9647918B2 (en) * 2009-01-28 2017-05-09 Headwater Research Llc Mobile device and method attributing media services network usage to requesting application
CN101813003B (en) * 2010-03-30 2012-06-13 煤炭科学研究总院重庆研究院 Mine disaster relief command system
US9098279B2 (en) * 2010-09-14 2015-08-04 Google Inc. Methods and systems for data interchange between a network-connected thermostat and cloud-based management server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188975A1 (en) * 2009-01-28 2010-07-29 Gregory G. Raleigh Verifiable device assisted service policy implementation
CN102098761A (en) * 2009-12-10 2011-06-15 华为终端有限公司 Mobile communication terminal and network access method thereof
CN104702608A (en) * 2015-03-13 2015-06-10 吴培希 WiFi sharing system
CN105873191A (en) * 2015-11-02 2016-08-17 乐视致新电子科技(天津)有限公司 WIFI dormancy control method and system, and router
CN106020942A (en) * 2016-05-05 2016-10-12 四川安嵌科技有限公司 Multi-system based WiFi device reuse method and device

Also Published As

Publication number Publication date
CN106603526A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
US10275586B2 (en) Method for power management using fingerprint identification in mobile terminal and mobile terminal
US9970966B2 (en) Method, device and computer storage medium for detecting power consumption of an application
US11698792B2 (en) Method for starting up device and device
CN106507445B (en) Wireless fidelity Wi-Fi scanning method and mobile terminal
CN109542744B (en) Method, device, storage medium and terminal for detecting abnormal starting problem of terminal
CN109522147A (en) A kind of method, apparatus, storage medium and the terminal of record booting exception information
EP3128789B1 (en) Method, device and mobile terminal for reducing power consumption
CN110018901B (en) Memory recovery method and device, computer equipment and computer readable storage medium
CN106603526B (en) WiFi/hotspot starting method and device
CN108664285A (en) Application program preloads method, apparatus, storage medium and mobile terminal
CN105517109A (en) Method and device for controlling background scanning of wireless local area network in mobile terminal
CN108768763A (en) Heartbeat message sending method and device
CN111475213A (en) Power consumption reduction method and device for multi-core structure solid state disk and computer equipment
CN106686627B (en) WiFi/hotspot starting method and device
CN104317611A (en) Application rousing setting device and method and mobile terminal
CN105159722A (en) Method for RTC (Real Time Clock) wake-up system and computer
CN110636598A (en) Terminal power saving control method and device, mobile terminal and storage medium
US20120327849A1 (en) Method for controlling network connection of wireless network device and associated wireless network device
WO2018010438A1 (en) Responding method and apparatus for terminal
CN109151144B (en) Hardware management method, device, system, computer equipment and storage medium
CN111897581B (en) Screen-off awakening method and device, storage medium and all-in-one machine equipment
CN113075992B (en) Memory power-on method, device, equipment and computer readable storage medium
CN112835826A (en) Communication method, device, equipment and readable storage medium
TWI442805B (en) Method for controlling network connection of wireless network device and associated wireless network device
CN113296597B (en) Power consumption control method and terminal equipment

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

GR01 Patent grant
GR01 Patent grant