CN107333323A - WIFI returns method, device and the terminal device connected after Android system start - Google Patents

WIFI returns method, device and the terminal device connected after Android system start Download PDF

Info

Publication number
CN107333323A
CN107333323A CN201710422899.XA CN201710422899A CN107333323A CN 107333323 A CN107333323 A CN 107333323A CN 201710422899 A CN201710422899 A CN 201710422899A CN 107333323 A CN107333323 A CN 107333323A
Authority
CN
China
Prior art keywords
wifi
supplicant
layers
middleware
framework
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710422899.XA
Other languages
Chinese (zh)
Other versions
CN107333323B (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.)
Qingdao Hisense Electronics Co Ltd
Original Assignee
Qingdao Hisense Electronics 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 Qingdao Hisense Electronics Co Ltd filed Critical Qingdao Hisense Electronics 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

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 present invention provides WIFI after a kind of Android system start and returns method, device and the terminal device connected.The WIFI of the present invention, which returns the method connected, to be included:After init process initiations, complete to be scanned the WIFI hot spot stored in upper layer application history unpaired message by loading WIFI drivings and starting supplicant middleware layers, determine target access;After after framework layers of startup of system, the communication connection of described framework layers and the supplicant middleware layers is created, make it that the network path of the upper layer application and the target access can proper communication to create route.The embodiment of the present invention, which can be improved, shortens the speed that WIFI after android system start goes back to company, improves network connection speed.

Description

