手机端联网,电脑端借助手机端网络上网

 估计有wifi的电脑使用者,会经常使用电脑做热点,手机(也有wifi)借助电脑的网络来上网,这个估计大多数都有尝试,关于这个的文章,估计百度一搜,一大把。有时候会出现手机和电脑连上了,有信号,但不能上网。这时设置手机端就有些复杂,需要root以及代理客户端。电脑上需要安装代理服务器。

    今天在测试使用工具,来实现手机端有网,电脑端无网,电脑借助手机网络上网,终于成功,有些手机设置里面是有usb做热点的这个选项,如此的话则在电脑端装好手机驱动后,则应该是可以使用usb通过手机上网了,这个简单,就不说了。

    我需要说的是手机端安装一个软件,作为服务端,电脑端安装一个软件,作为客户端,电脑端通过向手机端的软件进行adb请求,申请打开网页等请求,手机端收到这个请求后,进行联网搜索,然后将结果反馈给电脑端,来实现电脑端的上网。

1:手机端安装Tether_1.0.1.2.apk,打开此软件。

2:电脑端安装 dotnetfx_2.0_XiaZaiBa.zip TetherWindowsSetup.msi

随后打开电脑端的Tether

3:电脑上安装了手机的驱动,保证adb能够使用,可以使用腾讯手机管家,(在手机设置

---开发人员选项--usb调试的勾打上),使用手机管家连接,在电脑有网络的情况下自动安装完毕驱动。

4:这个时侯,手机管家可以显示出来类似如下的显示,表示adb已经可以使用了。此处为中兴U930手机连接的显示。

5:手机端打开Tether,显示为

点击灰色的图标,随后显示为:

这时手机端的则操作完毕。

6:电脑端先关闭手机管家,然后开启Tether,界面显示为:

点击start:

界面显示为:

C:\Program Files\ClockworkMod\Tether

"本地连接 4"

Checking arguments...

Setting IP Address, mask, and gateway.

netsh interface ip set address name="本地连接 4" source=static 10.0.0.1 255.255.255.0 10.0.0.2 1

确定。

Setting DNS server.

netsh interface ip add dns name="本地连接 4" 8.8.8.8 index=1

确定。

netsh interface ip add dns name="本地连接 4" 8.8.4.4 index=2

确定。

Adding Windows Firewall Exception

netsh firewall set allowedprogram program="C:\Program Files\ClockworkMod\Tether\win32\node.exe" name=Tether

确定。

Starting Tether...

C:\Program Files\ClockworkMod\Tether\node-tuntap

adb server is out of date.  killing...

Opening tun device.

Opening tun device: null

adb binary path: "C:\Program Files\ClockworkMod\Tether\win32\adb.exe"

Checking phone status...

Waiting for interface to get ready... (postSetup, waiting 5 seconds)

{ [Error: Command failed: ADB server didn't ACK

* failed to start daemon *

error: unknown host service

] killed: false, code: 1, signal: null }

You may need to install a driver for your phone to allow the computer to connect to it.

Consult the menu above to install the "adb drivers" for your phone.

If your manufacturer is not listed, please search Google for "adb drivers my-manufacturer name".

Tun/tap device IP: 10.0.0.1

Reading tun/tap device... 

Listening on tether port...

Checking phone status...

C:\Program Files\ClockworkMod\Tether

"本地连接 4"

Checking arguments...

Setting IP Address, mask, and gateway.

netsh interface ip set address name="本地连接 4" source=static 10.0.0.1 255.255.255.0 10.0.0.2 1

确定。

Setting DNS server.

netsh interface ip add dns name="本地连接 4" 8.8.8.8 index=1

服务器 8.8.8.8 已经在此接口上配置。

netsh interface ip add dns name="本地连接 4" 8.8.4.4 index=2

服务器 8.8.4.4 已经在此接口上配置。

Adding Windows Firewall Exception

netsh firewall set allowedprogram program="C:\Program Files\ClockworkMod\Tether\win32\node.exe" name=Tether

确定。

Starting Tether...

C:\Program Files\ClockworkMod\Tether\node-tuntap

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

Opening tun device.

Opening tun device: null

adb binary path: "C:\Program Files\ClockworkMod\Tether\win32\adb.exe"

Checking phone status...

Waiting for interface to get ready... (postSetup, waiting 5 seconds)

0a78310743208197_MTPADB New device found.(这个便是查找到了设备,此时则连接上了)

0a78310743208197_MTPADB Connecting to device.

0a78310743208197_MTPADB Checking if package is installed.

0a78310743208197_MTPADB Found that APK is already installed. Starting tether on phone.

0a78310743208197_MTPADB Setting up adb port forwarding to port 30002.

0a78310743208197_MTPADB adb port forwarding results:

{ '0': null, '1': '', '2': '' }

0a78310743208197_MTPADB Starting Tether service.

0a78310743208197_MTPADB Starting Tether activity.

0a78310743208197_MTPADB Results from starting Tether service:

{ '0': null,

  '1': 'Starting service: Intent { cmp=com.koushikdutta.tether/.TetherService }\r\r\n',

  '2': '' }

0a78310743208197_MTPADB Results from starting Tether activity:

{ '0': null,

  '1': 'Starting: Intent { cmp=com.koushikdutta.tether/.TetherActivity }\r\r\nWarning: Activity not started, its current task has been brought to the front\r\r\n',

  '2': '' }

Tun/tap device IP: 10.0.0.1

Reading tun/tap device... 

Listening on tether port...

Checking phone status...

0a78310743208197_MTPADB Creating relay for device.

0a78310743208197_MTPADB Tether has connected.

0a78310743208197_MTPADB Notifying client of Tether version: 6.

0a78310743208197_MTPADB Tether.apk version: 6

STATUS: Connected to phone. Waiting for tether connection.

STATUS: Tether has connected.

Checking phone status...

Checking phone status...

Checking phone status...

7:此时手机上面的界面变为了:

这个时候电脑则可以使用手机的网络进行上网了。当然此时手机最好是wifi上网方式,否则流量会消耗飞快,让你痛苦不已的。

这里复制不出来图片,还是自己下载看看,下载工具以及说明文档如下:

http://kuai.xunlei.com/d/k7LNAQMspQAdNiJRf39

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计算机毕业设计(源码都能跑起来)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值