Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an event for BLE deinit (DeviceEventType) (CON-938) #777

Closed
law-ko opened this issue Dec 18, 2023 · 6 comments
Closed

Adding an event for BLE deinit (DeviceEventType) (CON-938) #777

law-ko opened this issue Dec 18, 2023 · 6 comments

Comments

@law-ko
Copy link

law-ko commented Dec 18, 2023

In current esp_matter_core.cpp there are several DeviceEventType events posted to static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg). Is there any chance to post events for BLE deinitialzed when the RAM is freed?

Maybe kCHIPoBLEConnectionClosed or kCloseAllBleConnections

@github-actions github-actions bot changed the title Adding an event for BLE deinit (DeviceEventType) Adding an event for BLE deinit (DeviceEventType) (CON-938) Dec 18, 2023
@shubhamdp
Copy link
Contributor

@law-ko kCHIPoBLEConnectionClosed and kCloseAllBleConnections are defined for different purpose and can not be used. We can add a different one though.

    /** Signals that BLE is deinitialized and heap memory is reclaimed */
    kBLEDeinitialized,

@law-ko
Copy link
Author

law-ko commented Dec 18, 2023

@shubhamdp Thank you for the response. Is this available with a patch or do we need to wait for your implementation?

@shubhamdp
Copy link
Contributor

@law-ko this is not available right now, but I'll upload patch here till this gets merged and updated on github

@shubhamdp
Copy link
Contributor

@law-ko please see if the attached patch works for you 0001-Added-an-event-when-BLE-is-deinitialized-and-memory-patch.txt

@law-ko
Copy link
Author

law-ko commented Dec 20, 2023

@shubhamdp I believe it is working. Thank you

@shubhamdp
Copy link
Contributor

@law-ko patch is merged in main branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants