Specific implementation mode
Automatically switch WLAN used in mobile terminal to realize, the embodiment of the present invention provides a kind of WLAN
WLAN switching methods, the flow of this method is as shown in Figure 1, specifically steps are as follows for execution:
S10:Flow starts.
S11:Judge whether the WLAN access modules of mobile terminal configuration are automatic mode, if so, executing S12;Otherwise, it holds
Row S16.
The WLAN access modules of mobile terminal can be divided into manual mode and automatic mode, and manual mode is voluntarily selected by user
It selects a time and hopes the WLAN of access, automatic mode needs the WLAN accessed by mobile terminal self selection.In embodiments of the present invention, it moves
The WLAN access modules of dynamic terminal need to be switched to automatic mode, and mobile terminal can voluntarily select WLAN, and no longer need
User participates in.
S12:Judge whether the currently used WLAN of mobile terminal is charge WLAN, if so, executing S13;Otherwise, it executes
S16。
Existing WLAN can be divided into two classes, and one kind is that user stays at home or the privately owned WLAN of the erections such as office space,
These are free WLAN;Another kind of is the WLAN that operator sets up, these are charge WLAN.Charge WLAN can generally be such that user produces
Raw certain rate, when the currently used WLAN of mobile terminal is charge WLAN, so that it may which, to scan for, judging whether can be with
It is switched to free WLAN to mobile terminal, to save the rate of user, and is provided with free WLAN's when mobile terminal is in
When in environment, if mobile terminal uses the free WLAN, enhancing signal can also be played, expand the free WLAN coverage
Effect.
Mobile terminal currently used WLAN is logged in when may be mobile terminal initialization, it is also possible to be to be cut
Make login after changing.
S11 and S12 do not have sequencing, S11 can be first carried out, then execute S12, can also first carry out S12, then execute
S11.Here then executed and illustrate for S12 to first carry out S11.
S13:Judge whether to meet WLAN switching conditions, if so, executing S14;Otherwise, S16 is executed.
When meeting WLAN switching conditions, the switching currently used WLAN of mobile terminal, when being unsatisfactory for WLAN switching conditions
When, then do not switch.
S14:Search for currently available WLAN.
When meeting WLAN switching conditions, the currently available WLAN of search mobile terminal can be carried out according to signal strength
It sorts subsequently to be selected.
S15:The currently used WLAN of mobile terminal is switched to chosen in the currently available WLAN searched it is free
WLAN。
When in the currently available WLAN searched include free WLAN when, in the free WLAN searched choose one exempt from
Take WLAN, the currently used WLAN of mobile terminal is switched to the free WLAN of selection.
S16:Flow terminates.
If the WLAN access modules of mobile terminal configuration be manual mode or mobile terminal it is currently used be free
WLAN or mobile terminal are unsatisfactory for WLAN switching conditions, then mobile terminal is continuing with existing WLAN, above-mentioned stream
Journey terminates.
The program can be automatic mode in the access module for determining mobile terminal, currently used WLAN is charge WLAN
And when meeting WLAN switching conditions, a free WLAN is chosen directly in the currently available WLAN searched, it will be mobile whole
Currently used WLAN is held to be switched to the free WLAN of selection, the program is not necessarily to user's manual switching, realizes mobile terminal certainly
It is dynamic to carry out WLAN switchings.
Specifically, judging whether to meet WLAN switching conditions in above-mentioned S13, specifically include:Monitor the stream of mobile terminal
Amount, and judge whether the flow monitored is zero;When flow is zero, after the time cycle of setting expires, determine mobile whole
End can carry out WLAN switchings, and judging result is to meet WLAN switching conditions;When flow is not zero, determine that mobile terminal can not
To carry out WLAN switchings, judging result is to be unsatisfactory for WLAN switching conditions.
When mobile terminal it is currently used be charge WLAN when, the flow of mobile terminal is monitored, when the flow monitored is
When zero, that is to say, that user starts timing when being in idle condition using charge WLAN mobile terminals, when more than setting
When occurring still without flow after the fixed time cycle, then it can determine that current mobile terminal can carry out WLAN switchings, that is,
It says and meets WLAN switching conditions;When the flow monitored is not zero, that is, charge WLAN is used in user, need after
The flow of continuous monitoring mobile terminal determines that mobile terminal cannot carry out WLAN switchings, that is, is unsatisfactory for WLAN switchings at this time
Condition.Wherein it is possible to carry out timing using high priority WLAN search timers.
The flow monitored can also be compared with given threshold, when less than given threshold, in the time of setting
After period expires, determine that mobile terminal can carry out WLAN switchings, judging result is to meet WLAN switching conditions;When not less than setting
When determining threshold value, determine that mobile terminal cannot carry out WLAN switchings, judging result is to be unsatisfactory for WLAN switching conditions.
Specifically, the WLAN that mobile terminal is currently used in above-mentioned S15 be switched to it is currently available what is searched
The free WLAN chosen in WLAN, specifically includes:Judge whether at least one is present in shifting to the currently available WLAN searched
In the preconfigured free WLAN tables of dynamic terminal;It is present in freely if so, the currently used WLAN of mobile terminal is switched to
The strongest WLAN of signal in WLAN tables;Otherwise, the currently used WLAN of mobile terminal is exited, it is currently available according to what is searched
The strong and weak sequence of WLAN signal logon attempt successively, can the succeed identification information of the WLAN logged in of mobile terminal is added to and exempts from
Take in WLAN tables, the currently used WLAN of mobile terminal is switched to the strongest WLAN of signal being present in free WLAN tables.
Free WLAN known to user can be stored in the preconfigured free WLAN tables of mobile terminal, when what is searched works as
Before can be directly current by mobile terminal when with WLAN, at least one is present in the preconfigured free WLAN tables of mobile terminal
The WLAN used is switched to the strongest WLAN of signal being present in free WLAN tables.As the currently available WLAN searched
When being not present in the preconfigured free WLAN tables of mobile terminal, the currently used WLAN of mobile terminal is exited, according to searching
Logon attempt is required for inputting user name the strong and weak sequence of currently available WLAN signal that rope arrives when logging in charge WLAN successively
It is verified with password, when mobile terminal, which need not input username and password, successfully to log in certain WLAN, the WLAN
As free WLAN, it is after the identification information of such free WLAN is added to free WLAN tables, mobile terminal is currently used
WLAN be switched to the strongest WLAN of signal being present in free WLAN tables.
Specifically, the identification information of above-mentioned WLAN is the service level identification SSID or internet protocol address of WLAN.
The preconfigured free WLAN tables of mobile terminal can comprising the SSID of each WLAN, login username, log in it is close
Code etc. information, free WLAN tables can be indicated with PERSONAL_WLAN_LIST, as shown in Figure 2;It is of course also possible to match in advance
Charge WLAN tables are set, can be indicated with PROVIDER_WLAN_LIST, as shown in Figure 3.Free WLAN tables and charge WLAN tables
It can be stored in the configuration information of mobile terminal, the configuration information of mobile terminal can also include WLAN access modules etc. letter
Breath.All configuration informations can be stored in mobile terminal EFS/NV files, and be to pass through unified management field by user
Face is configured and is arranged management.
Judge whether at least one is present in the preconfigured free WLAN tables of mobile terminal the WLAN searched, it can
To be judged in the preconfigured free WLAN tables of mobile terminal by judging that the SSID of the WLAN searched whether there is,
It can be by judging that the IP address of the WLAN searched whether there is in the preconfigured free WLAN tables of mobile terminal come really
It is fixed.
It is present in free WLAN tables specifically, the WLAN that mobile terminal is currently used in above-mentioned S15 is switched to
The strongest WLAN of signal, specifically includes:Mobile terminal exits currently used WLAN, and logs in and be present in free WLAN tables
After the strongest WLAN of signal, the operating mode of mobile terminal is switched to network bridge mode by route pattern.
Mobile terminal in the embodiment of the present invention refers to the terminal with wireless routing function, including carries 3G/4G functions
Wireless routing product, the mobile wireless route terminal such as wireless router, while there are two types of operating modes for mobile terminal tool:
Bridge(BRIGE)Pattern and routing(ROUTER)Pattern, BRIGE pattern operation principle equivalent bridges, main purpose make network
Bridge joint, data forwarding do not calculate routing, eliminate node limitation, expand network topology, enhance the coverage area of the free WLAN with
Signal strength is improved service quality;ROUTER pattern operation principle peer routers, mobile terminal mainly provide routing, carry out
Data routing forwarding can be accessed for more mobile terminals, to realize network resources locating.
If the currently used WLAN of mobile terminal is free WLAN, mobile terminal automatically switches to BRIGE patterns, not into
Walking along the street is by carrying out signal enhancing, expanding network coverage;If the currently used WLAN of mobile terminal is charge WLAN, move
Dynamic terminal automatically switches to ROUTER patterns, carries out normal routing work.
When the currently used WLAN of mobile terminal is switched to free WLAN, the operating mode of mobile terminal also accordingly by
ROUTER pattern switchings are BRIGE patterns.
Based on same inventive concept, the embodiment of the present invention provides a kind of WLAN WLAN switching devices, which can
To be arranged in the terminal, concrete structure is as shown in figure 4, include:
Judging unit 40, for being automatic mode and determination when the WLAN access modules of the mobile terminal configuration where itself
When the currently used WLAN of mobile terminal where itself is charge WLAN, judge whether to meet WLAN switching conditions
Switch unit 41, for when 40 judging result of judging unit is to meet, searching for currently available WLAN;By itself
The WLAN that the mobile terminal at place is currently used is switched to the free WLAN chosen in the currently available WLAN searched.
Specifically, above-mentioned judging unit 40, is specifically used for:The flow of the mobile terminal where itself is monitored, and judges to supervise
Whether the flow controlled is zero;When flow is zero, after the time cycle of setting expires, the mobile terminal where itself is determined
WLAN switchings can be carried out, judging result is to meet WLAN switching conditions;When flow is not zero, the movement where itself is determined
Terminal cannot carry out WLAN switchings, and judging result is to be unsatisfactory for WLAN switching conditions.
Specifically, above-mentioned switch unit 41, is specifically used for:Judge the currently available WLAN that searches whether at least one
In the preconfigured free WLAN tables of mobile terminal where being present in itself;If so, the mobile terminal where itself is current
The WLAN used is switched to the strongest WLAN of signal being present in free WLAN tables;Otherwise, the mobile end where itself is exited
Currently used WLAN is held, according to the strong and weak sequence of the currently available WLAN signal searched successively logon attempt, by itself institute
The mobile terminal identification information of WLAN logged in that can succeed be added in free WLAN tables, by the mobile end where itself
Currently used WLAN is held to be switched to the strongest WLAN of signal being present in free WLAN tables.
Specifically, above-mentioned switch unit 41, is specifically used for:Mobile terminal where itself exits currently used WLAN,
And after login is present in the strongest WLAN of signal in free WLAN tables, by the operating mode of the mobile terminal where itself by road
It is network bridge mode by pattern switching.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.