Raspberry Pi 上的 Wifi - Edimax ew-7811un

Raspberry Pi 上的 Wifi - Edimax ew-7811un

我无法让我的 wifi 加密狗在 Pi 上工作。以下是 netinfo.sh 脚本显示的内容(来自我电脑上的 PuTTY;Pi 通过以太网电缆连接到我的路由器;wifi 加密狗在 Pi 中):

_____/boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 roo       tfstype=ext4 elevator=deadline rootwait

_____/etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
_____/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="myssid"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="mypassword"
}
_____/etc/dhcpcd.conf
hostname
duid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
interface eth0
inform 192.168.0.5
_____ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:f5:54:24
          inet addr:192.168.0.18  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:458 errors:0 dropped:0 overruns:0 frame:0
          TX packets:477 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:338712 (330.7 KiB)  TX bytes:85578 (83.5 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:185 errors:0 dropped:0 overruns:0 frame:0
          TX packets:185 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:79732 (77.8 KiB)  TX bytes:79732 (77.8 KiB)

wlan0     Link encap:Ethernet  HWaddr 74:da:38:3e:dd:80
          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)

_____iwconfig
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated
          Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

_____ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP ql       en 1000
    link/ether b8:27:eb:f5:54:24 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.18/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen        1000
    link/ether 74:da:38:3e:dd:80 brd ff:ff:ff:ff:ff:ff
_____ip route
default via 192.168.0.10 dev eth0
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.18
_____resolv.conf
# Generated by resolvconf
domain local
nameserver 192.168.0.10
_____ping google.com
PING google.com (216.58.209.46) 56(84) bytes of data.
64 bytes from waw02s05-in-f46.1e100.net (216.58.209.46): icmp_req=1 ttl=56 time=       10.6 ms
64 bytes from waw02s05-in-f14.1e100.net (216.58.209.46): icmp_req=2 ttl=56 time=       10.9 ms
64 bytes from waw02s05-in-f14.1e100.net (216.58.209.46): icmp_req=3 ttl=56 time=9.51 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 9.519/10.365/10.906/0.605 ms
_____ping google nameserver
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=49 time=29.5 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=49 time=32.5 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=49 time=30.9 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 29.571/31.043/32.576/1.235 ms
_____mini sysinfo
Debian
7.8
wheezy
Linux version 4.0.8+ (d
CPU: armv6
inet addr:192.168.0.18
inet addr:127.0.0.1  Ma
at sudo: ethtool: command not found
_____that is lot of good news, thanks

在上述配置下,我的 Pi 仅通过 wifi 连接到路由器一次。连接不稳定。重新启动 Pi 后,它又无法正常工作。我以为是 wifi 适配器的电源问题,但通过有源 USB 集线器连接它,却没有帮助。

你能帮我吗?


我仍然在为这个 Wifi 连接而苦苦挣扎。这太令人沮丧了!我甚至不知道从哪里开始调试……在 PI 上,我正在运行 Apache 和 mysql 服务器,因为我在启动时使用 localhost/index.php 在其上运行一个 php 站点。我通过以太网电缆连接到互联网(Pi 连接到路由器),然后我可以通过 Putty 连接。但我根本无法通过 Wifi 加密狗连接。我想我尝试了一切,甚至 wicd-curses。我不知道我还应该检查什么……此外,在启动 Pi 时,在 wpa_supplicant 上,我的 WPA 密码出现错误。Wpa_supplicant.conf 在我的密码中包含一些奇怪的 ascii 块。这是当我将密码配置为 psk="mypassword" 时发生的。

当我仅在 /etc/network/interfaces 上进行配置时,如下图所示 raspberrypihq.com/how-to-add-wifi-to-the-raspberry-pi 启动时出现错误
"Not running dhcpcd because "/etc/network/interfaces.... failed!""Network Interface plugging Daemon...skip eth0...skip wlan0...done. " 请帮帮我!

相关内容