CN103281799A - Network connection switching method based on mobile phone hot spots and mobile phone - Google Patents

Network connection switching method based on mobile phone hot spots and mobile phone Download PDF

Info

Publication number
CN103281799A
CN103281799A CN2013102113870A CN201310211387A CN103281799A CN 103281799 A CN103281799 A CN 103281799A CN 2013102113870 A CN2013102113870 A CN 2013102113870A CN 201310211387 A CN201310211387 A CN 201310211387A CN 103281799 A CN103281799 A CN 103281799A
Authority
CN
China
Prior art keywords
network
pdp
mobile phone
dial
connection
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
CN2013102113870A
Other languages
Chinese (zh)
Other versions
CN103281799B (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.)
TCL Communication Ningbo Ltd
Original Assignee
TCL Communication Ningbo 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 TCL Communication Ningbo Ltd filed Critical TCL Communication Ningbo Ltd
Priority to CN201310211387.0A priority Critical patent/CN103281799B/en
Publication of CN103281799A publication Critical patent/CN103281799A/en
Application granted granted Critical
Publication of CN103281799B publication Critical patent/CN103281799B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a network connection switching method based on mobile phone hot spots and a mobile phone. The method comprises the steps of when a network connection request, sent by a terminal which is used for being connected with the Internet through the mobile phone, of a network sharing service is received, controlling and disconnecting PDP connection in a mobile phone system default type, newly establishing PDP connection in a dial-up network type, configuring a DNS and a route of the connection, obtaining network card information of the PDP connection in the dial-up network type, and controlling the terminal to be connected with the Internet through the PDP connection in the dial-up network type according to the network card information. According to the network connection switching method based on the mobile phone hot spots and the mobile phone, when the network sharing service of the terminal is received, the network connection type can be automatically switched to the proper PDP connection in the dial-up network type, and convenience is brought to users.

Description

