Merge branch 'feat/ble_link_estab_event_v5.0' into 'release/v5.0'

feat(nimble): BLE_GAP_EVENT_LINK_ESTAB event to ensure link is established (v5.0)

See merge request espressif/esp-idf!32261
This commit is contained in:
Rahul Tank 2024-08-22 15:33:06 +08:00
commit d889c006ff
20 changed files with 22 additions and 21 deletions

@ -1 +1 @@
Subproject commit 2fbd46dfedbaf795f98429b0cd2ce8845e06d8ce
Subproject commit ab8a314d3a948815e00408b7823bfb77b02230ff

View File

@ -425,7 +425,7 @@ enc_adv_data_cent_gap_event(struct ble_gap_event *event, void *arg)
enc_adv_data_cent_connect_if_interesting(&event->disc);
return 0;
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
if (event->connect.status == 0) {
/* Connection successfully established. */

View File

@ -204,7 +204,7 @@ enc_adv_data_prph_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
MODLOG_DFLT(INFO, "connection %s; status=%d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -488,7 +488,7 @@ ble_htp_cent_gap_event(struct ble_gap_event *event, void *arg)
ble_htp_cent_connect_if_interesting(&event->disc);
return 0;
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
if (event->connect.status == 0) {
/* Connection successfully established. */

View File

@ -230,7 +230,7 @@ static int
ble_htp_prph_gap_event(struct ble_gap_event *event, void *arg)
{
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed */
MODLOG_DFLT(INFO, "connection %s; status=%d\n",
event->connect.status == 0 ? "established" : "failed",

View File

@ -412,7 +412,7 @@ blecent_gap_event(struct ble_gap_event *event, void *arg)
blecent_connect_if_interesting(&event->disc);
return 0;
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
if (event->connect.status == 0) {
/* Connection successfully established. */

View File

@ -317,7 +317,7 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
MODLOG_DFLT(INFO, "connection %s; status=%d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -302,7 +302,7 @@ ble_multi_advertise(ble_addr_t addr)
static void
ble_multi_perform_gatt_proc(ble_addr_t addr)
{
/* GATT procedures like notify, indicate can be perfomed now */
/* GATT procedures like notify, indicate can be performed now */
for (int i = 0; i < BLE_ADV_INSTANCES; i++) {
if (memcmp(&addr, &ble_instance_cb[i].addr, sizeof(addr)) == 0) {
if (ble_instance_cb[i].cb) {
@ -335,7 +335,7 @@ ble_multi_adv_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
MODLOG_DFLT(INFO, "connection %s; status=%d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -347,7 +347,7 @@ blecent_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
if (event->connect.status == 0) {
/* Connection successfully established. */

View File

@ -183,7 +183,7 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
MODLOG_DFLT(INFO, "connection %s; status=%d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -230,7 +230,7 @@ ble_spp_client_gap_event(struct ble_gap_event *event, void *arg)
ble_spp_client_connect_if_interesting(&event->disc);
return 0;
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
if (event->connect.status == 0) {
/* Connection successfully established. */

View File

@ -141,7 +141,7 @@ ble_spp_server_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
MODLOG_DFLT(INFO, "connection %s; status=%d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -691,7 +691,7 @@ blecent_gap_event(struct ble_gap_event *event, void *arg)
blecent_connect_if_interesting(&event->disc);
return 0;
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
if (event->connect.status == 0) {
/* Connection successfully established. */

View File

@ -184,7 +184,7 @@ static int
blehr_gap_event(struct ble_gap_event *event, void *arg)
{
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed */
MODLOG_DFLT(INFO, "connection %s; status=%d\n",
event->connect.status == 0 ? "established" : "failed",

View File

@ -237,7 +237,7 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
MODLOG_DFLT(INFO, "connection %s; status=%d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -389,7 +389,7 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
ESP_LOGI(TAG, "connection %s; status=%d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -282,7 +282,7 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
MODLOG_DFLT(INFO, "connection %s; status=%d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -538,7 +538,7 @@ blecent_gap_event(struct ble_gap_event *event, void *arg)
blecent_connect_if_interesting(&event->disc);
return 0;
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed. */
if (event->connect.status == 0) {
/* Connection successfully established. */

View File

@ -238,7 +238,7 @@ gatts_gap_event(struct ble_gap_event *event, void *arg)
int rc;
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed */
ESP_LOGI(tag, "connection %s; status = %d ",
event->connect.status == 0 ? "established" : "failed",

View File

@ -1500,6 +1500,7 @@ examples/bluetooth/nimble/blecent/main/blecent.h
examples/bluetooth/nimble/blecent/main/main.c
examples/bluetooth/nimble/blecent/main/misc.c
examples/bluetooth/nimble/blecent/main/peer.c
examples/bluetooth/nimble/blecsc/main/main.c
examples/bluetooth/nimble/blehr/blehr_test.py
examples/bluetooth/nimble/blehr/main/blehr_sens.h
examples/bluetooth/nimble/blehr/main/gatt_svr.c