Activating wifi card ?

Hello :wink:

i’m using openSUSE 13.2 with Ethernet but i added a wifi card in order to be able to access the web when the ethernet is Ko. I installed 13.2 from the dvd.

How do i activate the wifi access : do i need to turn off the ethernet before ?

I went to yast and set up the wifi device ( Atheros AR9485 , driver ath9k is active) , it seems it’s not completely set though .
In console i used wicked to turn on the wifi device ( # wicked ifup wlp4s0) but i can see that there’s a time out , also it seems it’s unable to translate eap protocol (see below).

What else shall i do ? What’s going wrong ?

Thank you :wink:



systemctl -p Id show network.service
Id=wicked.service

# systemctl status network.service 
wicked.service - wicked managed network interfaces 
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled) 
   Active: active (exited) since Tue 2015-01-20 13:38:44 CET; 23min ago 
  Process: 941 ExecStart=/usr/sbin/wicked --systemd ifup all  (code=exited, status=0/SUCCESS) 
 Main PID: 941 (code=exited, status=0/SUCCESS) 
   CGroup: /system.slice/wicked.service 

Jan 20 13:38:44 openSUSE132 wicked[941]: device wlp4s0 failed: operation  timed out 
Jan 20 13:38:44 openSUSE132 wicked[941]: lo              up 
Jan 20 13:38:44 openSUSE132 wicked[941]: enp3s0          up 
Jan 20 13:38:44 openSUSE132 wicked[941]: wlp4s0          setup-in-progress 


openSUSE132:~ # systemctl status wickedd.service 
wickedd.service - wicked network management service daemon 
   Loaded: loaded (/usr/lib/systemd/system/wickedd.service; enabled) 
   Active: active (running) since Tue 2015-01-20 13:38:14 CET; 25min ago 
 Main PID: 939 (wickedd) 
   CGroup: /system.slice/wickedd.service 
           └─939 /usr/sbin/wickedd --systemd --foreground 

Jan 20 13:38:14 openSUSE132 wickedd[939]: unable to translate eap  protocol AKA 
Jan 20 13:38:14 openSUSE132 wickedd[939]: unable to translate eap  protocol AKA' 
Jan 20 13:38:14 openSUSE132 wickedd[939]: unable to translate eap  protocol FAST 
... 

Hi,

i’m using this kernel



uname -r
3.18.3-1.gc3e148f-desktop


with this wifi card :



 # lspci -nnk
...
04:00.0 Network controller [0280]: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)
        Subsystem: Qualcomm Atheros Device [168c:3118]
        Kernel driver in use: ath9k
        Kernel modules: ath9k





hi,

i can see the AP with iwlist but iwonfig shoes the acces point is not associated, how come ? :

# iwconfig
wlp4s0    IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
enp3s0    no wireless extensions.

lo        no wireless extensions.


Any tip or idea on how can i improve this please ?

Thanks :wink:

I don’t have a good handle on this, since I’m still using openSUSE 13.1 (and prefer using NM anyway), but I did find a bug report which may be of help to you

https://bugzilla.suse.com/show_bug.cgi?id=902771

Some good debug information in comment #2, and comment #3 discusses the use of the nanny daemon for hotplugging (if applicable). Anyway, hopefully you can make some sense of this.

Hello,

I read it all, thanks for the information.
I’m not sure though if this is a bug linked with wicked or my wifi card.
Shall i add data as in comment 2 or rather like in # 22 ?

Thanks :wink:

Can you confirm that the NetworkManager service is not active at all? I would follow the debug steps that were mentioned in that bug report. Then you will have more useful info to go on.

Here is how to do it:
‒ set DEBUG=all in /etc/sysconfig/network/config
‒ systemctl restart wickedd
‒ wicked --debug all ifup all # systemctl restart wicked
‒ wicked ifstatus all > status.log
‒ wicked show-config > configs.log
‒ journalctl -b -o short-iso > wicked.log

  • edit /usr/lib/systemd/system/wpa_supplicant.service file:

-ExecStart=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log
+ExecStart=/usr/sbin/wpa_supplicant -dddt -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log

  • systemctl daemon-reload
  • systemctl restart wpa_supplicant

reproduce the issue and attach: status.log, configs.log, wicked.log and /var/log/wpa_supplicant.log

hello :wink:

to answer your question : networkmanager was not active, i cheched this following the bug report command lines.

Now this is confusing : shall i use networkmanager or fill a new bug report with wicked ? It seems openSUSE 13.2 introduced wicked too early, it’s brand new and not very well know so far, this making some cases more difficult to solve.

