a59eafbc9d
* fix sdmmc config * Fix warnings in EEPROM from @Curclamas * remove leftover TAG in EEPROM * Initial add of @stickbreaker i2c * Add log_n * fix warnings when log is off * i2c code clean up and reorganization * add flags to interrupt allocator * fix sdmmc config * Fix warnings in EEPROM from @Curclamas * remove leftover TAG in EEPROM * fix errors with latest IDF * fix debug optimization (#1365) incorrect optimization for debugging tick markers. * Fix some missing BT header * Change BTSerial log calls * Update BLE lib * Arduino-ESP32 release management scripted (#1515) * Calculate an absolute path for a custom partitions table (#1452) * * Arduino-ESP32 release management scripted (ready-to-merge) * * secure env for espressif/arduino-esp32 * * build tests enabled * gitter webhook enabled * * gitter room link fixed * better comment * * filepaths fixed * BT Serial adjustments * * don't run sketch builds & tests for tagged builds * Return false from WiFi.hostByName() if hostname is not resolved * Free BT Memory when BT is not used * WIFI_MODE_NULL is not supported anymore * Select some key examples to build with PlatformIO to save some time * Update BLE lib * Fixed BLE lib * Major WiFi overhaul - auto reconnect on connection loss now works - moved to event groups - some code clean up and procedure optimizations - new methods to get a more elaborate system ststus * Add cmake tests to travis * Add initial AsyncUDP * Add NetBIOS lib and fix CMake includes * Add Initial WebServer * Fix WebServer and examples * travis not quiting on build fail * Try different travis build * Update IDF to aaf1239 * Fix WPS Example * fix script permission and add some fail tests to sketch builder * Add missing space in WiFiClient::write(Stream &stream)
194 lines
7.8 KiB
C
194 lines
7.8 KiB
C
/******************************************************************************
|
|
*
|
|
* Copyright (C) 2006-2012 Broadcom Corporation
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at:
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
******************************************************************************/
|
|
|
|
/******************************************************************************
|
|
*
|
|
* This is the interface file for device mananger callout functions.
|
|
*
|
|
******************************************************************************/
|
|
#ifndef BTA_DM_CO_H
|
|
#define BTA_DM_CO_H
|
|
|
|
#include "bta/bta_sys.h"
|
|
|
|
/*****************************************************************************
|
|
** Function Declarations
|
|
*****************************************************************************/
|
|
|
|
/*******************************************************************************
|
|
**
|
|
** Function bta_dm_co_io_req
|
|
**
|
|
** Description This callout function is executed by DM to get IO capabilities
|
|
** of the local device for the Simple Pairing process
|
|
**
|
|
** Parameters bd_addr - The peer device
|
|
** *p_io_cap - The local Input/Output capabilities
|
|
** *p_oob_data - TRUE, if OOB data is available for the peer device.
|
|
** *p_auth_req - TRUE, if MITM protection is required.
|
|
**
|
|
** Returns void.
|
|
**
|
|
*******************************************************************************/
|
|
extern void bta_dm_co_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
|
|
tBTA_OOB_DATA *p_oob_data, tBTA_AUTH_REQ *p_auth_req,
|
|
BOOLEAN is_orig);
|
|
|
|
/*******************************************************************************
|
|
**
|
|
** Function bta_dm_co_io_rsp
|
|
**
|
|
** Description This callout function is executed by DM to report IO capabilities
|
|
** of the peer device for the Simple Pairing process
|
|
**
|
|
** Parameters bd_addr - The peer device
|
|
** io_cap - The remote Input/Output capabilities
|
|
** oob_data - TRUE, if OOB data is available for the peer device.
|
|
** auth_req - TRUE, if MITM protection is required.
|
|
**
|
|
** Returns void.
|
|
**
|
|
*******************************************************************************/
|
|
extern void bta_dm_co_io_rsp(BD_ADDR bd_addr, tBTA_IO_CAP io_cap,
|
|
tBTA_OOB_DATA oob_data, tBTA_AUTH_REQ auth_req);
|
|
|
|
/*******************************************************************************
|
|
**
|
|
** Function bta_dm_co_lk_upgrade
|
|
**
|
|
** Description This callout function is executed by DM to check if the
|
|
** platform wants allow link key upgrade
|
|
**
|
|
** Parameters bd_addr - The peer device
|
|
** *p_upgrade - TRUE, if link key upgrade is desired.
|
|
**
|
|
** Returns void.
|
|
**
|
|
*******************************************************************************/
|
|
extern void bta_dm_co_lk_upgrade(BD_ADDR bd_addr, BOOLEAN *p_upgrade );
|
|
|
|
/*******************************************************************************
|
|
**
|
|
** Function bta_dm_co_loc_oob
|
|
**
|
|
** Description This callout function is executed by DM to report the OOB
|
|
** data of the local device for the Simple Pairing process
|
|
**
|
|
** Parameters valid - TRUE, if the local OOB data is retrieved from LM
|
|
** c - Simple Pairing Hash C
|
|
** r - Simple Pairing Randomnizer R
|
|
**
|
|
** Returns void.
|
|
**
|
|
*******************************************************************************/
|
|
extern void bta_dm_co_loc_oob(BOOLEAN valid, BT_OCTET16 c, BT_OCTET16 r);
|
|
|
|
/*******************************************************************************
|
|
**
|
|
** Function bta_dm_co_rmt_oob
|
|
**
|
|
** Description This callout function is executed by DM to request the OOB
|
|
** data for the remote device for the Simple Pairing process
|
|
**
|
|
** Parameters bd_addr - The peer device
|
|
**
|
|
** Returns void.
|
|
**
|
|
*******************************************************************************/
|
|
extern void bta_dm_co_rmt_oob(BD_ADDR bd_addr);
|
|
|
|
|
|
/*******************************************************************************
|
|
**
|
|
** Function bta_dm_co_ble_io_req
|
|
**
|
|
** Description This callout function is executed by DM to get BLE IO capabilities
|
|
** before SMP pairing gets going.
|
|
**
|
|
** Parameters bd_addr - The peer device
|
|
** *p_io_cap - The local Input/Output capabilities
|
|
** *p_oob_data - TRUE, if OOB data is available for the peer device.
|
|
** *p_auth_req - Auth request setting (Bonding and MITM required or not)
|
|
** *p_max_key_size - max key size local device supported.
|
|
** *p_init_key - initiator keys.
|
|
** *p_resp_key - responder keys.
|
|
**
|
|
** Returns void.
|
|
**
|
|
*******************************************************************************/
|
|
extern void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
|
|
tBTA_OOB_DATA *p_oob_data,
|
|
tBTA_LE_AUTH_REQ *p_auth_req,
|
|
UINT8 *p_max_key_size,
|
|
tBTA_LE_KEY_TYPE *p_init_key,
|
|
tBTA_LE_KEY_TYPE *p_resp_key );
|
|
|
|
|
|
/*******************************************************************************
|
|
**
|
|
** Function bta_dm_co_ble_local_key_reload
|
|
**
|
|
** Description This callout function is to load the local BLE keys if available
|
|
** on the device.
|
|
**
|
|
** Parameters none
|
|
**
|
|
** Returns void.
|
|
**
|
|
*******************************************************************************/
|
|
extern void bta_dm_co_ble_load_local_keys (tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OCTET16 er,
|
|
tBTA_BLE_LOCAL_ID_KEYS *p_id_keys);
|
|
|
|
// btla-specific ++
|
|
/*******************************************************************************
|
|
**
|
|
** Function bta_dm_co_ble_io_req
|
|
**
|
|
** Description This callout function is executed by DM to get BLE IO capabilities
|
|
** before SMP pairing gets going.
|
|
**
|
|
** Parameters bd_addr - The peer device
|
|
** *p_io_cap - The local Input/Output capabilities
|
|
** *p_oob_data - TRUE, if OOB data is available for the peer device.
|
|
** *p_auth_req - Auth request setting (Bonding and MITM required or not)
|
|
** *p_max_key_size - max key size local device supported.
|
|
** *p_init_key - initiator keys.
|
|
** *p_resp_key - responder keys.
|
|
**
|
|
** Returns void.
|
|
**
|
|
*******************************************************************************/
|
|
extern void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap,
|
|
tBTA_OOB_DATA *p_oob_data,
|
|
tBTA_LE_AUTH_REQ *p_auth_req,
|
|
UINT8 *p_max_key_size,
|
|
tBTA_LE_KEY_TYPE *p_init_key,
|
|
tBTA_LE_KEY_TYPE *p_resp_key );
|
|
// btla-specific --
|
|
|
|
extern void bta_dm_co_ble_set_io_cap(UINT8 ble_io_cap);
|
|
|
|
extern void bta_dm_co_ble_set_auth_req(UINT8 ble_auth_req);
|
|
|
|
extern void bta_dm_co_ble_set_init_key_req(UINT8 init_key);
|
|
|
|
extern void bta_dm_co_ble_set_rsp_key_req(UINT8 rsp_key);
|
|
|
|
extern void bta_dm_co_ble_set_max_key_size(UINT8 ble_key_size);
|
|
#endif
|