A kind of network connection switching method and mobile phone based on the mobile phone focus
Technical field
The present invention relates to field of mobile terminals, in particular a kind of network connection switching method and mobile phone based on the mobile phone focus.
Background technology
The Android(Android) is existing intelligent mobile terminal operating system commonly used, must pass through PDP (packet data protocol) based on the Android mobile phone of WCDMA network and connect and could surf the Net, and the PDP connection need be set up according to some APN (access points).The APN of mobile phone has default (acquiescence), dun (Dial-up Network), mms polytypes such as (multimedia messages).Acquiescence was used the APN of default type when the PDP that the Android mobile phone is set up connected, so the APN of the application programs of moving on the Android mobile phone such as browser by the default type is connected to the internet.
(network is shared or is cried mobile phone portable focus starting the Tethering focus based on the Android mobile phone of WCDMA network, being mobile phone is shared with the function that other-end uses with its function of surfing the Net, for example USB binds or portable WLAN focus) when serving, other terminal can connect the Android mobile phone by this Tethering focus, and by giving tacit consent to PDP connection (what call is the APN setting of the default type) online of setting up on this Android mobile phone, but connect the APN that use the dun type and arrange by surf the Net only PDP of Tethering hotspot service, prior art needs the user manually to arrange, and has brought many inconvenience to the user.
Therefore, prior art has yet to be improved and developed.
Summary of the invention
The technical problem to be solved in the present invention is, above-mentioned defective at prior art, a kind of network connection switching method based on the mobile phone focus and mobile phone are provided, be intended to when handset starting network share service, the default type PDP that the application program of this mobile phone can be set up from the network connection acquiescence automatically connects the PDP that switches to the shared only dun type of network and connects, for the user provides convenience.
The technical scheme that technical solution problem of the present invention adopts is as follows:
A kind of network connection switching method based on the mobile phone focus wherein, comprises step:
The network share service of A, starting hand-set, reception is by the network connecting request of the network share service of the terminal transmission of this surfing Internet with cell phone;
B, when receiving described network connecting request, the PDP that control disconnects this mobile phone default type connects, the interface that network corresponding in this mobile phone is shared is configured, and the PDP of a newly-built Dial-up Network type connects;
C, after the PDP of described Dial-up Network type successful connection, dispose DNS and the route of this connection, and obtain the network interface card information of the PDP connection of this Dial-up Network type, and control described terminal by the PDP connection online of described Dial-up Network type according to described network interface card information.
Described network connection switching method based on the mobile phone focus wherein, also comprises step D:
When closing the network share service of mobile phone, the PDP that control disconnects described Dial-up Network type connects, and the PDP that internetwork connection mode is switched to this cell phone system default type connects.
Described network connection switching method based on the mobile phone focus, wherein, the PDP step of connecting of setting up a Dial-up Network type among the described step B specifically comprises:
B1, read the sign of corresponding operator from described cell phone system attribute, described sign comprises national code and the network No. of operator, and according to the sign of described operator, obtains all APN information of this operator from the database of described cell phone system correspondence;
B2, the described APN information of traversal judge whether to exist the APN of Dial-up Network type; When being, enter step B3; When not, then use the PDP of the APN of cell phone system default type to connect;
B3, judge whether connection status that the PDP of the APN of cell phone system default type connects connects and finish that finish if connect, the PDP that then disconnects the APN of cell phone system default type connects, the PDP of a newly-built Dial-up Network type connects; If it is after connection is finished, to carry out aforesaid operations again that connection status, then is deferred to described connection status for connecting.
Described network connection switching method based on the mobile phone focus wherein, also comprises between described step B and the step C:
Step C0, the cell phone network share service is arranged, it comprises: start IP address forwarding capability, the dns server address that network share service assignable IP address is set and the network share service is set.
Described network connection switching method based on the mobile phone focus, wherein, obtain the network interface card information that the PDP of this Dial-up Network type connects among the described step C, and control the step that the PDP of described terminal by described Dial-up Network type connect online according to described network interface card information and comprise:
C21, from the routing iinformation of the dns server address correspondence of described mobile phone, get access to the network interface card information that the PDP of described Dial-up Network type connects;
C22, start NAT network address translation function according to described network interface card information, connect and surf the Net to control the PDP of described terminal by described Dial-up Network type.
A kind of mobile phone that adopts described network connection switching method based on the mobile phone focus wherein, comprising:
The request receiver module for the network share service of starting hand-set, receives the network connecting request of the network share service of the terminal transmission of passing through this surfing Internet with cell phone;
The control handover module is used for when receiving described network connecting request, and the PDP that control disconnects this mobile phone default type connects, and the interface that network corresponding in this mobile phone is shared is configured, and the PDP of a newly-built Dial-up Network type connects;
The configuration link block, be used for after the PDP of described Dial-up Network type successful connection, dispose DNS and the route of this connection, and obtain the network interface card information of the PDP connection of this Dial-up Network type, and control described terminal by the PDP connection online of described Dial-up Network type according to described network interface card information.
Described mobile phone wherein, also comprises:
Recover the acquiescence module, be used for when closing the network share service of mobile phone, the PDP that control disconnects described Dial-up Network type connects, and the PDP that internetwork connection mode is switched to this cell phone system default type connects.
Described mobile phone wherein, comprises with lower unit in the described control handover module:
The APN information acquisition unit, from described cell phone system attribute, read the sign of corresponding operator, described sign comprises national code and the network No. of operator, and according to the sign of described operator, from the database of described cell phone system correspondence, obtain all APN information of this operator;
Judge type units, travel through described APN information, judge whether to exist the APN of Dial-up Network type; When being, enter step B3; When not, then use the PDP of the APN of cell phone system default type to connect;
The type switch unit judges whether connection status that the PDP of the APN of cell phone system default type connects connects to finish that finish if connect, the PDP that then disconnects the APN of cell phone system default type connects, and the PDP of a newly-built Dial-up Network type connects; If it is after connection is finished, to carry out aforesaid operations again that connection status, then is deferred to described connection status for connecting.
Described mobile phone, wherein, described system also comprises with lower unit:
The network share service arranges the unit, is used for the cell phone network share service is arranged, and it comprises, starts IP address forwarding capability; The dns server address that network share service assignable IP address is set and the network share service is set.
Described mobile phone, wherein, described configuration link block also comprises:
The inquiry subelement is used for obtaining the network interface card information that the PDP of described Dial-up Network type connects from the routing iinformation of the dns server address correspondence of described correspondence;
The control subelement is used for starting NAT network address translation function according to described network interface card information, to control described terminal by the PDP connection online of described Dial-up Network type.
Beneficial effect: a kind of network connection switching method and mobile phone based on the mobile phone focus provided by the present invention, when this mobile phone when carrying out the network share service, it can be automatically connects the PDP that switches to the most suitable Dial-up Network type of network share service from the PDP of the APN of cell phone system default type and connects online, need not the user and manually arrange, provide users with the convenient.
Description of drawings
Fig. 1 is the flow chart of a kind of network connection switching method based on the mobile phone focus provided by the invention.
The flow chart that Fig. 2 connects for the PDP that sets up a Dial-up Network type in a kind of network connection switching method based on the mobile phone focus provided by the invention.
Fig. 3 is the flow chart of the best applications embodiment of a kind of network connection switching method based on the mobile phone focus provided by the invention.
Fig. 4 is the theory structure block diagram of a kind of mobile phone provided by the invention.
Fig. 5 is the theory structure block diagram of control handover module in a kind of mobile phone provided by the invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, clear and definite, below develop simultaneously with reference to accompanying drawing that the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein only in order to explaining the present invention, and be not used in restriction the present invention.
See also Fig. 1, Fig. 1 is a kind of network connection switching method flow chart of steps based on the mobile phone focus of the present invention.In the present embodiment, said method comprising the steps of:
The network share service of S1, starting hand-set, reception is by the network connecting request of the network share service of the terminal transmission of this surfing Internet with cell phone.
When starting the network share service function of mobile phone, other-end can insert this mobile phone by USB binding or WLAN focus, be modulator-demodulator with this mobile phone, send the request that connects network to this mobile phone, connect network with the network focus that provides by this mobile phone, and, use the APN of default type to set up PDP connection online by default.
S2, when receiving described network connecting request, the PDP that control disconnects this cell phone system default type connects, the interface that network corresponding in this cell phone system is shared is configured, and the PDP of a newly-built Dial-up Network type connects.
When cell phone system received the network connecting request of the network share service that other-end sends, the PDP that disconnects the default type of cell phone system acquiescence earlier connected, and the PDP of a newly-built Dial-up Network type (dun type) connects.
Concrete, the Android mobile phone that is preferably based on the WCDMA network in the present embodiment is example, be illustrated in figure 2 as the flow chart of the PDP connection that a Dial-up Network type is provided in a kind of network connection switching method based on the mobile phone focus that provides, the PDP of a newly-built Dial-up Network type connects and comprises following steps:
S201, read the sign of corresponding operator from described cell phone system attribute, described sign comprises national code and the network No. of operator, and according to the sign of described operator, obtains all APN information of this operator from the database of described cell phone system correspondence.
S202, traversal all APN information in the cell phone system judge whether to exist the APN of Dial-up Network type; When being, enter step S204; When not, enter step S203.
The PDP of the APN of S203, use cell phone system default type connects the network share service of carrying out other portable terminals.
S204, judge whether the connection status that the PDP of the APN of cell phone system default type connects is in connecting, to finish if connect, and then enters step S205, otherwise enters step S206.
The PDP of the APN of S205, disconnection cell phone system default type connects, and the PDP of a newly-built Dial-up Network type connects.
S206, be deferred to described connection status for connect finish after, carry out the operation of handover network connection type again.
Described network connection switching method based on the mobile phone focus wherein, also comprises between described step S2 and the step S3:
Step 23, the cell phone network share service is arranged, it comprises:
1) starts IP address forwarding capability;
2) the assignable IP of network share service address is set;
3) dns server address of network share service is set.
S3, after the PDP of described Dial-up Network type successful connection, dispose DNS and the route of this connection, and obtain the network interface card information of the PDP connection of this Dial-up Network type, and control described terminal by the PDP connection online of described Dial-up Network type according to described network interface card information.
DNS and route that the PDP of described configuration Dial-up Network type connects specifically comprise:
Step 311, repeat above-mentioned steps S201-S204, judge whether to exist the APN of Dial-up Network type, if do not exist the PDP that then uses the cell phone system default type to connect, if exist then carry out step 312;
Step 312, the PDP of described newly-built Dial-up Network type is connected the configuration dns server;
Step 313, the PDP of described newly-built Dial-up Network type is connected the configuration route.
Concrete, in the network interface card information of the PDP connection of obtaining this Dial-up Network type described in the above-mentioned steps S3, and to control described terminal according to described network interface card information and surf the Net by the PDP connection of described Dial-up Network type, concrete steps comprise:
Step 321, from the routing iinformation of the dns server address correspondence of described mobile phone, get access to the network interface card information that the PDP of described Dial-up Network type connects;
Step 322, start NAT network address translation function according to described network interface card information, connect and surf the Net to control the PDP of described terminal by described Dial-up Network type.
With concrete Application Example said method is described in detail below.
As shown in Figure 3, be example with the Android4.0 system, wherein the Tethering.java file of Android system and the code of ConnectivityService.java file are made amendment to mobile phone in the present embodiment, to realize that the terminal that inserts cell phone network share service (that is to say the Tethering focus) can connect online by the PDP of dun type, specific implementation process comprises:
S01, at first receive to insert the request of the connection network that the terminal of this mobile phone sends, and finish configuration and the interpolation of corresponding interface.Specifically comprise step S11-S14.
S11, when receiving the user instruction of starting hand-set network share service, the TetherInterfaceSM state machine of Android 4.0 systems enters the InitialState state, with the request (be CMD_TETHER_REQUESTED) of reception by the connection network of the terminal transmission of this surfing Internet with cell phone, when receiving described request, send the message CMD_TETHER_MODE_REQUESTED of affirmation connection type to the TetherMasterSM state machine of system; Described TetherInterfaceSM state machine enters the StartingState state.
S12, after entering StartingState, (the Usb interface is rndis to interface corresponding in this cell phone system, the WIFI interface is wlan) be configured, namely call the attribute of NetworkManagementService.setInterfaceConfig configuration Tethering interface.Interface rndis with the USB binding is example: by calling the corresponding interface of configureUsbIface () function configuration, specific instructions is: interface setcfg rndis0 192.168.42.129 24 [up broadcast multicast].After the success of configuration Tethering interface attributes, described TetherInterfaceSM state machine enters the TetheredState state.
S13, enter the TetheredState state after, the information of preserving the Tethering interface of described configuration is added described tethering interface by calling NetworkManagementService.tetherInterface ().Interface rndis with the USB binding is example, and the specific instructions that adds interface is: tether interface add rndis0.
After S14, the described tethering interface success of interpolation, described TetherInterfaceSM state machine waits for that described TetherMasterSM returns the network interface card information of the PDP connection of dun type.
Also have process shown in the S02 among Fig. 3 with described process S01 carries out simultaneously, the TetherMasterSM state machine of system enters the InitialState state when the cell phone network share service is opened, prepare to set up the PDP connection of dun type.Specifically comprise step S21-S25.
S21, when receiving the CMD_TETHER_MODE_REQUESTED message that TetherInterfaceSM sends under the InitialState state, described TetherMasterSM state machine enters the TetherModeAliveState state.
S22, in the TetherModeAliveState state, calls the PDP that the chooseUpstreamType function disconnects earlier default type APN and connect, and the PDP that sets up a dun type connects.
The concrete steps that the PDP of a newly-built dun type connects in above-mentioned steps S22 are:
(1). read operator sign MCC+MNC, the i.e. national code+network No. of operator from system property;
(2). according to the sign of this operator, from the database table Carriers that storage APN arranges, obtain all APN of this operator;
(3). the APN that acquisition is read in circulation arranges, and judges whether the APN into the dun type;
(4). the if there is no APN of dun type, the PDP that keeps Android4.0 system default type connects, and namely uses the PDP of the default type APN of acquiescence to connect and offers the online of Tethering hotspot service;
(5) if. have the APN of dun type, judge whether the connection status of current Default APN is CONNECTING.If not, the PDP that disconnects the default type earlier connects, and the PDP of newly-built dun type APN connects then;
(6): if the connection status of current Default APN is CONNECTING.Then time-delay sends CMD_RETRY_UPSTREAM message, carries out the switching that PDP connects again after receiving message.
It is emphasized that: if the connection status of current Default APN is CONNECTING (namely connecting), carrying out the disconnection of this PDP connection this moment can fail, therefore will postpone a period of time, wait the PDP connection of Default APN to finish, namely connection status becomes CONNECTED.The disconnection of carrying out this PDP connection this moment again just can be successful.
S23, in the TetherModeAliveState state, call the network share service (Tethering focus) of turnOnMasterTetherSettings function setup correspondence, specifically comprise:
(1). start ip address forwarding capability by calling NetworkManagementService.setIpForwardingEnabled (), order to be: ipfwd enable;
(2). call NetworkManagementService.startTethering () the assignable ip of Tethering focus address is set, order to be: tether start 192.168.42.2 192.168.42.254
(3). call the dns server address that NetworkManagementService.setDnsForwarders () arranges the Tethering focus, order to be: tether dns set 8.8.8.8 8.8.4.4.
S24, when the PDP of described dun type connect set up successfully after, after the PDP connection of dun type is set up successfully, DNS (domain name resolution server) and the route (route) of this connection of configuration in the connectivityService.hanleConnectivityChange () function.
S25, TetherModeAliveState state receive CMD_UPSTREAM_CHANGED message, call the chooseUpstreamType function again, return the relevant information that described dun type PDP connects to described TetherInterfaceSM state machine.Be specially, logical chooseUpstreamType function obtains the network interface card information that described dun type PDP connects, and crosses message CMD_TETHER_CONNECTION_CHANGED then and sends described network interface card information to described TetherInterfaceSM.
S03, when described TetherInterfaceSM obtains described network interface card information under the TetheredState state, call function NetworkManagementService.enableNat () starts NAT network address translation function.Interface rndis with USB binding focus is example, namely sends order: nat enable rndis0 rmnet0 2 fe80: :/64 192.168.42.0/24.And then make described terminal connect online by the PDP of described dun type.
At last, when Android system finishing Tethering hotspot service,, the PDP connection is switched back, the PDP that is about to disconnect the PDP connection of newly-built dun type APN and rebuild default type APN connects.
1). the TetherMasterSM state machine can withdraw from the TetherModeAliveState state during system finishing Tethering hotspot service.
When 2) the .TetherModeAliveState state withdrawed from, cell phone system meeting call function turnOffUpstreamMobileConnection () interrupted current PDP and connects.The PDP that namely interrupts we newly-built dun type APN connects.
3). the PDP that rebuilds default type APN connects, thereby the PDP of the default type APNA that uses when making mobile telephone system recovery arrive common online connects.
And, based on similar principle, except the mobile phone of Android4.0 system, the method for network connection based on the cell phone network share service of above-described embodiment can be transplanted in the mobile phone of other operating systems.
Therefore, a kind of network connection switching method based on the mobile phone focus by the above embodiment of the present invention, can be when the cell phone network share service be opened, the PDP that sets up a dun type connects, and makes the terminal that connects this mobile phone to connect online by the PDP of dun type.When the terminal that connects this mobile phone is interrupted network share service with this mobile phone, the PDP of cell phone system default type connected online when this mobile phone returned to common the online, be that the Android mobile phone uses the PDP of default type APN to connect when common online, when acceptance is shared with the other-end network, the PDP that system can automatically switch to only dun type connects, need not the user and manually arrange, provide users with the convenient.
Based on above-described embodiment, the present invention also provides a kind of mobile phone that adopts the method for network connection based on the cell phone network share service described above, is illustrated in figure 4 as the theory structure block diagram of described mobile phone, wherein, comprising:
Request receiver module 10 for the network share service of starting hand-set, receives the network connecting request of the network share service of the terminal transmission of passing through this surfing Internet with cell phone;
Control handover module 20 is used for when receiving described network connecting request, and the PDP that control disconnects this mobile phone default type connects, and the interface that network corresponding in this mobile phone is shared is configured, and the PDP of a newly-built Dial-up Network type connects;
Configuration link block 30, be used for after the PDP of described Dial-up Network type successful connection, dispose DNS and the route of this connection, and obtain the network interface card information of the PDP connection of this Dial-up Network type, and control described terminal by the PDP connection online of described Dial-up Network type according to described network interface card information.
Described mobile phone wherein, also comprises:
Recover the acquiescence module, be used for when closing the network share service of mobile phone, the PDP that control disconnects described Dial-up Network type connects, and the PDP that internetwork connection mode is switched to this cell phone system default type connects.
Described mobile phone wherein, as shown in Figure 5, comprises with lower unit in the described control handover module:
APN information acquisition unit 21, from described cell phone system attribute, read the sign of corresponding operator, described sign comprises national code and the network No. of operator, and according to the sign of described operator, from the database of described cell phone system correspondence, obtain all APN information of this operator;
Judge type units 22, travel through described APN information, judge whether to exist the APN of Dial-up Network type; When being, enter step B3; When not, then use the PDP of the APN of cell phone system default type to connect;
Type switch unit 23 judges whether connection status that the PDP of the APN of cell phone system default type connects connects to finish that finish if connect, the PDP that then disconnects the APN of cell phone system default type connects, and the PDP of a newly-built Dial-up Network type connects; If it is after connection is finished, to carry out aforesaid operations again that connection status, then is deferred to described connection status for connecting.
Described mobile phone, wherein, described system also comprises with lower unit:
The network share service arranges the unit, is used for the cell phone network share service is arranged, and it comprises, starts IP address forwarding capability; The dns server address that network share service assignable IP address is set and the network share service is set.
Described mobile phone, wherein, described configuration link block also comprises:
The inquiry subelement is used for obtaining the network interface card information that the PDP of described Dial-up Network type connects from the routing iinformation of the dns server address correspondence of described correspondence;
The control subelement is used for starting NAT network address translation function according to described network interface card information, to control described terminal by the PDP connection online of described Dial-up Network type.
Corresponding one by one with the function in the said method step because of the function in the above-mentioned module, do not repeat them here.
In sum, a kind of network connection switching method and mobile phone based on the mobile phone focus provided by the present invention, by when the network share service of mobile phone is opened, when receiving the network connecting request of the network share service that other-end sends, the PDP that can interrupt this cell phone system default type automatically connects, the PDP that sets up a dun type for the terminal of this mobile phone connects, and makes described terminal to connect online by the PDP of this dun type; When mobile phone interrupt network share service state, the PDP that newly-built dun type can be interrupted automatically in system connects, recover the PDP of cell phone system default type, whether the network connection type of the network share service of this mobile phone can carry out network with this mobile phone according to other-end shares automatically and switches, need not the user and manually arrange, provide users with the convenient.
Should be understood that application of the present invention is not limited to above-mentioned giving an example, for those of ordinary skills, can be improved according to the above description or conversion that all these improvement and conversion all should belong to the protection range of claims of the present invention.