WIFI returns method, device and the terminal device connected after Android system start
Technical field
Return and connect the present embodiments relate to WIFI after the communication technology, more particularly to a kind of Android (Android) system boot Method, device and terminal device.
Background technology
With the development of the communication technology, Wireless Fidelity (WIreless-Fidelity, abbreviation WIFI) technology increasingly into It is ripe, and increasing user's custom accesses WIFI network access internet by terminal device, realizes corresponding network clothes Business.
Terminal device need to first be set up and be connected with the WIFI of access point before access WIFI network.Based on android system Terminal device start after, after init process initiations, need to first start system server processes, enter in system server Start framework layers after Cheng Qidong, and start loading WIFI drivings after framework layers of startup, then start Supplicant middleware layers, and create the communication connection of framework layers and the supplicant middleware layers, realize with The WIFI connections of access point.
However, the startup time of system server processes is longer so that after the terminal device start of android system The time that WIFI goes back to company is longer, connects slower, so as to influence terminal device to use the speed of network.
The content of the invention
The embodiment of the present invention provides WIFI after a kind of android system start and returns method, device and the terminal device connected, with Shorten WIFI after android system start and return the time connected, improve network connection speed, so that improving terminal device can be used net The speed of network.
The embodiment of the present invention provides Wireless Fidelity WIFI after a kind of android system start and returns the method connected, including:
After init process initiations, completed by loading WIFI drivings and starting supplicant middleware layers to upper strata The WIFI hot spot stored in applicating history unpaired message is scanned, and determines target access;
After after framework layers of startup of system, the communication of framework layers and the supplicant middleware layers is created Connection, make it that the network path of the upper layer application and the target access can proper communication to create route..
Optionally, described after init process initiations, methods described also includes:
Read whether predeterminated position stores start identification information, the start identification information is in for characterizing current system Open state;
If so, then starting to load the WIFI drivings and starting the supplicant middleware layers.
Optionally, it is described after framework layers of system starts, create described framework layers with it is described Before the communication connection of supplicant middleware layers, methods described also includes:
If detecting after system server process initiations, the instruction for unloading the WIFI drivings is deleted.
Optionally, it is described after framework layers of system starts, create described framework layers with it is described The communication connection of supplicant middleware layers, including:
After the framework layers of startup is detected, the stress state of the WIFI drivings is periodically read;
If the WIFI drive loads success, reads the starting state of the supplicant middleware layers;
After the supplicant middleware layers start successfully, described framework layers is created and described The communication connection of supplicant middleware layers.
Optionally, the loading WIFI drivings and startup supplicant middleware layers, including:
If the WIFI drive loads success, it is used to empty WLAN WLAN information and removes described deleting After the operating instruction of supplicant middleware layers, start the supplicant middleware layers.
The embodiment of the present invention also provides Wireless Fidelity WIFI after a kind of android system start and returns the device connected, including:
Starting module is loaded, for when the init process initiations after, by loading WIFI drivings and starting supplicant Middleware layer completes to be scanned the WIFI hot spot stored in upper layer application history unpaired message, determines target access;
Creation module, for after framework layers of system starts, create described framework layers with it is described The communication connection of supplicant middleware layers, to create the network that route causes the upper layer application and the target access Path can proper communication.
Optionally, described device also includes:
Read module, for when the init process initiations after, reading whether predeterminated position stores start identification information, The start identification information is used to characterize current system in open state;
The loading starting module, if storing the start identification information specifically for the predeterminated position, starts to add Carry the WIFI drivings and start the supplicant middleware layers.
Optionally, described device also includes:
Removing module, for creating described framework layers and the supplicant middlewares in the creation module Before the communication connection of layer, if detecting after system server process initiations, the finger for unloading the WIFI drivings is deleted Order.
Optionally, the read module, is additionally operable to after the framework layers of startup is detected, periodically reads The stress state of the WIFI drivings;If the WIFI drive loads success, reads the supplicant middleware layers Starting state;
The creation module, specifically for after the supplicant middleware layers start successfully, creating described Framework layers and the communication connection of the supplicant middleware layers.
Optionally, the removing module, if being additionally operable to the WIFI drive loads success, is deleted for emptying wireless office Domain net WLAN information and the operating instruction for removing the supplicant middleware layers;
The loading starting module, specifically for being used to empty the WLAN information and removing described deleting After the operating instruction of supplicant middleware layers, start the supplicant middleware layers.
The embodiment of the present invention also provides a kind of terminal device, including:Memory and processor;The memory and the place Manage device connection;
The memory, for storage program instruction;
The processor, the described program instruction stored for calling in the memory so that the computing device Wireless Fidelity WIFI returns the method connected after android system start shown in any of the above-described.
WIFI returns method, device and the terminal device connected after android system start provided in an embodiment of the present invention, can lead to After excessive init process initiations, complete to go through upper layer application by loading WIFI drivings and starting supplicant middleware layers The WIFI hot spot stored in history unpaired message is scanned, and determines target access, after after framework layers of startup of system, is created The communication connection of framework layers and the supplicant middleware layers is built, causes the upper layer application and the mesh to create route The network path of tag splice access point can proper communication.In this method can after init process initiations, will pass through loading WIFI driving with And startup supplicant middleware layers determine to return the target access connected for WIFI, without when the framework layers Target access is determined after startup again, the WIFI after android system start is effectively shortened and returns the time connected, improve WIFI Connection speed, improves the speed that network can be used in terminal device.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to do one simply to introduce, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the flow that WIFI returns the WLAN connection methods connected after android system provided in an embodiment of the present invention is started shooting Figure one;
Fig. 2 is the flow that Wireless Fidelity WIFI returns the method connected after android system provided in an embodiment of the present invention is started shooting Figure two;
Fig. 3 is the flow that Wireless Fidelity WIFI returns the method connected after android system provided in an embodiment of the present invention is started shooting Figure three;
Fig. 4 is the flow chart four that WIFI returns the method connected after android system provided in an embodiment of the present invention is started shooting;
Fig. 5 is the structural representation one that WIFI returns the device connected after android system provided in an embodiment of the present invention is started shooting;
Fig. 6 is the structural representation two that WIFI returns the device connected after android system provided in an embodiment of the present invention is started shooting;
Fig. 7 is the structural representation of terminal device provided in an embodiment of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
WIFI returns the method connected after the android system start that the following each embodiments of the present invention are provided, and is applicable to be based on The terminal device of android system, wherein, the terminal device for example can be smart mobile phone, tablet personal computer, computer, wearing Formula equipment etc. is any.
It is specifically described below in conjunction with multiple examples.Fig. 1 is after android system provided in an embodiment of the present invention is started shooting WIFI returns the flow chart one of the method connected.The method that WIFI times connect after android system start can be returned even device by WIFI and be held OK, the WIFI returns even device and can be integrated in by way of software and/or hardware in the terminal device based on android system. As shown in figure 1, this method may include:
S101, after init process initiations, completed by loading WIFI drivings and starting supplicant middleware layers The WIFI hot spot stored in upper layer application history unpaired message is scanned, target access is determined.
Wherein, init processes can be the initialization process of android system.WIFI drivings can be the Android It is used for the driver of wireless access in system.The supplicant middleware layers can be the wpa_ in android system Supplicant middleware layers.
The supplicant middleware layers are application layer authentication client, for supporting wireless device secrecy (Wired Equivalent Privacy, abbreviation WEP) agreement, Wireless Fidelity protection access (Wi-Fi Protected Access, referred to as WPA) agreement, Wireless Fidelity protection 2 (Wi-Fi Protected Access 2, abbreviation WPA2) WPA2 of access and WLAN Certification and cryptography infrastructure (Wireless LAN Authentication and Privacy Infrastructure, abbreviation WAPI) agreement.The supplicant middleware layers can be communicated by socket (socket) with upper layer application, can also pass through socket Word communicates with WIFI drivings.
The supplicant can be obtained in the S101 by loading WIFI drivings and starting supplicant middleware layers The configuration file of middleware layer, the configuration file may include:The network configuration information of history, from the network configuration information of the history The middle WIFI hot spot for determining to store in upper layer application history unpaired message, and the WIFI hot spot of the storage is scanned one by one, Then target access is determined according to scanning result.
It may include in the WIFI hot spot stored in the history unpaired message:The information of at least one access point, each access The information of point can include the mark such as title of each access point.In the WIFI hot spot stored in the history unpaired message, often Individual access point is configured access point.
The target access for example can for the storage WIFI hot spot in, apart from current time the last time access connect Access point;Can also for the storage WIFI hot spot in, be successfully accessed the most access points of number of times;Can also be hot for the WIFI of the storage Access priority highest access point in point;Can also be any one access point random in the WIFI hot spot of the storage.This connects The access point for entering highest priority can be the configuration for being determined or being inputted according to user according to default access conditions What information was determined.
It can for example use linux orders to load WIFI drivings in the S101 and start supplicant middleware layers with complete The WIFI hot spot stored in paired upper layer application history unpaired message is scanned, and determines target access.
Due to having determined that target access after performing above-mentioned S101, therefore, after the S101, this method just may be such that Layer applies back the even target access, and sets up the connection of the link layer between the upper layer application and the target access, is somebody's turn to do with setting up Network path between upper layer application and the target access.Wherein, link layer connection is properly termed as bottom connection.
It should be noted that in this method, it is determined that after the target access, may be such that the supplicant middleware layers WIFI state machines not-connected status, WIFI connection status is set to not-connected status.Wherein, WIFI state machines are not Connection status is represented by DisconnectedState.
After network path between the upper layer application and the target access is created, WIFI connection status is by not connected change Connection status is turned to, the change of the WIFI connection status drives the state of WIFI state machines to redirect, i.e., by not-connected status Jump to connection status.The connection status of the WIFI state machines is represented by ConnectedState.
After network path between the upper layer application and the target access is created, supplicant intermediate layers will can be somebody's turn to do WIFI connection status is preserved, and is continuously attempted to the WIFI connection state reportings to framework layers, until should The communication connection of framework layers and the supplicant middleware layers is created successfully.
Optionally, before init process initiations, this method may also include:Start guiding loading (Bootloader) journey Sequence, starts kernel (Kernel) program of the android system.
The init processes can be started after kernel program startup.
S102, after framework layers of system starts, create the framework layers and the supplicant middleware layers Communication connection, make it that the network path of the upper layer application and the target access can proper communication to create route.
Wherein, the framework layers can for android system system framework layer.The framework layers defines visitor The service of family end and serviced component and interface.
Can be by creating the framework layers of socket communicated with the supplicant middleware layers in the S102 Word, creates the communication connection.
For ensure the upper layer application and the target access network path can proper communication, set up the upper layer application with On the basis of network path between the target access, this method also needs to create the route of the network path.In this method, for example By the framework layers of communication connection with the supplicant middleware layers, the route letter of the target access can be obtained Breath, then sets routing table according to the routing iinformation, realizes that route is set.
Wherein, the routing iinformation may include following at least one:The IP address of the target access, the target access pair Gateway identification, the corresponding subnet mask of the target access, the IP address of the corresponding router of the target access, the mesh answered Corresponding domain name system of tag splice access point (Domain Name System, abbreviation DNS) etc..
For example, during the communication connection is created, this method may also include:Start thread.The thread can be with For the framework layers of thread from supplicant middleware layers acquisition reported event, the thread can be wireless circulating The thread of execution.That is, starting the thread by performing, the framework layers sustainable in the middle of the supplicant Part layer obtains the event that the supplicant middleware layers are reported.
, should due to having determined that target access after above-mentioned S101 is performed, therefore after the communication connection is created Framework layers can obtain the target access of above-mentioned determination from the supplicant middleware layers by the communication connection Information, and notify to the upper layer application.
During the framework layers can be by creating in the communication connection, the thread started, from the supplicant Middleware layer obtains the corresponding WIFI connection status of the target access, and notifies the upper layer application to this by the communication connection WIFI connection status is updated.
If the WIFI connection status be connection status, can by the framework layers by the communication connection from this Supplicant intermediate layers obtain the routing iinformation of the target access.Wherein, in this method, the framework layers can be started Middle DHCP (Dynamic Host Configuration Protocol, abbreviation DHCP) layer so that should Framework layers are believed using the DHCP routes for obtaining the target access from the supplicant intermediate layers by the communication connection Breath.It should be noted that in this method or starting the framework layers of Internet protocol (Internet Protocol, abbreviation IP) layer so that the framework layers using IP agreement by the communication connection from the supplicant Interbed obtains the routing iinformation of the target access.Certainly, other protocol layers in framework layers can also be started in this method The routing iinformation is obtained, the present invention is not limited this.
Optionally, it is logical by this at the framework layers in this method if the WIFI connection status is connection status Before letter connection obtains the routing iinformation of the target access from the supplicant intermediate layers, it can make in the middle of the supplicant Part layer jumps to routing iinformation state machine by WIFI state machines, the routing iinformation to obtain the target access.The route is believed Breath obtains state machine, such as the acquisition state machine (ObtainingIpstate) of IP address.
If the WIFI connection status is not-connected status, this method can be reacquired according to the default scan period should WIFI connection status, and upper layer application is notified, wait user to issue link order.Such as receive the link order of user's input Afterwards, it just can rescan to reacquire the WIFI connection status.
Optionally, after route is created, WLAN successful connections are just can determine that, this method can also notify upper layer application WIFI Successful connection.
Wireless Fidelity WIFI returns the method connected after the android system start that the present invention is provided, can be by when init processes After startup, completed by loading WIFI drivings and starting supplicant middleware layers in upper layer application history unpaired message The WIFI hot spot of storage is scanned, and determines target access, after after framework layers of startup of system, creates framework layers With the communication connection of the supplicant middleware layers, cause the upper layer application and the network of the target access to create route Path can proper communication.It can will pass through loading WIFI drivings after init process initiations and start in this method Supplicant middleware layers determine to return the target access connected for WIFI, without after the framework layers starts Target access is determined again, is effectively shortened the WIFI after android system start and is returned the time connected, improves WIFI connections speed Degree, improves the speed that network can be used in terminal device.
Meanwhile, the scheme of the embodiment of the present invention can also improve terminal device in the case where improving WIFI connection speeds System time renewal speed, it is ensured that system time is more accurate.
On the basis of method as mentioned, the embodiment of the present invention may also provide wireless after a kind of android system start Fidelity WIFI returns the method connected.Fig. 2 is that Wireless Fidelity WIFI returns what is connected after android system provided in an embodiment of the present invention is started shooting The flowchart 2 of method.Optionally, in S101 as implied above after init process initiations, this method may also include:
Whether S201, reading predeterminated position store start identification information, and the start identification information is used to characterize current system In open state.
Specifically, in this method, just starting logo position can be set in android system, after init process initiations Start identification information is set to, to indicate that current system is in open state, and the start identification information storage is preset to this Position.Can be by reading the information stored in the predeterminated position, to determine whether be stored with this in the predeterminated position in the S201 Start identification information.
S202, if so, then starting to load WIFI drivings and starting the supplicant middleware layers.
If being stored with the start identification information in the predeterminated position, it can determine that current system is in open state, thus It can start to load WIFI drivings and start the supplicant middleware layers.
If not being stored with the start identification information in the predeterminated position, it can determine that current system is not in open state, The S202 thus need not be performed.
In this method, the start identification information that can be stored by reading in predeterminated position determines that current system is in time Open state, then starts loading WIFI drivings and starts the supplicant middleware layers, to load as early as possible WIFI drives and drives the supplicant middleware layers, then effectively shortens WIFI times after android system start and connects Time, improve WIFI connection speeds, improve the speed that network can be used in terminal device.
Optionally, after init process initiations, this method may also include:
Start Zygote processes, activation system service (SystemService) process starts Wireless Fidelity service (WIFIservice) process.
The Zygote processes can be the application establishment process in android system.SystemService processes can be Kernel process in android system, it can be by Zygote process creations.The framework layers is somebody's turn to do in startup Started after SystemService processes.
After the SystemService process initiations, this method can also will set starting logo position to be other information, be used to Indicate that current system has been switched on completing.
Optionally, after WIFIservice process initiations, WIFI is set to enable.
Specifically, in this method, by calling setWifiEnabled () function WIFI can be set to enable.
On the basis of method as mentioned, the embodiment of the present invention may also provide wireless after a kind of android system start Fidelity WIFI returns the method connected.Fig. 3 is that Wireless Fidelity WIFI returns what is connected after android system provided in an embodiment of the present invention is started shooting The flow chart 3 of method.Optionally, on the basis of method as implied above, wherein, framework layers of startup of system are treated in S102 Afterwards, create before the framework layers of communication connection with the supplicant middleware layers, this method may also include:
S301, after system server process initiations are detected, delete for unload the WIFI driving instruction.
Specifically, for example wireless guarantor will can be entered after system server process initiations are detected in this method The instruction that being used in the method for true state machine original state unloads WIFI drivings is deleted, and is in WIFI state machines The operation of unloading WIFI drivings is not performed under original state.Wherein, the method for entering Wireless Fidelity state machine original state can Think WifiStateMachineInitialState enter () method.
After system server process initiations are detected, the instruction for unloading WIFI drivings is deleted in time, can be kept away The WIFI drivings for exempting to have loaded in start process are unloaded, it is ensured that WIFI, which is returned, to be connected.
Optionally, S101 may include in loading WIFI drivings and startup supplicant middleware layers:
If the success of S301a, the WIFI drive loads, it is used to empty WLAN information and remove to be somebody's turn to do deleting After the operating instruction of supplicant middleware layers, start the supplicant middleware layers.
It can be deleted and be somebody's turn to do for emptying WLAN information and removing after WIFI drive loads success in this method The instruction of supplicant middleware layers, and after the instruction is deleted, start the supplicant middleware layers.
Because in start process, WLAN information may and be not present, without carrying out emptying (clear) for WLAN information, and And, after the WIFI drive loads, supplicant middleware layers are also not actuated, therefore without execution supplicant middlewares The removing (kill) of layer, therefore, can deleted for emptying WLAN information and removing the fortune of the supplicant middleware layers After row instruction, start the supplicant middleware layers.
In this method, after deleting for emptying WLAN information and removing the instruction of the supplicant middleware layers, The redundancy of instruction operation can be avoided, reduces the operating load during system boot.
Optionally, the framework layers is created with being somebody's turn to do after after framework layers of startup of system in S102 as implied above The communication connection of supplicant middleware layers may include:
S302, detect the framework layers start after, periodically read the WIFI driving stress state.
If the success of S303, the WIFI drive loads, reads the starting state of the supplicant middleware layers.
If the stress state of the WIFI drivings read can determine that WIFI drive loads success to have loaded.If The stress state of the WIFI drivings read continues to read the state of WIFI drivings not load, then, until the WIFI drives It is dynamic to load successfully.
S304, after the supplicant middleware layers start successfully, create the framework layers and the supplicant The communication connection of middleware layer.
In this method, if reading the starting state of the supplicant middleware layers to have been turned on, this can determine that Supplicant middleware layers start successfully, you can return and start successful information, can then create the framework layers and be somebody's turn to do The communication connection of supplicant middleware layers.
This method, can read the stress state that WIFI drives, to obtain in time by starting the cycle at framework layers The stress state of WIFI drivings, and if WIFI drive loads success, the supplicant middleware layers can be then read in time Starting state, with after the supplicant middleware layers start successfully, create as early as possible the framework layers and should The communication connection of supplicant middleware layers, then effectively shortens the WIFI after android system start and returns the time connected, carry High WIFI connection speeds, improve the speed that network can be used in terminal device.
Optionally, the communication connection of the framework layers and the supplicant middleware layers is created in as above S102 Afterwards, this method may also include following at least one operation:The corresponding frequency range of WIFI connections is set, causes the framework layers Config update information is issued to the supplicant middleware layers, (load) is downloaded and all configured access point correspondences are enabled WIFI network, initialization WiFi protection settings (Wi-Fi Protected Setup) information, enable point-to-point (Point To Point, abbreviation P2P) communication etc..
Optionally, before supplicant middleware layers are started, the settable IP address for going to enable of this method, wherein, The IP address for going to enable for example may include:Remove forth generation Internet protocol (the Internet Protocol Version enabled 4, abbreviation IPV4) address, and/or, remove the 6th generation Internet protocol (the Internet Protocol Version 6, letter enabled Claim IPV6) address.
In the method, after the WLAN for receiving user's input turns off or on instruction, WLAN interfaces (down can be closed Wlan interface), the IP information of WLAN interfaces (clear waln interface) is deleted, supplicant is removed (kill supplicant) intermediate layer.Receive user input WLAN turn off or on instruction in the case of, starting logo position Corresponding indicated value has been completed for machine process.
Specifically, in this method, the instruction for emptying WLAN information can be run, to close WLAN interfaces, WLAN is deleted The IP information at interface;Run for removing the instruction of the supplicant middleware layers to remove supplicant intermediate layers.
Optionally, the embodiment of the present invention may also provide a kind of WLAN connection methods.Fig. 4 is provided in an embodiment of the present invention WIFI returns the flow chart four of the method connected after android system start.The Fig. 4 can be example to any in above-mentioned Fig. 1-Fig. 3 Shown method is illustrated.As shown in figure 4,
S401, startup Bootloader programs.
S402, the Kernel programs for starting android system.
S403, startup init processes.
S404, after init process initiations, read predeterminated position whether store start identification information, the start identification information Open state is in for characterizing current system.
S405, if so, then start loading WIFI driving.
If the success of S406, WIFI drive load, deleting for emptying WLAN information and removing the supplicant After the instruction of middleware layer, start supplicant middleware layers.
After S407, supplicant middleware layer start, to the WIFI hot spot stored in upper layer application history unpaired message It is scanned, determines target access, the access point that the target access can be successfully connected for last time.
S408, the network path set up between the upper layer application and the target access.
S409, after init process initiations, start Zygote processes.
It should be noted that absolute time relationship can be not present with S409 in above-mentioned S404, it can perform simultaneously, also can be first After perform, the present invention this is not limited.
S410, startup SystemService processes.
After S411, startup SystemService processes, delete for unloading the instruction of WIFI drivings, and start WiFiService processes.
S412, setting WiFi are enabled so that WiFi switches are opening.
S413, detect framework layers start after, periodically read the WIFI driving stress state.
If the success of S414, the WIFI drive loads, reads the starting state of the supplicant middleware layers.
S415, after the supplicant middleware layers start successfully, create the framework layers and the supplicant The communication connection of middleware layer, while starting thread.
S416, the thread acquisition WiFi connection status by the startup.
If S417, the WiFi connection status are connection status, using DHCP by the communication connection from this Supplicant middleware layers obtain the IP address information of the target access, and set routing table according to the IP address information.
S418, notice upper layer application WiFi successful connections.
If S419, the WiFi connection status are not-connected status, the WiFi connection shapes are obtained according to the default acquisition cycle State, and the connection request of user's input to be received is waited, to carry out WiFi connections according to the connection request.
Method provided in an embodiment of the present invention, can be after init process initiations, by loading WIFI drivings and starting Supplicant middleware layers complete to be scanned the WIFI hot spot stored in upper layer application history unpaired message, determine target Access point, after after framework layers of startup of system, creates framework layers and the communication link of the supplicant middleware layers Connect, make it that the network path of the upper layer application and the target access can proper communication to create route.Can be in this method After init process initiations, it will pass through loading WIFI drivings and startup supplicant middleware layers determine to return what is connected for WIFI Target access, without determining target access again after starting when the framework layers, effectively shortens Android systems WIFI after system start returns the time connected, improves WIFI connection speeds, improves the speed that network can be used in terminal device.
The embodiment of the present invention also provides WIFI after a kind of android system start and returns the device connected.Fig. 5 is implemented for the present invention WIFI returns the structural representation one of the device connected after the android system start that example is provided.As shown in figure 5, the android system WIFI returns the device connected after start, it may include:
Starting module 501 is loaded, for when the init process initiations after, by loading WIFI drivings and starting Supplicant middleware layers complete to be scanned the WIFI hot spot stored in upper layer application history unpaired message, determine target Access point.
Creation module 502, for after after framework layers of startup of system, creating the framework layers with being somebody's turn to do The communication connection of supplicant middleware layers, to create the network path that route causes the upper layer application and the target access Can proper communication.
On the basis of the device shown in above-mentioned Fig. 5, the embodiment of the present invention is also provided after a kind of android system start WIFI returns the device connected.Fig. 6 is that the structure of the device that WIFI goes back to company after android system provided in an embodiment of the present invention is started shooting is shown It is intended to two.As shown in fig. 6, WIFI returns the device connected after android system start, it may also include:
Read module 503, for when the init process initiations after, reading whether predeterminated position stores start mark letter Breath, the start identification information is used to characterize current system in open state.
Starting module 501 is loaded, if storing the start identification information specifically for the predeterminated position, starting loading should WIFI drives and started the supplicant middleware layers.
Optionally, WIFI returns the device connected after android system start, may also include:
Removing module 504, for creating the framework layers and the supplicant middleware layers in creation module 502 Communication connection before, if detecting after system server process initiations, delete for unload the WIFI driving instruction.
Optionally, read module 503, are additionally operable to after the framework layers of startup is detected, periodically reading should The stress state of WIFI drivings;If WIFI drive loads success, reads the starting state of the supplicant middleware layers.
Creation module 502, specifically for after the supplicant middleware layers start successfully, creating the framework The communication connection of layer and the supplicant middleware layers.
Optionally, removing module 504, if being additionally operable to WIFI drive loads success, are deleted for emptying WLAN information And remove the operating instruction of the supplicant middleware layers.
Starting module 501 is loaded, specifically for deleting for emptying the WLAN information and removing the supplicant After the instruction of middleware layer, start the supplicant middleware layers.
WLAN attachment means provided in an embodiment of the present invention, can perform above-mentioned Fig. 1 any shown Android into Fig. 4 WIFI returns the method connected after system boot, and its concrete implementation process and beneficial effect will not be repeated here referring to above-mentioned.
The embodiment of the present invention also provides a kind of terminal device.Fig. 7 is the structure of terminal device provided in an embodiment of the present invention Schematic diagram.As shown in fig. 7, the terminal device 700, it may include:Memory 701 and processor 702;Memory 701 and processor 702 connections.
Memory 701, for storage program instruction.
Processor 702, programmed instruction stored for calling in memory 701 so that processor 702 performs above-mentioned figure 1 method that WIFI goes back to company after any described android system start into Fig. 4.
Terminal device provided in an embodiment of the present invention, can perform above-mentioned Fig. 1 any shown android systems into Fig. 4 WIFI returns the method connected after start, and its concrete implementation process and beneficial effect will not be repeated here referring to above-mentioned.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to The technical scheme described in foregoing embodiments can so be modified, or which part or all technical characteristic are entered Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology The scope of scheme.

