hci.c (d22b82d660ae9cd0135055a6605470ff010376b6) hci.c (204e8f1db18fbf9052ee11c80a64ae611b79d96e)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 6405 unchanged lines hidden (view full) ---

6414 */
6415uint8_t gap_ssp_remote_oob_data(const bd_addr_t addr, const uint8_t * c_192, const uint8_t * r_192, const uint8_t * c_256, const uint8_t * r_256){
6416 hci_connection_t * connection = hci_connection_for_bd_addr_and_type(addr, BD_ADDR_TYPE_ACL);
6417 if (connection == NULL) {
6418 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
6419 }
6420 connection->classic_oob_c_192 = c_192;
6421 connection->classic_oob_r_192 = r_192;
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 6405 unchanged lines hidden (view full) ---

6414 */
6415uint8_t gap_ssp_remote_oob_data(const bd_addr_t addr, const uint8_t * c_192, const uint8_t * r_192, const uint8_t * c_256, const uint8_t * r_256){
6416 hci_connection_t * connection = hci_connection_for_bd_addr_and_type(addr, BD_ADDR_TYPE_ACL);
6417 if (connection == NULL) {
6418 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
6419 }
6420 connection->classic_oob_c_192 = c_192;
6421 connection->classic_oob_r_192 = r_192;
6422 connection->classic_oob_c_256 = c_256;
6423 connection->classic_oob_r_256 = r_256;
6422
6423 // ignore P-256 if not supported by us
6424 if (hci_stack->secure_connections_active){
6425 connection->classic_oob_c_256 = c_256;
6426 connection->classic_oob_r_256 = r_256;
6427 }
6428
6424 return ERROR_CODE_SUCCESS;
6425}
6426/**
6427 * @brief Generate new OOB data
6428 * @note OOB data will be provided in GAP_EVENT_LOCAL_OOB_DATA and be used in future pairing procedures
6429 */
6430void gap_ssp_generate_oob_data(void){
6431 hci_stack->classic_read_local_oob_data = true;

--- 393 unchanged lines hidden ---
6429 return ERROR_CODE_SUCCESS;
6430}
6431/**
6432 * @brief Generate new OOB data
6433 * @note OOB data will be provided in GAP_EVENT_LOCAL_OOB_DATA and be used in future pairing procedures
6434 */
6435void gap_ssp_generate_oob_data(void){
6436 hci_stack->classic_read_local_oob_data = true;

--- 393 unchanged lines hidden ---