You are not logged in.

#1 2014-08-10 05:04:35

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 296
Website

TP-Link WiFi setup problems

I have a TP-LINK TL-WN727N USB WiFi dongle, and I have trouble getting it to work.

According to [1] pointing [2], it uses the rt2800usb driver. I have added "rt2800usb" to /etc/modules-load.d/wifi.conf. After reboot, I get this:

# lsusb
Bus 002 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter
...
# lsmod | grep rt28
rt2800usb              21418  0 
rt2x00usb               9346  1 rt2800usb
rt2800lib              76675  1 rt2800usb
rt2x00lib              39175  3 rt2x00usb,rt2800lib,rt2800usb
mac80211              495361  3 rt2x00lib,rt2x00usb,rt2800lib
crc_ccitt               1363  1 rt2800lib
usbcore               188509  6 uhci_hcd,rt2x00usb,rt2800usb,ehci_hcd,ehci_pci,usbhid

but then

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 00:1c:c0:34:d2:bb brd ff:ff:ff:ff:ff:ff

does not show the interface, nor does

iw dev

Here's from the kernel log:

# dmesg | grep usbcore    
[    4.962208] usbcore: registered new interface driver rt2800usb
# dmesg | grep firmware

(no output)

I'm afraid I'm stuck. Help?


[1] https://wiki.archlinux.org/index.php/Wifi
[2] http://wireless.kernel.org/en/users/Devices/USB

Offline

#2 2014-08-10 05:22:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: TP-Link WiFi setup problems

It's registering as the MT7601U, don't you need this https://aur.archlinux.org/packages/dkms-mt7601u/


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-08-10 05:36:21

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 296
Website

Re: TP-Link WiFi setup problems

You think the page on wireless.kernel.org is wrong?

But let's say it is. Installing it produces a new interface called ra0, which I can set to "up".

But

iw dev

still doesn't produce any output, nor does

iw phy

or

iw list

. Nothing about firmware in kernel log either.

Last edited by jernst (2014-08-10 05:37:53)

Offline

#4 2014-08-10 05:49:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: TP-Link WiFi setup problems

I don't know that the reference page would be wrong, but I would not be surprised if a branded device shipped with a completely different chip in it...

What firmware should be loaded for that chip? Check dmesg.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-08-10 10:09:59

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: TP-Link WiFi setup problems

A hint: *Never* look at marketing names, always at the usb-id (or pci-id for pci devices). It's irrelevant that you have a TL-WN727N, what's relevant is that you have a 148f:7601. So the wireless page isn't wrong, it doesn't list a 148f:7601 at all.

Another hint: External drivers, especially for usb devices, tend to be wext (wireless extensions) drivers and not nl80211. iw uses nl80211 exclusively, it won't work with wext drivers. Use wireless_tools instead. wpa_supplicant works with both wext and nl80211.

Offline

#6 2014-08-10 19:54:12

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 296
Website

Re: TP-Link WiFi setup problems

@Gusar: You are obviously correct, because I now got it to work using wpa_supplicant. But the mind boggles ... what a mess! Shouldn't all tools support all drivers, or is that a naive question?

For the record, this is what I did:

  1. Installed dkms-mt7601u-latest from AUR. (dkms-mt7601u, which is also there, fails to build for me.) This makes the device show up as ra0 in 'ip link'

  2. Installed wpa_supplicant, and followed the instructions here for specifying network and authentication: https://wiki.archlinux.org/index.php/WPA_supplicant

  3. However, I need to specify -Dext on the wpa_supplicant command-line, otherwise I get this error message: nl80211: Driver does not support authentication/association or connect commands

For permanent configuration, I ended up having to create a new systemd service file:

cp /usr/lib/systemd/system/wpa_supplicant-nl80211@.service /usr/lib/systemd/system/wpa_supplicant-wext@.service

where I replaced all occurrences of 'nl80211' with 'wext'. Thus, the correct name of the wpa_supplicant config file became /etc/wpa_supplicant/wpa_supplicant-wext-ra0.conf and I can start the service with

systemctl start wpa_supplicant-wext@ra0

Still some problems when rebooting -- chances are that dhcpcd@ra0 does not wait until wpa_supplicant-wext@ra0 is ready.

Update: I have attempted to update the Wiki based on the valuable comments in this thread.

Last edited by jernst (2014-08-12 04:50:38)

Offline

#7 2014-11-24 21:14:18

Flowerkick
Member
Registered: 2014-11-24
Posts: 1

Re: TP-Link WiFi setup problems

@jernst: did u fix ur problem with dhcpcd? I have some issues, too. At startup I have a mac of all zeros and it trys (and gets) an IP from router. After restart of dhcpcd service the interface gets it's hardwired mac and from my router another IP on this mac. Here is a cp of my router log:
ip=192.168.0.4   mac=00-00-00-00-00-00   name=mediamachine (1. connect)
ip=192.168.0.6   mac=E8-94-F6-11-F7-1E   name=mediamachine (after restart of dhcpcd service)
It looks like as dhcpcd should wait for wpa_supplicant or something like this. But how to configure it to wait?

Any ideas?

Thanks in advance smile

Offline

Board footer

Powered by FluxBB