CN105357373A - Method and system for simultaneously using plurality of networks based on Android system - Google Patents

Method and system for simultaneously using plurality of networks based on Android system Download PDF

Info

Publication number
CN105357373A
CN105357373A CN201510648702.5A CN201510648702A CN105357373A CN 105357373 A CN105357373 A CN 105357373A CN 201510648702 A CN201510648702 A CN 201510648702A CN 105357373 A CN105357373 A CN 105357373A
Authority
CN
China
Prior art keywords
value
network
android system
logo file
mobile
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
CN201510648702.5A
Other languages
Chinese (zh)
Other versions
CN105357373B (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.)
Guangzhou Hi Target Surveying Instrument Co ltd
Original Assignee
广州中海达定位技术有限公司
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 广州中海达定位技术有限公司 filed Critical 广州中海达定位技术有限公司
Priority to CN201510648702.5A priority Critical patent/CN105357373B/en
Publication of CN105357373A publication Critical patent/CN105357373A/en
Application granted granted Critical
Publication of CN105357373B publication Critical patent/CN105357373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones
    • H04M1/72502Cordless telephones with one base station connected to a single line
    • H04M1/72505Radio link set-up procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a method and a system for simultaneously using a plurality of networks based on an Android system. The method comprises the following steps: pre-shielding a native mobile data network dialup driver positioned in an RIL (Radio Interface Layer) of the Android system; switching on a mobile data network connection according to an instruction, and modifying a value of a Flag file into a starting value; when the value of the Flag file is monitored to be the starting value, running a mobile network dialup program pre-installed on a Linux layer in order to acquire an IP (Internet Protocol) address of a current network; adding the IP address into a routing table; and establishing a Socket on an application layer according to the routing table in order to perform a mobile network connection. The customized mobile network dialup program is built in the Linux layer of the Android system. When a first instruction is received, the mobile data network connection is switched on, and the mobile network dialup program pre-installed in the Linux layer is directly run without any framework, so that a priority judgment mechanism of the framework can be avoided, and a mobile network and other network connection ways can be used simultaneously.

Description

Based on Android system Multi net voting and use method and system
Technical field
The present invention relates to intelligent terminal field, particularly relate to a kind of Multi net voting based on Android system and use method and system.
Background technology
Android system smart mobile phone on the market or panel computer, usual use wifi surfs the Net or Mobile data (comprises 3G, 4G, GPRS) mode connected, wifi is connected with Mobile data and can only chooses one of two, and the default priority that wifi connects is higher, when namely opening mobile data services and wifi function at the same time, Android system can judge to identify and default priority uses wifi online, and these two data link cannot be made to exist simultaneously and use simultaneously, the result caused like this cannot realize some Android layer application (as web browser) to use wifi connection to surf the Net and some other application use Mobile data flow business online simultaneously.
Based on point-to-point protocol (PointtoPointProtoco, PPP) dial-up access is current permission ISP (InternetServiceProvider, i.e. ISP) network access mode that provides, for broadband dialing such as ADSL, access service completes primarily of PPPoE (PPPoverEthernet).PPPoE agreement is agreement PPP frame being encapsulated in ethernet frame.Ppp protocol is the point-to-point communication protocol for being communicated with one another by telephone wire connection computer and server and formulated.Internet Service Provider can provide PPP to connect, the server of such provider just can respond the request of user, is sent on network, then the response on network is sent back to user's request receiving.
According to the layering of Android system, realize Mobile data flow business, need to be dialled up on the telephone by PPPoE, from the APP software of application layer (Applications), downwards need through ccf layer (Framework), Linux inner core (Kernel), hardware base band (Baseband), and PPPOE is in Linux layer, needs to carry out PPPOE by RIL user's abstract space of ccf layer between kernel according to some strategies and call.
The radio interface layer (RIL) of Android provides the level of abstraction between Android telephone service (android.telephony) and radio hardware.RIL is that communication has nothing to do, and provides the network support based on GSM.
The common flow process that dials up on the telephone of Android is through Android telephone service and sends relevant Request request by RIL layer to hardware communication module, first by Socket, the RILD finger daemon that order is sent to RIL layer is done respective handling from Java layer, the driver (as AT order) that process calls hardware communication module downwards carries out intercommunication with hardware, hardware is to command response, RIL obtains this Response and responds, realize data interaction, finally call the PPPOE script that dials up on the telephone and realize ppp Connection Service.
The open and close of Wifi first by the event of application triggers (such as user clicks and opens icon), then ccf layer is imported into, ccf layer starts wpa_supplicant, set up socket connection to communicate with wpa_supplicant simultaneously, comprise the control to wpa_supplicant and the passback result obtaining wpa_supplicant.But, because the WLAN0 connection of wifi is also in Linux layer, Android ccf layer has priority judgment mechanism, if wifi connects WLAN0 once set up, ccf layer can interrupt ppp0 and connects and keep WLAN0 to connect, cannot realize WLAN0 and ppp0 link to exist, the object done like this prevents user from using wifi online while, also consuming mobile network data traffic simultaneously simultaneously.
WLAN0 and the ppp0 link solving Linux layer exists simultaneously and Android application layer app software freely can distribute different data flow from which link walks, common way needs amendment Android ccf layer ril interface code, ccf layer recognize Linux layer set up simultaneously WLAN0 and ppp0 link in, do not give tacit consent to and ppp0 is cut off, and call java external command routing table is set.Because the design of Android ccf layer code structure is tight, amendment difficulty is comparatively large, and cannot keep the stability of ecosystem Android system layer after amendment, belongs to customized type system, inconvenience amendment usually.
Summary of the invention
Based on this, be necessary provide a kind of simple and realize Multi net voting and the Multi net voting based on Android system and use method and system.
Based on the Multi net voting also use method of Android system, comprising:
The mobile data network dialing being positioned at RIL layer shielding Android system in advance primary drives;
Netlisten script is run with the value of the Flag logo file in supervisory user space when Android system starts;
According to the first instruction, open the switch that mobile data network connects, and the value of the Flag logo file of described user's space is revised as initiation value;
When the value that described Netlisten script monitors described Flag logo file is initiation value, operation is pre-installed in mobile network's dial-up program of Linux layer to obtain the IP address of current network;
The IP address of described current network is added in the routing table of PPPoE data cube computation;
Socket socket is set up to carry out mobile network's connection in application layer according to described routing table.
Wherein in a kind of execution mode, the described Netlisten script that runs when Android system starts comprises with the step of the value of the Flag logo file in supervisory user space:
Run Netlisten script when Android system starts and whether have Flag logo file to detect user's space;
If nothing, then create Flag logo file, the value of described Flag logo file is set to close value and the value of real-time monitoring Flag logo file;
If have, then the value of the Flag logo file in real-time supervisory user space.
Wherein in a kind of execution mode, mobile network's dial-up program that Linux is installed in described operation in advance comprises with the step of the IP address obtaining current network:
Run the mobile network's dial-up program being pre-installed in Linux layer and inquire about hardware communication module to obtain the state of hardware;
When the hardware state obtained is normal, dialing obtains the IP address of current network.
Wherein in a kind of execution mode, also comprise: according to the second instruction, close the switch that mobile data network connects, and the value of the Flag logo file of described user's space is revised as close value;
When the value that described Netlisten script monitors described Flag logo file is close value, stop described mobile network's dialing process.
Wherein in a kind of execution mode, described according to the first instruction, open the switch that mobile data network connects, and before or after the value of the Flag logo file of described user's space is revised as the step of initiation value, also comprise:
According to the 3rd instruction, open the switch that WIFI network connects; And/or, according to the 4th instruction, open the switch that Ethernet connects;
Start wireless network linker at ccf layer and set up Socket socket to carry out the connection of WLANO network, and/or start Ethernet linker at ccf layer and set up Socket socket to carry out Ethernet connection.
Multi net voting based on Android system also uses system, comprising:
Shroud module, drives for the mobile data network dialing being positioned at RIL layer shielding Android system in advance primary;
Netlisten script, for running when Android system starts with the value of the Flag logo file in supervisory user space;
First starts module, for according to the first instruction, opens the switch that mobile data network connects, and the value of the Flag logo file of described user's space is revised as initiation value;
Mobile network's dial-up program, is pre-installed in Linux layer, for running when the value that described Netlisten script monitors described Flag logo file is initiation value with the IP address obtaining current network;
Routing table, for adding in the routing table of PPPoE data cube computation by the IP address of described current network;
First communication module, for setting up Socket socket to carry out mobile network's connection according to described routing table in application layer.
Wherein in a kind of execution mode, described Netlisten script specifically for, whether run Netlisten script has Flag logo file when Android system starts to detect user's space; If nothing, then create Flag logo file, the value of described Flag logo file is set to close value and the value of real-time monitoring Flag logo file; If have, then the value of the Flag logo file in real-time supervisory user space.
Wherein in a kind of execution mode, described mobile network's dial-up program, specifically comprises:
Query unit, for inquiring about hardware communication module to obtain the state of hardware;
Dialing unit, when the hardware state obtained is normal, dialing obtains the IP address of current network.
Wherein in a kind of execution mode, also comprise:
Closing module, for according to the second instruction, closes the switch that mobile data network connects, and the value of the Flag logo file of described user's space is revised as close value;
Stop module, for when the value that described Netlisten script monitors described Flag logo file is close value, stop described mobile network's dialing process.
Wherein in a kind of execution mode, also comprise:
Second starts module, for according to the 3rd instruction, opens the switch that WIFI network connects; And/or the 3rd starts module, for according to the 4th instruction, open the switch that Ethernet connects;
Second communication module, for starting wireless network linker at ccf layer and setting up Socket socket to carry out the connection of WLANO network, and/or third communication module, for starting Ethernet linker at ccf layer and setting up Socket socket to carry out Ethernet connection.
Because this self-defining mobile network's dial-up program is embedded in the Linux layer of Android system, when receiving the first instruction, open the switch that mobile data network connects, directly run the mobile network's dial-up program being pre-installed in Linux layer, without the need to via ccf layer.Therefore, it is possible to avoid the priority judgment mechanism of ccf layer.When Android system is when using mobile data network to connect, when starting WIFI connected mode or other interconnection network connected mode, the priority avoiding ccf layer due to mobile network's link judges, therefore, it is possible to realize mobile network and other internetwork connection mode and use.The method without the need to revising Android ccf layer code structure, therefore, this realize Multi net voting and method simple and the stability that Android system runs can be ensured.
Accompanying drawing explanation
Fig. 1 is a kind of Multi net voting based on Android system of execution mode and the flow chart of use method;
Fig. 2 is a kind of workflow diagram of Netlisten script of execution mode;
Fig. 3 is a kind of workflow diagram of mobile network's dial-up program of execution mode;
Fig. 4 is the Multi net voting based on Android system of another kind of execution mode and the flow chart of use method;
Fig. 5 be a kind of execution mode mobile network with and net or WIFI and schematic flow sheet;
Fig. 6 is that a kind of Multi net voting based on Android system of execution mode is also with the module diagram of system.
Embodiment
As shown in Figure 1, based on the Multi net voting also use method of Android system, comprise the following steps:
S101: the mobile data network dialing being positioned at RIL layer shielding Android system in advance primary drives.
Android system primary mobile data network dialing drive do not support Multi net voting and use, for realizing the Multi net voting of Android system and using, the primary mobile network being positioned at RIL layer of Android system need be shielded to dial driving, be specially, remove/system/lib/librefernce-ril.so file, this so library file is used for the application layer docking driver of hardware module and the calling of PPPoE dial-up connection of Android system.
S102: run Netlisten script when Android system starts with the value of the Flag logo file in supervisory user space.
Android system acquiescence when starting loads Service, automatically runs Netlisten script with the value of the Flag logo file in supervisory user space.In a particular embodiment, the value of Flag logo file comprises ON and OFF.When the switch that mobile data network connects is opening, the value of the Flag logo file of user's space is ON, is initiation value; When the switch that mobile data network connects is closed condition, the value of the Flag logo file of user's space is OFF, is close value.
S105: according to the first instruction, opens the switch that mobile data network connects, and the value of the Flag logo file of user's space is revised as initiation value.
In a particular embodiment, " Mobile data " that first instruction can click Android system for user releases the button, in other embodiments, also can for starting a certain application program, the internetwork connection mode of this application program acquiescence is that mobile data network connects, such as, in automatic steering control of farm mechanism system, need to connect background server by mobile 3G network and obtain base station data, the internetwork connection mode mobile data network of this navigation system setting connects, while opening this application program, open the switch of " Mobile data ".According to this first instruction, open the switch that mobile data network connects, meanwhile, the value of the Flag logo file of user's space is revised as initiation value, initiation value is ON.
S107: when the value that Netlisten script monitors Flag logo file is initiation value, operation is pre-installed in mobile network's dial-up program of Linux layer to obtain the IP address of current network.
This self-defining mobile network dial-up program/etc/ppp/pppd can use C language to edit, and is embedded into the Linux layer of Android system, completes dialing with the IP address obtaining current network by self-defining mobile dial program.In a particular embodiment, the shell script that need use that dials can be gprs-connect-chat, chap-secrets etc.
S109: the IP address of current network is added in the routing table of PPPoE data cube computation.
After the successful connection of mobile network's dial-up program, the IP address of the current network of acquisition is added in the routing table of ppp0 data cube computation.
S111: set up Socket socket to carry out mobile network's connection in application layer according to routing table.
According to routing table, set up Socket socket to carry out mobile network's connection in application layer, set up TCP by mobile data network with the background server of application program or UDP message is connected row data communication of going forward side by side.
Because this self-defining mobile network's dial-up program is embedded in the Linux layer of Android system, when receiving the first instruction, open the switch that mobile data network connects, directly run the mobile network's dial-up program being pre-installed in Linux layer, without the need to via ccf layer.Therefore, it is possible to avoid the priority judgment mechanism of ccf layer.When Android system is when using mobile data network to connect, when starting WIFI connected mode or other interconnection network connected mode, the priority avoiding ccf layer due to mobile network's link judges, therefore, it is possible to realize mobile network and other internetwork connection mode and use.The method without the need to revising Android ccf layer code structure, therefore, this realize Multi net voting and method simple and the stability that Android system runs can be ensured.
In another embodiment, step S103 specifically comprises:
S1031: whether run Netlisten script has Flag logo file to detect user's space when Android system starts.
If nothing, then perform step S1032: create Flag logo file, the value of Flag logo file is set to close value and the value of real-time monitoring Flag logo file.
If have, then perform step S1033: the value of the Flag logo file in supervisory user space in real time.
When the value that Netlisten script monitors Flag logo file is initiation value, step S107 specifically comprises:
S1071: run the mobile network's dial-up program being pre-installed in Linux layer and inquire about hardware communication module to obtain the state of hardware.
S1073: when the hardware state obtained is normal, dialing obtains the IP address of current network.
In another embodiment, after step S111, also comprise:
S113: according to the second instruction, closes the switch that mobile data network connects, and the value of the Flag logo file of user's space is revised as close value.
In a particular embodiment, second instruction can click " Mobile data " X button of Android system for user, in other embodiments, also can for closing a certain application program, the internetwork connection mode of this application program acquiescence is that mobile data network connects, such as, in automatic steering control of farm mechanism system, need to connect background server by mobile 3G network and obtain base station data, the internetwork connection mode mobile data network of this navigation system setting connects, while closing this application program, close the switch of " Mobile data ".According to this second instruction, close the switch that mobile data network connects, meanwhile, the value of the Flag logo file of user's space is revised as close value, close value is OFF.
When the value that Netlisten script monitors Flag logo file is close value, perform step S115: kill mobile network's dialing process.
In another embodiment, based on the Multi net voting also use method of Android system, can realize mobile data network connect is connected and use with WIFI, or realize mobile data network connect be connected and use with Ethernet, or realize mobile data network connection, WIFI connection and Ethernet connect and use.
Concrete, before or after step S105, also comprise:
S1061: according to the 3rd instruction, opens the switch that WIFI network connects; And/or, according to the 4th instruction, open the switch that Ethernet connects.
S1062: start wireless network linker at ccf layer and set up Socket socket to carry out the connection of WLANO network, and/or start Ethernet linker at ccf layer and set up Socket socket to carry out Ethernet connection.
3rd instruction, be specially " WIFI " that user clicks Android system to release the button, according to the 3rd instruction, the WIFI opening Android system releases the button and connects the wifi hotspot of needs, now can there are WLAN0 and ppp0 two communication links in linux bottom simultaneously, App application is now selected the IP address being connected the ECU being in same local area network (LAN) with wifi to set up socket to connect, be defaulted as the data link of use WLAN0.
4th instruction, be specially " Ethernet " that user clicks Android system to release the button, according to the 4th instruction, the Ethernet opening Android system is released the button and carries out network connection by Ethernet, now linux bottom can exist simultaneously ppp0 with and net two communication links, App application is now selected the IP address being connected the ECU being in same local area network (LAN) with Ethernet to set up socket to connect, be defaulted as the data link of use ether.
When " WIFI " of Android system release the button and " Ethernet " release the button be all open mode time, ppp0, WLAN0 and and net three communication links can be there are in linux bottom simultaneously.
Should based on the Multi net voting of Android system also use method, can realize two or three networks and use, this implementation method is simple, without the need to revising complicated Android ccf layer ril interface code.
The present invention also provides a kind of Multi net voting based on Android system and uses system, comprising:
Shroud module 100: the mobile data network dialing being positioned at RIL layer for shielding Android system in advance primary drives.
Android system primary mobile data network dialing drive do not support Multi net voting and use, for realizing the Multi net voting of Android system and using, the primary mobile network being positioned at RIL layer of Android system need be shielded to dial driving, be specially, remove/system/lib/librefernce-ril.so file, this so library file is used for the application layer docking driver of hardware module and the calling of PPPoE dial-up connection of Android system.
Netlisten script 101, for running when Android system starts with the value of the Flag logo file in supervisory user space.
Android system acquiescence when starting loads Service, automatically runs Netlisten script with the value of the Flag logo file in supervisory user space.In a particular embodiment, the value of Flag logo file comprises ON and OFF.When the switch that mobile data network connects is opening, the value of the Flag logo file of user's space is ON, is initiation value; When the switch that mobile data network connects is closed condition, the value of the Flag logo file of user's space is OFF, is close value.
First starts module 102, for according to the first instruction, opens the switch that mobile data network connects, and the value of the Flag logo file of user's space is revised as initiation value.
In a particular embodiment, " Mobile data " that first instruction can click Android system for user releases the button, in other embodiments, also can for starting a certain application program, the internetwork connection mode of this application program acquiescence is that mobile data network connects, such as, in automatic steering control of farm mechanism system, need to connect background server by mobile 3G network and obtain base station data, the internetwork connection mode mobile data network of this navigation system setting connects, while opening this application program, open the switch of " Mobile data ".According to this first instruction, open the switch that mobile data network connects, meanwhile, the value of the Flag logo file of user's space is revised as initiation value, initiation value is ON.
Mobile network's dial-up program 103, is pre-installed in Linux layer, runs when the value that Netlisten script monitors Flag logo file is initiation value with the IP address obtaining current network.
This self-defining mobile network dial-up program/etc/ppp/pppd can use C language to edit, and is embedded into the Linux layer of Android system, completes dialing with the IP address obtaining current network by self-defining mobile dial program.In a particular embodiment, the shell script that need use that dials can be gprs-connect-chat, chap-secrets etc.
Routing table 104, for adding to the IP address of current network in the routing table of PPPoE data cube computation.
After the successful connection of mobile network's dial-up program, the IP address of the current network of acquisition is added in the routing table of ppp0 data cube computation.
First communication module 105, for setting up Socket socket to carry out mobile network's connection according to routing table in application layer.
According to routing table, set up Socket socket to carry out mobile network's connection in application layer, set up TCP by mobile data network with the background server of application program or UDP message is connected row data communication of going forward side by side.
Because this self-defining mobile network's dial-up program is embedded in the Linux layer of Android system, when receiving the first instruction, open the switch that mobile data network connects, directly run the mobile network's dial-up program being pre-installed in Linux layer, without the need to via ccf layer.Therefore, it is possible to avoid the priority judgment mechanism of ccf layer.When Android system is when using mobile data network to connect, when starting WIFI connected mode or other interconnection network connected mode, the priority avoiding ccf layer due to mobile network's link judges, therefore, it is possible to realize mobile network and other internetwork connection mode and use.This system without the need to revising Android ccf layer code structure, therefore, this realize Multi net voting and system simple and the stability that Android system runs can be ensured.
In another embodiment, Netlisten script 101 specifically for, whether run Netlisten script has Flag logo file when Android system starts to detect user's space; If nothing, then create Flag logo file, the value of Flag logo file is set to close value and the value of real-time monitoring Flag logo file; If have, then the value of the Flag logo file in real-time supervisory user space.
Mobile network's dial-up program 103 specifically comprises:
Query unit, for inquiring about hardware communication module to obtain the state of hardware;
Dialing unit, when the hardware state obtained is normal, dialing obtains the IP address of current network.
In another embodiment, based on the Multi net voting of Android system also by system, also should comprise:
Closing module, for according to the second instruction, closes the switch that mobile data network connects, and the value of the Flag logo file of user's space is revised as close value.
In a particular embodiment, second instruction can click " Mobile data " X button of Android system for user, in other embodiments, also can for closing a certain application program, the internetwork connection mode of this application program acquiescence is that mobile data network connects, such as, in automatic steering control of farm mechanism system, need to connect background server by mobile 3G network and obtain base station data, the internetwork connection mode mobile data network of this navigation system setting connects, while closing this application program, close the switch of " Mobile data ".According to this second instruction, close the switch that mobile data network connects, meanwhile, the value of the Flag logo file of user's space is revised as close value, close value is OFF.
Stop module, when being close value for monitoring the value of Flag logo file when Netlisten script, kill mobile network's dialing process.
In another embodiment, Multi net voting based on Android system also uses system, can realize mobile data network connect is connected and use with WIFI, or realize mobile data network connect be connected and use with Ethernet, or realize mobile data network connection, WIFI connection and Ethernet connect and use.
Concrete, the Multi net voting based on Android system also uses system, also comprises:
Second starts module, for according to the 3rd instruction, opens the switch that WIFI network connects; And/or the 3rd starts module, for according to the 4th instruction, open the switch that Ethernet connects;
Second communication module, for starting wireless network linker at ccf layer and setting up Socket socket to carry out the connection of WLANO network, and/or third communication module, for starting Ethernet linker at ccf layer and setting up Socket socket to carry out Ethernet connection.
3rd instruction, be specially " WIFI " that user clicks Android system to release the button, according to the 3rd instruction, the WIFI opening Android system releases the button and connects the wifi hotspot of needs, now can there are WLAN0 and ppp0 two communication links in linux bottom simultaneously, App application is now selected the IP address being connected the ECU being in same local area network (LAN) with wifi to set up socket to connect, be defaulted as the data link of use WLAN0.
4th instruction, be specially " Ethernet " that user clicks Android system to release the button, according to the 4th instruction, the Ethernet opening Android system is released the button and carries out network connection by Ethernet, now linux bottom can exist simultaneously ppp0 with and net two communication links, App application is now selected the IP address being connected the ECU being in same local area network (LAN) with Ethernet to set up socket to connect, be defaulted as the data link of use ether.
When " WIFI " of Android system release the button and " Ethernet " release the button be all open mode time, ppp0, WLAN0 and and net three communication links can be there are in linux bottom simultaneously.
Should based on the Multi net voting of Android system also by system, can realize two or three networks and use, this system is simple, without the need to revising complicated Android ccf layer ril interface code.
Each technical characteristic of above embodiment can combine arbitrarily, for making description succinct, all possible combination of each technical characteristic in above-described embodiment is not all described, but, as long as the combination of these technical characteristics does not exist contradiction, be all considered to be the scope that this specification is recorded.
Above embodiment only have expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be construed as limiting the scope of the patent.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (10)

1., based on the Multi net voting also use method of Android system, comprising:
The mobile data network dialing being positioned at RIL layer shielding Android system in advance primary drives;
Netlisten script is run with the value of the Flag logo file in supervisory user space when Android system starts;
According to the first instruction, open the switch that mobile data network connects, and the value of the Flag logo file of described user's space is revised as initiation value;
When the value that described Netlisten script monitors described Flag logo file is initiation value, operation is pre-installed in mobile network's dial-up program of Linux layer to obtain the IP address of current network;
The IP address of described current network is added in the routing table of PPPoE data cube computation;
Socket socket is set up to carry out mobile network's connection in application layer according to described routing table.
2. the Multi net voting based on Android system according to claim 1 also use method, is characterized in that, the described Netlisten script that runs when Android system starts comprises with the step of the value of the Flag logo file in supervisory user space:
Run Netlisten script when Android system starts and whether have Flag logo file to detect user's space;
If nothing, then create Flag logo file, the value of described Flag logo file is set to close value and the value of real-time monitoring Flag logo file;
If have, then the value of the Flag logo file in real-time supervisory user space.
3. the Multi net voting based on Android system according to claim 2 also use method, it is characterized in that, mobile network's dial-up program that Linux is installed in described operation in advance comprises with the step of the IP address obtaining current network:
Run the mobile network's dial-up program being pre-installed in Linux layer and inquire about hardware communication module to obtain the state of hardware;
When the hardware state obtained is normal, dialing obtains the IP address of current network.
4. the Multi net voting based on Android system according to claim 1 also use method, is characterized in that, also comprise: according to the second instruction, close the switch that mobile data network connects, and the value of the Flag logo file of described user's space is revised as close value;
When the value that described Netlisten script monitors described Flag logo file is close value, stop described mobile network's dialing process.
5. the Multi net voting based on Android system according to claim 1 also use method, it is characterized in that, described according to the first instruction, open the switch that mobile data network connects, and before or after the value of the Flag logo file of described user's space is revised as the step of initiation value, also comprise:
According to the 3rd instruction, open the switch that WIFI network connects; And/or, according to the 4th instruction, open the switch that Ethernet connects;
Start wireless network linker at ccf layer and set up Socket socket to carry out the connection of WLANO network, and/or start Ethernet linker at ccf layer and set up Socket socket to carry out Ethernet connection.
6. the Multi net voting based on Android system also uses system, comprising:
Shroud module, drives for the mobile data network dialing being positioned at RIL layer shielding Android system in advance primary;
Netlisten script, for running when Android system starts with the value of the Flag logo file in supervisory user space;
First starts module, for according to the first instruction, opens the switch that mobile data network connects, and the value of the Flag logo file of described user's space is revised as initiation value;
Mobile network's dial-up program, is pre-installed in Linux layer, for running when the value that described Netlisten script monitors described Flag logo file is initiation value with the IP address obtaining current network;
Routing table, for adding in the routing table of PPPoE data cube computation by the IP address of described current network;
First communication module, for setting up Socket socket to carry out mobile network's connection according to described routing table in application layer.
7. the Multi net voting based on Android system according to claim 6 by system, it is characterized in that, described Netlisten script specifically for, when Android system starts, whether operation Netlisten script has Flag logo file to detect user's space; If nothing, then create Flag logo file, the value of described Flag logo file is set to close value and the value of real-time monitoring Flag logo file; If have, then the value of the Flag logo file in real-time supervisory user space.
8. the Multi net voting based on Android system according to claim 7 is also by system, and it is characterized in that, described mobile network's dial-up program, specifically comprises:
Query unit, for inquiring about hardware communication module to obtain the state of hardware;
Dialing unit, when the hardware state obtained is normal, dialing obtains the IP address of current network.
9. the Multi net voting based on Android system according to claim 6 is also by system, it is characterized in that, also comprises:
Closing module, for according to the second instruction, closes the switch that mobile data network connects, and the value of the Flag logo file of described user's space is revised as close value;
Stop module, for when the value that described Netlisten script monitors described Flag logo file is close value, stop described mobile network's dialing process.
10. the Multi net voting based on Android system according to claim 6 is also by system, it is characterized in that, also comprises:
Second starts module, for according to the 3rd instruction, opens the switch that WIFI network connects; And/or the 3rd starts module, for according to the 4th instruction, open the switch that Ethernet connects;
Second communication module, for starting wireless network linker at ccf layer and setting up Socket socket to carry out the connection of WLANO network, and/or third communication module, for starting Ethernet linker at ccf layer and setting up Socket socket to carry out Ethernet connection.
CN201510648702.5A 2015-10-08 2015-10-08 Multi net voting based on android system simultaneously uses method and system Active CN105357373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510648702.5A CN105357373B (en) 2015-10-08 2015-10-08 Multi net voting based on android system simultaneously uses method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510648702.5A CN105357373B (en) 2015-10-08 2015-10-08 Multi net voting based on android system simultaneously uses method and system

Publications (2)

Publication Number Publication Date
CN105357373A true CN105357373A (en) 2016-02-24
CN105357373B CN105357373B (en) 2018-11-13

Family

ID=55333229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510648702.5A Active CN105357373B (en) 2015-10-08 2015-10-08 Multi net voting based on android system simultaneously uses method and system

Country Status (1)

Country Link
CN (1) CN105357373B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108173909A (en) * 2017-12-15 2018-06-15 北京臻迪科技股份有限公司 Method of data synchronization, mobile terminal and computer readable storage medium
CN113329473A (en) * 2020-02-28 2021-08-31 深圳市万普拉斯科技有限公司 Method and device for accessing application program to Internet and user terminal
CN114071628A (en) * 2022-01-06 2022-02-18 深圳佑驾创新科技有限公司 Terminal communication method and device based on android system and storage medium
WO2023240899A1 (en) * 2022-06-13 2023-12-21 上海移远通信技术股份有限公司 Communication method and system for vehicle-mounted device, and apparatus, electronic device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103037358A (en) * 2012-12-24 2013-04-10 杭州浦禾通信技术有限公司 Network communication method and network communication system of mobile terminal based on android system
CN104135744A (en) * 2014-08-18 2014-11-05 中怡(苏州)科技有限公司 Communication system and communication method related to communication system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103037358A (en) * 2012-12-24 2013-04-10 杭州浦禾通信技术有限公司 Network communication method and network communication system of mobile terminal based on android system
CN104135744A (en) * 2014-08-18 2014-11-05 中怡(苏州)科技有限公司 Communication system and communication method related to communication system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108173909A (en) * 2017-12-15 2018-06-15 北京臻迪科技股份有限公司 Method of data synchronization, mobile terminal and computer readable storage medium
CN113329473A (en) * 2020-02-28 2021-08-31 深圳市万普拉斯科技有限公司 Method and device for accessing application program to Internet and user terminal
CN114071628A (en) * 2022-01-06 2022-02-18 深圳佑驾创新科技有限公司 Terminal communication method and device based on android system and storage medium
WO2023240899A1 (en) * 2022-06-13 2023-12-21 上海移远通信技术股份有限公司 Communication method and system for vehicle-mounted device, and apparatus, electronic device and storage medium

