Calling esp_spp_write outside of bluedriod callbacks

Posts: 5
Joined: Fri Jan 14, 2022 2:24 am

Calling esp_spp_write outside of bluedriod callbacks

Postby grumpyEngineer12 » Wed Jan 19, 2022 7:55 am

Hi Everyone,

I'm sorry if this has been answered previously - but I just want to verify some code I wrote today.

I am extending the SPP acceptor demo (Classic bluetooth) and I need to trigger writes to the BLE client (on a phone) from a different task.

What I did was save a reference to the handle inside off the ESP_SPP_SRV_OPEN_EVT callback. My question is, will this handle ever change? In that case I would be SOL - I'm only familiar w/ BLE so I'm a little lost.

Code: Select all

        handle = param->open.handle;
I'm cleaning up in the ESP_SPP_SRV_STOP_EVT (removing the handle) - this is for the tear-down.

Thanks everyone!

Who is online

Users browsing this forum: Bing [Bot], marius.cezar18 and 35 guests