Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
求助:关于tp link tl wn322g+设置网络的问题
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
jkddontmove
n00b
n00b


Joined: 22 Nov 2013
Posts: 4

PostPosted: Fri Nov 22, 2013 12:55 pm    Post subject: 求助:关于tp link tl wn322g+设置网络的问题 Reply with quote

本人新手,第一次接触gentoo,按照官方AMD64手册进行安装。当到设置网络这一步时,遇上阻碍,一直不得其解。
利用平时不多的时间去搜索各种英文论坛,进展非常缓慢,而且很多东西也是边看边猜,所以就鼓起勇气来发帖求助啦。我想,既然在ubuntu安装完后就默认支持这款网卡,就说明这款网卡是一定可以驱动的。只是对于新手来说,的却很是困难啊!
我用的是TP LINK TL WN322G+这一款的网卡,如果有人能帮助我,非常感激!

lsusb中查看网卡显示:
0ace:1215 ZyDAS ZD1211B 802.11g

ifconfig -a显示:
enp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether d4:3d:7e:d8:d4:48 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp0s19f2u2: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:19:e0:7e:10:a2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lsmod查看显示:
能看到已经加载了zd1211rw,但不知道是否不支持我的网卡?Ubuntu下也lsmod了一下,发现还加载了mac80211和cfg80211,在gentoo安装过程中也modprobe以上两者,可还是不行。

iwconfig显示:
wlp0s19f2u2 IEEE 802.11bg ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on

lo no wireless extensions.

enp1s0 no wireless extensions.

因为无线网络是WPA-PSK2 AES的,所以按照某教程尝试:
wpa_passphrase 网络名 密码 > /etc/wpa_supplicant.conf 这一步没有输出任何提示

打开wpa_supplicant.conf
network={
ssid="网络名"
#psk="密码"
psk=d32247e21750271c7965267edc5f6e5328b485ecec7606962b09394ebbe47ccc
}

修改为:
network={
ssid="网络名"
proto=RSN
key=mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
#psk="密码"
psk=d32247e21750271c7965267edc5f6e5328b485ecec7606962b09394ebbe47ccc
}
接着输入:
ifconfig enp1s0 up 没有任何提示

再输入:
iwlist enp1s0 scan
enp1s0 Interface doesn't support scanning. 不支持扫描?

把另一个也试了一下:
ifconfig wlp0s19f2us up
wlp0s19f2us: ERROR while getting interface flags: No such device 直接错误。。

如果有人能帮助一下,十分感激! :)
Back to top
View user's profile Send private message
Saigut
n00b
n00b


Joined: 15 Mar 2013
Posts: 17

PostPosted: Sat Nov 23, 2013 4:24 am    Post subject: Reply with quote

fconfig -a 能看到enp1s0和wlp0s19f2u2,估计wlp0s19f2u2就是你的无线网卡。如果那确实是你的无线网卡的话,也就是说你的无线网卡已经被识别了,并不是驱动问题。这样的话,应该是相关的连网软件没有弄好。你的无线网络是WPA-PSK2加密的,所以建议你使用wpa_supplicant这个软件(我以前也是用它连接wifi成功的,iwconfig对我的机子貌似不起作用)。
关于wpa_supplicant的使用建议你参考下面:
gentoo手册:http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=4&chap=4#doc_chap2
archlinux文档:https://wiki.archlinux.org/index.php/WPA_supplicant (我以前记得是参考arch文档配置的)
以及wpa_supplicant的man手册, man wpa_supplicant

(如果你不连无线,直接有线连路由器,那样的情况最容易连网)
_________________
Gentoo/Funtoo Awesome
Back to top
View user's profile Send private message
jkddontmove
n00b
n00b


Joined: 22 Nov 2013
Posts: 4

PostPosted: Sat Nov 23, 2013 2:51 pm    Post subject: Reply with quote

Saigut wrote:
fconfig -a 能看到enp1s0和wlp0s19f2u2,估计wlp0s19f2u2就是你的无线网卡。如果那确实是你的无线网卡的话,也就是说你的无线网卡已经被识别了,并不是驱动问题。这样的话,应该是相关的连网软件没有弄好。你的无线网络是WPA-PSK2加密的,所以建议你使用wpa_supplicant这个软件(我以前也是用它连接wifi成功的,iwconfig对我的机子貌似不起作用)。
关于wpa_supplicant的使用建议你参考下面:
gentoo手册:http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=4&chap=4#doc_chap2
archlinux文档:https://wiki.archlinux.org/index.php/WPA_supplicant (我以前记得是参考arch文档配置的)
以及wpa_supplicant的man手册, man wpa_supplicant

