Embodiment
In order to realize the employed WLAN of portable terminal that automaticallyes switch, the embodiment of the invention provides a kind of WLAN WLAN changing method, and the flow process of this method is as shown in Figure 1, and concrete execution in step is following:
S10: flow process begins.
S11: whether the WLAN access module of judging mobile terminal configuration is automatic mode, if carry out S12; Otherwise, carry out S16.
The WLAN access module of portable terminal can be divided into manual mode and automatic mode, and manual mode selects voluntarily to expect that by the user WLAN that inserts, automatic mode are needed the WLAN that inserts by the mobile terminal self selection.In embodiments of the present invention, the WLAN access module of portable terminal need switch to automatic mode, and portable terminal can be selected WLAN voluntarily, and no longer needs the user to participate in.
S12: whether the WLAN that judges the current use of portable terminal is charge WLAN, if carry out S13; Otherwise, carry out S16.
Existing WLAN can be divided into two types, one type be the user at home or the privately owned WLAN that sets up such as office space, these are free WLAN; Another kind of is the WLAN that operator sets up, and these are charge WLAN.Charge WLAN generally can make the user produce certain rate; As the WLAN of the current use of portable terminal during for charge WLAN, just can search for, judge whether and can switch to free WLAN to portable terminal; To save user's rate; And when portable terminal is in the environment that sets up free WLAN,, can also play enhancing signal, enlarge the effect of this free WLAN coverage if portable terminal uses this free WLAN.
The WLAN of the current use of portable terminal logins in the time of possibly being the portable terminal initialization, makes login after also might having carried out switching.
S11 and S12 do not have sequencing, can at first carry out S11, carry out S12 again, can carry out S12 earlier yet, carry out S11 again.Here be to carry out S11 with elder generation, carrying out S12 again is that example describes.
S13: judge whether to satisfy the WLAN switching condition, if carry out S14; Otherwise, carry out S16.
When satisfying the WLAN switching condition, switch the WLAN of the current use of portable terminal, when not satisfying the WLAN switching condition, then do not switch.
S14: search for current available WLAN.
When satisfying the WLAN switching condition, the current available WLAN of search portable terminal can sort so that follow-up the selection according to the signal power.
S15: the WLAN of the current use of portable terminal is switched to the free WLAN that in the current available WLAN that searches, chooses.
When comprising free WLAN among the current available WLAN that searches, in the free WLAN that searches, choose a free WLAN, the WLAN of the current use of portable terminal is switched to the free WLAN that chooses get final product.
S16: flow process finishes.
If the WLAN access module of mobile terminal configuration be manual mode or the current use of portable terminal be that free WLAN or portable terminal do not satisfy the WLAN switching condition, portable terminal continue to use existing WLAN get final product so, above-mentioned flow process end.
This scheme can be that the WLAN of automatic mode, current use is for charging WLAN and when satisfying the WLAN switching condition at the access module of confirming portable terminal; Directly in the current available WLAN that searches, choose a free WLAN; The WLAN of the current use of portable terminal is switched to the free WLAN that chooses; This scheme need not user's manual switchover, has realized that portable terminal carries out WLAN automatically and switches.
Concrete, judging whether among the above-mentioned S13 satisfied the WLAN switching condition, specifically comprises: the flow of monitoring portable terminal, and judge whether the flow that monitors is zero; When flow is zero, arrive after date in the time cycle of setting, confirm that portable terminal can carry out WLAN and switch, judged result is for satisfying the WLAN switching condition; When flow is non-vanishing, confirm that portable terminal cannot carry out WLAN and switch, judged result is not for satisfying the WLAN switching condition.
When the current use of portable terminal is when charging WLAN; The flow of monitoring portable terminal when the flow that monitors is zero, that is to say when the user does not use this charge WLAN portable terminal to be in idle condition; Pick up counting; When still not having flow to take place after the time cycle of surpass setting, can confirm that then current mobile terminal can carry out WLAN and switch, that is to say and satisfy the WLAN switching condition; When the flow that monitors was non-vanishing, just the user was using this charge WLAN, needed to continue the flow of monitoring portable terminal, confirmed that portable terminal cannot carry out WLAN and switch this moment, did not just satisfy the WLAN switching condition.Wherein, can use high priority WLAN search timer to carry out timing.
Also can flow that monitor and setting threshold be compared, when less than setting threshold, arrive after date in the time cycle of setting, confirm that portable terminal can carry out WLAN and switch, judged result is for satisfying the WLAN switching condition; When being not less than setting threshold, confirm that portable terminal cannot carry out WLAN and switch, judged result is not for satisfying the WLAN switching condition.
Concrete; The WLAN with the current use of portable terminal among the above-mentioned S15 switches to the free WLAN that in the current available WLAN that searches, chooses, and specifically comprises: judge whether the current available WLAN that searches has at least one to be present in the pre-configured free WLAN table of portable terminal; If the WLAN of the current use of portable terminal is switched to the strongest WLAN of signal that is present in the free WLAN table; Otherwise; Withdraw from the WLAN of the current use of portable terminal; Attempt login successively according to the strong and weak order of the current available WLAN signal that searches; The identification information of the WLAN that portable terminal can successfully be logined adds in the free WLAN table, and the WLAN of the current use of portable terminal is switched to the strongest WLAN of signal that is present in the free WLAN table.
During showing, the pre-configured free WLAN of portable terminal can store the known free WLAN of user; When the current available WLAN that searches had at least one to be present in the pre-configured free WLAN table of portable terminal, direct WLAN with the current use of portable terminal switched to the strongest WLAN of signal that is present in the free WLAN table and gets final product.When the current available WLAN that searches all is not present in the pre-configured free WLAN table of portable terminal; Withdraw from the WLAN of the current use of portable terminal; Attempt login successively according to the strong and weak order of the current available WLAN signal that searches, when login charge WLAN, all need import username and password and verify; When portable terminal need not imported username and password and just can successfully login certain WLAN; This WLAN is free WLAN, add the identification information of so free WLAN to free WLAN table after, the WLAN of the current use of portable terminal is switched to the strongest WLAN of signal that is present in the free WLAN table.
Concrete, the identification information of above-mentioned WLAN is seeervice level sign SSID or the Internet protocol IP address of WLAN.
The pre-configured free WLAN table of portable terminal can comprise information such as the SSID, login username, login password of each WLAN, and free WLAN table can be represented with PERSONAL_WLAN_LIST, and is as shown in Figure 2; Certainly, also can show by pre-configured charge WLAN, can represent with PROVIDER_WLAN_LIST, as shown in Figure 3.Free WLAN table and charge WLAN table can be stored in the configuration information of portable terminal, and the configuration information of portable terminal can also comprise WLAN access module or the like information.All configuration informations can be kept in the portable terminal EFS/NV file, and are to be configured and to be provided with management by the user through unified administration interface.
Judge whether the WLAN that searches has at least one to be present in the pre-configured free WLAN table of portable terminal; Whether the SSID of the WLAN that can search through judgement is present in the pre-configured free WLAN table of portable terminal is judged, whether the IP address of the WLAN that also can search through judgement is present in the pre-configured free WLAN table of portable terminal is confirmed.
Concrete; The WLAN with the current use of portable terminal among the above-mentioned S15 switches to the strongest WLAN of signal that is present in the free WLAN table; Specifically comprise: portable terminal withdraws from the WLAN of current use; And after login is present in the strongest WLAN of signal in the free WLAN table, the mode of operation of portable terminal is switched to network bridge mode by route pattern.
Portable terminal in the embodiment of the invention is meant the terminal that has wireless routing function; Comprise mobile wireless route terminals such as the wireless routing product that has the 3G/4G function, wireless router, this portable terminal has two kinds of mode of operations simultaneously: bridge (BRIGE) pattern and route (ROUTER) pattern, BRIGE pattern operation principle are equal to bridge; Its main purpose is made network bridging; Data forwarding is not calculated route, eliminates the node restriction, enlarges network topology; Strengthen coverage and the signal strength signal intensity of this free WLAN, improve service quality; ROUTER pattern operation principle peer router, portable terminal mainly provides route, carries out the data routing forwarding, can insert for many portable terminals, thereby realize that Internet resources are shared.
If the WLAN of the current use of portable terminal is free WLAN, portable terminal automatically switches to the BRIGE pattern, does not carry out route, carries out signal and strengthens, and enlarges network coverage; If the WLAN of the current use of portable terminal is charge WLAN, portable terminal automatically switches to the ROUTER pattern, carries out normal route work.
When the WLAN of the current use of portable terminal switched to free WLAN, the mode of operation of portable terminal was the BRIGE pattern by the ROUTER mode switch accordingly also.
Based on same inventive concept, the embodiment of the invention provides a kind of WLAN WLAN switching device shifter, and this device can be arranged in the portable terminal, and concrete structure is as shown in Figure 4, comprising:
Identifying unit 40, the WLAN of the current use of portable terminal that is used for the WLAN access module of mobile terminal configuration when self place and is automatic mode and confirm self place judge whether to satisfy the WLAN switching condition during for charge WLAN.
Switch unit 41, be used for when identifying unit 40 judged results when satisfying, search for current available WLAN; The WLAN of the current use of portable terminal that self belongs to is switched to the free WLAN that in the current available WLAN that searches, chooses.
Concrete, above-mentioned identifying unit 40 specifically is used for: monitor the flow of the portable terminal that self belongs to, and judge whether the flow that monitors is zero; When flow is zero, arrive after date in the time cycle of setting, confirm that the portable terminal that self belongs to can carry out WLAN and switch, judged result is for satisfying the WLAN switching condition; When flow is non-vanishing, confirm that the portable terminal that self belongs to cannot carry out WLAN and switch, judged result is not for satisfying the WLAN switching condition.
Concrete, above-mentioned switch unit 41 specifically is used for: judge whether the current available WLAN that searches has at least one to be present in the pre-configured free WLAN table of portable terminal that self belongs to; If the WLAN of the current use of portable terminal that self belongs to is switched to the strongest WLAN of signal that is present in the free WLAN table; Otherwise; Withdraw from the WLAN of the current use of portable terminal that self belongs to; Attempt login successively according to the strong and weak order of the current available WLAN signal that searches; The identification information of the portable terminal WLAN that can successfully login at self place is added in the free WLAN table, the WLAN of the current use of portable terminal at self place is switched to the strongest WLAN of signal that is present in the free WLAN table.
Concrete; Above-mentioned switch unit 41; Specifically be used for: the portable terminal at self place withdraws from the WLAN of current use, and after login is present in the strongest WLAN of signal in the free WLAN table, and the mode of operation of the portable terminal at self place is switched to network bridge mode by route pattern.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.