# wpa_supplicant : no connection to ap

## strelok

Hello,

I can't have connection to ap with wpa_supplicant. My configuration was used to work 3 months ago, but since, I have some troubles. I guess it is the upgrade to gentoo-sources>3.1.6.

 *Quote:*   

>  wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -d -i wlan0
> 
> wpa_supplicant v1.0
> 
> random: Trying to read entropy from /dev/random
> ...

 

I really have no idea of what to do. Thanks for the help.

----------

## gerdesj

Can we have some more details please?  WiFi model and the AP make and model.

Now this is from memory but I did have trouble a while ago with a particular kernel version and had to revert back to the previous one.  I am currently running 3.3.0 with no problems on this laptop. 

Thanks for posting this and making me check my kernel version. I "upgraded" my kernel to 3.4.4 last night and updated the title of the Grub entry but not the kernel load line!" Time for a reboot  :Cool: 

So for troubleshooting purposes could you try reverting back to an older kernel to prove that is OK.  If so then we probably do not have to change configuration.  If that works then try a newer kernel.

Cheers

Jon

----------

## strelok

For the WiFi model :

03:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express)

For the AP : it doesn't work for any.

How can I downgrade to an older kernel ? I already have the last :/

----------

## gerdesj

 *strelok wrote:*   

> For the WiFi model :
> 
> 03:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express)
> 
> For the AP : it doesn't work for any.
> ...

 

```

emerge -va =sys-kernel/gentoo-sources-3.0.36

```

Will install the sources for 3.0.36.  I know it was a while ago ...

How do you do your kernel updates - genkernel?

If it is a bit of a pain to go backwards then what about up to the latest - 3.4.4?

Cheers

Jon

----------

## strelok

 *Quote:*   

> emerge -va =sys-kernel/gentoo-sources-3.0.36 
> 
> zsh: sys-kernel/gentoo-sources-3.0.36 not found
> 
> 

 

What am I doing wrong ? :/

No, I'm using make oldconfig for kernel updates.

I can't emerge the 3.4.4 version : when I try, it makes me install the 3.4.3 one.

----------

## gerdesj

I am using ~amd64.  I've just checked the online package database and the version I posted above is available on all arches.

3.4.3 is still pretty current  :Cool:  Please try that.  Have you not run emerge --sync recently?

Cheers

Jon

----------

## strelok

It didn't solve the issue :/

What should I try ?

----------

## khayyam

strelock ...

just a hunch but do you have a wildcard AP defined, something like the following examples?

```
network={

    key_mgmt=NONE

}

network={

    ssid="any"

    key_mgmt=NONE

}
```

If so, please try with them commented out ... it looks to me (from the above) that you are getting to the point of associating and then getting a 'DISASSOC' when a 'new AP'  00:00:00:00:00:00 (a non-existant BSSID) comes on the scene. I'm not sure why this is happening, it may be bleed over from other AP's in the area, but I think you might be getting it because on the inital scan you are prepared to connect to any network.

Again, this is a hunch ... but perhaps worth a try.

HTH & best ...

khay

----------

## strelok

Thanks for the reply.

No, it doesn't seem to work :

 *Quote:*   

> wlan0: Cancelling scan request
> 
> wlan0: WPA: clearing own WPA/RSN IE
> 
> wlan0: Automatic auth_alg selection: 0x1
> ...

 

My ap seems to be blacklisted (freebox_4410) : I don't know why...

----------

## khayyam

 *strelok wrote:*   

> No, it doesn't seem to work

 

OK, so there was a wildcard defined? Anyhow, you post all this debug info yet we haven't even got a clue about your wpa_supplicant.conf, kernel .config, AP, etc ... its next to impossible to debug this without such details. Reading the output of wpa_supplicant is something that needs to be done in context, and as the product of a limited wpa_supplicant.conf (ie one network { }), so that the problem can be isolated. The debug doesn't help in this instance becuase there are no specific errors and we have no idea what its configured to do.

best ... khay

----------

## strelok

Concerning the AP, what should I post ?Last edited by strelok on Mon Oct 24, 2016 6:12 pm; edited 1 time in total

----------

## khayyam

OK ... so, you have practically every single wireless card enabled, however, I think your issue is you have CONFIG_MAC80211_MESH=y please try building your kernel with it disabled. 