So …as the release notes says that networkmanager can be reactived , i followed the tips there to try this option too, i then rebooted in order to restart all that’s needed (services like wicked, wickedd, wpa_supplicant, network… ) , but then iwconfig still gave me the wifi device not associated. Did i forget something ?
Shall i do something more trying to use networkmanager ?

I then returned to the previous state : reactived wicked and turned off networkmanager using the following :

# /usr/bin/systemctl --kill-who=all kill NetworkManager.service
 # /usr/bin/systemctl stop NetworkManager.service
# /usr/bin/systemctl --force disable NetworkManager.service

status is now as follows :

# systemctl status network.service wickedd.service wpa_supplicant.service NetworkManager.service
wicked.service - wicked managed network interfaces                                                                                                                                                                                          
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled)                                                                                                                                                                         
   Active: active (exited) since Mon 2015-02-02 10:08:05 CET; 5min ago                                                                                                                                                                      
  Process: 966 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited, status=0/SUCCESS)                                                                                                                                                
 Main PID: 966 (code=exited, status=0/SUCCESS)                                                                                                                                                                                              
   CGroup: /system.slice/wicked.service                                                                                                                                                                                                     
                                                                                                                                                                                                                                            
Feb 02 10:08:05 openSUSE132 wicked[966]: device wlp4s0 failed: operation timed out                                                                                                                                                          
Feb 02 10:08:05 openSUSE132 wicked[966]: lo              up                                                                                                                                                                                 
Feb 02 10:08:05 openSUSE132 wicked[966]: enp3s0          up                                                                                                                                                                                 
Feb 02 10:08:05 openSUSE132 wicked[966]: wlp4s0          setup-in-progress                                                                                                                                                                  
                                                                                                                                                                                                                                            
wickedd.service - wicked network management service daemon                                                                                                                                                                                  
   Loaded: loaded (/usr/lib/systemd/system/wickedd.service; enabled)                                                                                                                                                                        
   Active: active (running) since Mon 2015-02-02 10:07:35 CET; 5min ago                                                                                                                                                                     
 Main PID: 957 (wickedd)                                                                                                                                                                                                                    
   CGroup: /system.slice/wickedd.service                                                                                                                                                                                                    
           └─957 /usr/sbin/wickedd --systemd --foreground                                                                                                                                                                                   
                                                                                                                                                                                                                                            
Feb 02 10:07:35 openSUSE132 wickedd[957]: unable to translate eap protocol AKA                                                                                                                                                              
Feb 02 10:07:35 openSUSE132 wickedd[957]: unable to translate eap protocol AKA'                                                                                                                                                             
Feb 02 10:07:35 openSUSE132 wickedd[957]: unable to translate eap protocol FAST
Feb 02 10:07:36 openSUSE132 wickedd[957]: lo: address 127.0.0.1 covered by a static lease
Feb 02 10:07:36 openSUSE132 wickedd[957]: lo: address ::1 covered by a static lease
Feb 02 10:07:38 openSUSE132 wickedd[957]: enp3s0: Notified neighbours about IP address 192.168.0.13
Feb 02 10:07:38 openSUSE132 wickedd[957]: Skipping hostname update, none available

wpa_supplicant.service - WPA Supplicant daemon
   Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant.service; enabled)
   Active: active (running) since Mon 2015-02-02 10:07:34 CET; 5min ago
 Main PID: 834 (wpa_supplicant)
   CGroup: /system.slice/wpa_supplicant.service
           └─834 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log

Feb 02 10:07:35 openSUSE132 wpa_supplicant[834]: ioctl[SIOCSIWENCODEEXT]: Invalid argument
Feb 02 10:07:35 openSUSE132 wpa_supplicant[834]: ioctl[SIOCSIWENCODEEXT]: Invalid argument

NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled)
   Active: inactive (dead)

You choice as to whether you use NM or wicked. (I think NM is easier to configure and connect for those switching wireless networks frequently.)

So …as the release notes says that networkmanager can be reactived , i followed the tips there to try this option too, i then rebooted in order to restart all that’s needed (services like wicked, wickedd, wpa_supplicant, network… ) , but then iwconfig still gave me the wifi device not associated. Did i forget something ?
Shall i do something more trying to use networkmanager ?

Yes, you need to configure a connection using the NM connection editor first.

I then returned to the previous state : reactived wicked and turned off networkmanager using the following :

Okay, so sticking with wicked…

Feb 02 10:07:35 openSUSE132 wpa_supplicant[834]: ioctl[SIOCSIWENCODEEXT]: Invalid argument
Feb 02 10:07:35 openSUSE132 wpa_supplicant[834]: ioctl[SIOCSIWENCODEEXT]: Invalid argument

