# [solved] can't scan via wpa_cli after update

## oneone

Hi there,

I've recently updated wpa_supplicant to version 2.9-r1 and now I can't trigger a scan via wpa_cli. Apparently scans are triggered (by wpa_supplicant or wpa_cli), because I get the following output, when starting wpa_cli interactively:

```
wpa_cli v2.9

Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.

See README for more details.

Selected interface 'wlp3s0'

Interactive mode

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
```

Every second a new CTRL-EVENT-SCAN-FAILED message appears. I can trigger a scan using "sudo iwlist wlp3s0 scan" though and I can also show the results using "wpa_cli scan_results". Connecting to a wpa encrypted network using "sudo iwconfig wlp3s0 essid ..." works aswell.

It is just wpa_cli which seems to be broken in some way. Maybe it is important to mention at this point that I updated gcc to version 8.3.0-r1. Unfortunately I do not know the previous version, but I'm quite sure it was no major version update.

So, what I think is, that by compiling the new version of wpa_supplicant with the new GCC version, I might have gotten some ABI conflict. Downgrading wpa_supplicant doesn't solve the problem either.

My kernel version is 4.19.72 and

if it is of any use, here is the hardware information of my wireless adapter:

```
description: Wireless interface

product: BCM4360 802.11ac Wireless Network Adapter

vendor: Broadcom Inc. and subsidiaries

physical id: 0

bus info: pci@0000:03:00.0

logical name: wlp3s0

version: 03

serial: 7c:04:d0:c6:dc:74

width: 64 bits

clock: 33MHz

capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless

configuration: broadcast=yes driver=wl0 driverversion=6.30.223.271 (r587334) ip=192.168.14.19 latency=0 multicast=yes wireless=IEEE 802.11

resources: irq:18 memory:c1200000-c1207fff memory:c1000000-c11fffff
```

Maybe someone from the community has a suggestion, what I should rebuild to solve this (if it is indeed an ABI conflict). Other suggestions are more than welcome as well.

oneone.Last edited by oneone on Tue Nov 05, 2019 10:09 pm; edited 1 time in total

----------

## charles17

You might try killall wpa_supplicant and starting with -dd as explained there.

----------

## oneone

Thank you very much for your response.

So, I tried it, but the debug wasn't too helpful for me. Here is a commented and edited paste of the log:

http://dpaste.com/12PHGQ8

I'm really clueless. I rebuild all the kernel modules with the new gcc-version, rebuild dbus, but both without any effect  :Sad: 

----------

## charles17

Some guess 

* topic 1037764

* https://bbs.archlinux.org/viewtopic.php?id=235916

----------

## oneone

I had a look at that gentoo thread earlier, but it doesn't really seem to be like my problem. The Arch thread looks much like my case though - besides that I don't use NetworkManager. It gave me the idea to adjust the setting of ap_scan to 1.

By doing so, I am now reproducably able to connect to a network via wpa_cli. But still just if I started the scan with iwlist. Once before the first connection attempt and once after. So something is still very wrong  :Very Happy: 

This is what I get:

```
wpa_cli v2.9

Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.

See README for more details.

Selected interface 'wlp3s0'

Interactive mode

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

<3>CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

> ap_scan 0

OK

<4>Could not read SSID from driver
```

Now I do the first "sudo iwlist wlp3s0 start"...

```
 

<3>CTRL-EVENT-SCAN-STARTED 

<3>CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN

<3>CTRL-EVENT-SCAN-RESULTS 

<3>WPS-AP-AVAILABLE 

> select_network 12

OK

<4>Could not read SSID from driver
```

... and the second one ...

```

<3>CTRL-EVENT-SCAN-STARTED 

<3>CTRL-EVENT-SCAN-RESULTS 

<3>WPS-AP-AVAILABLE 

> select_network 12

OK

<3>Trying to associate with xx:xx:xx:xx:xx:xx (SSID='MyNetwork' freq=2422 MHz)

<3>Associated with xx:xx:xx:xx:xx:xx

<3>CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx completed [id=12 id_str=]

<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0

>
```

It's odd...

----------

## oneone

Okay  :Very Happy: 

Downgrading even further to wpa_supplicant-2.6-r10 did the trick. I still wonder, what the problem was, but I mark this as solved now.

Thanks for the help!

----------

