CN106507446A - A kind of Wireless Fidelity Wi Fi methods of attachment and mobile terminal - Google Patents

A kind of Wireless Fidelity Wi Fi methods of attachment and mobile terminal Download PDF

Info

Publication number
CN106507446A
CN106507446A CN201611117240.5A CN201611117240A CN106507446A CN 106507446 A CN106507446 A CN 106507446A CN 201611117240 A CN201611117240 A CN 201611117240A CN 106507446 A CN106507446 A CN 106507446A
Authority
CN
China
Prior art keywords
address
mobile terminal
renting
new
routed path
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
CN201611117240.5A
Other languages
Chinese (zh)
Other versions
CN106507446B (en
Inventor
黄园
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201611117240.5A priority Critical patent/CN106507446B/en
Publication of CN106507446A publication Critical patent/CN106507446A/en
Application granted granted Critical
Publication of CN106507446B publication Critical patent/CN106507446B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Abstract

A kind of Wireless Fidelity Wi Fi methods of attachment and mobile terminal is embodiments provided, methods described includes:When the IP address of mobile terminal changes, the new IP address of the mobile terminal are obtained;Obtain the IP address of current gateway;The target routed path that sets up between the IP address of the new IP address and the current gateway;By the target routed path, the communication connection between the mobile terminal and the router is realized.Wi Fi networks also can be quickly accessed in the case where the IP address of mobile terminal changes by the embodiment of the present invention.

Description

A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal
Technical field
The present invention relates to Internet technical field, and in particular to a kind of Wireless Fidelity Wi-Fi connection method and mobile terminal.
Background technology
With the fast development of information technology, mobile terminal (such as mobile phone, panel computer etc.) is used using increasingly popularizing Requirement of the family to mobile terminal also more and more higher, not only needs higher processing speed, also to accessing Wireless Fidelity (Wireless Fidelity, Wi-Fi) propose requirement.
In prior art, mobile terminal is after Wi-Fi in connection, if Wi-Fi does not disconnect, but the IP address of mobile terminal is sent out The default route information (comprising routed path) of Wi-Fi network can then be disposed by changing, mobile terminal, cause mobile terminal Network cannot be accessed.
Content of the invention
A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal is embodiments provided, to moving eventually In the case that the IP address at end changes, Wi-Fi network is accessed.
Embodiment of the present invention first aspect provides a kind of Wireless Fidelity Wi-Fi connection method, including:
When the IP address of mobile terminal changes, the new IP address of the mobile terminal are obtained;
Obtain gateway IP address, wherein, the IP address of the gateway by router in DHCP Dynamic Host Configuration Protocol server is configured;
According to the new IP address and the IP address of the gateway, target routed path is set up;
By the target routed path, the communication connection that sets up between the mobile terminal and the router.
Embodiment of the present invention second aspect provides a kind of mobile terminal, including:
First acquisition unit, for when the IP address of mobile terminal changes, obtaining the new IP ground of the mobile terminal Location;
Second acquisition unit, for obtaining the IP address of gateway, wherein, the IP address of the gateway by router in dynamic State host configuration Dynamic Host Configuration Protocol server is configured;
Unit is set up, for the IP address according to the new IP address and the gateway, target routed path is set up;
Communication unit, for by the target routed path, setting up between the mobile terminal and the router Communication connection.
The embodiment of the present invention third aspect provides a kind of mobile terminal, including:
Processor and memory;Wherein, the processor is executed by calling code in the memory or instruction The some or all of step of the method described by first aspect.
Implement the embodiment of the present invention, have the advantages that:
The new IP address of mobile terminal by the embodiment of the present invention, when the IP address of mobile terminal changes, are obtained, is obtained Take the IP address of gateway, wherein, the IP address of gateway by router in dynamic host configuration protocol DHCP server configuration, root According to new IP address and the IP address of gateway, target routed path is set up, by target routed path, set up mobile terminal and route Communication connection between device.So as to even if in the case where the IP address of mobile terminal changes, can also quickly access Wi-Fi nets Network.
Description of the drawings
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, below will be to making needed for embodiment description Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, can be other attached to be obtained according to these accompanying drawings Figure.
Fig. 1 is that a kind of first embodiment flow process of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention is illustrated Figure;
Fig. 2 is that a kind of second embodiment flow process of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention is illustrated Figure;
Fig. 3 is that a kind of 3rd embodiment flow process of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention is illustrated Figure;
Fig. 4 a are a kind of first embodiment structural representations of mobile terminal provided in an embodiment of the present invention;
Fig. 4 b are the structural representations of the second acquisition unit of the mobile terminal described by Fig. 4 a provided in an embodiment of the present invention Figure;
Fig. 4 c are the another structures of the second acquisition unit of the mobile terminal described by Fig. 4 a provided in an embodiment of the present invention Schematic diagram;
Fig. 4 d are the another structural representations of the mobile terminal described by Fig. 4 a provided in an embodiment of the present invention;
Fig. 4 e are the another structural representations of the mobile terminal described by Fig. 4 a provided in an embodiment of the present invention;
Fig. 5 is a kind of second embodiment structural representation of mobile terminal provided in an embodiment of the present invention.
Specific embodiment
Accompanying drawing in below in conjunction with the embodiment of the present invention, to the embodiment of the present invention in technical scheme carry out clear, complete Site preparation is described, it is clear that described embodiment is a part of embodiment of the invention, rather than whole embodiments.It is based on this Embodiment in bright, the every other enforcement obtained under the premise of creative work is not made by those of ordinary skill in the art Example, belongs to the scope of protection of the invention.
Term " first ", " second ", " the 3rd " in description and claims of this specification and the accompanying drawing and " Four " it is etc. for distinguishing different objects, rather than for describing particular order.Additionally, term " comprising " and " having " and it Any deformation, it is intended that cover and non-exclusive include.For example contain the process of series of steps or unit, method, be System, product or equipment are not limited to the step of listing or unit, but alternatively also include the step of not listing or list Unit, or alternatively also include other steps intrinsic for these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can be wrapped in conjunction with the embodiments It is contained at least one embodiment of the present invention.It is identical that each position in the description shows that the phrase might not each mean Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly it is understood by, embodiment described herein can be combined with other embodiments.
Mobile terminal described by the embodiment of the present invention can include smart mobile phone (as Android phone, iOS mobile phones, Windows Phone mobile phones etc.), panel computer, mobile unit, palm PC, notebook computer, mobile internet device (MID, Mobile Internet Devices) or Wearable etc., above-mentioned is only citing, and non exhaustive, comprising but do not limit In above-mentioned mobile terminal.
Under normal circumstances, DHCP (Dynamic Host Configuration are built-in with router Protocol, DHCP) server, the Dynamic Host Configuration Protocol server with can distributing the IP of an IP address, i.e. mobile terminal to mobile terminal Location.A routed path is formed between the IP address of mobile terminal and the IP address of gateway, based on the routed path, mobile terminal Can be communicatively coupled between router, i.e., can carry out data transmission between mobile terminal and router.
It should be noted that the system monitoring Wi-Fi network change of mobile terminal, for example, mobile terminal finds the movement Although terminal is in Wi-Fi connection status, the mobile terminal IP address of itself there occurs change (such as:From 192.168.1.100 it is changed into 192.168.1.123), then mobile terminal cannot carry out data transmission.
Thus, the embodiment of the present invention provides a kind of Wireless Fidelity Wi-Fi connection method, comprises the steps:
When the IP address of mobile terminal changes, the new IP address of the mobile terminal are obtained;
Obtain the IP address of current gateway;
The target routed path that sets up between the IP address of the new IP address and the current gateway;
By the target routed path, the communication connection between the mobile terminal and the router is realized.
Even if thus, the IP address of mobile terminal itself has changed and for, it is also possible to set up the new IP address of mobile terminal The routed path and IP address of network between, based on the routed path, mobile terminal can be set up logical again between router Letter connection, you can to carry out data transmission between router.
Fig. 1 is referred to, is a kind of first embodiment stream of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention Journey schematic diagram.Wireless Fidelity Wi-Fi connection method described in the present embodiment, comprises the following steps:
101st, the new IP address of the mobile terminal, when the IP address of mobile terminal changes, are obtained.
Under normal circumstances, in mobile terminal under Wi-Fi connection status, if the IP address of mobile terminal changes, move Dynamic terminal may disconnect Wi-Fi network, and be in non-access state.In the case where the IP address of mobile terminal changes, can Obtain the new IP address of the mobile terminal.Wherein, the IP address that the IP address of mobile terminal can be randomly assigned by Dynamic Host Configuration Protocol server.
For example, when the IP address of mobile terminal is static ip address, if will be tied up between the IP address and router Fixed, then only have the IP address correct and password correctly, just can access the router, even if other mobile terminal be aware of close Code, but the IP address of its mobile terminal is not above-mentioned IP address, cannot access the router yet.
102nd, the IP address of current gateway is obtained.
Wherein, the IP address of mobile terminal is varied, but, the IP address of gateway does not change, thus, can obtain current The IP address of gateway, the IP address of the gateway can be by the built-in Dynamic Host Configuration Protocol server distribution of router.Certainly, the IP address of gateway by Router distributes, and mobile terminal is then needed in the coverage of the router, and router can be just the IP which distributes gateway Address, otherwise, if mobile terminal is not in the coverage of the router, mobile terminal may carry out covering for other routers Lid scope, then gateway now have also been changed, the IP address of gateway have also been changed.
Alternatively, mobile terminal can get the IP address of middle gateway from routing table.Under normal circumstances, even if mobile whole The IP address at end is varied, its routing table also need to a period of time update, thus, can direct access routing table, Bing Conggai roads The IP address that gateway is obtained by table.
Alternatively, the IP address of above-mentioned acquisition gateway, it may include following steps:
21) the first routed path before, the IP address of the acquisition mobile terminal changes;
22), the IP address of the gateway is obtained from first routed path.
Wherein, in step 21, the IP address of above-mentioned mobile terminal change before the first routed path, i.e., current road By path, although IP address changes, but, routed path is not yet changed, thus, can direct access first routed path, First routed path comprising the mobile terminal IP address change before IP address and gateway IP address, thus, can The IP address of gateway is obtained from the first routed path.
Alternatively, the IP address of above-mentioned acquisition gateway, it may include following steps:
23), the packet sent by the router is obtained, and the packet carries the IP address of the gateway;
24), the packet is parsed, the IP address of the gateway is obtained.
Wherein, more packet can be preserved in mobile terminal.Router to mobile terminal send packet when Wait, mobile terminal can receive the packet sent by router, and be stored in the mobile terminal.Each packet can carry net The IP address of pass, then, mobile terminal can be parsed to packet, so as to obtain the IP address of gateway.Specifically, gateway IP address be mobile terminal when IP address is obtained to Dynamic Host Configuration Protocol server, the Offer messages that is replied by Dynamic Host Configuration Protocol server or ACK Carry in message (i.e. packet), it is only necessary to Offer messages or ACK messages (packet) are parsed, just can be obtained IP address to gateway.
103rd, the target routed path that sets up between the IP address of the new IP address and the current gateway.
Wherein, in the case where the new IP address of mobile terminal and the IP address of gateway all determine, then mobile terminal can Quickly generate target routed path between the two.The target routed path can include new IP address of the mobile terminal and current The IP address of gateway.
104th, by the target routed path, the communication connection between the mobile terminal and the router is realized.
Wherein, after the determination of target routed path, then by the target routed path, mobile terminal can be passed to router Transmission of data, or, router can also be to the mobile terminal transmission data.
As can be seen that by the embodiment of the present invention, when the IP address of mobile terminal changes, obtaining the new of mobile terminal IP address, obtains the IP address of current gateway, according to new IP address and the IP address of current gateway, sets up target routed path, By target routed path, the communication connection that sets up between mobile terminal and router.So as to even if the IP ground in mobile terminal In the case that location changes, Wi-Fi network can be quickly accessed also, thus, can achieve mobile terminal does not perceive Wi-Fi network disconnection In the case of, Wi-Fi network is quickly accessed, is had using lifting Consumer's Experience, especially user in transmission file or game When, do not result in network interruption.
Consistent with the abovely, Fig. 2 is referred to, is a kind of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention Second embodiment schematic flow sheet.Wireless Fidelity Wi-Fi connection method described in the present embodiment, comprises the following steps:
201st, whether detection mobile terminal there occurs and re-rents IP address event.
Wherein, mobile terminal is during IP address event is re-rented, it is likely that can change the IP of the mobile terminal Address, thus, by detecting whether there occurs IP address event of re-renting, and can detect whether the IP address of mobile terminal changes.
It should be noted that under normal circumstances, router is provided with Dynamic Host Configuration Protocol server, and Dynamic Host Configuration Protocol server is used for movement Terminal distribution IP address (i.e. the IP address of mobile terminal), the IP address have a term of validity, before the deadline, mobile terminal Wi-Fi connection status can be kept with router, at the end of the term of validity, then mobile terminal can be disconnected and router between Wi-Fi connection.Before the IP address term of validity terminates, IP address can be sent to Dynamic Host Configuration Protocol server and re-rent request, Dynamic Host Configuration Protocol server The IP address can be responded request is re-rented for mobile terminal distribution IP address.I.e. gateway IP address before the term of validity, Then need to carry out re-renting IP address, now, mobile terminal just there occurs re-rents IP address event.In this process, mobile terminal IP address may be reallocated.
When IP address event is re-rented described in the 202nd, there occurs in the mobile terminal, obtain the mobile terminal after re-renting IP address.
Wherein, when mobile terminal there occurs and re-rent IP address event, the IP address of the mobile terminal after re-renting can be obtained.
The mobile terminal before IP address and described the re-renting of the mobile terminal after the 203, re-renting described in detection IP address whether consistent.
Wherein, the IP address before can be re-rented IP address of the mobile terminal after re-renting with mobile terminal is compared, Whether consistent to determine both.
204th, the mobile terminal before IP address and described the re-renting of the mobile terminal after described re-renting When IP address is inconsistent, the new IP address of the mobile terminal are obtained.
Wherein, when IP address of the mobile terminal after re-renting is inconsistent with the IP address before re-renting, can direct access should The new IP address of mobile terminal, i.e. IP address re-rent after IP address.The IP address of mobile terminal changes, then mobile terminal Its IP address can comparatively fast be perceived to change, thus, can read the new IP address of mobile terminal.
205th, the IP address of current gateway is obtained.
206th, the target routed path that sets up between the IP address of the new IP address and the current gateway.
207th, by the target routed path, the communication connection between the mobile terminal and the router is realized.
Wherein, above-mentioned steps 204- step 207 can refer to the corresponding of the Wireless Fidelity Wi-Fi connection method described by Fig. 1 Step, will not be described here.
As can be seen that by the embodiment of the present invention, there occurs IP address event of re-renting in mobile terminal, and mobile terminal be continuous When IP address after rent is inconsistent with the IP address before re-renting, the new IP address of mobile terminal can be obtained, new IP address are set up Target routed path and the IP address of current gateway between, by the target routed path, realizes mobile terminal and router Between communication connection.So as to even if in the case where the IP address of mobile terminal changes, can also quickly access Wi-Fi network. Thus, in the case that achievable mobile terminal does not perceive Wi-Fi network disconnection, quickly accessing Wi-Fi network, there is utilization to carry Consumer's Experience, especially user are risen when file or game is transmitted, network interruption is not resulted in.
Consistent with the abovely, Fig. 3 is referred to, is a kind of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention 3rd embodiment schematic flow sheet.Wireless Fidelity Wi-Fi connection method described in the present embodiment, comprises the following steps:
301st, whether detection mobile terminal is provided with static ip address.
Wherein, although the IP address of mobile terminal can be randomly assigned by Dynamic Host Configuration Protocol server, but, the IP of mobile terminal Address can also be arranged to static ip address.As IP address is by dynamic IP addressing to static ip address, the IP of mobile terminal Address changes to static ip address by dynamic IP addressing, and the IP address of the mobile terminal may change.If current dynamic IP As static ip address, then the IP address of mobile terminal does not change for address.
302nd, when the mobile terminal is provided with the static ip address, the static ip address and the setting are detected Whether IP address before is consistent.
Wherein, when mobile terminal is provided with static ip address, detect that static ip address with the IP address before arranging is No consistent.For example, static ip address is 192.168.1.123, and the IP address before arranging static ip address is 192.168.1.100, then, illustrate that static ip address is inconsistent with the IP address before arranging static ip address.Again for example, quiet State IP address is 192.168.1.123, and it is 192.168.1.123 to arrange the IP address before static ip address, then, explanation Static ip address is consistent with the IP address before arranging static ip address.
303rd, when the IP address before the static ip address with the setting is inconsistent, the mobile terminal is obtained New IP address.
Wherein, when static ip address is inconsistent with the IP address before arranging static ip address, then can obtain mobile whole The new IP address at end.The new IP address are static ip address.
304th, the IP address of current gateway is obtained.
305th, the target routed path that sets up between the IP address of the new IP address and the current gateway.
306th, by the target routed path, the communication connection between the mobile terminal and the router is realized.
Wherein, above-mentioned steps 303- step 306 can refer to the corresponding of the Wireless Fidelity Wi-Fi connection method described by Fig. 1 Step, will not be described here.
As can be seen that by the embodiment of the present invention, after mobile terminal is provided with static ip address, if the static IP ground Location is inconsistent with the IP before being provided with static ip address, then can obtain current net using the static ip address as new IP address The IP address of pass, the target routed path that sets up between new IP address and the IP address of current gateway route road by the target Footpath, realizes the communication connection between mobile terminal and router.So as to even if the situation of the IP address change in mobile terminal Under, can also quickly access Wi-Fi network.Thus, in the case that achievable mobile terminal does not perceive Wi-Fi network disconnection, soon Speed is linked into Wi-Fi network, when having using lifting Consumer's Experience, especially user in transmission file or playing, Bu Huizao Interrupt into network.
Consistent with the abovely, below for implementing the device of above-mentioned Wireless Fidelity Wi-Fi connection method, specific as follows:
Fig. 4 a are referred to, is a kind of first embodiment structural representation of mobile terminal provided in an embodiment of the present invention.This Mobile terminal described in embodiment, including:First acquisition unit 401, second acquisition unit 402, set up unit 403 and logical Letter unit 404, specific as follows:
First acquisition unit 401, for when the IP address of mobile terminal changes, obtaining the new IP of the mobile terminal Address;
Second acquisition unit 402, for obtaining the IP address of current gateway;
Unit 403 is set up, for the target route that sets up between the new IP address and the IP address of the current gateway Path;
Communication unit 404, for by the target routed path, realizing between the mobile terminal and the router Communication connection.
Alternatively, such as Fig. 4 b, concrete refinement knots of Fig. 4 b for the second acquisition unit 402 of mobile terminal described by Fig. 4 a Structure, the second acquisition unit 402 may include:First acquisition module 4021 and the second acquisition module 4022, specific as follows:
First acquisition module 4021, for obtaining the first via before the IP address of the mobile terminal changes by road Footpath;
Second acquisition module 4022, for obtaining the IP address of the current gateway from first routed path.
Alternatively, such as Fig. 4 c, concrete refinement knots of Fig. 4 c for the second acquisition unit 402 of mobile terminal described by Fig. 4 a Structure, the second acquisition unit 402 may include:3rd acquisition module 4023 and parsing module 4024, specific as follows:
3rd acquisition module 4023, for obtaining the packet sent by the router, the packet carries described The IP address of current gateway;
Parsing module 4024, for parsing to the packet, obtains the IP address of the current gateway.
Alternatively, such as Fig. 4 d, Fig. 4 d are the another modification structures of the mobile terminal described by Fig. 4 a, and described by Fig. 4 a Mobile terminal compares, and which also includes:First detector unit 405, the 3rd acquiring unit 406 and the second detector unit 407, specifically As follows:
First detector unit 405, for when the first acquisition unit 401 changes in the IP address of mobile terminal, Before obtaining the new IP address of the mobile terminal, detect whether the mobile terminal there occurs and re-rent IP address event;
3rd acquiring unit 406, occurs for the mobile terminal for the testing result in first detector unit 405 Described when re-renting IP address event, obtain the IP address of the mobile terminal after re-renting;
Second detector unit 407, for detecting that the IP address of the mobile terminal after described re-renting re-rents it with described Whether the IP address of the front mobile terminal is consistent, after the testing result of second detector unit 407 is for described re-renting The mobile terminal IP address and described re-renting before the mobile terminal IP address inconsistent when, confirm the shifting The IP address of dynamic terminal changes.
Alternatively, such as Fig. 4 e, Fig. 4 e are the another modification structures of the mobile terminal described by Fig. 4 a, and described by Fig. 4 a Mobile terminal compares, and which also includes:3rd detector unit 408 and the 4th detector unit 409, specific as follows:
3rd detector unit 408, for when the first acquisition unit 401 changes in the IP address of mobile terminal, Before obtaining the new IP address of the mobile terminal, detect whether the mobile terminal is provided with static ip address;
4th detector unit 409, is arranged for the mobile terminal for the testing result in the 3rd detector unit 408 During the static ip address, detect whether the static ip address is with the IP address before the setting consistent, described the The testing result of four detector units 409 be the static ip address with the setting before IP address inconsistent when, confirm institute The IP address for stating mobile terminal changes.
As can be seen that by the mobile terminal described by the embodiment of the present invention, can change in the IP address of mobile terminal When, the new IP address of mobile terminal are obtained, the IP address of current gateway is obtained, is set up the IP address of new IP address and current gateway Between target routed path, by the target routed path, realize the communication connection between mobile terminal and router.From And, even if in the case where the IP address of mobile terminal changes, can also quickly access Wi-Fi network, thus, can achieve mobile whole In the case that end does not perceive Wi-Fi network disconnection, Wi-Fi network is quickly accessed, had using Consumer's Experience is lifted, especially User does not result in network interruption when file or game is transmitted.
Consistent with the abovely, Fig. 5 is referred to, is a kind of second embodiment knot of mobile terminal provided in an embodiment of the present invention Structure schematic diagram.Mobile terminal described in the present embodiment, including:At least one input equipment 1000;At least one output sets Standby 2000;At least one processor 3000, such as CPU;With memory 4000, above-mentioned input equipment 1000, output equipment 2000, Processor 3000 and memory 4000 are connected by bus 5000.
Wherein, above-mentioned input equipment 1000 concretely contact panel, physical button or mouse.
The concretely display screen of above-mentioned output equipment 2000.
Above-mentioned memory 4000 can be high-speed RAM memory, alternatively nonvolatile storage (non-volatile Memory), such as magnetic disc store.Above-mentioned memory 4000 is used for storing batch processing code, above-mentioned input equipment 1000, defeated Going out equipment 2000 and processor 3000 is used for calling the program code stored in memory 4000, executes following operation:
Above-mentioned processor 3000, is used for:
When the IP address of mobile terminal changes, the new IP address of the mobile terminal are obtained;
Obtain the IP address of current gateway;
The target routed path that sets up between the IP address of the new IP address and the current gateway;
By the target routed path, the communication connection between the mobile terminal and the router is realized.
Alternatively, above-mentioned processor 3000 obtains the IP address of current gateway, including:
Obtain the mobile terminal IP address change before the first routed path;
The IP address of the current gateway is obtained from first routed path.
Alternatively, above-mentioned processor 3000 obtains the IP address of current gateway, including:
The packet sent by the router is obtained, the packet carries the IP address of the current gateway;
The packet is parsed, the IP address of the current gateway is obtained.
Alternatively, above-mentioned processor 3000, described change in the IP address of mobile terminal when, obtain described mobile eventually Before the new IP address at end, also particularly useful for:
Detect whether the mobile terminal there occurs and re-rent IP address event;
When IP address event is re-rented described in there occurs in the mobile terminal, obtain the IP address after re-renting;
Whether the IP address after re-renting described in detection is consistent with the IP address before described re-renting;
When IP address before the IP address after described re-renting with described re-renting is inconsistent, the mobile terminal is confirmed IP address changes.
Alternatively, above-mentioned processor 3000, described change in the IP address of mobile terminal when, obtain described mobile eventually Before the new IP address at end, also particularly useful for:
Detect whether the mobile terminal is provided with static ip address;
When the mobile terminal is provided with the static ip address, before detecting the static ip address and the setting IP address whether consistent;
When IP address before the static ip address with the setting is inconsistent, the IP ground of the mobile terminal is confirmed Location changes.
The embodiment of the present invention also provides a kind of computer-readable storage medium, and wherein, the computer-readable storage medium can be stored with journey Sequence, includes the part of any Wireless Fidelity Wi-Fi connection method described in said method embodiment during the program performing Or Overall Steps.
Although here combines each embodiment, and invention has been described, however, implementing the present invention for required protection During, those skilled in the art are by checking the accompanying drawing, disclosure and appended claims, it will be appreciated that and real Other changes of the existing open embodiment.In the claims, " including " (comprising) word be not excluded for other composition Part or step, "a" or "an" are not excluded for multiple situations.Single processor or other units can realize claim In some functions enumerating.Mutually different has been recited in mutually different dependent some measures, it is not intended that these are arranged Apply to combine and produce good effect.
It will be understood by those skilled in the art that embodiments of the invention can be provided as method, device (equipment) or computer journey Sequence product.Therefore, the present invention can adopt complete hardware embodiment, complete software embodiment or with reference to software and hardware in terms of The form of embodiment.And, the present invention can be adopted in one or more calculating for wherein including computer usable program code The upper computer program that implements of machine usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) The form of product.Computer program is stored/distributed in suitable medium, is provided or as hardware one together with other hardware Part, it would however also be possible to employ other distribution forms, such as by Internet or other wired or wireless telecommunication systems.
The present invention be with reference to the embodiment of the present invention method, device (equipment) and computer program flow chart with/ Or block diagram is describing.It should be understood that can by each flow process in computer program instructions flowchart and/or block diagram and/ Or the combination of square frame and flow chart and/or the flow process in block diagram and/or square frame.These computer program instructions can be provided Processor to all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is producing one Individual machine so that produced by the instruction of computer or the computing device of other programmable data processing devices and existed for realization The device of the function of specifying in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in and can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory is produced to be included referring to Make the manufacture of device, the command device realize in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or The function of specifying in multiple square frames.
These computer program instructions can be also loaded in computer or other programmable data processing devices so that in meter Series of operation steps is executed on calculation machine or other programmable devices to produce computer implemented process, so as in computer or The instruction executed on other programmable devices is provided for realization in one flow process of flow chart or multiple flow processs and/or block diagram one The step of function of specifying in individual square frame or multiple square frames.
Although in conjunction with specific features and embodiment, invention has been described, it is clear that, without departing from this In the case of bright spirit and scope, various modifications and combinations can be carried out to which.Correspondingly, the specification and drawings are only institute The exemplary illustration of the present invention defined by attached claim, and be considered as cover in the scope of the invention any and all and repair Change, change, combining or equivalent.Obviously, those skilled in the art the present invention can be carried out various change and modification and not Depart from the spirit and scope of the present invention.So, if the present invention these modification and modification belong to the claims in the present invention and its Within the scope of equivalent technologies, then the present invention is also intended to comprising these changes and modification.

