Page 1 of 1

spp handle id

Posted: Tue May 01, 2018 2:43 am
by peterlspot
How SPP handle is managed in SPP acceptor role?

It seems that the handle value got upon ESP_SPP_SRV_OPEN_EVT is not always the same as the handle upon ESP_SPP_CLOSE_EVT.

Code: Select all

case ESP_SPP_SRV_OPEN_EVT:
     ESP_LOGI(TAG, "srv_open: %d", param->srv_open.handle);
     break;
case ESP_SPP_CLOSE_EVT:
    ESP_LOGI(TAG, "close: %d", param->close.handle);
    break;
Sometimes the two values are same, sometimes they are not. Not sure how handle is defined and managed in ESP_SPP module. Can someone teach here?