(如果你不连无线,直接有线连路由器,那样的情况最容易连网)

谢谢! :) 我会再参考一下archlinux的手册。我也觉得如果是有线网络应该会很顺利,可惜,只有无线网络 :(

今天又查了一些资料,发现用livecd启动后执行dmesg命令,在以下输出的内容里面看见了我加粗的部分。
发现的却是网卡的命名方式有所改变,貌似这个wlp0s19f2u2才是我的网卡。同时也发现了一个could not load firmware的错误。
所以目前来看问题好像应该在网卡的驱动上?是识别了但没有很好的支持么?再次感谢你的帮助 :)
......
[ 21.506430] UDF-fs: warning (device sdb8): udf_fill_super: No partition found (1)
[ 25.021383] systemd-udevd[22742]: starting version 204
[ 25.126267] wmi: Mapper loaded
[ 25.126782] input: Power Button as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input3
[ 25.126809] ACPI: Power Button [PWRB]
[ 25.126841] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input4
[ 25.126859] ACPI: Power Button [PWRF]
[ 25.151550] ACPI: acpi_idle registered with cpuidle
[ 25.174752] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 25.197660] cfg80211: Calling CRDA to update world regulatory domain
[ 25.234477] hda-intel 0000:00:01.1: Force to non-snoop mode
[ 25.234507] snd_hda_intel 0000:00:01.1: irq 51 for MSI/MSI-X
[ 25.234579] r8169 0000:01:00.0: irq 52 for MSI/MSI-X
[ 25.234719] r8169 0000:01:00.0 eth0: RTL8168evl/8111evl at 0xffffc90011784000, d4:3d:7e:d8:d4:48, XID 0c900800 IRQ 52
[ 25.234721] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 25.315830] acpi-cpufreq: overriding BIOS provided _PSD data
[ 25.354653] usb 2-2: reset high-speed USB device number 3 using ehci-pci
[ 25.504417] systemd-udevd[22769]: renamed network interface eth0 to enp1s0
[ 25.527765] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 25.527854] zd1211rw 2-2:1.0: phy0
[ 25.527878] usbcore: registered new interface driver zd1211rw
[ 25.550955] cfg80211: World regulatory domain updated:
[ 25.550957] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 25.550959] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 25.550960] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 25.550961] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 25.550962] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 25.550963] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 25.577996] systemd-udevd[22769]: renamed network interface wlan0 to wlp0s19f2u2
[ 29.803435] warning: process `hwsetup' used the deprecated sysctl system call with 1.23.
[ 35.045368] NET: Registered protocol family 10
[ 35.354381] r8169 0000:01:00.0 enp1s0: unable to load firmware patch rtl_nic/rtl8168e-3.fw (-2)
[ 35.383731] r8169 0000:01:00.0 enp1s0: link down
[ 35.383763] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[ 35.384192] usb 2-2: Could not load firmware file zd1211/zd1211b_ub. Error number -2
[ 35.384195] zd1211rw 2-2:1.0: couldn't load firmware. Error number -2
Back to top
View user's profile Send private message
Saigut
n00b
n00b


Joined: 15 Mar 2013
Posts: 17

PostPosted: Sat Nov 23, 2013 3:25 pm    Post subject: Reply with quote

我不知道firmware的这个问题对你的无线连网造成了多大影响。之前有见过有人intel无线网卡配置联网时弄了与firmware相关的东西。不过我不记得他怎么操作或是安装了什么软件包。而且我的无线网卡现在已经坏掉了,也不记得我当时当到底弄没弄过firmware了— —
如果你用wpa_supplicent确实无法联网,而且你配置好或正确使用这个软件了,也许真的要解决那个firmware问题了。但关于firmware的地方目前我也没有办法
_________________
Gentoo/Funtoo Awesome
Back to top
View user's profile Send private message
jkddontmove
n00b
n00b


Joined: 22 Nov 2013
Posts: 4

PostPosted: Tue Nov 26, 2013 11:53 am    Post subject: Reply with quote

Saigut wrote:
我不知道firmware的这个问题对你的无线连网造成了多大影响。之前有见过有人intel无线网卡配置联网时弄了与firmware相关的东西。不过我不记得他怎么操作或是安装了什么软件包。而且我的无线网卡现在已经坏掉了,也不记得我当时当到底弄没弄过firmware了— —
如果你用wpa_supplicent确实无法联网,而且你配置好或正确使用这个软件了,也许真的要解决那个firmware问题了。但关于firmware的地方目前我也没有办法


今天顺藤摸瓜,找到解决方法了。目前还在按照手册安装中,
参考的http://www.aircrack-ng.org/doku.php?id=zd1211rw
Couldn't load firmware. Error number -2

If dmesg has an error similar to the following:

usb 1-1: Could not load firmware file zd1211/zd1211b_ub. Error number -2
zd1211rw 1-1:1.0: couldn't load firmware. Error number -2

This means you are missing the firmware for your device or it is located in the wrong location. The firmware is downloaded to the device each time it is initialized by the kernel module and is required for your device to operate. The typical location is /lib/firmware/zd1211. Please keep in mind that this may vary for your specific distribution. Try this location first, if that fails then seek out help from your distribution support group or review the source code of the zd1211rw module on your distribution.

On some distributions, the kernel version is included in the firmware path: /lib/firmware/<kernel version from uname -r>/zd1211. If this is the case then you may have to copy the firmware to the standard driver location or add a symbolic link. One way or another, the driver needs to be able to find the firmware.
Back to top
View user's profile Send private message
rawname
n00b
n00b


Joined: 31 Dec 2007
Posts: 2

PostPosted: Tue Nov 26, 2013 2:25 pm    Post subject: Reply with quote

可以确定你没有安装无线网卡的firmware,可以用 sudo emerge linux-firmware 安装
然后修改 /etc/conf.d/net,加入以下3行

modules_wlp0s19f2u2="wpa_supplicant"
wpa_supplicant_wlp0s19f2u2="-Dwext"
config_wlp0s19f2u2="dhcp"


另外我的wpa_supplicant.conf 是放在/etc/wpa_supplicant/下,不知放在/etc/下是否可以?

wpa_supplicant.conf 的内容如下

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

ap_scan=1

network={
ssid="你的SSID"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="你的明文psk"
priority=5
}

在我这里,使用加密的psk好像有问题,但使用明文psk就没有问题

希望能对你有帮助!!呵呵
Back to top
View user's profile Send private message
jkddontmove
n00b
n00b


Joined: 22 Nov 2013
Posts: 4

PostPosted: Wed Nov 27, 2013 2:49 pm    Post subject: Reply with quote

rawname wrote:
可以确定你没有安装无线网卡的firmware,可以用 sudo emerge linux-firmware 安装
然后修改 /etc/conf.d/net,加入以下3行

modules_wlp0s19f2u2="wpa_supplicant"
wpa_supplicant_wlp0s19f2u2="-Dwext"
config_wlp0s19f2u2="dhcp"


另外我的wpa_supplicant.conf 是放在/etc/wpa_supplicant/下,不知放在/etc/下是否可以?

wpa_supplicant.conf 的内容如下

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

ap_scan=1

network={
ssid="你的SSID"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="你的明文psk"
priority=5
}

在我这里,使用加密的psk好像有问题,但使用明文psk就没有问题

希望能对你有帮助!!呵呵


谢谢!livecd中已经成功连网了,用的是楼上我提到的办法。不过你倒是提醒了我,貌似应该也在安装的gentoo系统中emerge你提到的firmware,好让新装的系统跟livecd一样能成功地连接网络。
目前安装到了最后一步又卡住了,写好了grub.cfg,但是重启显示
Grub loading stage1.5

Grub loading,please wait
Boot "Gentoo Linux"

root(hd3,0)
Error 22:No such partition

我看了devicemap,也用了fdisk看了一下,确定我的启动分区是(hd3,0)

我的grub.cfg内容如下:
default 0
timeout 10

title Gentoo Linux
root (hd3,0) #我的boot分区是/dev/sdd1
kernel /boot/kernerl-XXX-gentoo root=/dev/sdd6

目前已经尝试过了在win下用diskgenius修复sdd的mbr,但是依旧出现error 22。
另外我是按照内容较新的英文版amd手册,通过emerge sys-boot/grub:0来安装grub的,而中文版中是emerge grub,不知和这个有没有关系。

无论如何,先换个思路看看,试试grub2先~
Back to top
View user's profile Send private message
Saigut
n00b
n00b


Joined: 15 Mar 2013
Posts: 17

PostPosted: Wed Nov 27, 2013 3:16 pm    Post subject: Reply with quote

Quote:
root (hd3,0)
Error 22:No such partition

看起来你还可能是grub所在分区写错了。(hd3,0)代表的是第4块硬盘上的第一个分区,你确实是用的第四块硬盘吗? /dev/sdd不知道是不是对应hd3
_________________
Gentoo/Funtoo Awesome
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum