mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
Merge branch 'bugfix/add_ci_files_v5.3' into 'release/v5.3'
fix(nimble): Add CI files for base configurations (v5.3) See merge request espressif/esp-idf!39243
This commit is contained in:
Submodule components/bt/host/nimble/nimble updated: 544e94303c...bcb5345e25
@ -707,7 +707,9 @@ static void blecent_power_control(uint16_t conn_handle)
|
||||
static int
|
||||
blecent_gap_event(struct ble_gap_event *event, void *arg)
|
||||
{
|
||||
#if NIMBLE_BLE_CONNECT
|
||||
struct ble_gap_conn_desc desc;
|
||||
#endif
|
||||
struct ble_hs_adv_fields fields;
|
||||
#if MYNEWT_VAL(BLE_HCI_VS)
|
||||
#if MYNEWT_VAL(BLE_POWER_CONTROL)
|
||||
@ -730,7 +732,7 @@ blecent_gap_event(struct ble_gap_event *event, void *arg)
|
||||
/* Try to connect to the advertiser if it looks interesting. */
|
||||
blecent_connect_if_interesting(&event->disc);
|
||||
return 0;
|
||||
|
||||
#if NIMBLE_BLE_CONNECT
|
||||
case BLE_GAP_EVENT_CONNECT:
|
||||
/* A new connection was established or a connection attempt failed. */
|
||||
if (event->connect.status == 0) {
|
||||
@ -964,6 +966,8 @@ blecent_gap_event(struct ble_gap_event *event, void *arg)
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@ -1039,7 +1043,6 @@ static void stack_init_deinit(void)
|
||||
void
|
||||
app_main(void)
|
||||
{
|
||||
int rc;
|
||||
/* Initialize NVS — it is used to store PHY calibration data */
|
||||
esp_err_t ret = nvs_flash_init();
|
||||
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
||||
@ -1059,6 +1062,8 @@ app_main(void)
|
||||
ble_hs_cfg.sync_cb = blecent_on_sync;
|
||||
ble_hs_cfg.store_status_cb = ble_store_util_status_rr;
|
||||
|
||||
#if NIMBLE_BLE_CONNECT
|
||||
int rc;
|
||||
/* Initialize data structures to track connected peers. */
|
||||
#if MYNEWT_VAL(BLE_INCL_SVC_DISCOVERY) || MYNEWT_VAL(BLE_GATT_CACHING_INCLUDE_SERVICES)
|
||||
rc = peer_init(MYNEWT_VAL(BLE_MAX_CONNECTIONS), 64, 64, 64, 64);
|
||||
@ -1067,11 +1072,13 @@ app_main(void)
|
||||
rc = peer_init(MYNEWT_VAL(BLE_MAX_CONNECTIONS), 64, 64, 64);
|
||||
assert(rc == 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CONFIG_BT_NIMBLE_GAP_SERVICE
|
||||
int m;
|
||||
/* Set the default device name. */
|
||||
rc = ble_svc_gap_device_name_set("nimble-blecent");
|
||||
assert(rc == 0);
|
||||
m = ble_svc_gap_device_name_set("nimble-blecent");
|
||||
assert(m == 0);
|
||||
#endif
|
||||
|
||||
/* XXX Need to have template for store */
|
||||
|
10
examples/bluetooth/nimble/blecent/sdkconfig.ci.central
Normal file
10
examples/bluetooth/nimble/blecent/sdkconfig.ci.central
Normal file
@ -0,0 +1,10 @@
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=y
|
||||
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=n
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=n
|
||||
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=n
|
@ -0,0 +1,10 @@
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=y
|
||||
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=n
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=y
|
||||
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y
|
10
examples/bluetooth/nimble/blecent/sdkconfig.ci.no_peripheral
Normal file
10
examples/bluetooth/nimble/blecent/sdkconfig.ci.no_peripheral
Normal file
@ -0,0 +1,10 @@
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=y
|
||||
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=y
|
||||
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=n
|
11
examples/bluetooth/nimble/blecent/sdkconfig.ci.observer
Normal file
11
examples/bluetooth/nimble/blecent/sdkconfig.ci.observer
Normal file
@ -0,0 +1,11 @@
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
|
||||
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=n
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=y
|
||||
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=n
|
||||
CONFIG_BT_NIMBLE_SECURITY_ENABLE=n
|
@ -52,6 +52,7 @@ static uint16_t bearers;
|
||||
|
||||
void ble_store_config_init(void);
|
||||
|
||||
#if NIMBLE_BLE_CONNECT
|
||||
/**
|
||||
* Logs information about a connection to the console.
|
||||
*/
|
||||
@ -78,6 +79,7 @@ bleprph_print_conn_desc(struct ble_gap_conn_desc *desc)
|
||||
desc->sec_state.authenticated,
|
||||
desc->sec_state.bonded);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_EXAMPLE_EXTENDED_ADV
|
||||
/**
|
||||
@ -148,7 +150,9 @@ bleprph_advertise(void)
|
||||
{
|
||||
struct ble_gap_adv_params adv_params;
|
||||
struct ble_hs_adv_fields fields;
|
||||
#if CONFIG_BT_NIMBLE_GAP_SERVICE
|
||||
const char *name;
|
||||
#endif
|
||||
int rc;
|
||||
|
||||
/**
|
||||
@ -175,10 +179,12 @@ bleprph_advertise(void)
|
||||
fields.tx_pwr_lvl_is_present = 1;
|
||||
fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO;
|
||||
|
||||
#if CONFIG_BT_NIMBLE_GAP_SERVICE
|
||||
name = ble_svc_gap_device_name();
|
||||
fields.name = (uint8_t *)name;
|
||||
fields.name_len = strlen(name);
|
||||
fields.name_is_complete = 1;
|
||||
#endif
|
||||
|
||||
fields.uuids16 = (ble_uuid16_t[]) {
|
||||
BLE_UUID16_INIT(GATT_SVR_SVC_ALERT_UUID)
|
||||
@ -236,10 +242,14 @@ static void bleprph_power_control(uint16_t conn_handle)
|
||||
static int
|
||||
bleprph_gap_event(struct ble_gap_event *event, void *arg)
|
||||
{
|
||||
#if NIMBLE_BLE_CONNECT
|
||||
struct ble_gap_conn_desc desc;
|
||||
int rc;
|
||||
#endif
|
||||
|
||||
switch (event->type) {
|
||||
|
||||
#if NIMBLE_BLE_CONNECT
|
||||
case BLE_GAP_EVENT_CONNECT:
|
||||
/* A new connection was established or a connection attempt failed. */
|
||||
MODLOG_DFLT(INFO, "connection %s; status=%d ",
|
||||
@ -463,9 +473,9 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg)
|
||||
event->subrate_change.status,
|
||||
event->subrate_change.subrate_factor);
|
||||
return 0;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -594,9 +604,11 @@ app_main(void)
|
||||
assert(rc == 0);
|
||||
#endif
|
||||
|
||||
#if CONFIG_BT_NIMBLE_GAP_SERVICE
|
||||
/* Set the default device name. */
|
||||
rc = ble_svc_gap_device_name_set("nimble-bleprph");
|
||||
assert(rc == 0);
|
||||
#endif
|
||||
|
||||
/* XXX Need to have template for store */
|
||||
ble_store_config_init();
|
||||
|
11
examples/bluetooth/nimble/bleprph/sdkconfig.ci.broadcaster
Normal file
11
examples/bluetooth/nimble/bleprph/sdkconfig.ci.broadcaster
Normal file
@ -0,0 +1,11 @@
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
|
||||
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=n
|
||||
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=n
|
||||
CONFIG_BT_NIMBLE_SECURITY_ENABLE=n
|
10
examples/bluetooth/nimble/bleprph/sdkconfig.ci.no_central
Normal file
10
examples/bluetooth/nimble/bleprph/sdkconfig.ci.no_central
Normal file
@ -0,0 +1,10 @@
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
|
||||
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=y
|
||||
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y
|
10
examples/bluetooth/nimble/bleprph/sdkconfig.ci.no_observer
Normal file
10
examples/bluetooth/nimble/bleprph/sdkconfig.ci.no_observer
Normal file
@ -0,0 +1,10 @@
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=y
|
||||
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=n
|
||||
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y
|
10
examples/bluetooth/nimble/bleprph/sdkconfig.ci.peripheral
Normal file
10
examples/bluetooth/nimble/bleprph/sdkconfig.ci.peripheral
Normal file
@ -0,0 +1,10 @@
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
|
||||
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=n
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=n
|
||||
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y
|
@ -9,6 +9,7 @@
|
||||
#include "host/ble_hs.h"
|
||||
#include "esp_central.h"
|
||||
|
||||
#if NIMBLE_BLE_CONNECT
|
||||
static void *peer_svc_mem;
|
||||
static struct os_mempool peer_svc_pool;
|
||||
|
||||
@ -1089,3 +1090,4 @@ err:
|
||||
peer_free_mem();
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user