获取 Wifi WPA2 wifi 连接

获取 Wifi WPA2 wifi 连接

我一直在尝试建立一个简单的 wifi 连接!但我不得不承认我做不到!

这是我尝试过的:

root@MYONE:/etc# clear
root@MYONE:/etc# vi wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
     ssid="Mi Engine"
     psk="7407352688e4"
}


root@MYONE:/etc# iw wlan0 link
Not connected.
root@MYONE:/etc# ifconfig
eth0      Link encap:Ethernet  HWaddr 74:FE:48:3A:55:AB
          inet addr:192.168.178.88  Bcast:192.168.178.255  Mask:255.255.255.0
          inet6 addr: fe80::76fe:48ff:fe3a:55ab%4804152/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5268 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7625 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:345028 (336.9 KiB)  TX bytes:2899092 (2.7 MiB)

eth1      Link encap:Ethernet  HWaddr 74:FE:48:3A:55:AC
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%4804152/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:171 errors:0 dropped:0 overruns:0 frame:0
          TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:13057 (12.7 KiB)  TX bytes:13057 (12.7 KiB)

wlan0     Link encap:Ethernet  HWaddr 02:00:EA:FF:D2:06
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

所以我的问题是这里我遗漏了什么并且可以解决它?提前谢谢!

提前致谢!

答案1

添加

auto wlan0
iface wlan0 inet dhcp
wpa-ssid [SSID]
wpa-ap-scan 1
wpa-key-mgmt WPA-PSK
wpa-psk [password]

/etc/network/interfaces

然后

sudo /etc/init.d/networking restart

相关内容