Claims (10)

1. Wireless Fidelity WIFI returns the method connected after a kind of android system start, it is characterised in that methods described includes:
After init process initiations, completed by loading WIFI drivings and starting supplicant middleware layers to upper layer application The WIFI hot spot stored in history unpaired message is scanned, and determines target access;
After after framework layers of startup of system, the communication of described framework layers and the supplicant middleware layers is created Connection, make it that the network path of the upper layer application and the target access can proper communication to create route.
2. according to the method described in claim 1, it is characterised in that described also to include after init process initiations:
Read whether predeterminated position stores start identification information, the start identification information is used to characterize current system in start State;
If so, then starting to load the WIFI drivings and starting the supplicant middleware layers.
3. method according to claim 2, it is characterised in that described after after framework layers of startup of system, creates described Before the framework layers of communication connection with the supplicant middleware layers, methods described also includes:
After system server process initiations are detected, the instruction for unloading the WIFI drivings is deleted.
4. method according to claim 3, it is characterised in that described after after framework layers of startup of system, creates described Framework layers with the communication connections of the supplicant middleware layers, including:
After the framework layers of startup is detected, the stress state of the WIFI drivings is periodically read;
If the WIFI drive loads success, reads the starting state of the supplicant middleware layers;
After the supplicant middleware layers start successfully, create in described framework layers and the supplicant Between part layer communication connection.
5. method according to claim 3, it is characterised in that the loading WIFI drives and started in supplicant Between part layer, including:
If the WIFI drive loads success, it is used to empty WLAN WLAN information and removes described deleting After the instruction of supplicant middleware layers, start the supplicant middleware layers.
6. Wireless Fidelity WIFI returns the device connected after a kind of android system start, it is characterised in that described device includes:
Starting module is loaded, for when the init process initiations after, by loading WIFI drivings and starting in the middle of supplicant Part layer completes to be scanned the WIFI hot spot stored in upper layer application history unpaired message, determines target access;
Creation module, for after after framework layers of startup of system, creating described framework layers and the supplicant The communication connection of middleware layer, make it that the network path of the upper layer application and the target access can be normal to create route Communication.
7. device according to claim 6, it is characterised in that described device also includes:
Read module, it is described for when the init process initiations after, reading whether predeterminated position stores start identification information Start identification information is used to characterize current system in open state;
The loading starting module, if storing the start identification information specifically for the predeterminated position, starts to load institute State WIFI drivings and start the supplicant middleware layers.
8. device according to claim 7, it is characterised in that described device also includes:
Removing module, for creating described framework layers and the supplicant middleware layers in the creation module Before communication connection, if detecting after system server process initiations, the instruction for unloading the WIFI drivings is deleted.
9. device according to claim 8, it is characterised in that
The read module, is additionally operable to after the framework layers of startup is detected, and periodically reads the WIFI drivings Stress state;If the WIFI drive loads success, reads the starting state of the supplicant middleware layers;
The creation module, specifically for after the supplicant middleware layers start successfully, creating the framework The communication connection of layer and the supplicant middleware layers.
10. a kind of terminal device, it is characterised in that including:Memory and processor;The memory connects with the processor Connect;
The memory, for storage program instruction;
The processor, the described program instruction stored for calling in the memory so that the computing device is above-mentioned Wireless Fidelity WIFI returns the method connected after android system start shown in any one of claim 1-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 true CN107333323A (en) 2017-11-07
CN107333323B 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)