You might want to share the configuration in /etc/wpa_supplicant/wpa_supplicant.conf, as perhaps there’s an error or mis-configuration there. (Don’t share the passkey of course.)

hi,

i agree that NM seems to be easier, known option and easy to use, but i do not know how to use it (yet).
How do you “configure a connection using the NM connection editor” ?

in my opinion wicked is supposed to work (i “hate” it when i need to change defaults) and the futureoption too, so i’d rather have wicked working if possible, but if not i’ll use NM in the meanwhile.

i have this in the wpa supplicant conf file :


# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

The Gnome and KDE NM front-ends are a little different from each other (but the same principles apply). Here’s a graphical guide to get you started

https://activedoc.opensuse.org/book/opensuse-reference/chapter-25-using-networkmanager

in my opinion wicked is supposed to work (i “hate” it when i need to change defaults) and the futureoption too, so i’d rather have wicked working if possible, but if not i’ll use NM in the meanwhile.

No, both are the current alternatives. The Wicked framework for network configuration and is a replacement for the ifup family of scripts, as explained here. I agree with you though, that it can be frustrating when there is an issue with configuration or similar.

i have this in the wpa supplicant conf file :

cat /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

Okay, I have the same as it happens, (but that’s probably just the default install settings). Other references that I’ve seen look more like these examples below

 ctrl_interface=/var/run/wpa_supplicant
  ctrl_interface_group=wheel
  eapol_version=1
  ap_scan=1
  fast_reauth=1

  network={
        ssid="your_essid"
        proto=WPA RSN
        key_mgmt=WPA-PSK WPA-EAP
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk=your_64_hex_characters_long_key
  }

or

ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1

network={
    ssid="Foobar1"
    psk="password1"
    priority=1
}
network={
    ssid="Foobar2"
    psk="password2"
    priority=2
}

Not sure what else I can advise here, since I’m not familiar with wicked. Is the wireless configuration located in /etc/sysconfig/network/ifcfg… perhaps?

Is the wireless configuration located in /etc/sysconfig/network/ifcfg… perhaps?

Further to this, can you provide you configured /etc/sysconfig/network/ifcfg-wlp4s0 file? (Leave out the passphrase of course.)

Some good info in the man page for wicked
https://github.com/openSUSE/wicked/blob/master/man/ifcfg-wireless.5.in
In particular, note the section dealing with authentication, including PSK and EAP.

hi,

is the wpa_supplicant conf file generated by a process not working ok or manually ?

here’s the cat of /etc/sysconfig/network/ifcfg-wlp4s0 :


# cat  /etc/sysconfig/network/ifcfg-wlp4s0
BOOTPROTO='dhcp'
BROADCAST=''
DHCLIENT_SET_DEFAULT_ROUTE='yes'
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME='AR9485 Wireless Network Adapter'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
WIRELESS_AP=''
WIRELESS_AP_SCANMODE='1'
WIRELESS_AUTH_MODE='psk'
WIRELESS_BITRATE='auto'
WIRELESS_CA_CERT=''
WIRELESS_CHANNEL=''
WIRELESS_CLIENT_CERT=''
WIRELESS_CLIENT_KEY=''
WIRELESS_CLIENT_KEY_PASSWORD=''
WIRELESS_DEFAULT_KEY='0'
WIRELESS_EAP_AUTH=''
WIRELESS_EAP_MODE=''
WIRELESS_ESSID='xxxxxx'
WIRELESS_FREQUENCY=''
WIRELESS_KEY=''
WIRELESS_KEY_0=''
WIRELESS_KEY_1=''
WIRELESS_KEY_2=''
WIRELESS_KEY_3=''
WIRELESS_KEY_LENGTH='128'                                                                                                                                                                                                                   
WIRELESS_MODE='Managed'                                                                                                                                                                                                                     
WIRELESS_NICK=''                                                                                                                                                                                                                            
WIRELESS_NWID=''                                                                                                                                                                                                                            
WIRELESS_PEAP_VERSION=''                                                                                                                                                                                                                    
WIRELESS_POWER='no'                                                                                                                                                                                                                         
WIRELESS_WPA_ANONID=''                                                                                                                                                                                                                      
WIRELESS_WPA_IDENTITY=''                                                                                                                                                                                                                    
WIRELESS_WPA_PASSWORD=''                                                                                                                                                                                                                    
WIRELESS_WPA_PSK='xxxx'     



Yes, I think so.

Looking at your ifcfg-wlp4s0 config, I would check that the appropriate authentication protocol for your AP matches what you set here. The config shows PSK (WPA-PSK). Nothing looks wrong with the configuration (assuming authentication details are correct), but you might want to review the settings you made in YaST anyway. The curious error message reported by the wicked daemon was