Claims (11)

1. a kind of Wireless Fidelity Wi-Fi connection method, it is characterised in that include:
When the IP address of mobile terminal changes, the new IP address of the mobile terminal are obtained;
Obtain the IP address of current gateway;
The target routed path that sets up between the IP address of the new IP address and the current gateway;
By the target routed path, the communication connection between the mobile terminal and the router is realized.
2. method according to claim 1, it is characterised in that the IP address of the acquisition current gateway, including:
Obtain the mobile terminal IP address change before the first routed path;
The IP address of the current gateway is obtained from first routed path.
3. method according to claim 1, it is characterised in that the IP address of the acquisition current gateway, including:
The packet sent by the router is obtained, the packet carries the IP address of the current gateway;
The packet is parsed, the IP address of the current gateway is obtained.
4. the method according to any one of claims 1 to 3, it is characterised in that in the IP address in mobile terminal During change, before obtaining the new IP address of the mobile terminal, methods described also includes:
Detect whether the mobile terminal there occurs and re-rent IP address event;
When IP address event is re-rented described in there occurs in the mobile terminal, obtain the IP address of the mobile terminal after re-renting;
The IP address of the mobile terminal before IP address and described the re-renting of the mobile terminal after re-renting described in detection Whether consistent;
The IP address of the mobile terminal before IP address and described the re-renting of the mobile terminal after described re-renting is not When consistent, confirm that the IP address of the mobile terminal changes.
5. the method according to any one of claims 1 to 3, it is characterised in that in the IP address in mobile terminal During change, before obtaining the new IP address of the mobile terminal, methods described also includes:
Detect whether the mobile terminal is provided with static ip address;
When the mobile terminal is provided with the static ip address, the IP before the static ip address and the setting is detected Whether address is consistent;
When IP address before the static ip address with the setting is inconsistent, the IP address of the mobile terminal has been confirmed Change.
6. a kind of mobile terminal, it is characterised in that include:
First acquisition unit, for when the IP address of mobile terminal changes, obtaining the new IP address of the mobile terminal;
Second acquisition unit, for obtaining the IP address of current gateway;
Unit is set up, for setting up the target routed path between the new IP address and the IP address of the current gateway;
Communication unit, for by the target routed path, realizing the communication between the mobile terminal and the router Connection.
7. mobile terminal according to claim 6, it is characterised in that the second acquisition unit includes:
First acquisition module, for obtaining the first routed path before the IP address of the mobile terminal changes;
Second acquisition module, for obtaining the IP address of the current gateway from first routed path.
8. mobile terminal according to claim 6, it is characterised in that the second acquisition unit includes:
3rd acquisition module, for obtaining the packet sent by the router, the packet carries the current gateway IP address;
Parsing module, for parsing to the packet, obtains the IP address of the current gateway.
9. the mobile terminal according to any one of claim 6 to 8, it is characterised in that the mobile terminal is changed and also included:
First detector unit, for when the first acquisition unit changes in the IP address of mobile terminal, obtaining the shifting Before the new IP address of dynamic terminal, detect whether the mobile terminal there occurs and re-rent IP address event;
3rd acquiring unit, for there occurs described re-renting in the testing result of first detector unit for the mobile terminal During IP address event, the IP address of the mobile terminal after re-renting is obtained;
Second detector unit, described in before detecting the IP address of the mobile terminal after described re-renting and described re-renting Whether the IP address of mobile terminal is consistent, described mobile whole after being described re-renting in the testing result of second detector unit When the IP address of the mobile terminal before the IP address at end and described re-renting is inconsistent, the IP ground of the mobile terminal is confirmed Location changes.
10. the mobile terminal according to any one of claim 6 to 8, it is characterised in that the mobile terminal also includes:
3rd detector unit, for when the first acquisition unit changes in the IP address of mobile terminal, obtaining the shifting Before the new IP address of dynamic terminal, detect whether the mobile terminal is provided with static ip address;
4th detector unit, for being provided with the static state in the testing result of the 3rd detector unit for the mobile terminal During IP address, detect whether the static ip address is consistent with the IP address before the setting, in the 4th detector unit Testing result be the static ip address with the setting before IP address inconsistent when, confirm the IP of the mobile terminal Address changes.
11. a kind of mobile terminals, it is characterised in that include:
Processor and memory;Wherein, the processor is executed such as power by calling code in the memory or instruction Profit requires the method described in 1 to 5 any one.
CN201611117240.5A 2016-12-07 2016-12-07 A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal Active CN106507446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611117240.5A CN106507446B (en) 2016-12-07 2016-12-07 A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611117240.5A CN106507446B (en) 2016-12-07 2016-12-07 A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal

Publications (2)

Publication Number Publication Date
CN106507446A true CN106507446A (en) 2017-03-15
CN106507446B CN106507446B (en) 2019-08-27

Family

ID=58329767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611117240.5A Active CN106507446B (en) 2016-12-07 2016-12-07 A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal

Country Status (1)

Country Link
CN (1) CN106507446B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119312A (en) * 2007-09-13 2008-02-06 北京交通大学 Method for implementing integrated network mobile switch management
CN102170628A (en) * 2010-02-25 2011-08-31 中兴通讯股份有限公司 Worldwide interoperability for microwave access (Wimax) system realizing fixed anchor point-free switching and switching method thereof
CN103338482A (en) * 2013-07-24 2013-10-02 成都西加云杉科技有限公司 Distributing data transmission method, distributing data transmission equipment and user terminal
CN104660683A (en) * 2015-01-27 2015-05-27 广州视源电子科技股份有限公司 Data transmission control method, device and system
US20150270987A1 (en) * 2014-03-20 2015-09-24 Panasonic Intellectual Property Management Co., Ltd. Data distribution device and imaging apparatus
US20160211991A1 (en) * 2013-09-21 2016-07-21 Avaya Inc. Captive portal systems, methods, and devices

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119312A (en) * 2007-09-13 2008-02-06 北京交通大学 Method for implementing integrated network mobile switch management
CN102170628A (en) * 2010-02-25 2011-08-31 中兴通讯股份有限公司 Worldwide interoperability for microwave access (Wimax) system realizing fixed anchor point-free switching and switching method thereof
CN103338482A (en) * 2013-07-24 2013-10-02 成都西加云杉科技有限公司 Distributing data transmission method, distributing data transmission equipment and user terminal
US20160211991A1 (en) * 2013-09-21 2016-07-21 Avaya Inc. Captive portal systems, methods, and devices
US20150270987A1 (en) * 2014-03-20 2015-09-24 Panasonic Intellectual Property Management Co., Ltd. Data distribution device and imaging apparatus
CN104660683A (en) * 2015-01-27 2015-05-27 广州视源电子科技股份有限公司 Data transmission control method, device and system

