1. BLE Mesh Core * Provisioning: Node Role * Advertising and GATT bearer * Authentication OOB * Provisioning: Provisioner Role * Advertising and GATT bearer * Authentication OOB * Networking * Relay * Segmentation and Reassembly * Key Refresh * IV Update * Proxy Support * Multiple Client Models Run Simultaneously * Support multiple client models send packets to different nodes simultaneously * No blocking between client model and server * NVS Storage * Store Provisioning Data of BLE Mesh Nodes in Flash 2. BLE Mesh Applications * BLE Mesh Node & Provisioner * Node Example * Provisioner Example * Node + Generic OnOff Client Example * Fast Provisioning * Vendor Fast Prov Server Model * Vendor Fast Prov Client Model * Examples * Wi-Fi & BLE Mesh Coexistence * Example * BLE Mesh Console Commands * Example 3. BLE Mesh Models * Foundation Models * Configuration Server Model * Configuration Client Model * Health Server Model * Health Client Model * Generic Client Models * Generic OnOff Client * Generic Level Client * Generic Location Client * Generic Default Transition Timer Client * Generic Power OnOff Client * Generic Power Level Client * Generic Battery Client * Generic Property Client * Generic Server Models * Generic OnOff Server (Example) * Lighting Client Models * Light Lightness Client * Light CTL Client * Light HSL Client * Light xyL Client * Light LC Client * Sensor Client Model * Sensor Client * Time and Scenes Client Models * Time Client * Scene Client * Scheduler Client
45 lines
1.5 KiB
C
45 lines
1.5 KiB
C
/*
|
|
* Copyright (c) 2017 Nordic Semiconductor ASA
|
|
* Copyright (c) 2015-2016 Intel Corporation
|
|
* Additional Copyright (c) 2018 Espressif Systems (Shanghai) PTE LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include "sdkconfig.h"
|
|
|
|
#include "stack/bt_types.h"
|
|
#include "device/controller.h"
|
|
|
|
#include "mesh_hci.h"
|
|
|
|
struct bt_mesh_dev bt_mesh_dev;
|
|
|
|
void bt_mesh_hci_init(void)
|
|
{
|
|
const uint8_t *features = controller_get_interface()->get_features_ble()->as_array;
|
|
if (features != NULL) {
|
|
memcpy(bt_mesh_dev.features[0], features, 8);
|
|
memcpy(bt_mesh_dev.le.features, features, 8);
|
|
}
|
|
|
|
/**
|
|
* Currently 20ms non-connectable adv interval is supported, and we need to add
|
|
* a flag to indicate this support.
|
|
*/
|
|
#ifdef CONFIG_BLE_MESH_HCI_5_0
|
|
bt_mesh_dev.hci_version = BLE_MESH_HCI_VERSION_5_0;
|
|
#else
|
|
bt_mesh_dev.hci_version = controller_get_interface()->get_bt_version()->hci_version;
|
|
#endif
|
|
bt_mesh_dev.lmp_version = controller_get_interface()->get_bt_version()->lmp_version;
|
|
bt_mesh_dev.hci_revision = controller_get_interface()->get_bt_version()->hci_revision;
|
|
bt_mesh_dev.lmp_subversion = controller_get_interface()->get_bt_version()->lmp_subversion;
|
|
bt_mesh_dev.manufacturer = controller_get_interface()->get_bt_version()->manufacturer;
|
|
|
|
const uint8_t *p = controller_get_interface()->get_ble_supported_states();
|
|
uint64_t states_fh = 0, states_sh = 0;
|
|
STREAM_TO_UINT32(states_fh, p);
|
|
STREAM_TO_UINT32(states_sh, p);
|
|
bt_mesh_dev.le.states = (states_sh << 32) | states_fh;
|
|
}
|