最终,我设法使wlan0(一个Edimax EW-7811Un USB WiFi加密狗)连接到我的路由器,但是之后,apt-get update
我发现Raspberry在本地网络外部看不到。我的Raspberry正在最新的(截至撰写本文时)Raspbian映像上运行。
- wlan0已连接到我的路由器,并已获得IP地址
- 我可以对本地网络中的路由器,打印机和其他计算机执行ping操作,但无法对外部网络中的任何内容执行ping操作(也对本地主机上的环回ping表示“主机无法访问”,但我会说这是NAT取消) 127.0.0.1请求)
- 我可以成功连接
eth0
,但是我需要连接wlan0
。
ifconfig输出:
pi@MinoPi ~ $ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr *macaddresshere*
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:552 errors:0 dropped:6 overruns:0 frame:0
TX packets:289 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:375003 (366.2 KiB) TX bytes:318051 (310.5 KiB)
iwconfig输出:
pi@MinoPi ~ $ iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"Sanctuary" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.437 GHz Access Point: *macaddresshere*
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=100/100 Signal level=100/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
/etc/network/interfaces
文件:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
iface wlan0 inet static
address 192.168.1.9
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid "Sanctuary"
wpa-psk "somePasswordHere"
有任何想法吗?