CN107333323B - WIFI (Wireless Fidelity) reconnection method and device after android system is started and terminal equipment - Google Patents

WIFI (Wireless Fidelity) reconnection method and device after android system is started and terminal equipment Download PDF

Info

Publication number
CN107333323B
CN107333323B CN201710422899.XA CN201710422899A CN107333323B CN 107333323 B CN107333323 B CN 107333323B CN 201710422899 A CN201710422899 A CN 201710422899A CN 107333323 B CN107333323 B CN 107333323B
Authority
CN
China
Prior art keywords
wifi
layer
supplicant
started
starting
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
CN201710422899.XA
Other languages
Chinese (zh)
Other versions
CN107333323A (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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201710422899.XA priority Critical patent/CN107333323B/en
Publication of CN107333323A publication Critical patent/CN107333323A/en
Application granted granted Critical
Publication of CN107333323B publication Critical patent/CN107333323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • 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/4401Bootstrapping
    • G06F9/4416Network booting; Remote initial program loading [RIPL]
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a method and a device for WIFI (wireless fidelity) reconnection after startup of an android system and terminal equipment. The WIFI loopback method comprises the following steps: after the init process is started, scanning WIFI hotspots stored in the upper application history pairing information by loading a WIFI driver and starting a supplicant middleware layer to determine a target access point; after a system frame layer is started, creating a communication connection between the frame layer and the supplicant middleware layer so as to create a route, so that the network access between the upper layer application and the target access point can normally communicate. According to the embodiment of the invention, the WIFI connection speed after the Android system is started can be increased, and the network connection speed is increased.

Description

WIFI (Wireless Fidelity) reconnection method and device after android system is started and terminal equipment
Technical Field
The embodiment of the invention relates to a communication technology, in particular to a method and a device for WIFI (wireless fidelity) reconnection after an Android (Android) system is started and terminal equipment.
Background
With the development of communication technology, WIreless-Fidelity (WIFI for short) technology is more and more mature, and more users are used to access the internet through a terminal device to access a WIFI network, so as to realize corresponding network services.
Before the terminal equipment is accessed to the WIFI network, the WIFI connection with the access point needs to be established. After a terminal device based on an Android system is started, after an init process is started, a system server process needs to be started first, a frame layer is started after the system server process is started, WIFI driving is loaded after the frame layer is started, then a supplicant middleware layer is started, communication connection between the frame layer and the supplicant middleware layer is established, and WIFI connection with an access point is achieved.
However, the starting time of the system server process is long, so that the WIFI connection time is long after the terminal equipment of the Android system is started, and the connection is slow, so that the speed of the terminal equipment using the network is influenced.
Disclosure of Invention
The embodiment of the invention provides a WIFI (wireless fidelity) reconnection method and device after starting an Android system and terminal equipment, which are used for shortening the WIFI reconnection time after starting the Android system and improving the network connection speed, so that the network using speed of the terminal equipment is improved.
The embodiment of the invention provides a method for wireless fidelity (WIFI) reconnection after an Android system is started, which comprises the following steps:
after the init process is started, scanning WIFI hotspots stored in the upper application history pairing information by loading a WIFI driver and starting a supplicant middleware layer to determine a target access point;
after a system frame layer is started, creating a communication connection between the frame layer and the supplicant middleware layer so as to create a route, so that the network access between the upper layer application and the target access point can normally communicate. .
Optionally, after the init process is started, the method further includes:
reading whether a preset position stores startup identification information or not, wherein the startup identification information is used for representing that the current system is in a startup state;
and if so, starting to load the WIFI driver and starting the supplicant middleware layer.
Optionally, after the system framework layer is started and before a communication connection between the framework layer and the suppplicant middleware layer is created, the method further includes:
and if the system server process is detected to be started, deleting the instruction for unloading the WIFI driver.
Optionally, after the system framework layer is started, creating a communication connection between the framework layer and the suppplicant middleware layer, where the method includes:
after detecting that the framework layer is started, periodically reading the loading state of the WIFI driver;
if the WIFI driver is loaded successfully, reading the starting state of the supplicant middleware layer;
after the success of the supplicant middleware layer starting, a communication connection between the frame layer and the supplicant middleware layer is established.
Optionally, the loading the WIFI driver and starting the supplicant middleware layer includes:
and if the WIFI driver is loaded successfully, after deleting the operation instruction for clearing the wireless local area network W L AN information and clearing the supplicant middleware layer, starting the supplicant middleware layer.
The embodiment of the invention also provides a device for wireless fidelity (WIFI) reconnection after the Android system is started, which comprises the following steps:
the loading starting module is used for completing scanning of WIFI hotspots stored in the upper application history matching information by loading the WIFI driver and starting the supplicant middleware layer after the init process is started, and determining a target access point;
and the creating module is used for creating communication connection between the frame layer and the supplicant middleware layer after the frame layer of the system is started so as to create a route, so that the network access between the upper layer application and the target access point can normally communicate.
Optionally, the apparatus further comprises:
the reading module is used for reading whether a preset position stores starting-up identification information or not after the init process is started, wherein the starting-up identification information is used for representing that the current system is in a starting-up state;
the loading starting module is specifically configured to start loading the WIFI driver and start the supplicant middleware layer if the preset location stores the boot identification information.
Optionally, the apparatus further comprises:
and the deleting module is used for deleting the instruction for uninstalling the WIFI driver after detecting that a system server process is started before the creating module creates the communication connection between the frame layer and the supplicant middleware layer.
Optionally, the reading module is further configured to periodically read the loading state of the WIFI driver after detecting that the frame layer is started; if the WIFI driver is loaded successfully, reading the starting state of the supplicant middleware layer;
the creating module is specifically configured to create a communication connection between the frame layer and the suplicant middleware layer after the suplicant middleware layer is successfully started.
Optionally, the deleting module is further configured to delete the operation instruction for clearing the wlan W L AN information and clearing the supporting middleware layer if the WIFI driver is successfully loaded;
the load starting module is specifically configured to start the suppplicant middleware layer after deleting the operation instruction for clearing the W L AN information and clearing the suppplicant middleware layer.
An embodiment of the present invention further provides a terminal device, including: a memory and a processor; the memory is connected with the processor;
the memory to store program instructions;
the processor is configured to call the program instruction stored in the memory, so that the processor executes any one of the above methods for wireless fidelity (WIFI) reconnection after the Android system is started.
According to the method, the device and the terminal equipment for WIFI reconnection after starting the Android system, after the init process is started, the WIFI drive is loaded and the supplicant middleware layer is started to complete scanning of WIFI hotspots stored in the upper application historical pairing information, a target access point is determined, after the system frame layer is started, communication connection between the frame layer and the supplicant middleware layer is established, and a route is established so that a network access between the upper application and the target access point can normally communicate. According to the method, after the init process is started, the target access point for WIFI reconnection is determined by loading the WIFI driver and starting the supplicant middleware layer, and the target access point does not need to be determined after the framework layer is started, so that the WIFI reconnection time after the Android system is started is effectively shortened, the WIFI connection speed is increased, and the network using speed of the terminal equipment is increased.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a first flowchart of a W L AN connection method for WIFI reconnection after AN Android system is powered on according to AN embodiment of the present invention;
fig. 2 is a flowchart of a second method for wireless fidelity (WIFI) backhaul after an Android system is powered on according to an embodiment of the present invention;
fig. 3 is a flowchart three of a method for wireless fidelity WIFI backhaul after an Android system is powered on according to an embodiment of the present invention;
fig. 4 is a fourth flowchart of a method for WIFI reconnection after an Android system is powered on according to an embodiment of the present invention;
fig. 5 is a first schematic structural diagram of a WIFI reconnection device after an Android system is powered on according to an embodiment of the present invention;
fig. 6 is a second schematic structural diagram of a WIFI reconnection device after an Android system is powered on according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method for WIFI (wireless fidelity) reconnection after starting of the Android system, provided by the following embodiments of the invention, can be applied to terminal equipment based on the Android system, wherein the terminal equipment can be any one of a smart phone, a tablet personal computer, a computer, wearable equipment and the like.
The following is a detailed description in conjunction with several examples. Fig. 1 is a first flowchart of a method for WIFI reconnection after an Android system is powered on according to an embodiment of the present invention. The WIFI reconnection method after the Android system is started can be executed by a WIFI reconnection device, and the WIFI reconnection device can be integrated in terminal equipment based on the Android system in a software and/or hardware mode. As shown in fig. 1, the method may include:
s101, after the init process is started, scanning WIFI hotspots stored in the upper application history matching information is completed by loading a WIFI driver and starting a supplicant middleware layer, and a target access point is determined.
The init process may be an initialization process of an Android system. The WIFI driver may be a driver for wireless access in the Android system. The supplicant middleware layer can be a wpa _ supplicant middleware layer in an Android system.
The supplicant middleware layer is AN application layer Authentication client and is used for supporting a Wireless device Privacy (WEP) protocol, a Wireless fidelity Protected Access (WPA) protocol, a WPA (Wi-Fi Protected Access 2, WPA2) WPA2 and a Wireless local area network Authentication and encryption base (Wireless L AN Authentication and Privacy Infrastructure, WAPI) protocol.
In this S101, a configuration file of the suppplicant middleware layer may be acquired by loading the WIFI driver and starting the suppplicant middleware layer, where the configuration file may include: and historical network configuration information, namely determining WIFI hotspots stored in the upper-layer application historical pairing information from the historical network configuration information, scanning the stored WIFI hotspots one by one, and then determining a target access point according to a scanning result.
The WIFI hotspots stored in the historical pairing information may include: information of at least one access point, the information of each access point may comprise an identification of each access point, such as a name. In the WIFI hotspots stored in the historical pairing information, each access point is a configured access point.
The target access point may be, for example, an access point that is accessed the latest time from the current time in the stored WIFI hotspots; the access point with the largest access success times in the stored WIFI hotspots can also be used; the access point with the highest access priority in the stored WIFI hotspots can also be selected; or any random access point in the stored WIFI hotspots. The access point with the highest access priority may be determined according to preset access conditions, or may be determined according to configuration information input by a user.
In S101, for example, a linux command may be used to load a WIFI driver and start a supplicant middleware layer to complete scanning of a WIFI hotspot stored in the upper application history pairing information, so as to determine a target access point.
Since the target ap has been determined after the above S101 is executed, after the S101, the method may enable the upper layer application to loop back to the target ap and establish a link layer connection between the upper layer application and the target ap to establish a network path between the upper layer application and the target ap. Wherein the link layer connection may be referred to as an underlay connection.
It should be noted that, in the method, after the target access point is determined, the unconnected state of the WIFI state machine of the suppplicant middleware layer may be enabled to set the WIFI connection state to the unconnected state. The unconnected state of the WIFI state machine may be denoted as disconnectstate.
After the network path between the upper application and the target access point is established, the WIFI connection state is changed from the disconnection state to the connection state, and the change of the WIFI connection state drives the state of the WIFI state machine to jump, namely, the WIFI connection state jumps to the connection state from the disconnection state. The connection status of the WIFI state machine may be denoted as connectiredstate.
After the network path between the upper application and the target access point is established, the supplicant middle layer can store the WIFI connection state and continuously try to report the WIFI connection state to the frame layer until the communication connection between the frame layer and the supplicant middle layer is established successfully.
Optionally, before the init process is started, the method may further include: and starting a boot loader (Bootloader) program and starting a Kernel (Kernel) program of the Android system.
The init process may be started after the kernel is started.
S102, after a system frame layer is started, establishing communication connection between the frame layer and the supplicant middleware layer so as to establish a route, so that the network access between the upper layer application and the target access point can normally communicate.
The frame layer may be a system framework layer of an Android system. The framework layer defines the services and interfaces of the client and service components.
The communication connection may be created in S102 by creating a socket for the frame layer to communicate with the suppplicant middleware layer.
In order to ensure that the network access between the upper layer application and the target access point can normally communicate, on the basis of establishing the network access between the upper layer application and the target access point, the method also needs to establish a route of the network access. In the method, for example, the routing information of the target access point can be acquired through the communication connection between the frame layer and the subordinate middleware layer, and then the routing table is set according to the routing information, so as to realize the routing setting.
Wherein the routing information may include at least one of: an IP address of the target access point, a gateway identifier corresponding to the target access point, a subnet mask corresponding to the target access point, an IP address of a router corresponding to the target access point, a Domain Name System (DNS for short) corresponding to the target access point, and the like.
For example, in the process of creating the communication connection, the method may further include: the thread is started. The thread may be a thread that the framework layer acquires a reported event from the suppplicant middleware layer, and the thread may be a thread that is executed in a wireless loop. That is, by executing the thread to start, the frame layer can continue to obtain the events reported by the suppplicant middleware layer from the suppplicant middleware layer.
Since the target access point is determined after the execution of S101, after the communication connection is established, the frame layer may obtain the information of the determined target access point from the supplicant middleware layer through the communication connection, and notify the information to the upper application.
The framework layer can acquire the WIFI connection state corresponding to the target access point from the supplicant middleware layer through the started thread in the communication connection establishing process, and inform the upper layer application of updating the WIFI connection state through the communication connection.
If the WIFI connection state is a connection state, the frame layer may obtain the routing information of the target access point from the supplicant intermediate layer through the communication connection. In the method, a Dynamic Host Configuration Protocol (DHCP) layer in the frame layer may be started, so that the frame layer obtains the routing information of the target access point from the supplicant intermediate layer through the communication connection by using the DHCP. It should be noted that, in the method, an Internet Protocol (IP) layer of the frame layer may also be started, so that the frame layer obtains the routing information of the target access point from the supplicant intermediate layer through the communication connection by using an IP protocol. Of course, other protocol layers in the frame layer may also be started to obtain the routing information in the method, which is not limited in the present invention.
Optionally, if the WIFI connection state is a connected state, in the method, before the frame layer obtains the routing information of the target access point from the subordinate intermediate layer through the communication connection, the subordinate intermediate layer may jump to a routing information state machine from the WIFI state machine to obtain the routing information of the target access point. The route information acquiring state machine may be, for example, an IP address acquiring state machine (obtainingstate).
If the WIFI connection state is the unconnected state, the method can reacquire the WIFI connection state according to a preset scanning period, inform an upper layer application, and wait for a user to issue a connection instruction. If a connection instruction input by a user is received, the WIFI connection state can be obtained again through rescanning.
Optionally, after the route is created, it may be determined that the W L AN connection is successful, and the method may further notify the upper layer that the WIFI connection is successful.
According to the method for wirelessly connecting fidelity WIFI after starting the Android system, after the init process is started, the WIFI drive is loaded and the supplicant middleware layer is started to complete scanning of WIFI hotspots stored in the historical matching information of the upper application, a target access point is determined, after the system frame layer is started, communication connection between the frame layer and the supplicant middleware layer is established, and a route is established so that a network access between the upper application and the target access point can normally communicate. According to the method, after the init process is started, the target access point for WIFI reconnection is determined by loading the WIFI driver and starting the supplicant middleware layer, and the target access point does not need to be determined after the framework layer is started, so that the WIFI reconnection time after the Android system is started is effectively shortened, the WIFI connection speed is increased, and the network using speed of the terminal equipment is increased.
Meanwhile, according to the scheme of the embodiment of the invention, under the condition of improving the WIFI connection speed, the updating speed of the system time of the terminal equipment can be improved, and the system time is ensured to be more accurate.
On the basis of the method, the embodiment of the invention also provides a method for wireless fidelity (WIFI) loopback after the Android system is started. Fig. 2 is a flowchart of a second method for wireless fidelity WIFI backhaul after an Android system is powered on according to an embodiment of the present invention. Optionally, after the init process is started in S101 as shown above, the method may further include:
s201, whether the preset position stores the startup identification information or not is read, and the startup identification information is used for representing that the current system is in a startup state.
Specifically, in the method, in the Android system, after the init process is started, the boot flag bit may be set as boot identification information to indicate that the current system is in a boot state, and the boot identification information is stored in the preset position. In S201, it is determined whether the boot identification information is stored in the preset position by reading the information stored in the preset position.
S202, if yes, loading the WIFI driver and starting the supplicant middleware layer.
If the preset position stores the startup identification information, the current system can be determined to be in a startup state, so that the WIFI driver can be loaded and the supplicant middleware layer can be started.
If the preset location does not store the boot identification information, it is determined that the current system is not in the boot state, and thus the S202 does not need to be executed.
According to the method, the starting identification information stored in the preset position can be read, the current system is timely determined to be in the starting state, then the WIFI drive is loaded and the supplicant middleware layer is started, so that the WIFI drive is loaded and the supplicant middleware layer is driven as early as possible, the WIFI reconnection time after the Android system is started is effectively shortened, the WIFI connection speed is increased, and the network using speed of the terminal equipment is increased.
Optionally, after the init process is started, the method may further include:
starting a Zygote process, starting a system service (Systemservice) process, and starting a wireless fidelity service (WIFIservice) process.
The Zygote process may create a process for an application in the Android system. The SystemService process may be a core process in the Android system, which may be created by a Zygote process. The frame layer may be initiated after the SystemService process is initiated, for example.
After the SystemService process is started, the method can also set the starting marker bit as other information to indicate that the current system is started completely.
Optionally, after the WIFI service process is started, the WIFI enable is set.
Specifically, in the method, the WIFI enable may be set by calling a setwifi enabled () function.
On the basis of the method, the embodiment of the invention also provides a method for wireless fidelity (WIFI) loopback after the Android system is started. Fig. 3 is a flowchart of a method for wireless fidelity WIFI backhaul after an Android system is powered on according to an embodiment of the present invention. Optionally, on the basis of the method shown above, where after the frame layer of the system is started in S102, before creating a communication connection between the frame layer and the suppplicant middleware layer, the method may further include:
s301, after the system server process is detected to be started, deleting the instruction for uninstalling the WIFI driver.
Specifically, in the method, for example, after it is detected that the system server process is started, the instruction for uninstalling the WIFI driver in the method for entering the initial state of the wireless fidelity state machine may be deleted, and the operation of uninstalling the WIFI driver is not performed when the WIFI state machine is in the initial state. The method for entering the initial state of the wireless fidelity state machine may be an enter () method of the wifistatemachine initialstate.
After the system server process is detected to be started, the instruction for unloading the WIFI driver is deleted in time, so that the loaded WIFI driver can be prevented from being unloaded in the starting process, and the WIFI reconnection is ensured.
Optionally, the S101 may include, in loading the WIFI driver and starting the supplicant middleware layer:
s301a, if the WIFI driver is loaded successfully, after deleting the operation instruction for clearing the W L AN information and clearing the supplicant middleware layer, starting the supplicant middleware layer.
According to the method, after the WIFI driver is loaded successfully, the instruction for clearing the W L AN information and clearing the supplicant middleware layer is deleted, and after the instruction is deleted, the supplicant middleware layer is started.
Since the W L AN information may not exist during the boot process, it is not necessary to perform a clear (clear) of the W L AN information, and after the WIFI driver is loaded, the sublicent middleware layer is not yet started, and therefore it is not necessary to perform a clear (kill) of the sublicent middleware layer, and therefore, the sublicent middleware layer may be started after deleting the operation instruction for clearing the W L AN information and clearing the sublicent middleware layer.
In the method, after the instruction for clearing the W L AN information and clearing the suppllicant middleware layer is deleted, the redundancy of instruction operation can be avoided, and the operation load in the system starting process can be reduced.
Optionally, as shown above, after the system frame layer is started in S102, creating a communication connection between the frame layer and the suppplicant middleware layer may include:
s302, after the fact that the frame layer is started is detected, the loading state of the WIFI driver is read periodically.
And S303, if the WIFI driver is loaded successfully, reading the starting state of the supplicant middleware layer.
If the read loading state of the WIFI driver is loaded, it can be determined that the loading of the WIFI driver is successful. And if the read loading state of the WIFI driver is not loaded, continuing to read the state of the WIFI driver until the WIFI driver is loaded successfully.
S304, after the success of the supplicant middleware layer, establishing the communication connection between the frame layer and the supplicant middleware layer.
In the method, if the starting state of the supplicant middleware layer is read to be started, the success of the starting of the supplicant middleware layer can be determined, the information of success of the starting can be returned, and then the communication connection between the frame layer and the supplicant middleware layer can be established.
According to the method, the loading state of the WIFI driver can be read in a frame layer starting period, the loading state of the WIFI driver can be timely obtained, if the WIFI driver is successfully loaded, the starting state of the suppllicant middleware layer can be timely read, and after the suppllicant middleware layer is successfully started, the communication connection between the frame layer and the suppllicant middleware layer is established as early as possible, so that the WIFI reconnection time after the Android system is started up is effectively shortened, the WIFI connection speed is improved, and the speed of the terminal device for using the network is increased.
Optionally, after creating the communication connection between the frame layer and the supplicant middleware layer in S102, the method may further include at least one of the following operations: setting a bandwidth corresponding to a WIFI connection, enabling the framework layer to issue configuration update information to the subordinate middleware layer, downloading (load) and enabling WIFI networks corresponding to all configured access points, initializing WIFI Protected Setup (Wi-Fi Protected Setup) information, enabling Point-to-Point (Point to Point, abbreviated as P2P) communication, and the like.
Optionally, before starting the supplicant middleware layer, the method may set a disabled IP address, where the disabled IP address may include, for example: a disabled fourth generation Internet Protocol (Internet Protocol Version4, IPV4) address, and/or a disabled sixth generation Internet Protocol (Internet Protocol Version 6, IPV6) address.
According to the method, after a W L AN closing or opening instruction input by a user is received, a W L AN interface (downlink interface) can be closed, IP information of the W L AN interface (clear wall interface) is deleted, and a notice (kill notice) intermediate layer is cleared.
Specifically, in the method, a command for clearing the W L AN information can be executed to close the W L AN interface and delete the IP information of the W L AN interface, and a command for clearing the supplicant middleware layer can be executed to clear the supplicant middleware layer.
Optionally, AN embodiment of the present invention may further provide a W L AN connection method, fig. 4 is a fourth flowchart of a method for WIFI reconnection after AN Android system is powered on according to AN embodiment of the present invention, fig. 4 may illustrate the method shown in any one of fig. 1 to 3 for example, as shown in fig. 4,
s401, starting a Bootloader program.
S402, starting a Kernel program of the Android system.
And S403, starting an init process.
S404, after the init process is started, whether the preset position stores the starting-up identification information or not is read, and the starting-up identification information is used for representing that the current system is in a starting-up state.
And S405, if so, starting to load the WIFI driver.
S406, if the WIFI driver is loaded successfully, after the instruction for clearing the W L AN information and clearing the supplicant middleware layer is deleted, starting the supplicant middleware layer.
And S407, after the supplicant middleware layer is started, scanning WIFI hotspots stored in the upper application history pairing information to determine a target access point, wherein the target access point can be the last successfully connected access point.
S408, establishing a network path between the upper layer application and the target access point.
And S409, starting the Zygote process after the init process is started.
It should be noted that, the above S404 and S409 may not have an absolute time relationship, and may be executed simultaneously or sequentially, which is not limited in the present invention.
S410, starting a SystemService process.
And S411, after the Systemservice process is started, deleting the instruction for uninstalling the WIFI drive, and starting the WiFiservice process.
S412, WiFi enabling is set, and the WiFi switch is in an on state.
And S413, after the frame layer is detected to be started, periodically reading the loading state of the WIFI driver.
And S414, if the WIFI driver is loaded successfully, reading the starting state of the supplicant middleware layer.
S415, after the supplicant middleware layer is successfully started, creating a communication connection between the frame layer and the supplicant middleware layer, and starting a thread at the same time.
And S416, acquiring the WiFi connection state through the started thread.
S417, if the WiFi connection state is the connected state, acquiring the IP address information of the target access point from the supplicant middleware layer through the communication connection by using DHCP, and setting a routing table according to the IP address information.
And S418, informing the upper layer that the WiFi connection is successful.
And S419, if the WiFi connection state is the unconnected state, acquiring the WiFi connection state according to a preset acquisition period, and waiting for receiving a connection request input by a user for WiFi connection according to the connection request.
According to the method provided by the embodiment of the invention, after the init process is started, the WIFI drive is loaded and the supplicant middleware layer is started to complete the scanning of the WIFI hotspot stored in the historical pairing information of the upper application, the target access point is determined, and after the frame layer of the system is started, the communication connection between the frame layer and the supplicant middleware layer is established, so that the routing is established, and the network access between the upper application and the target access point can be normally communicated. According to the method, after the init process is started, the target access point for WIFI reconnection is determined by loading the WIFI driver and starting the supplicant middleware layer, and the target access point does not need to be determined after the framework layer is started, so that the WIFI reconnection time after the Android system is started is effectively shortened, the WIFI connection speed is increased, and the network using speed of the terminal equipment is increased.
The embodiment of the invention also provides a WIFI reconnection device after the Android system is started. Fig. 5 is a first schematic structural diagram of a WIFI reconnection device after an Android system is powered on according to an embodiment of the present invention. As shown in fig. 5, the apparatus for WIFI reconnection after booting the Android system may include:
and the loading starting module 501 is configured to, after the init process is started, complete scanning of the WIFI hotspot stored in the upper application history pairing information by loading the WIFI driver and starting the supplicant middleware layer, and determine the target access point.
A creating module 502, configured to create, after a frame layer of the system is started, a communication connection between the frame layer and the supplicant middleware layer, so as to create a route, so that a network path between the upper layer application and the target access point can normally communicate.
On the basis of the device shown in fig. 5, an embodiment of the present invention further provides a device for WIFI reconnection after an Android system is powered on. Fig. 6 is a second schematic structural diagram of a WIFI reconnection device after an Android system is powered on according to an embodiment of the present invention. As shown in fig. 6, the apparatus for WIFI reconnection after starting up an Android system may further include:
a reading module 503, configured to read whether the preset location stores boot identifier information after the init process is started, where the boot identifier information is used to represent that the current system is in a boot state.
The loading starting module 501 is specifically configured to start loading the WIFI driver and start the applying middleware layer if the preset location stores the boot identifier information.
Optionally, the apparatus for WIFI reconnection after starting up the Android system may further include:
a deleting module 504, configured to delete the instruction for uninstalling the WIFI driver if it is detected that the system server process is started before the creating module 502 creates the communication connection between the frame layer and the supplicant middleware layer.
Optionally, the reading module 503 is further configured to periodically read the loading state of the WIFI driver after detecting that the frame layer is started; and if the WIFI driver is loaded successfully, reading the starting state of the supplicant middleware layer.
The creating module 502 is specifically configured to create a communication connection between the frame layer and the suplicant middleware layer after the suplicant middleware layer is successfully started.
Optionally, the deleting module 504 is further configured to delete the operation instruction for clearing the W L AN information and clearing the supplicant middleware layer if the WIFI driver is successfully loaded.
The loading start module 501 is specifically configured to start the suplicant middleware layer after the instruction for clearing the W L AN information and clearing the suplicant middleware layer is deleted.
The W L AN connection device provided in the embodiment of the present invention may execute the method for WIFI reconnection after the Android system is powered on as shown in any one of fig. 1 to 4, and the specific implementation process and beneficial effects thereof are described above and are not described herein again.
The embodiment of the invention also provides the terminal equipment. Fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 7, the terminal device 700 may include: a memory 701 and a processor 702; the memory 701 is connected to the processor 702.
A memory 701 for storing program instructions.
The processor 702 is configured to call the program instruction stored in the memory 701, so that the processor 702 executes the method for WIFI reconnection after the Android system is powered on as described in any one of fig. 1 to fig. 4.
The terminal device provided in the embodiment of the present invention may execute the method for WIFI reconnection after the Android system is powered on as shown in any one of fig. 1 to 4, and specific implementation processes and beneficial effects thereof are described above and are not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for wireless fidelity (WIFI) reconnection after starting an Android system is characterized by comprising the following steps:
after the init process is started, scanning WIFI hotspots stored in the upper application history pairing information by loading a WIFI driver and starting a supplicant middleware layer to determine a target access point;
after a system frame layer is started, creating a communication connection between the frame layer and the supplicant middleware layer so as to create a route, so that the network access between the upper layer application and the target access point can normally communicate;
and loading the WIFI driver and starting the supplicant middleware layer simultaneously with the starting of the frame layer.
2. The method according to claim 1, wherein after the init process is started, further comprising:
reading whether a preset position stores startup identification information or not, wherein the startup identification information is used for representing that the current system is in a startup state;
and if so, starting to load the WIFI driver and starting the supplicant middleware layer.
3. The method according to claim 2, wherein after the system framework layer is started and before a communication connection between the framework layer and the supplicant middleware layer is created, the method further comprises:
and deleting the instruction for uninstalling the WIFI driver after detecting that the system server process is started.
4. The method according to claim 3, wherein the creating a communication connection between the frame layer and the supplicant middleware layer after the system frame layer is started comprises:
after detecting that the framework layer is started, periodically reading the loading state of the WIFI driver;
if the WIFI driver is loaded successfully, reading the starting state of the supplicant middleware layer;
after the success of the supplicant middleware layer starting, a communication connection between the frame layer and the supplicant middleware layer is established.
5. The method of claim 3, wherein loading the WIFI driver and launching the supplicant middleware layer comprises:
and if the WIFI driver is loaded successfully, after the command for clearing the wireless local area network W L AN information and clearing the supplicant middleware layer is deleted, starting the supplicant middleware layer.
6. The utility model provides a device that wireless fidelity WIFI of Android system after start-up links back, its characterized in that, the device includes:
the loading starting module is used for completing scanning of WIFI hotspots stored in the upper application history matching information by loading the WIFI driver and starting the supplicant middleware layer after the init process is started, and determining a target access point;
the creating module is used for creating communication connection between the frame layer and the supplicant middleware layer after the frame layer of the system is started so as to create a route, so that the network access between the upper layer application and the target access point can normally communicate;
and loading the WIFI driver and starting the supplicant middleware layer simultaneously with the starting of the frame layer.
7. The apparatus of claim 6, further comprising:
the reading module is used for reading whether a preset position stores starting-up identification information or not after the init process is started, wherein the starting-up identification information is used for representing that the current system is in a starting-up state;
the loading starting module is specifically configured to start loading the WIFI driver and start the supplicant middleware layer if the preset location stores the boot identification information.
8. The apparatus of claim 7, further comprising:
and the deleting module is used for deleting the instruction for uninstalling the WIFI driver after detecting that a system server process is started before the creating module creates the communication connection between the frame layer and the supplicant middleware layer.
9. The apparatus of claim 8,
the reading module is further configured to periodically read a loading state of the WIFI driver after detecting that the frame layer is started; if the WIFI driver is loaded successfully, reading the starting state of the supplicant middleware layer;
the creating module is specifically configured to create a communication connection between the frame layer and the suplicant middleware layer after the suplicant middleware layer is successfully started.
10. A terminal device, comprising: a memory and a processor; the memory is connected with the processor;
the memory to store program instructions;
the processor is configured to call the program instructions stored in the memory, so that the processor executes the method for WIFI reconnection after starting up an Android system as claimed in any one of claims 1 to 5.
CN201710422899.XA 2017-06-07 2017-06-07 WIFI (Wireless Fidelity) reconnection method and device after android system is started and terminal equipment Active CN107333323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710422899.XA CN107333323B (en) 2017-06-07 2017-06-07 WIFI (Wireless Fidelity) reconnection method and device after android system is started and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710422899.XA CN107333323B (en) 2017-06-07 2017-06-07 WIFI (Wireless Fidelity) reconnection method and device after android system is started and terminal equipment

Publications (2)

Publication Number Publication Date
CN107333323A CN107333323A (en) 2017-11-07
CN107333323B true CN107333323B (en) 2020-08-04

Family

ID=60194422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710422899.XA Active CN107333323B (en) 2017-06-07 2017-06-07 WIFI (Wireless Fidelity) reconnection method and device after android system is started and terminal equipment

Country Status (1)

Country Link
CN (1) CN107333323B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770846A (en) * 2017-11-08 2018-03-06 奇酷互联网络科技(深圳)有限公司 WiFi connection methods, device and mobile terminal
CN108111954B (en) * 2017-12-25 2020-10-20 微鲸科技有限公司 Audio input control method and device
CN112040535B (en) * 2020-09-02 2022-10-28 青岛海信传媒网络技术有限公司 Wifi processing method and display device
CN112134765A (en) * 2020-09-28 2020-12-25 深圳创维-Rgb电子有限公司 WIFI (Wireless Fidelity) back-connection test method and device, test terminal and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160112932A1 (en) * 2014-10-20 2016-04-21 Xiaomi Inc. Methods and devices for displaying wireless device list
CN105704226A (en) * 2016-03-11 2016-06-22 北京奇虎科技有限公司 Intelligent terminal and network configuration method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160112932A1 (en) * 2014-10-20 2016-04-21 Xiaomi Inc. Methods and devices for displaying wireless device list
CN105704226A (en) * 2016-03-11 2016-06-22 北京奇虎科技有限公司 Intelligent terminal and network configuration method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
android 6.0架构下wpa_supplicant分析;佚名;《https://blog.csdn.net/hatchuel/article/details/50779546》;20160302;第1-4页,图1-2 *
系统启动后的 wifi 加载过程;佚名;《https://blog.csdn.net/haokaihaohe110/article/details/8065096》;20121012;全文 *

Also Published As

Publication number Publication date
CN107333323A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
CN107333323B (en) WIFI (Wireless Fidelity) reconnection method and device after android system is started and terminal equipment
US12021823B2 (en) Communication apparatus, methods, and non-transitory computer-readable media for determining IP addresses for use in different networks
JP6885970B2 (en) Methods and equipment for creating and using roaming lists based on user roaming plans
US11206700B2 (en) Method and system, and terminal for locating a user plane function (UPF) entity when a session is an inactive state
JP5498199B2 (en) Information processing system, information processing apparatus, and communication method
US20190261233A1 (en) Inter-Network Change Method and Apparatus, and Related Device
CN110650500B (en) AMF, network slice selection method and AMF
US10534600B2 (en) Method and system for uniform remote management of network devices
KR102248694B1 (en) Method for managing profile and electronic device supporting thereof
WO2017054172A1 (en) Profile switching method and terminal
JP2018510517A (en) Dynamic subscriber identification module
JP2015508613A (en) An extensible framework for wireless network connectivity
CN110830936B (en) Electronic device and method for supporting data communication
JP2021510997A (en) Methods, devices, and systems for configuring policies for UEs
EP2898729A1 (en) Wireless access point
CN110169099B (en) Installation of profiles in an embedded subscriber identity module
US20090233609A1 (en) Touchless Plug and Play Base Station
CN104838696A (en) System and method for network selection
US11463921B2 (en) Policy control method, apparatus, and system
WO2019144598A1 (en) Method for carrying out access network management and mobile device
JP5436345B2 (en) Wireless LAN setting method and system using portable terminal
CN114449657A (en) Method and device for establishing policy association, terminal and network side equipment
EP3649762B1 (en) Method and apparatus for rapidly configuring network element device for plug and play
CN109150671B (en) Access equipment mode switching method, network access equipment and intelligent networking system
JP6492985B2 (en) Wireless access point, wireless communication system, communication control method and program in wireless access point

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: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Visual Technology Co., Ltd.

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant before: QINGDAO HISENSE ELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant