WXK
2025-01-22 255c51174a0571340ef470184064a5c75d261d27
01_SDK/nimble/samples/bluetooth/ble_central_periph_ota/src/app_ble_periph.c
@@ -19,7 +19,7 @@
static uint16_t conn_handle = 0xFFFF;
/**@brief BLE device name. */
static const char *device_name = "pan_ble_cent_periph";
static const char *device_name = "HX_SHENGJI_TAG";
/**@brief Heart-rate data send timer. */
static struct ble_npl_callout  hr_tx_timer;
@@ -237,6 +237,34 @@
   
   APP_LOG_INFO("Adv Start...\n");
}
//void shengji_start(void)
//{
//    struct ble_gap_adv_params adv_params;
//    int rc;
//
//   /* Figure out address to use while advertising (no privacy for now) */
//   uint8_t own_addr_type = 0;
//    rc = ble_hs_id_infer_auto(0, &own_addr_type);
//    if (rc != 0) {
//        APP_LOG_ERR("error determining address type; rc=%d\n", rc);
//        return;
//    }
//    /* Start Adv */
//    memset(&adv_params, 0, sizeof(adv_params));
//    adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
//    adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
//    rc = ble_gap_adv_start(own_addr_type, NULL, BLE_HS_FOREVER, &adv_params,
//                          app_ble_periph_gap_event_cb, NULL);
//    if (rc != 0) {
//        APP_LOG_ERR("error enabling advertisement; rc=%d\n", rc);
//        return;
//    }
//
//   APP_LOG_INFO("Adv Start...\n");
//}
void app_ble_periph_init(void)
{