Cited By (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
CN108111954A (en) * 2017-12-25 2018-06-01 微鲸科技有限公司 Audio input control method and device
CN112040535A (en) * 2020-09-02 2020-12-04 青岛海信传媒网络技术有限公司 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》 *
佚名: "系统启动后的 wifi 加载过程", 《HTTPS://BLOG.CSDN.NET/HAOKAIHAOHE110/ARTICLE/DETAILS/8065096》 *

Cited By (5)

* 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
CN108111954A (en) * 2017-12-25 2018-06-01 微鲸科技有限公司 Audio input control method and device
CN112040535A (en) * 2020-09-02 2020-12-04 青岛海信传媒网络技术有限公司 Wifi processing method and display 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

Also Published As

Publication number Publication date
CN107333323B (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN107333323A (en) WIFI returns method, device and the terminal device connected after Android system start
US9572050B2 (en) Method and apparatus for creating virtual base station
CN109314855B (en) Method for enabling migration of subscriptions
WO2017054172A1 (en) Profile switching method and terminal
WO2017181627A1 (en) Network connection method and device, terminal, and system
CN105162748B (en) The processing of electronic user identification module application identifier
KR102248694B1 (en) Method for managing profile and electronic device supporting thereof
US20160173156A1 (en) Apparatuses, methods and systems for virtualizing a reprogrammable unversal integrated circuit chip
JP2018510517A (en) Dynamic subscriber identification module
TW201611644A (en) Electronic subscriber identity module selection
US11172352B2 (en) Apparatuses, methods, and systems for configuring a trusted java card virtual machine using biometric information
JP2013042491A (en) Imsi switching method and device
WO2022017256A1 (en) Device binding method and apparatus
CN104427583B (en) Higher priority network sweep
CN109862605A (en) A kind of networking methods and equipment for terminal device
CN110169099A (en) Installation of the profile in embedded subscriber mark module
CN110808942B (en) Subscription information configuration method, network equipment and terminal equipment
JP2017516407A (en) Method for updating RPLMN information and user equipment
CN106211132B (en) Virtual SIM card identification method and terminal
CN109587829B (en) Method and device for simultaneously working as site and hotspot by terminal and terminal
WO2016092702A1 (en) Communication device, communication device control method, and program
EP3108678A1 (en) System and method for handling inactive sim cards
CN104754701A (en) Signal processing method and mobile terminal
CN109040169A (en) The communication device and method of management configuration file
CN110891266A (en) Network roaming method, device, terminal equipment and storage medium

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 Video Technology Co., Ltd

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

Applicant before: HISENSE ELECTRIC Co.,Ltd.

GR01 Patent grant
GR01 Patent grant