Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] USB wifi adpater not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Reiner6
n00b
n00b


Joined: 14 Aug 2016
Posts: 35

PostPosted: Fri Aug 19, 2016 12:41 am    Post subject: [solved] USB wifi adpater not working Reply with quote

I have an old laptop i installed gentoo to, now im trying to make the wifi work, and i got it a wifi usb adapter, i tried working with it using iwconfig commands, but with no results; mostly i think because my network has a wpa2 protection, can anyone help me solve this?
thanks in advance :D


Last edited by Reiner6 on Fri Aug 26, 2016 3:48 am; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Fri Aug 19, 2016 12:57 am    Post subject: Reply with quote

Assuming that the wireless Usb adapter is already working, I mean commands like
Code:
ifconfig wlan0 up
iwlist wlan0 scan | less

return access points available and the one you want to connect to. You need first to associate your wireless card to the access point. Suppose you create a simple wpa_supplicant.conf like this
Code:
wpa_passphrase access-point passphrase > /root/wpa_supplicant.conf


Replace access-point and passphrase with the good information. Than you start wpa_supplicant like this for testing
Code:
 wpa_supplicant -c /root/wpa_supplicant.conf -D nl80211,wext -i wlan0

Than, after a pause, you check if you are associated with the access point
Code:
iwconfig wlan0

If yes, than
Code:
dhcpcd wlan0

To get an Ip configuration from the dhcp server. Try to surf. This can be ameliorate but may work from the beginning after adapting (change wlan0 with the real wireless name interface). Than you can setup a boot script to do the same.
_________________
Paul
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 592
Location: Australia

PostPosted: Fri Aug 19, 2016 1:10 am    Post subject: Re: USB wifi adpater not working Reply with quote

Reiner6 wrote:
I have an old laptop i installed gentoo to, now im trying to make the wifi work, and i got it a wifi usb adapter, i tried working with it using iwconfig commands, but with no results; mostly i think because my network has a wpa2 protection, can anyone help me solve this?
thanks in advance :D

If you want meaningful help you need to be a bit more specific, ie. what is the hardware - the output of
Code:
lsusb
- you may need to
Code:
emerge -a usbutils
if not already installed.

You may need additional kernel options, firmware etc.. depending on the device. Have you tried to work through https://wiki.gentoo.org/wiki/Wifi if so, include what you did and how far you got - do you have a wireless device listed if you run:
Code:
ip a
For wpa2 you need wpa_supplicant installed.
Back to top
View user's profile Send private message
Reiner6
n00b
n00b


Joined: 14 Aug 2016
Posts: 35

PostPosted: Fri Aug 19, 2016 2:58 am    Post subject: Reply with quote

Logicien wrote:

Replace access-point and passphrase with the good information. Than you start wpa_supplicant like this for testing
Code:
 wpa_supplicant -c /root/wpa_supplicant.conf -D nl80211,wext -i wlan0



I tried this and i got
Code:
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWSCAN]: Device or resource busy
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry1


and got stuck there, im guessing thats not a good thing


ian.au

lsusb tells me this

Code:
148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 592
Location: Australia

PostPosted: Fri Aug 19, 2016 4:47 am    Post subject: Reply with quote

Reiner6 wrote:
Logicien wrote:

Replace access-point and passphrase with the good information. Than you start wpa_supplicant like this for testing
Code:
 wpa_supplicant -c /root/wpa_supplicant.conf -D nl80211,wext -i wlan0



I tried this and i got
Code:
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWSCAN]: Device or resource busy
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry1


and got stuck there, im guessing thats not a good thing


ian.au

lsusb tells me this

Code:
148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter


This is a systemd install, right? If setup with NetworkManager there might already have been a wpa_supplicant process running, which would give that error, what does
Code:
systemctl status wpa_supplicant
return? If your credentials in /etc/wpa_supplicant/wpa_supplicant.conf are correct it should just work, you do have to restart wpa_supplicant after you entered the config strings in /etc/conf.d.net and /etc/wpa_supplicant/wpa_supplicant.conf per the wiki ie
Code:
systemctl restart wpa_supplicant

Unfortunately I don't have a system with this running at the moment and it's been some time since I set it up, but from memory provided you have a device listed to connect to
Code:
ip a
, an entry in /etc/conf.d/net and correct passphrase in /etc/wpa_supplicant/wpa_supplicant.conf, that should be all that is required.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Fri Aug 19, 2016 7:12 pm    Post subject: Reply with quote

Reiner6,

Post your dmesg on a pastebin site please.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Reiner6
n00b
n00b


Joined: 14 Aug 2016
Posts: 35

PostPosted: Fri Aug 26, 2016 3:47 am    Post subject: Reply with quote

A friend ended up helping me with NetworkManager, it solved everything
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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