我在 beagleboard-xm 上安装了 Ubuntu 12.04 armhf,现在尝试连接到无线网络。首先,我检查是否可以搜索可用网络:
ubuntu@arm:~$ iwlist scan
lo Interface doesn't support scanning.
usb0 Interface doesn't support scanning.
wlan0 Scan completed :
Cell 01 - Address: EA:7D:EF:60:C9:0B
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=70/70 Signal level=-23 dBm
Encryption key:on
ESSID:"ghostrider"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Ad-Hoc
Extra:tsf=000000005a1ab50e
Extra: Last beacon: 6242ms ago
IE: Unknown: 000A67686F73747269646572
IE: Unknown: 010882848B962430486C
IE: Unknown: 030101
IE: Unknown: 06020000
IE: Unknown: 2A0100
IE: Unknown: 2F0100
IE: Unknown: 32040C121860
IE: Unknown: 2D1A2C181BFF00000000000000000000000000000000000000000000
IE: Unknown: 3D16010800000000FF000000000000000000000000000000
IE: Unknown: DD09001018020000000000
然后我将 /etc/network/interfaces 文件编辑如下:
root@arm:/etc/wpa_supplicant# cat /etc/network/interfaces
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# Example to keep MAC address between reboots
#hwaddress ether DE:AD:BE:EF:CA:FE
# WiFi Example
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "ghostrider"
wpa-psk "b34d373eb2fb836a43b0afffe783c7d0af694724506c9e77b06d1021302905bf"
但我仍然无法连接到无线网络:
root@arm:/etc/wpa_supplicant# iwconfig
lo no wireless extensions.
usb0 no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Asociated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
eth0 no wireless extensions.
root@arm:/etc/network# ifup wlan0
Failed to bring up wlan0.
哪里错了?我是否还需要更改其他文件?但我认为这已经足够了。顺便说一句,如果您好奇 wpa-psk 的来源:
zero@ghostrider:~$ wpa_passphrase ghostrider 34bddf67c2
network={
ssid="ghostrider"
#psk="34bddf67c2"
psk=b34d373eb2fb836a43b0afffe783c7d0af694724506c9e77b06d1021302905bf
}
我将感激任何能够提供帮助的努力。
问候,艾玛迪斯
附言:我也尝试过手动连接:
root@arm:/etc/network# iwconfig wlan0 essid ghostrider key s:34bddf67c2
但这也不能解决我的问题。
`root@arm:/home/ubuntu# ifup wlan0 无法启动 wlan0。root@arm:/home/ubuntu# tail -f /var/log/syslog Dec 31 18:05:13 arm dhclient: 未收到 DHCPOFFERS。十二月 31 18:05:15 arm dhclient:wlan0 上的 DHCPDISCOVER 到 255.255.255.255 端口 67 间隔 9 十二月 31 18:05:24 arm dhclient:wlan0 上的 DHCPDISCOVER 到 255.255.255.255 端口 67 间隔 15 十二月 31 18:05:39 arm dhclient:wlan0 上的 DHCPDISCOVER 到 255.255.255.255 端口 67 间隔 12 十二月 31 18:05:51 arm dhclient:wlan0 上的 DHCPDISCOVER 到 255.255.255.255 端口 67 间隔 7 十二月 31 18:05:58 arm dhclient:wlan0 上的 DHCPDISCOVER 到 255.255.255.255 端口67 间隔 9 十二月 31 18:06:07 arm dhclient:wlan0 上的 DHCPDISCOVER 到 255.255.255.255 端口 67 间隔 20 十二月 31 18:06:27 arm dhclient:wlan0 上的 DHCPDISCOVER 到 255.255.255.255 端口 67 间隔 18 十二月 31 18:06:45 arm dhclient:wlan0 上的 DHCPDISCOVER 到 255.255.255.255 端口 67 间隔 8 十二月 31 18:06:53 arm dhclient:未收到 DHCPOFFERS。
我尝试连接的网络的属性:
`
答案1
由于无线网络使用的是 WEP 加密,因此首先要确保注释掉wlan0
中的所有行/etc/network/interface
。
然后执行以下操作(将“essid”和 wepkey 替换为您的实际无线网络名称和密钥):
sudo ifconfig wlan0 down
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid "essid"
sudo iwconfig wlan0 key wepkey
检查一切是否正常:
sudo iwconfig wlan0
然后启动dhclient:
sudo dhclient wlan0
如果仍然没有成功,您的卡可能不支持临时。更多信息请点击此处。
其他来源: