Android 蜂窝和 wifi 网络
2019-01-08 本文已影响8人
that_is_this
可参考,同时使用 蜂窝 和 wifi 连接
https://blog.csdn.net/lqxandroid2012/article/details/79071027
- 当连接 wifi 时,蜂窝就会关闭
- 当连接蜂窝时,
netcfg 命令查看
当打开 wifi 时,wlan0 为 up 状态
wlan0 UP 0.0.0.0/0 0x00001003 8c:3a:e3:93:78:47
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
p2p0 UP 0.0.0.0/0 0x00001003 8e:3a:e3:93:78:47
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
rmnet4 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet2 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet3 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet7 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet5 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet6 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet1 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet0 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rev_rmnet1 DOWN 0.0.0.0/0 0x00001002 52:ae:ec:a8:4f:a6
rev_rmnet0 DOWN 0.0.0.0/0 0x00001002 7e:a8:5e:ce:ff:4b
rev_rmnet4 DOWN 0.0.0.0/0 0x00001002 d6:31:b7:4e:a0:80
rev_rmnet2 DOWN 0.0.0.0/0 0x00001002 52:81:d6:3a:b9:ff
rev_rmnet3 DOWN 0.0.0.0/0 0x00001002 42:fb:23:ee:ab:6d
rev_rmnet7 DOWN 0.0.0.0/0 0x00001002 8a:d1:9f:55:a4:f2
rev_rmnet5 DOWN 0.0.0.0/0 0x00001002 5a:fc:6d:7e:d7:1d
rev_rmnet6 DOWN 0.0.0.0/0 0x00001002 92:c6:bd:fb:2d:97
rev_rmnet8 DOWN 0.0.0.0/0 0x00001002 92:78:dd:54:86:67
当连接上蜂窝网络(蜂窝可用)时,wlan0 为 up 状态,rmnet0 也是 up 状态
wlan0 UP 0.0.0.0/0 0x00001003 8c:3a:e3:93:78:47
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
p2p0 UP 0.0.0.0/0 0x00001003 8e:3a:e3:93:78:47
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
rmnet4 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet2 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet3 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet7 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet5 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet6 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet1 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet0 UP 10.197.24.241/30 0x00000041 00:00:00:00:00:00
rev_rmnet1 DOWN 0.0.0.0/0 0x00001002 52:ae:ec:a8:4f:a6
rev_rmnet0 DOWN 0.0.0.0/0 0x00001002 7e:a8:5e:ce:ff:4b
rev_rmnet4 DOWN 0.0.0.0/0 0x00001002 d6:31:b7:4e:a0:80
rev_rmnet2 DOWN 0.0.0.0/0 0x00001002 52:81:d6:3a:b9:ff
rev_rmnet3 DOWN 0.0.0.0/0 0x00001002 42:fb:23:ee:ab:6d
rev_rmnet7 DOWN 0.0.0.0/0 0x00001002 8a:d1:9f:55:a4:f2
rev_rmnet5 DOWN 0.0.0.0/0 0x00001002 5a:fc:6d:7e:d7:1d
rev_rmnet6 DOWN 0.0.0.0/0 0x00001002 92:c6:bd:fb:2d:97
rev_rmnet8 DOWN 0.0.0.0/0 0x00001002 92:78:dd:54:86:67
当蜂窝可用且连接 wifi 时,rmnet0 状态为 DOWN,wlan0 显示的有 ID
wlan0 UP 192.168.5.191/24 0x00001043 8c:3a:e3:93:78:47
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
p2p0 UP 0.0.0.0/0 0x00001003 8e:3a:e3:93:78:47
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
rmnet4 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet2 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet3 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet7 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet5 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet6 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet1 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet0 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rev_rmnet1 DOWN 0.0.0.0/0 0x00001002 52:ae:ec:a8:4f:a6
rev_rmnet0 DOWN 0.0.0.0/0 0x00001002 7e:a8:5e:ce:ff:4b
rev_rmnet4 DOWN 0.0.0.0/0 0x00001002 d6:31:b7:4e:a0:80
rev_rmnet2 DOWN 0.0.0.0/0 0x00001002 52:81:d6:3a:b9:ff
rev_rmnet3 DOWN 0.0.0.0/0 0x00001002 42:fb:23:ee:ab:6d
rev_rmnet7 DOWN 0.0.0.0/0 0x00001002 8a:d1:9f:55:a4:f2
rev_rmnet5 DOWN 0.0.0.0/0 0x00001002 5a:fc:6d:7e:d7:1d
rev_rmnet6 DOWN 0.0.0.0/0 0x00001002 92:c6:bd:fb:2d:97
rev_rmnet8 DOWN 0.0.0.0/0 0x00001002 92:78:dd:54:86:67