You are not logged in.

#1 2020-04-12 10:52:53

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

[Solved] Need help for USB DWA-171 5g usb wifi adpater

Pls help me in getting a driver for d link DWA-171 wifi usb.I installed arch using a tethered phone internet and after installation still this adapter doesn't work.I changed the mode using usb_modeswitch so it no longer appears as a storage device.
I tried what i got working for ubuntu : https://github.com/brektrou/rtl8821CU.git . The build fails with or without dkms.
Tried this also : https://github.com/gnab/rtl8812au . Build fails.
I got the kernel headers installed.I just cant copy the build errors as im still in the terminal.
My Kernel version is 5.6.3-arch-1. I got kernel headers installed for dkms, : header version is linux-headers-5.6.3.arch1-1
Have i got the wrong header or do i need to do something more.
pls pls help me.I aint got a clue of building from source and hence cant go debugging to any extent.
Thanks a ton! I really want to get Arch going having got it installed on a dual boot machine borrowed from someone who does not want to give up windows,only leased it for sometime so running out of time....

Last edited by kaushikgn (2020-04-13 19:38:08)

Offline

#2 2020-04-12 11:02:57

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

kaushikgn wrote:

I just cant copy the build errors as im still in the terminal

https://wiki.archlinux.org/index.php/Li … in_clients


Jin, Jîyan, Azadî

Offline

#3 2020-04-12 11:40:46

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

Hi
I could get the build working for rtl8821cu. The module file is present in /lib/modules/<linux version>/kernel/drivers/net/wireless/realtek/rtl8821cu.
I can also see the interface listed : sudo iw dev shows it as wlp9s0e3u1 ...
when i try to dhcpcd on that interface it doesnt get any ip address assigned from the router.Basically its just dead.How can i get this interface to work?
Thanks again.And it was awesome to get back an reply so quickly on my original query,

Offline

#4 2020-04-12 11:57:08

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

kaushikgn wrote:

when i try to dhcpcd on that interface it doesnt get any ip address assigned from the router.Basically its just dead.How can i get this interface to work?

If you post (a link to) the full output from dhcpcd(8) then we might be able to help you with that. Otherwise try using static addresses instead.


Jin, Jîyan, Azadî

Offline

#5 2020-04-12 12:32:13

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

If i use -d flag i can see its terminating at waiting for carrier..There are just 3 lines for the 2 steps without any detailed message.

Run-hooks PREINIT , then
Run-hooks NOCARRIER,
waiting for carrier
and then exiting after a few seconds after reporting its timed out.

Is there any way to capture more logs for this?

Offline

#6 2020-04-12 13:25:58

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

I finally got it working with wpa supplicant after creating a wpa passphrase.I remembered from ubuntu when i did not have any DE.

So basically :wpa_passphrase ssid pwd >wpa.conf
wpa_supplicant -Dwext -i myinterface -c /etc/wpa_supplicant/wpa.conf
then dhcpcd on that interface
It still takes some time though.Not as fast as it should be.
Is this the correct way of doing things in Arch linux?
Thanks again

Offline

#7 2020-04-12 13:26:42

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

Did you associate with the access point before attempting to obtain a network lease?

EDIT: crossposted with your last reply...

See the hooks section on the dhcpcd ArchWiki page for a way to bring wpa_supplicant up automatically along with dhcpcd.

Last edited by Head_on_a_Stick (2020-04-12 13:37:46)


Jin, Jîyan, Azadî

Offline

#8 2020-04-12 13:39:38

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

The steps i followed are:
1. ran wpa supplicant to authenticate and associate the interface.
2.dhcpcd to get a lease

Is there anything before 1 that should be done or something else altogether.

Offline

#9 2020-04-12 13:51:35

loqs
Member
Registered: 2014-03-06
Posts: 19,078

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