Also Published As

Publication number Publication date
CN106507446B (en) 2019-08-27

Similar Documents

Publication Publication Date Title
CN104967997B (en) A kind of Wi-Fi cut-in method, Wi-Fi equipment, terminal device and system
CN103607385B (en) Method and apparatus for security detection based on browser
CN110611723B (en) Scheduling method and device of service resources
CN107347205B (en) A kind of network slice selection method, apparatus and system
EP3836486A1 (en) Service link selection control method and device
CN106851779A (en) A kind of method and mobile terminal for recognizing access point and focus
CN105100213B (en) Apparatus bound method and device
CN104869043B (en) A kind of method and terminal for establishing VPN connection
KR20170139582A (en) Internet access authentication methods and clients, and computer storage media
CN103491648B (en) Communication means and system based on WIFI
CN106375465B (en) A kind of data migration method and server
CN105635084A (en) Apparatus and method for authenticating terminal
CN107370685A (en) A kind of internet-of-things terminal cut-in method and device
CN106713522A (en) Wireless fidelity (Wi-Fi) connection method and mobile terminal
CN104461683A (en) Verification method, device and system for virtual machine illegal configuration
CN107274222A (en) Advertisement placement method and device
CN107182098A (en) For realizing the method and apparatus that user equipment switches between WAP
CN105119928A (en) Data transmission method, device and system for Android intelligent terminal
US20200169867A1 (en) Interception method, core network device and base station
CN108566643A (en) APP access control methods, system, terminal device and storage medium
CN106302519A (en) The method of a kind of internet security management and terminal
CN107113615A (en) A kind of authentication method, system and relevant device to access point AP
CN106658670A (en) Wireless fidelity Wi-Fi scanning method and mobile terminal
CN106535102A (en) Mobile terminal positioning method and mobile terminal
CN115150209B (en) Data processing method, industrial control system, electronic device, and storage medium

Legal Events

Date Code Title Description
C06 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: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant