Android mobile phone connected to the Internet through USB binding (conclusion)

Source: Internet
Author: User

This article describes how to use the USB binding function of Android mobile phones to achieve two-way Internet sharing between mobile phones and PCs.

 

1. Use USB to bind a mobile phone to share PC Internet Resources

 

Reference:

Http://wenku.baidu.com/view/366ea292daef5ef7ba0d3c9a.html

Http://wenku.baidu.com/view/33487bfc0242a8956bece46e.html

 

1. Environment Construction:

Android 2.3.7 one mobile phone (ZTE u960s) must have the root permission and install busybox

Windows XP

Vro auto-dial cat Internet access

 

2. Connect your phone to your computer and check "Settings-wireless connection-binding-USB binding" on your phone, your computer will prompt you to find new hardware (if you already have a driver, you can specify to install it, or install the jion that comes with your mobile phone
Me ).

Open the network neighbor-view the network connection, and you will find an additional local connection

 

NOTE: If your USB binding option is gray, you need to add a new name named USB (any name) to "Settings-wireless and connection-mobile network settings-Access Point name ), the access point is the usb apn.

 

3. Open the local PC connection and select share

 

Note: you do not need to select the second option.

 

4. Set the connection IP address of the mobile phone to 192.168.42.1 and the subnet mask to 255.255.255.0. At this time, the PC is automatically connected to the Internet.

The picture on the left shows the information automatically obtained by the phone Nic, and the picture on the right shows what we needModified mobile phone Nic. Generally, the CIDR block of 192.168.42.1 is set based on the first three segments of the IP address of the mobile phone Nic.

 

 

Others who do not know how to install it with one click can directly use Baidu)

Download the terminal script software gscript Mod.

Create a new script and batch Import and Export commands. You only need to execute the script each time.

Busybox route add default GW192.168.42.1

Setprop net. dns1 8.8.8.8

 

For the sake of security, you can add a busybox route delete default command to delete the default route first.

 

6. Now, your mobile phone can access the Internet and surf the Internet. Of course, this method is not easy to use. Normally, you can connect to the vro directly on the home phone wifi.

Applicable to environments without WiFi.

 

 

2. The PC is bound to the mobile phone USB to share the Internet resources of the mobile phone.

 

 

Change step 4 of the previous step to modify the local PC network adapter IPv4 (content is enough). The other steps are the same as those in Chapter 1. (The IPv4 address of the network card of the mobile phone is automatically obtained by default.)

Remember, the first chapter is modification.Mobile Network CardIPv4, which is modified in this chapter.PC NicIPv4, do not confuse.

 

Note that, of course, your mobile phone data option (PDP) should be activated at this time, or it will be useless.

 

20120813 supplement the network principles of mutual internet access between mobile phones and PCS:

Chapter 1:

After the mobile phone is bound to USB, modify the IP address of the mobile phone Nic to 192.168.42.1 and view the route

 

View the information of the mobile phone Nic In ipconfig.

Ethernet Adapter local connection 3:

Connection-specific DNS suffix .:
Description ......: Remote NDIS based Internet sharingevice
Physical address .........:EA-5A-18-28-E3-13
DHCP enabled...
IP address ......: 192.168.42.1
Subnet Mask ......: 255.255.255.0
IP address ......: fe80: e85a: 18ff: fe28: e313 % 7
Default Gateway .........:
DNS servers ......: fec0: 0: FFFF: 1% 1
Fec0: 0: 0: FFFF: 2% 1
Fec0: 0: 0: FFFF: 3% 1

 

View busybox ARP on your phone

(74.125.235.195) at <> On usb0

192.168.42.1 at EA: 5A: 18: 28: E3: 13 [ether] On usb0

 

Suddenly I understood something, and the mobile phone could eventually access the internet.

 

When a mobile phone accesses the internet, it first jumps to the virtual default network card 192.168.42.1 (this process is actually the same as a normal computer accessing the Internet through the router gateway ).

The route 192.168.42.1 mask 255.255.255.255 on the PC is redirected to the loopback address 127.0.0.1, and the Internet is accessed from the default gateway 192.168.1.2.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.