Integrating wifi support into a BLE and ESB coexistence project

I'm in the process of integrating wifi into a BLE and ESB coexistence project that Torbjørn has been helping us with but we're having some issues with the integration. We are using the nrf7002dk for the RX node and a nrf5340dk for the TX node. The goal of this integration is to have a device that can receive wifi credentials via bluetooth, send data back and forth with nearby devices using ESB, and upload the results to a server over a wifi connection.

Our first approach was to transplant some logic from the WiFi scan sample into our project. When we do that, we get the following runtime errors. These errors only appear when trying to run the wifi logic alongside the BLE and ESB logic. The device can run the Wifi scan sample without any issues.

[00:00:00.396,484] <err> wifi_nrf: hal_fw_patch_load: Failed to allocate memory for patch LMAC-bin: chunk 1/3, size: 8192
[00:00:00.396,575] <err> wifi_nrf: wifi_nrf_fmac_fw_load: LMAC patch load failed
[00:00:00.396,575] <err> wifi_nrf: wifi_nrf_fmac_dev_add_zep: wifi_nrf_fmac_fw_load failed
[00:00:00.396,606] <err> wifi_nrf: wifi_nrf_drv_main_zep: wifi_nrf_fmac_dev_add_zep failed
[00:00:00.399,566] <err> wifi_nrf: wifi_nrf_if_init_zep: Device wlan0 is not ready
[00:00:00.400,024] <err> wifi_nrf: wifi_nrf_if_start_zep: Device wlan0 is not ready

Our second approach was to transplant the BLE and ESB logic from our existing project into the WiFi and BLE coexistence project. When we do that, we get the following runtime errors. These errors only appear when trying to run the wifi logic alongside the BLE and ESB logic. The device can run the Wifi and BLE coexistence sample without any issues.

[00:00:02.574,096] <err> bt_hci_driver: Endpoint binding failed with -11
[00:00:02.574,096] <err> bt_hci_core: HCI driver open failed (-11)
[00:00:02.574,096] <err> coex: [bluetooth]: init failed (err -11)

With both approaches, we have done our best to match the configuration of the sample projects but can't seem to make any progress. Torbjørn has been incredibly helpful throughout our development process and we would like to request him as our support engineer if he is available.

  • Hi Mike

    Just letting you know that I am on the case, but I need a bit more time to look into this. 

    The issue in the first case I have never seen before, I asked the developers for some input if they have any idea what the cause could be. I expect it is some configuration setting that is not correctly set, or possibly some partition in memory that is missing. 

    The error in the second case implies that the network core is not properly programmed. Do you know what firmware is flashed in the network core, if any? 

    Best regards
    Torbjørn

  • Thanks for taking a look at this. The image flashed to the net core is the net core image from the esb and ble coexistence project. I compared the logic against the default bluetooth net core Image and it looks like the same logic is applied.

  • Hi Mike

    I never tested the sample on the nRF7002DK, and as such there are no config files included for this particular board. 

    Could you try to copy the nrf5340dk_nrf5340_cpuapp.conf file from the boards folder, and rename it to nrf7002dk_nrf5340_cpuapp.conf? 

    Without this file you will miss a lot of the configuration needed to setup the network core correctly, and disable ESB on the appcore (since it will be run from the netcore instead). 

    Please note that you need to do a pristine build after making this change, otherwise the build system won't find the new boards file. 

    If you still can't make it work just let me know, and I will try to run the sample on the nRF7002DK myself. 

    Best regards
    Torbjørn

Related