Failed to Initiate schedule scan

On my colibri imx8x module I am using the DBUS api to communicate to the connman service to control the api. I have noticed that when ever I initiate a scan for wireless networks I see a error from wpa_supplicant.

wpa_supplicant: wlp1s0: Failed to initiate sched scan

Is this normal ?

Could you please follow this instructions?

I did follow this page. I am able to connect to the wireless network via connman and everything works fine. I am just curious about the error I am seeing in the journal ? Is there something additional I need to do?

Could you please specify OS and BSP you are using and steps to replicate your issue?

I am using a custom yocto os based on the latest dunfell bsp (5.4.193).

Whenever I do a connmanctl scan wifi I see the message appear in the journalctl .

Can you reproduce this issue on a Toradex pre-build image?

Hi @nmohan86

I believe this message is coming from connman and has to do with scans for new APs while connected to an AP. Recently we disabled this background scan by default but I’m not sure if that has made it to a released build yet. I am fairly certain you can just ignore this message. Are you seeing any adverse affects on your wifi connection?

Drew

The only adverse affect I see is that when I am trying to scan via my application it collides with wpa_supplicant and I get a busy status.

How would I go about disabling this scan ?

We add bgscan="" into `/etc/wpa_supplicant.conf to disable this:

root@apalis-imx8:~# cat /etc/wpa_supplicant.conf 
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
bgscan=""

network={
        key_mgmt=NONE
}

Drew

Thank you that helps.

I am also periodically seeing a a association failure. Do you know what could be causing this?

Nov 02 18:52:19 colibri-imx8x wpa_supplicant[654]: mlan0: Trying to associate with 06:55:6d:10:f7:56 (SSID='ivWatch-Guest' freq=2462 MHz)
Nov 02 18:52:19 colibri-imx8x kernel: mwifiex_pcie 0000:01:00.0: info: trying to associate to 'ivWatch-Guest' bssid 06:55:6d:10:f7:56
Nov 02 18:52:19 colibri-imx8x kernel[383]: [  271.485779] mwifiex_pcie 0000:01:00.0: info: trying to associate to 'ivWatch-Guest' bssid 06:55:6d:10:f7:56
Nov 02 18:52:20 colibri-imx8x kernel: mwifiex_pcie 0000:01:00.0: ASSOC_RESP: failed,        status code=2 err=0xfffa a_id=0x3fff
Nov 02 18:52:20 colibri-imx8x kernel: mwifiex_pcie 0000:01:00.0: assoc failure: reason Unknown connect failure
Nov 02 18:52:20 colibri-imx8x kernel: mwifiex_pcie 0000:01:00.0: info: association to bssid 06:55:6d:10:f7:56 failed
Nov 02 18:52:20 colibri-imx8x kernel[383]: [  272.504610] mwifiex_pcie 0000:01:00.0: ASSOC_RESP: failed,        status code=2 err=0xfffa a_id=0x3fff
Nov 02 18:52:20 colibri-imx8x kernel[383]: [  272.513630] mwifiex_pcie 0000:01:00.0: assoc failure: reason Unknown connect failure
Nov 02 18:52:20 colibri-imx8x kernel[383]: [  272.521694] mwifiex_pcie 0000:01:00.0: info: association to bssid 06:55:6d:10:f7:56 failed
Nov 02 18:52:20 colibri-imx8x wpa_supplicant[654]: mlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=2

I don’t have any ideas at hand. My colleague @rafael.tx may know more.

Drew

I don’t have an answer but I have some comments. I looked through the code and this is where this error is handled (drivers/net/wireless/marvell/mwifiex/join.c):

675         if (status_code) {                                                                                                                                
 676                 priv->adapter->dbg.num_cmd_assoc_failure++;                                                                                               
 677                 mwifiex_dbg(priv->adapter, ERROR,                                                                                                         
 678                             "ASSOC_RESP: failed,\t"                                                                                                       
 679                             "status code=%d err=%#x a_id=%#x\n",                                                                                          
 680                             status_code, cap_info,                                                                                                        
 681                             le16_to_cpu(assoc_rsp->a_id));                                                                                                
 682                                                                                                                                                           
 683                 mwifiex_dbg(priv->adapter, ERROR, "assoc failure: reason %s\n",                                                                           
 684                             assoc_failure_reason_to_str(cap_info));                                                                                       
 685                 if (cap_info == CONNECT_ERR_ASSOC_ERR_TIMEOUT) {                                                                                          
 686                         if (status_code == MWIFIEX_ASSOC_CMD_FAILURE_AUTH) {                                                                              
 687                                 ret = WLAN_STATUS_AUTH_TIMEOUT;                                                                                           
 688                                 mwifiex_dbg(priv->adapter, ERROR,                                                                                         
 689                                             "ASSOC_RESP: AUTH timeout\n");                                                                                
 690                         } else {                                                                                                                          
 691                                 ret = WLAN_STATUS_UNSPECIFIED_FAILURE;                                                                                    
 692                                 mwifiex_dbg(priv->adapter, ERROR,                                                                                         
 693                                             "ASSOC_RESP: UNSPECIFIED failure\n");                                                                         
 694                         }                                                                                                                                 
 695                 } else {                                                                                                                                  
 696                         ret = status_code;                                                                                                                
 697                 }

The specific error code that’s being returned is not handled by the driver. This brings some questions:

  • Are you using one of Toradex’s standard builds? This could be caused by a mismatch between the firmware and the driver.
  • Does the problem “fix itself” after a while? Do you see a later attempt to connect that goes successfully? Is it automatic or do you need to trigger the connection again?

If I understood the code correctly, the error could also indicate the IEEE status code for this operation. As the code shown (0xfffa) is -6 in decimal, it could mean “Unacceptable lifetime” according to this.

Unfortunately, I also don´t know what “Unacceptable lifetime” means, it’s probably described in one of the IEEE 802.11 standards which I don’t have access at the moment.

Rafael