wickedd[957]: unable to translate eap protocol

but I’m not sure how it applies here, since you appear not to be using EAP. BTW, there is also a WPA-EAP authentication protocol which is supported. You can review the man pages for more info

man ifcfg-wireless

hello,

the error message is strange i agree.

In Yast the options are clear : wpa-psk or wpa-eap , i chose wpa-psk.

if i’m correct yast fills the /etc/sysconfig/network/ifcfg-wlp4s0 file , and there it is set psk : WIRELESS_AUTH_MODE=‘psk’ .

Nonetheless I guess that wicked is expecting something linked with eap that it can’t find …

I did wonder about this parameter though (may or may not be relevant)

WIRELESS_KEY_LENGTH='128

I wonder if this correct or even needs to be used here for WPA-PSK. (I doubt it.)

I note that it is mentioned

WIRELESS_KEY_LENGTH
Defines the length in bits for all keys used. There are currently 40 and 104
bit keys supported. Sometimes they are also called 64 resp. 128 bits
(depends on whether you count the 24 bit initialization vetor or not).
This variable is only meaningful if you enter the key as passphrase.

WIRELESS_WPA_PSK
When using WPA-PSK authentication, you need to specify your preshared key
here. The key is used for authentication and encryption purposes. You can
enter it in hex digits (needs to be exactly 64 digits long) or as passphrase
getting hashed (8 to 63 ASCII characters long).

hi,

WIRELESS_KEY_LENGTH : can i use 40 or 104 only ?

i don’t get the following : what is resp. ? what does it mean ?

"Sometimes they are also called 64 resp. 128 bits

(depends on whether you count the 24 bit initialization vetor or not)".

in WIRELESS_WPA_PSK : i entered a passphrase myself , i understand that this passphrase is going to be hashed by the system after . Is this correct ?
( as passphrase getting hashed (8 to 63 ASCII characters long). )

Also i added in the interface conf file

# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

###ajouts pour la configuration du wifi, au départ le fichier n'a que les 2 1eres lignes ce qui n'est pas complet.
### the following i added for file was not complete as default
 
  eapol_version=1
  ap_scan=1
  fast_reauth=1

  network={
        ssid="xx"
        proto=WPA RSN
        key_mgmt=WPA-PSK WPA-EAP
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk=yyyyyyyy
  }


and then rebooted but i still have no association :


# iwconfig
wlp4s0    IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
enp3s0    no wireless extensions.

lo        no wireless extensions.

openSUSE132:~ # ifup wlp4s0
wicked: device wlp4s0 failed: call to org.opensuse.Network.Wireless.changeDevice() failed: General failure
wlp4s0          setup-in-progress

Can you try removing that entry, or perhaps commenting it out?

in WIRELESS_WPA_PSK : i entered a passphrase myself , i understand that this passphrase is going to be hashed by the system after . Is this correct ?
( as passphrase getting hashed (8 to 63 ASCII characters long). )

Yes, that’s correct.

As far as wicked is concerned, I don’t think it uses wpa_supplicant.conf (although wpa_supplicant daemon is used itself of course), so this won’t help. It is used by distros using systemd-networkd, or those using CLI to connect, (but openSUSE does not yet). I include the following pages only for interest’s sake:

http://blog.volcanis.me/2014/06/01/systemd-networkd/
https://wiki.archlinux.org/index.php/WPA_supplicant
http://www.joachim-breitner.de/blog/664-Switching_to_systemd-networkd

i don’t get the following : what is resp. ? what does it mean ?

I think it means respectively, but that doesn’t really add value to the description IMHO.

hi,

i v’e commented the “WIRELESS_KEY_LENGTH” line. But despite this it still does not work :


# iwconfig                                                                                                                                                                                                                    
wlp4s0    IEEE 802.11bgn  ESSID:off/any                                                                                                                                                                                                     
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm                                                                                                                                                                      
          Retry short limit:7   RTS thr:off   Fragment thr:off                                                                                                                                                                              
          Encryption key:off                                                                                                                                                                                                                
          Power Management:off    

Try connecting manually as explained here

https://en.opensuse.org/SDB:WiFi#How-to_connect_to_WiFi_without_the_NetworkManager

wpa_passphrase <ESSID> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant.conf

Then kill any running wpa_supplicant daemons, and try to associate with

wpa-supplicant -dddt -iwlp4s0 -c/etc/wpa_supplicant/wpa_supplicant.conf  -Dwext -f /var/log/wpa_supplicant.log

If you connected successfully, do

dhclient wlp4s0

You should now have a working internet connection. (If that works as expected, then the next step might be to submit a bug report for wicked.)