Claims (10)

1. the network connection switching method based on the mobile phone focus is characterized in that, comprises step:
The network share service of A, starting hand-set, reception is by the network connecting request of the network share service of the terminal transmission of this surfing Internet with cell phone;
B, when receiving described network connecting request, the PDP that control disconnects this mobile phone default type connects, the interface that network corresponding in this mobile phone is shared is configured, and the PDP of a newly-built Dial-up Network type connects;
C, after the PDP of described Dial-up Network type successful connection, dispose DNS and the route of this connection, and obtain the network interface card information of the PDP connection of this Dial-up Network type, and control described terminal by the PDP connection online of described Dial-up Network type according to described network interface card information.
2. according to the described network connection switching method based on the mobile phone focus of claim 1, it is characterized in that, also comprise step D:
When closing the network share service of mobile phone, the PDP that control disconnects described Dial-up Network type connects, and the PDP that internetwork connection mode is switched to this cell phone system default type connects.
3. according to the described network connection switching method based on the mobile phone focus of claim 1, it is characterized in that the PDP step of connecting of setting up a Dial-up Network type among the described step B specifically comprises:
B1, read the sign of corresponding operator from described cell phone system attribute, described sign comprises national code and the network No. of operator, and according to the sign of described operator, obtains all APN information of this operator from the database of described cell phone system correspondence;
B2, the described APN information of traversal judge whether to exist the APN of Dial-up Network type; When being, enter step B3; When not, then use the PDP of the APN of cell phone system default type to connect;
B3, judge whether connection status that the PDP of the APN of cell phone system default type connects connects and finish that finish if connect, the PDP that then disconnects the APN of cell phone system default type connects, the PDP of a newly-built Dial-up Network type connects; If it is after connection is finished, to carry out aforesaid operations again that connection status, then is deferred to described connection status for connecting.
4. according to the described network connection switching method based on the mobile phone focus of claim 1, it is characterized in that, also comprise between described step B and the step C:
Step C0, the cell phone network share service is arranged, it comprises, starts IP address forwarding capability; The dns server address that network share service assignable IP address is set and the network share service is set.
5. according to the described network connection switching method based on the mobile phone focus of claim 1, it is characterized in that, obtain the network interface card information that the PDP of this Dial-up Network type connects among the described step C, and control the step that the PDP of described terminal by described Dial-up Network type connect online according to described network interface card information and comprise:
C21, from the routing iinformation of the dns server address correspondence of described mobile phone, get access to the network interface card information that the PDP of described Dial-up Network type connects;
C22, start NAT network address translation function according to described network interface card information, connect and surf the Net to control the PDP of described terminal by described Dial-up Network type.
6. a mobile phone that adopts the described network connection switching method based on the mobile phone focus of claim 1 is characterized in that, comprising:
The request receiver module for the network share service of starting hand-set, receives the network connecting request of the network share service of the terminal transmission of passing through this surfing Internet with cell phone;
The control handover module is used for when receiving described network connecting request, and the PDP that control disconnects this mobile phone default type connects, and the interface that network corresponding in this mobile phone is shared is configured, and the PDP of a newly-built Dial-up Network type connects;
The configuration link block, be used for after the PDP of described Dial-up Network type successful connection, dispose DNS and the route of this connection, and obtain the network interface card information of the PDP connection of this Dial-up Network type, and control described terminal by the PDP connection online of described Dial-up Network type according to described network interface card information.
7. mobile phone according to claim 6 is characterized in that, also comprises:
Recover the acquiescence module, be used for when closing the network share service of mobile phone, the PDP that control disconnects described Dial-up Network type connects, and the PDP that internetwork connection mode is switched to this cell phone system default type connects.
8. mobile phone according to claim 6 is characterized in that, comprises with lower unit in the described control handover module:
The APN information acquisition unit, from described cell phone system attribute, read the sign of corresponding operator, described sign comprises national code and the network No. of operator, and according to the sign of described operator, from the database of described cell phone system correspondence, obtain all APN information of this operator;
Judge type units, travel through described APN information, judge whether to exist the APN of Dial-up Network type; When being, enter step B3; When not, then use the PDP of the APN of cell phone system default type to connect;
The type switch unit judges whether connection status that the PDP of the APN of cell phone system default type connects connects to finish that finish if connect, the PDP that then disconnects the APN of cell phone system default type connects, and the PDP of a newly-built Dial-up Network type connects; If it is after connection is finished, to carry out aforesaid operations again that connection status, then is deferred to described connection status for connecting.
9. mobile phone according to claim 6 is characterized in that, described system also comprises with lower unit:
The network share service arranges the unit, is used for the cell phone network share service is arranged, and it comprises, starts IP address forwarding capability; The dns server address that network share service assignable IP address is set and the network share service is set.
10. mobile phone according to claim 6 is characterized in that, described configuration link block also comprises:
The inquiry subelement is used for obtaining the network interface card information that the PDP of described Dial-up Network type connects from the routing iinformation of the dns server address correspondence of described correspondence;
The control subelement is used for starting NAT network address translation function according to described network interface card information, to control described terminal by the PDP connection online of described Dial-up Network type.
CN201310211387.0A 2013-05-31 2013-05-31 Network connection switching method based on mobile phone hot spots and mobile phone Expired - Fee Related CN103281799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310211387.0A CN103281799B (en) 2013-05-31 2013-05-31 Network connection switching method based on mobile phone hot spots and mobile phone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310211387.0A CN103281799B (en) 2013-05-31 2013-05-31 Network connection switching method based on mobile phone hot spots and mobile phone