Are you using https://aur.archlinux.org/packages/rtl8821cu-dkms-git/ for the rtl8821cu module?
Did you try wpa_supplicant without -Dwext before switching to the legacy interface?

Offline

#10 2020-04-12 14:05:15

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

I also crossposted!
Im using the one from https://github.com/brektrou/rtl8821CU.git
Everything is working with the wpa supplicant and things are fast without Dwext.
The only thing is how to get wpa supplicant to do this at startup ? i have enabled it as a startup service but does not seem to work though.
Also need to add the dhcpcd lease for the entire thing to get working at startup without having to manually initialize and then get a lease.
Thanks a ton for your help smile

Offline

#11 2020-04-12 14:21:59

loqs
Member
Registered: 2014-03-06
Posts: 19,078

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

How did you enable wpa_supplicant to run at startup?  Are you following Wpa_supplicant#At_boot_(systemd)?
For DHCP as Head_on_a_Stick has already mentioned there is https://wiki.archlinux.org/index.php/Dh … supplicant which will run wpa_supplicant when running dhcpcd.

Offline

#12 2020-04-12 15:53:03

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

I created the sym link  as mentioned in # ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant /usr/lib/dhcpcd/dhcpcd-hooks/
created etc/wpa_supplicant/wpa_supplicant-interface.conf
when i run dhcpcd i get the message there is no ctrl_interface defined in the wpa conf file with my interface name.

I enabled the wpa@interface service originally via systemctl and it did startup the wpa supplicant service and i could connect if i ran dhcpcd manually.If there is a way fr this wpa supplicant@interface service to kick off dhcpcd then it would also work.Since im not sure about these nuances i guess i may be grossly mistaken in like putting the cart before the horse....
Can u pls help me this one bit.Thanks a bunch@

Offline

#13 2020-04-12 16:05:37

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

kaushikgn wrote:

created etc/wpa_supplicant/wpa_supplicant-interface.conf

How did you do that? What is the content of the file? Note that interface should be replaced with the actual interface name (this is generally the case for any italicised configuration elements quoted in the ArchWiki).

kaushikgn wrote:

when i run dhcpcd i get the message there is no ctrl_interface defined in the wpa conf file with my interface name.

See https://wiki.archlinux.org/index.php/Wp … figuration ← the ctrl_interface= line in the example configuration file.

Last edited by Head_on_a_Stick (2020-04-12 16:06:01)


Jin, Jîyan, Azadî

Offline

#14 2020-04-12 16:47:29

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

So i enabled dhcpcd as a service and wpa_supplicant@inerface service using systemctl.Which works as network is turned on when i login,Is this the correct way of doing it?thank you.
If i put in an desktop environment i hope everything will work fine as they interfere with network management.
This is solved , how do i mark it as resolved?

Last edited by kaushikgn (2020-04-12 18:32:42)

Offline

#15 2020-04-12 18:39:26

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

kaushikgn wrote:

So i enabled dhcpcd as a service and wpa_supplicant@inerface service using systemctl.Which works as network is turned on when i login,Is this the correct way of doing it?

If you've enabled the wpa_supplicant hook for dhcpcd then you don't have to also enable wpa_supplicant@interface.service and doing so may cause conflicts. Either rely on the hook or enable wpa_supplicant as a separate service, don't use both methods.

kaushikgn wrote:

If i put in an desktop environment i hope everything will work fine as they interfere with network management.

Although most desktop environments will include NetworkManager Arch doesn't enable services by default so it should carry on working without conflicting with NM.

kaushikgn wrote:

how do i mark it as resolved?

Edit the title of the thread (in your first post) and prepend it with [SOLVED].


Jin, Jîyan, Azadî

Offline

#16 2020-04-13 19:39:47

kaushikgn
Member
Registered: 2020-04-12
Posts: 52

Re: [Solved] Need help for USB DWA-171 5g usb wifi adpater

Thanks again. Much obliged!

Offline

Board footer

Powered by FluxBB