Page 1 of 1

Does ESP support running matter and BLE simultaneously?

Posted: Fri Nov 24, 2023 4:47 am
by trantrieuphi
My application needs to use BLE to receive broadcast packets from other common BLE devices and run matter at the same time. Does ESP have an SDK package that supports running BLE and matter simultaneously?

Re: Does ESP support running matter and BLE simultaneously?

Posted: Wed Apr 24, 2024 8:43 am
by chrelu
Hello everyone, I have a similar question.

@trantrieuphi: Have you found a solution?

As a workaround, I have added an abort service to the Matter BLE profile to abort the commissioning process. As soon as I receive the ChipDeviceEvent "kCHIPoBLEConnectionClosed", I initialize the nimble stack and start the BLE advertising. This initialization corresponds to the example from git repository https://github.com/michael-angerer/esp3 ... e/main/esp. I have set the configuration CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING to “No” because initialization is no longer possible after a complete deinitialization (for whatever reason). Therefore, I implemented the "deinitialization light", which calls nimble_port_stop() and then esp_nimble_deinit(). After this "deinitialization light" I start the nimble stack with esp_nimble_init() instead of nimble_port_init(). Everything can be initialized in this way, but ble_gap_adv_start() returns error value 530 (0x212 = 0x200 | 0x012 = BLE_HS_EROLE). Can anyone help me?

Thank you and best regards.

Re: Does ESP support running matter and BLE simultaneously?

Posted: Thu Apr 25, 2024 9:31 am
by chrelu
Some more information for better understanding of my problem. My goal is to change as little as possible in the existing esp-matter implementation. To achieve this, I wanted to start Nimble BLE with my BLE profile as soon as the esp-matter SDK tells me that BLE is no longer needed for Matter/CHIP.

As an extension, the Matter BLE profile should be supplemented with an abort service so that the user (my smartphone app) can change the BLE profile.

To illustrate this, I have drawn a simple sequence diagram. The very abstract component diagram should roughly show the dependencies and the associated BLE profile and make it clear that I only want to create/change the component "myApplication".
ESP-Matter-BLE-Dependencies.jpg
ESP-Matter-BLE-Dependencies.jpg (61.07 KiB) Viewed 10967 times
Two-BLE-Profile-Solutions.jpg
Two-BLE-Profile-Solutions.jpg (106.66 KiB) Viewed 10967 times