Android手机通过电脑上网的几种方法

长平狐 发布于 2012/06/08 12:34
阅读 821
收藏 2

本文定位:没有wifi,想让手机通过电脑的有线连接上网。

android手机可以通过wifi上网,这个很好。可当没有wifi的时候怎么上啊,3G--->流量受限,看视频很不划算!
我这里总结了几种方法供大家参考。

方法一:usb连接线,手机有线上网
我这里说下大致流程,具体可见http://www.angeeks.com/thread-41906-1-1.html
1、将手机通过usb线连接到电脑,勾选“设置 -> 无线和网络 -> 绑定与便携热点 -> USB绑定”选项,电脑上会出现虚拟网卡,
为便于分辨,给虚拟网卡改个名字叫:android ;
2、共享电脑网络至android网卡;
3、打开超级终端,su变身超级用户,查询手机ip
# busybox ifconfig
手机ip:192.168.43.100(每个人不一样)
4、把电脑上android网卡的ip改为192.168.43.1;
5、添加默认网关
#busybox route add default gw 192.168.43.1

辅助软件:busybox、z4root
关键点:手机上的网关IP和电脑上的IP一样。

方法二:无线网卡,手机AP
此方法适用于笔记本有无线网卡,但不支持adhoc,支持anhoc的建议使用方法三。
1、勾选“设置 -> 无线和网络 -> 绑定与便携热点 -> 便携式Wi-Fi热点”选项,并设置AP(比如:myAp);
2、电脑连接到myAp并获取ip地址(比如:192.168.23.121);
3、添加默认网关
#busybox route add default gw 192.168.23.121

辅助软件:busybox、z4root
关键点:手机上的网关IP和电脑上的IP一样。

方法三:支持adhoc的无线网卡,组建wifi
如果电脑本身带的无线网卡不支持的话,可以买一个支持adhoc的usb无线网卡(一般都带驱动,可以直接模拟AP供手机用)。
这里以win7为例,说下大致流程,具体可见http://www.deepin.org/article-117-1.html

1、以管理员身份运行命令提示符;
2、启用并设定“虚拟Wifi网卡”模式;
运行以下命令启用虚拟无线网卡:
netsh wlan set hostednetwork mode=allow ssid=(这里写无线网名字) key=(这里是密码)
3、启用“Internet连接共享(ICS)”;
4、开启无线网络 :netsh wlan start hostednetwork
5、手机连接设置的wifi

好,就这些了,希望对你有帮助。


原文链接:http://www.cnblogs.com/MikeZhang/archive/2012/02/04/androidComputerWifi.html
加载中
0
warlock51
warlock51
<6>[18609.196809] atmel_mxt_ts 3-004a: cmd(01): a3 76 43
<6>[18623.919159] atmel_mxt_ts 3-004a: cmd(01): a3 76 43 OFL
<6>[18624.014308] atmel_mxt_ts 3-004a: nse(15): 32 1 FHCHG
<4>[18627.856760] ## wifi_probe
<4>[18627.856771] wifi_set_power = 1
<4>[18627.856779] bcm_wifi_power:5832 on[1] enter
<4>[18628.183537] bcm_wifi_power:5843 on[1] leave
<4>[18628.183554] wifi_set_carddetect = 1
<4>[18628.183565]  bcm_wifi_set_carddetect:5820 val[1]
<6>[18628.183579] mmc2: Slot status change detected (0 -> 1)
<4>[18628.185114]
<4>[18628.185120] Dongle Host Driver, version 5.90.195.75
<4>[18628.185125] Compiled in drivers/net/wireless/bcmdhd on Aug  1 2013 at 09:4
6:20
<4>[18628.250654] mmc2: queuing unknown CIS tuple 0x80 (50 bytes)
<4>[18628.259132] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
<4>[18628.262003] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
<4>[18628.290800] mmc2: queuing unknown CIS tuple 0x02 (1 bytes)
<6>[18628.293623] mmc2: new SDIO card at address 0001
<4>[18628.299026] F1 signature read @0x18000000=0x9934329
<4>[18628.301360] DHD: dongle ram size is set to 294912(orig 294912)
<4>[18628.303298] wl_create_event_handler thr:4365 started
<4>[18628.304150] dhd_attach thr:4366 started
<4>[18628.304281] dhd_attach thr:4367 started
<4>[18628.304411] dhd_attach thr:4368 started
<4>[18628.304617] wifi_get_mac_addr
<4>[18628.305857] Broadcom Dongle Host Driver: register interface [wlan0] MAC: 0
0:90:4c:11:22:33
<4>[18628.313648] wifi_set_power = 0
<4>[18628.313667] bcm_wifi_power:5832 on[0] enter
<4>[18628.616230] bcm_wifi_power:5843 on[0] leave
<4>[18628.616244] =========== WLAN placed in RESET ========
<6>[18633.383822] atmel_mxt_ts 3-004a: nse(15): 32 0 FHCHG
<6>[18638.090877] atmel_mxt_ts 3-004a: cmd(01): a3 76 43
<4>[18644.235262] dhd_detach thr:4368 terminated OK
<4>[18644.317824] dhd_detach thr:4366 terminated OK
<4>[18644.318128] dhd_detach thr:4367 terminated OK
<3>[18644.320741] CFG80211-ERROR) wl_event_handler : wl_event_handler was termin
ated
<4>[18644.321036] wl_destroy_event_handler thr:4365 terminated OK
<4>[18644.397339] dhdsdio_htclk: HT Avail request error: -35
<4>[18644.415724] ## wifi_remove
<4>[18644.415736] wifi_set_power = 0
<4>[18644.415744] bcm_wifi_power:5832 on[0] enter
<4>[18644.718792] bcm_wifi_power:5843 on[0] leave
<4>[18644.718804] wifi_set_carddetect = 0
<4>[18644.718811]  bcm_wifi_set_carddetect:5820 val[0]
<6>[18644.718819] mmc2: Slot status change detected (1 -> 0)
<6>[18644.723163] mmc2: card 0001 removed
<6>[18668.259948] max17043 soc:68 68 v:3988
<6>[18728.257189] max17043 soc:69 69 v:3990
<6>[18788.257626] max17043 soc:69 69 v:3991

0
warlock51
warlock51
adhoc 挂了wifi
返回顶部
顶部