Also, your should have removed the psk (I don't need to know, and nobody should) and the sections for 'wildcard' AP's I'd intended that you would remove them, not add them.

HTH & best ...

khay

----------

## BillWho

 *khayyam wrote:*   

> OK ... so, you have practically every single wireless card enabled, however, I think your issue is you have CONFIG_MAC80211_MESH=y please try building your kernel with it disabled.

 

I think that should be set. This is wireless and I have MAC80211_MESH set.

gentoo ~ # grep CONFIG_MAC80211_MESH /usr/src/linux/.config

CONFIG_MAC80211_MESH=y

----------

## strelok

Unfortunately, I moved for 3 days. Moreover, I'm using the MESH config for a project :/ But I'll try.

 *Quote:*   

> Also, your should have removed the psk (I don't need to know, and nobody should) and the sections for 'wildcard' AP's I'd intended that you would remove them, not add them. 

 

I don't know about what you are talking. What is the sections for wildcard AP's ?

----------

## khayyam

 *BillWho wrote:*   

> I think that should be set. This is wireless and I have MAC80211_MESH set.

 

Bill ... yes, if you intend to operate in a mesh, however, I don't think it should be =y ... but =m ... in any case the issue is why 00:00:00:00:00:00 appears on the scene and then kappposssssh, DISASSOC. Now, that doesn't seem normal to me, and so after reading the config assumed that probably MESH is the culprit (possibly looking to ASSOC with a MESH). I could be wrong, but unless someone suggests a better idea of whats actually happening here then that to my mind is the most probable. I was also operating on the assumption that as the OP had practically every wireless card enabled, they were probably setting everything "just in case", and so disabling MESH (which you'll agree most people don't use or need) was simply a matter of disabling something that was probably enabled without the understanding of what it was, or does. This turn out not to be the case, but none the less its a fair assumption to work from given the circumstances ... and the nature of the problem.

best ... khay

----------

## khayyam

 *strelok wrote:*   

> I'm using the MESH config for a project

 

I'm which case build it as a module and blacklist it for the period in which you can test.

 *strelok wrote:*   

>  *Quote:*   Also, your should have removed the psk (I don't need to know, and nobody should) and the sections for 'wildcard' AP's I'd intended that you would remove them, not add them.  
> 
> I don't know about what you are talking. What is the sections for wildcard AP's?

 

In your wpa_supplicant.conf ... you added the networks I provided as examples of those you should remove.

best ... khay

----------

## BillWho

 *khayyam wrote:*   

> 
> 
> I'm which case build it as a module and blacklist it for the period in which you can test.

 

Unfortunately, it's built-in or nothing   :Sad: 

Out of curiosity, I'm compiling without it to see if it affects anything with the wireless connection

----------

## khayyam

 *BillWho wrote:*   

>  *khayyam wrote:*   I'm which case build it as a module and blacklist it for the period in which you can test. 
> 
> Unfortunately, it's built-in or nothing

 

Really ... well, I wonder at this wisdom of this as B.A.T.M.A.N. has been in the kernel since 3.x (and, yes, I have B.A.T.M.A.N as a module).

 *BillWho wrote:*   

> Out of curiosity, I'm compiling without it to see if it affects anything with the wireless connection

 

Well, it may not, but if you were in the vacinity of a MESH node then when associating what is going to have priority, your AP or the MESH? Note that MESH is a non standardised protocol, how it's supposed to perform no one can really tell you.

best ... khay

----------

## BillWho

khayyam,

Well, I disabled MAC80211_MESH and it's connected and I have a ssh connection to it from this machine so everything looks good so far  :Smile: 

----------

## khayyam

 *BillWho wrote:*   

> Well, I disabled MAC80211_MESH and it's connected and I have a ssh connection to it from this machine so everything looks good so far

 

Bill ... yes, I know MAC80211_MESH is not required for wireless networking, I don't have it enabled.

best ... khay

----------

## strelok

I tried with an other AP and whitout the MESH, it seems to work. I'll try to come back to my previous configuration to be sure.

----------

## khayyam

 *strelok wrote:*   

> I tried with an other AP and whitout the MESH, it seems to work. I'll try to come back to my previous configuration to be sure.

 

strelok ... OK, good ... at least we now know its not a bug with your wireless driver. I would make a copy of a debug log from wpa_supplicant of a successful ASSOC, this way this can be compared to those which failed above.

BTW, is there a wireless MESH network in your vacinity (that is, in the vacinity of freebox_4410)?

best ... khay

----------

## strelok

I think it was an hardware issue, because it works now, but I did not put off the MESH option.

----------

