Wifi initialisation fails nrf7002-nrf5340

In our custom board we checked WIFI, facing below issues,

1. We flashed sta sample project to our custom board facing the issue below. Is there any configuration needed to address in the config file? Please provide debugging steps to resolve this issue?


2. Also tried provisioning samples in our custom board, no log response detected from the device. 
For both samples, 1.build configuration is set as nrf7002dk_nrf5340_cpuapp and 
                               2.include clock config CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y in the proj.conf file 
For sta we are able to get log but no log response for provisioning samples. How to resolve this issue?
And we can't build the samples with the nrf7002dk_nrf5340_cpuapp_ns configuration facing the issue .Why?

Parents
  • Hi,

    I have tried wi-fi station sample in NCS v2.6.0 and could not reproduce your issue on nrf7002dk even after adding CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to the prj.conf file.

    Which NCS version do you use?

    Could you provide a full log of the station sample from the moment you restart the device after flashing?

    Best regards,
    Dejan

  • Hi,

    Lavanya_Manohar said:
    1. WiFi Provisioning Not Working: The sample provisioning code is not working.Not even seeing the log. 

    Which of the two Wi-Fi provisioning samples have you used?

    Lavanya_Manohar said:
    2. MAC Address Not Programmed in OTP: In all our WiFi modules, we are encountering the "MAC addr not programmed in OTP" issue.

    MAC address configuration page describes 2 mechanisms for configuring MAC addresses - programming MAC address into the OTP memory and using alternative method where MAC address is programmed using NET_REQUEST_ETHERNET_SET_MAC_ADDRESS in net_mgmt(). Sample code for alternative method can be found in this discussion.

    Best regards,
    Dejan

  • Which of the two Wi-Fi provisioning samples have you used?

    Wi-Fi: Bluetooth LE based provision in SDK version 2.6.1 nrf/sample/wifi/provisioning

    Sample code for alternative method can be found in this discussion.

    Will check and let you know, thank you

  • Hi,

    Thank you for additional information.

    Lavanya_Manohar said:
    Wi-Fi: Bluetooth LE based provision in SDK version 2.6.1 nrf/sample/wifi/provisioning

    Did you install protocol buffer compiler as mentioned in building and running section?
    Did you build the sample from VS Code?
    Can you show your build command?

    Lavanya_Manohar said:
    Will check and let you know, thank you

    Please do so. Thank you.

    Best regards,
    Dejan

  • Did you install protocol buffer compiler as mentioned in building and running section?

    No, I'm not any installation of protocol buffer compiler. 

    But without doing that, the same build working fine in DK.

    Did you build the sample from VS Code?

    Yes, i'm using VS code for build the sample. Just choosing board nrf7002dk_nrf5340_cpuapp and proceed build. 

    Add to the point, I'm doing same steps for all sample build configurations, Other Wifi sample are working fine in our board except provisioning.

  • on our custom board, which has a single antenna shared between both BLE and Wi-Fi. We suspect that this might be the root cause of the problem, as the sample code utilizes both BLE and Wi-Fi simultaneously. 

    Could you please confirm if the shared antenna setup is indeed causing the provisioning issue? If so, are there any specific configurations or settings that we need to adjust to ensure proper functionality?

    Now we can able to get terminal log. In that wifi error ocurring but ble is able to pair with mobile. here i share log

    [00:00:00.000,518] <err> qspi_nor: JEDEC id [00 00 00] expect [c2 28 17]
    [00:00:00.003,295] <inf> wifi_nrf_bus: SPIM spi@a000: freq = 8 MHz
    [00:00:00.003,356] <inf> wifi_nrf_bus: SPIM spi@a000: latency = 0
    [00:00:00.003,814] <err> wifi_nrf: hal_rpu_reg_read: Error !! Value read at addr_offset = 400 is = FFFFFFFF
    [00:00:00.003,875] <err> wifi_nrf: hal_rpu_irq_enable: Reading from Root interrupt register failed
    [00:00:00.003,906] <err> wifi_nrf: nrf_wifi_hal_dev_add: hal_rpu_irq_enable failed
    [00:00:00.004,058] <err> wifi_nrf: nrf_wifi_fmac_dev_add: nrf_wifi_hal_dev_add failed
    [00:00:00.004,089] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_add failed
    [00:00:00.004,119] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed
    [00:00:00.007,934] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,934] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,934] <inf> fs_nvs: data wra: 0, 0
    *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
    [00:00:00.008,087] <inf> net_config: Initializing network
    [00:00:00.008,087] <inf> net_config: Waiting interface 1 (0x20001620) to be up...
    [00:00:00.008,239] <inf> net_config: IPv4 address: 192.165.100.150
    [00:00:00.008,270] <inf> net_config: Running dhcpv4 client...
    [00:00:01.021,453] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:01.021,484] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    [00:00:01.021,514] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870
    [00:00:01.023,559] <inf> bt_hci_core: Identity: F2:98:65:E5:4D:27 (random)
    [00:00:01.023,590] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x218f, manufacturer 0x0059
    [00:00:01.023,620] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x218f
    Bluetooth initialized.
    Wi-Fi provisioning service starts successfully.
    BT Advertising successfully started.
    BT Connected: 78:0B:85:F8:23:97 (random)BT pairing completed: 78:0B:85:F8:23:97 (random), bonded: 0
    BT Security changed: 78:0B:85:F8:23:97 (random) level 2.
    [00:00:17.847,259] <inf> wifi_prov: Wi-Fi Provisioning service - control point: indications enabled
    [00:00:18.109,741] <inf> wifi_prov: Wi-Fi Provisioning service - data out: notifications enabled
    [00:00:18.154,876] <inf> wifi_prov: Start parsing...
    [00:00:18.154,907] <inf> wifi_prov: GET_STATUS received...
    [00:00:19.422,271] <inf> wifi_prov: Start parsing...
    [00:00:19.422,271] <inf> wifi_prov: Start_Scan received...
    [00:00:19.422,302] <err> wifi_nrf: nrf_wifi_disp_scan_zep: Interface not UP

    note: We have also checked with independent antenna for wifi and ble, but facing same issue.

Reply
  • on our custom board, which has a single antenna shared between both BLE and Wi-Fi. We suspect that this might be the root cause of the problem, as the sample code utilizes both BLE and Wi-Fi simultaneously. 

    Could you please confirm if the shared antenna setup is indeed causing the provisioning issue? If so, are there any specific configurations or settings that we need to adjust to ensure proper functionality?

    Now we can able to get terminal log. In that wifi error ocurring but ble is able to pair with mobile. here i share log

    [00:00:00.000,518] <err> qspi_nor: JEDEC id [00 00 00] expect [c2 28 17]
    [00:00:00.003,295] <inf> wifi_nrf_bus: SPIM spi@a000: freq = 8 MHz
    [00:00:00.003,356] <inf> wifi_nrf_bus: SPIM spi@a000: latency = 0
    [00:00:00.003,814] <err> wifi_nrf: hal_rpu_reg_read: Error !! Value read at addr_offset = 400 is = FFFFFFFF
    [00:00:00.003,875] <err> wifi_nrf: hal_rpu_irq_enable: Reading from Root interrupt register failed
    [00:00:00.003,906] <err> wifi_nrf: nrf_wifi_hal_dev_add: hal_rpu_irq_enable failed
    [00:00:00.004,058] <err> wifi_nrf: nrf_wifi_fmac_dev_add: nrf_wifi_hal_dev_add failed
    [00:00:00.004,089] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_add failed
    [00:00:00.004,119] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed
    [00:00:00.007,934] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,934] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.007,934] <inf> fs_nvs: data wra: 0, 0
    *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
    [00:00:00.008,087] <inf> net_config: Initializing network
    [00:00:00.008,087] <inf> net_config: Waiting interface 1 (0x20001620) to be up...
    [00:00:00.008,239] <inf> net_config: IPv4 address: 192.165.100.150
    [00:00:00.008,270] <inf> net_config: Running dhcpv4 client...
    [00:00:01.021,453] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:01.021,484] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    [00:00:01.021,514] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870
    [00:00:01.023,559] <inf> bt_hci_core: Identity: F2:98:65:E5:4D:27 (random)
    [00:00:01.023,590] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x218f, manufacturer 0x0059
    [00:00:01.023,620] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x218f
    Bluetooth initialized.
    Wi-Fi provisioning service starts successfully.
    BT Advertising successfully started.
    BT Connected: 78:0B:85:F8:23:97 (random)BT pairing completed: 78:0B:85:F8:23:97 (random), bonded: 0
    BT Security changed: 78:0B:85:F8:23:97 (random) level 2.
    [00:00:17.847,259] <inf> wifi_prov: Wi-Fi Provisioning service - control point: indications enabled
    [00:00:18.109,741] <inf> wifi_prov: Wi-Fi Provisioning service - data out: notifications enabled
    [00:00:18.154,876] <inf> wifi_prov: Start parsing...
    [00:00:18.154,907] <inf> wifi_prov: GET_STATUS received...
    [00:00:19.422,271] <inf> wifi_prov: Start parsing...
    [00:00:19.422,271] <inf> wifi_prov: Start_Scan received...
    [00:00:19.422,302] <err> wifi_nrf: nrf_wifi_disp_scan_zep: Interface not UP

    note: We have also checked with independent antenna for wifi and ble, but facing same issue.

Children
  • Hi,

    The first line in provided log shows Jedec ID mismatch. This could happen for a number of reasons ranging from configuration to hardware. You could start checking by using jedec SPI-NOR flash sample to test your external flash. If this works fine, you could compare the contents of .config and zephyr.dts files of your custom board with the ones provided for nrf7002-dk. For other possible causes, you could look at this jedec-id discussion.

    Best regards,
    Dejan

  • Hi dejans,

    In our custom board, we don't have external flash. We suspect this could be the reason for the provisioning issue.

    Now we can able to get terminal log. In that wifi error ocurring but ble is able to pair with mobile. here i share log

    After resolving the Wi-Fi issue, we noticed that we can no longer retrieve terminal logs for the provisioning code.

    During debugging, we found that the pointer does not exit from the z_sys_init_run_level(INIT_LEVEL_POST_KERNEL) function, which prevents it from entering our main application. Consequently, no debug logs appear in the terminal. Please see the attached image for more details.



    Since we are not using external flash, is there any specific configuration we need for internal flash to address this issue?

Related