Also Published As

Publication number Publication date
CN105357373B (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN109391648B (en) Method and device for associating application with network slice and communication system
CN105357373A (en) Method and system for simultaneously using plurality of networks based on Android system
CN105848310B (en) The multi-standby terminal and terminal of a kind of Android system realize mostly to method
CN107222324B (en) Service configuration method and device of network service
WO2015154495A1 (en) Traffic control method and device
CN106455139B (en) WiFi module works at the same time the method, apparatus and system in double mode
CN104869057B (en) Open flow switch Graceful Restart processing method, device and open flow controller
CN101883355B (en) Collocation method and system of terminal parameter and terminal management device
CN103491653A (en) WiFi and 3G coexisting method based on Android intelligent terminal
MXPA05006171A (en) System and method for handshaking between wireless devices and servers.
CN103095922B (en) Method and system of rapid circular dialing based on mobile terminal device
CN105516502A (en) Mobile terminal and flow control method therefor
CN103024192A (en) Festival wallpaper switching method of cellphone
WO2015000379A1 (en) Method for remotely controlling air conditioner and remote control system for air conditioner
CN104105218A (en) Method and system for achieving Android system mobile phone hotspot WPS connection
CN102148876A (en) Access point switching method and device on iOS
CN108173725A (en) Apparatus control method, device, terminal and computer readable storage medium
CN107181618A (en) Firmware upgrade method and system
CN112286652A (en) Android APP background keep-alive method
CN113329454B (en) Method, network element, system and equipment for releasing route
CN104935732A (en) Airplane mode control method and mobile terminal
WO2016065910A1 (en) Network mode switching processing method, device and terminal
WO2013178171A1 (en) Error code information obtaining method, device and system
CN106452828A (en) Provision protocol transmission-based terminal configuration method and system
CN102316230A (en) Method for realizing mobile phone intelligent IP (internet protocol) dialing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220425

Address after: 510000 Room 202, building 13, Tian'an headquarters center, No. 555, North Panyu Avenue, Donghuan street, Panyu District, Guangzhou City, Guangdong Province

Patentee after: GUANGZHOU HI-TARGET SURVEYING INSTRUMENT Co.,Ltd.

Address before: 510000 plant 301, No. 13, Tian'an headquarters center, No. 555, North Panyu Avenue, Donghuan street, Panyu District, Guangzhou, Guangdong Province

Patentee before: HI-TARGET POSITIONING TECHNOLOGY CO.,LTD.