Publications (2)

Publication Number Publication Date
CN103281799A true CN103281799A (en) 2013-09-04
CN103281799B CN103281799B (en) 2017-03-22

Family

ID=49064198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310211387.0A Expired - Fee Related CN103281799B (en) 2013-05-31 2013-05-31 Network connection switching method based on mobile phone hot spots and mobile phone

Country Status (1)

Country Link
CN (1) CN103281799B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104735667A (en) * 2015-03-23 2015-06-24 丁贤根 Mobile phone-borne wireless routing system for human body network
CN104753821A (en) * 2013-12-25 2015-07-01 ***通信集团公司 Network connection method, information feedback method, terminal and network access device
CN104902544A (en) * 2015-05-20 2015-09-09 北京展讯高科通信技术有限公司 Method and device for sharing hotspot device network
WO2016145800A1 (en) * 2015-08-11 2016-09-22 中兴通讯股份有限公司 Pdp connection establishing method and device
WO2016180109A1 (en) * 2015-10-21 2016-11-17 中兴通讯股份有限公司 Method and apparatus for extending transmission distance
CN106465160A (en) * 2016-07-27 2017-02-22 北京小米移动软件有限公司 Network function switching method and device
CN106792580A (en) * 2016-12-14 2017-05-31 深圳市万普拉斯科技有限公司 The method and apparatus for sending multimedia message
CN106973369A (en) * 2017-04-10 2017-07-21 深圳市万普拉斯科技有限公司 Method for sending color message, device, mobile terminal and computer-readable recording medium
CN107426746A (en) * 2016-05-24 2017-12-01 中兴通讯股份有限公司 The method and apparatus for identifying WIFI types

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025400A (en) * 2009-09-10 2011-04-20 周凯支 Method for directly networking mobile terminal equipment by utilizing Bluetooth technique and mobile phone
CN102111907A (en) * 2009-12-25 2011-06-29 康佳集团股份有限公司 Mobile terminal and method adopting same as wireless access point
US20120054353A1 (en) * 2010-08-26 2012-03-01 Samsung Electronics Co. Ltd. Wlan terminal supporting mobile infrastructure mode and method of providing tethering service of the same
CN103052170A (en) * 2012-12-21 2013-04-17 Tcl通讯(宁波)有限公司 Mobile phone network shared service-based network connection method and mobile phone

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025400A (en) * 2009-09-10 2011-04-20 周凯支 Method for directly networking mobile terminal equipment by utilizing Bluetooth technique and mobile phone
CN102111907A (en) * 2009-12-25 2011-06-29 康佳集团股份有限公司 Mobile terminal and method adopting same as wireless access point
US20120054353A1 (en) * 2010-08-26 2012-03-01 Samsung Electronics Co. Ltd. Wlan terminal supporting mobile infrastructure mode and method of providing tethering service of the same
CN103052170A (en) * 2012-12-21 2013-04-17 Tcl通讯(宁波)有限公司 Mobile phone network shared service-based network connection method and mobile phone

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104753821B (en) * 2013-12-25 2017-12-19 ***通信集团公司 A kind of method for connecting network, information feedback method, terminal and network access equipment
CN104753821A (en) * 2013-12-25 2015-07-01 ***通信集团公司 Network connection method, information feedback method, terminal and network access device
CN104735667A (en) * 2015-03-23 2015-06-24 丁贤根 Mobile phone-borne wireless routing system for human body network
CN104735667B (en) * 2015-03-23 2019-01-18 丁贤根 Mobile phone airborne wireless route system towards human body network
CN104902544A (en) * 2015-05-20 2015-09-09 北京展讯高科通信技术有限公司 Method and device for sharing hotspot device network
CN104902544B (en) * 2015-05-20 2018-11-16 北京展讯高科通信技术有限公司 A kind of method and device of hotspot device network sharing
WO2016145800A1 (en) * 2015-08-11 2016-09-22 中兴通讯股份有限公司 Pdp connection establishing method and device
CN106454963A (en) * 2015-08-11 2017-02-22 中兴通讯股份有限公司 Method and device for building PDP connection
WO2016180109A1 (en) * 2015-10-21 2016-11-17 中兴通讯股份有限公司 Method and apparatus for extending transmission distance
CN107426746A (en) * 2016-05-24 2017-12-01 中兴通讯股份有限公司 The method and apparatus for identifying WIFI types
WO2018018465A1 (en) * 2016-07-27 2018-02-01 北京小米移动软件有限公司 Method and apparatus for switching network functions
CN106465160A (en) * 2016-07-27 2017-02-22 北京小米移动软件有限公司 Network function switching method and device
CN106465160B (en) * 2016-07-27 2020-09-08 北京小米移动软件有限公司 Network function switching method and device
CN106792580A (en) * 2016-12-14 2017-05-31 深圳市万普拉斯科技有限公司 The method and apparatus for sending multimedia message
CN106792580B (en) * 2016-12-14 2020-09-11 深圳市万普拉斯科技有限公司 Method and device for sending multimedia message
CN106973369A (en) * 2017-04-10 2017-07-21 深圳市万普拉斯科技有限公司 Method for sending color message, device, mobile terminal and computer-readable recording medium
CN106973369B (en) * 2017-04-10 2021-03-02 深圳市万普拉斯科技有限公司 Multimedia message sending method, device, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN103281799B (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN103281799A (en) Network connection switching method based on mobile phone hot spots and mobile phone
CN108141724B (en) Virtual subscriber identity module for mobile communication device
CN109151807B (en) Method and system for binding main card and auxiliary card of dual-card dual-standby mobile terminal
WO2007033546A1 (en) Method for realizing one card with multiple numbers service
CN105338178A (en) Communication method and device based on dual-card dual-standby single-communication terminal
CN103052170B (en) A kind of method that network based on cell phone network share service connects and mobile phone
CN104902524A (en) Method for terminal to automatically switch data link and terminal
CN101801062B (en) The method of mobile terminal and this mobile terminal network visiting
CN103281797A (en) Mobile terminal and method of transmitting business data by same
CN106576227B (en) Method, device and system for conventional interconnection and intercommunication of DMR/PDT cluster and DMR/PDT
CN110324808A (en) Switching method, device and the mobile terminal of configuration file
CN103581889A (en) Method and system for automatically updating network configuration parameters
CN104125321B (en) A kind of contact details update method, device and system
CN102196449B (en) Wireless communication system and method for assigning physical-layer cell ID of base stations in wireless communication system
CN103369161B (en) Implementation method and system for communication by using intelligent roaming terminal
JP2005244463A (en) Call connection controller, management server, call connection control system and call connection control method
CN103582064A (en) Method and device for ensuring continuity of data service
CN103813395A (en) Method for moving seamlessly among different networks by terminal user, and wireless local area network optimization gateway (WOG)
CN102904879A (en) Dialing mobile terminal and dialing method thereof
CN105554724B (en) A kind of system of the seamless certification of roaming based on virtual SIM card
CN110505356B (en) Call establishment method and call establishment system
CN101437212B (en) Method and system for implementing IP multimedia subsystem dynamic telephone book business
JP7270845B2 (en) Mobile service access method, device, system, storage medium, electronic device
CN110493737B (en) Method and device for establishing three-party call
CN101494575B (en) Management method and proxy equipment for personal area network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170322