ERROR: wifi_mgmt_ext: Connection request failed, reason 8

Hello,

We would like to inquire about a technical issue regarding the nRF7002 + nrf5340 with sdk v2.7.0. We have a nrf7002 module connected with nrf5340 through qspi interface on our custom pcb.

we are trying to connect to a wifi router using nrf7002 but while trying to do so we are facing the below error. 

<err> wifi_mgmt_ext: Connection request failed. 

we are not able to determine what could be causing this error, our earlier project firmware, compiled with sdkv2.5.2, was working fine with this setup and we were able to connect to wifi router. After migrating the firmware from sdk v2.5.2 to sdk v2.7.0 we are facing the above error.

this error is generated from below api. please note that we have enabled the needed modules and set the wifi credentials statically in prj.conf. we have also tried to connect to credentials store in flash without any success, we have verified that credentials are correct and are properly read from the memory.

ret = net_mgmt(NET_REQUEST_WIFI_CONNECT_STORED, iface, NULL, 0);

if (ret) {
	LOG_ERR("Connection request failed %d",ret);

	return -ENOEXEC;
}

we are receiving -8 error code with this api call.

Here are the details of my development environment,
SDK version: nRF Connect SDK v2.7.0
Toolchain version: nRF Connect SDK Toolchain v2.7.0
Development environment: Ubuntu 24.04
Development tool: Visual Studio Code
Development board: we are using our custom overlay board files.
Example refference path: ~/ncs/v2.7.0/nrf/samples/wifi/sta
 
Also, this is our memory usage in case if it is helpful.
[793/802] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:      920560 B       912 KB     98.57%
             RAM:      470592 B       476 KB     96.55%
        IDT_LIST:          0 GB        32 KB      0.00%
Generating files from ~/xxxxx/build/zephyr/zephyr.elf for board: xxxxxxxxxxxxx

Please ask if any more information is needed.

Thank you.
  • Hi,

    Are you setting the credentials using the WIFI_CREDENTIALS Kconfig options?

    CONFIG_WIFI_CREDENTIALS=y
    CONFIG_WIFI_CREDENTIALS_STATIC=y
    CONFIG_WIFI_CREDENTIALS_STATIC_SSID="Myssid"
    CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD="Mypassword"

    Can you share the full code where you connect to the network?

    Best regards,
    Marte

  • Yes, we are using the same WIFI_CREDENTIALS Kconfig options and our code is same as the sample code provided here  ~/ncs/v2.7.0/nrf/samples/wifi/sta.

    We are still unsure about what the error code -8 actually means, can you please explain what should we derive from that ?

  • Hi,

    Are you using the sample code out of the box in v2.7.0, or have you made any changes to it?

    Error -8 means ENOEXEC. In this case, it suggests that there was a problem executing the Wi-Fi connection request. Since you are using a module and custom board, it could be an issue there.

    Please upload the full log from the start of the application. You can upload it using Insert > Code or as a text or log file using Insert > Image/video/file.

    Best regards,
    Marte

  • We integrated the sample code as it is in our project for testing purpose, and verified that all config option from the sample code is present in our project.

    We are getting these logs from bootup.

    --- 4 messages dropped ---
    [00:00:00.025,360] <dbg> net_mgmt: net_mgmt_event_init: (main): Net MGMT initialized: queue of 5 entries, stack size of 4400
    [00:00:00.025,634] <dbg> net_mgmt: net_mgmt_add_event_callback: (main): Adding event callback 0x20016844
    [00:00:00.025,665] <dbg> net_mgmt: net_mgmt_add_event_callback: (main): Adding event callback 0x20016830
    [00:00:00.026,580] <dbg> wifi_nrf_bus: rpu_gpio_config: GPIO configuration done...
    
    [00:00:00.028,778] <dbg> wifi_nrf_bus: rpu_pwron: Bucken = 0, IOVDD = 0
    [00:00:00.028,930] <dbg> wifi_nrf_bus: qspi_nrfx_configure: RDSR 42 QE 1 need 1: no-change
    [00:00:00.029,052] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    [00:00:00.029,144] <dbg> wifi_nrf_bus: qspi_RDSR2: RDSR2 = 0x1
    [00:00:00.029,296] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x0
    [00:00:00.029,327] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x0
    [00:00:00.030,487] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x0
    [00:00:00.030,517] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x0
    [00:00:00.031,677] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x0
    [00:00:00.034,057] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x2
    [00:00:00.034,179] <dbg> wifi_nrf_bus: rpu_clks_on: RPU Clocks ON...
    [00:00:00.067,535] <dbg> wifi_nrf_bus: rpu_irq_config: Finished Interrupt config
    
    [00:00:00.067,657] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    [00:00:00.067,749] <dbg> wifi_nrf_bus: qspi_RDSR2: RDSR2 = 0x1
    [00:00:00.067,840] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x6
    [00:00:00.067,840] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x6
    [00:00:00.069,030] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x6
    [00:00:00.069,030] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x6
    [00:00:00.079,589] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    [00:00:00.079,681] <dbg> wifi_nrf_bus: qspi_RDSR2: RDSR2 = 0x1
    [00:00:00.079,803] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x6
    [00:00:00.079,803] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x6
    [00:00:00.080,993] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x6
    [00:00:00.081,024] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x6
    [00:00:00.199,157] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    [00:00:00.199,249] <dbg> wifi_nrf_bus: qspi_RDSR2: RDSR2 = 0x1
    [00:00:00.199,340] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x6
    [00:00:00.199,371] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x6
    [00:00:00.200,531] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x6
    [00:00:00.200,561] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x6
    *** Booting My Application v1.1.15-lte-da6981f16cef ***
    *** Using nRF Connect SDK v2.7.0-5cb85570ca43 ***
    *** Using Zephyr OS v3.6.99-100befc70c74 ***
    [00:00:00.281,555] <dbg> net_mgmt: net_mgmt_add_event_callback: (main): Adding event callback 0x200149b0
    [00:00:00.281,616] <dbg> net_mgmt: net_mgmt_del_event_callback: (main): Deleting event callback 0x200149b0
    [00:00:00.282,440] <wrn> usb_device: USB device support already enabled
    [00:00:00.283,233] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    [00:00:00.283,294] <dbg> wifi_nrf_bus: qspi_RDSR2: RDSR2 = 0x1
    [00:00:00.283,386] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x0
    [00:00:00.283,386] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x0
    [00:00:00.284,576] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x0
    [00:00:00.284,576] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x0
    [00:00:00.285,736] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x0
    [00:00:00.285,766] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x0
    [00:00:00.286,895] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x0
    [00:00:00.286,926] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x0
    [00:00:00.288,055] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x2
    [00:00:00.288,085] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x2
    [00:00:00.289,215] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x2
    [00:00:00.289,245] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x2
    [00:00:00.290,069] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x2
    [00:00:00.290,100] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x2
    [00:00:00.291,076] <dbg> wifi_nrf_bus: qspi_RDSR1: RDSR1 = 0x6
    [00:00:00.291,107] <dbg> wifi_nrf_bus: qspi_wait_while_rpu_awake: RDSR1 = 0x6
    [00:00:00.300,201] <dbg> net_mgmt: net_mgmt_add_event_callback: (wpa_supplicant_wq): Adding event callback 0x20015abc
    [00:00:29.039,672] <dbg> net_mgmt: net_mgmt_add_event_callback: (main): Adding event callback 0x20013880
    [00:00:29.039,703] <dbg> net_mgmt: net_mgmt_add_event_callback: (main): Adding event callback 0x2001386c
    [00:00:29.039,855] <wrn> date_time: getaddrinfo, error: -11
    [00:00:29.039,978] <wrn> date_time: getaddrinfo, error: -11
    [00:00:29.039,978] <wrn> date_time: Did not get time from any NTP server
    [00:00:29.040,008] <inf> network: DATE_TIME_NOT_OBTAINED
    
    [00:00:29.089,996] <err> wifi_mgmt_ext: Connection request failed
    
    [00:00:29.090,026] <inf> apt_wifi: Connection Requested
    [00:00:29.090,057] <inf> apt_wifi: -----------------Device MAC address is:00:18:07:00:fc:9d and type is:3-------------------------------

    We have used these config options for enabling the logging.

    CONFIG_NET_MGMT_EVENT_LOG_LEVEL_DBG=y
    CONFIG_WIFI_CREDENTIALS_LOG_LEVEL_DBG=y
    CONFIG_WIFI_MGMT_EXT_LOG_LEVEL_DBG=y
    CONFIG_NET_L2_WIFI_MGMT_LOG_LEVEL_DBG=y
    CONFIG_WIFI_NRF700X_BUS_LOG_LEVEL_DBG=y

  • Ok, so we tested the out of the box sample code for sta and we were able to connect to the router. But still, even though the qspi pins and code is same its not working with our custom board.

Related