# Do not edit the generic key layout to support a specific keyboard; instead, create
# a new key layout file with the required keyboard configuration.
#
-
key 1 ESCAPE
-key 28 ENTER
-key 63 F5
-key 102 HOME
+key 2 1
+key 3 2
+key 4 3
+key 5 4
+key 6 5
+key 7 6
+key 8 7
+key 9 8
+key 10 9
+key 11 0
+key 28 DPAD_CENTER
+key 59 HOME
+key 61 MEDIA_REPEAT
+key 62 INFO
+key 63 SEARCH
key 103 DPAD_UP
+key 104 MEDIA_PREVIOUS
key 105 DPAD_LEFT
key 106 DPAD_RIGHT
key 108 DPAD_DOWN
+key 109 MEDIA_NEXT
+key 113 VOLUME_MUTE
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 116 POWER
key 130 MENU
+#key 240 ESCAPE
const tBTA_GATTC_CHARACTERISTIC *p_char = BTA_GATTC_GetCharacteristic(p_dev_cb->conn_id,
p_data->handle);
-
+#ifdef BLUETOOTH_RTK
+ if(p_char == NULL){
+ return;
+ }
+#endif
app_id= p_dev_cb->app_id;
p_rpt = bta_hh_le_find_report_entry(p_dev_cb,
btif_media_cb.encoder.s16AllocationMethod, btif_media_cb.encoder.u16BitRate,
btif_media_cb.encoder.s16SamplingFreq);
+ /* Reset entirely the SBC encoder */
+ SBC_Encoder_Init(&(btif_media_cb.encoder));
#ifdef BLUETOOTH_RTK_COEX
rtk_parse_manager_get_interface()->rtk_add_bitpool_to_fw(btif_media_cb.encoder.s16BitPool);
#endif
- /* Reset entirely the SBC encoder */
- SBC_Encoder_Init(&(btif_media_cb.encoder));
btif_media_cb.tx_sbc_frames = calculate_max_frames_per_packet();
rtkbt_callbacks = callbacks;
UIPC_Init(0);
loadplugins(&rtkbt_api_callbacks);
- //rtkbt_api_Hook(RTKBT_HOOK_ENABLE_BT_COMPLETE, (void *)BT_STATE_ON, 0);
+ rtkbt_api_Hook(RTKBT_HOOK_ENABLE_BT_COMPLETE, (void *)BT_STATE_ON, 0);
return BT_STATUS_SUCCESS;
}
static void cleanup()
static BOOLEAN btm_sec_use_smp_br_chnl(tBTM_SEC_DEV_REC *p_dev_rec);
static BOOLEAN btm_sec_is_master(tBTM_SEC_DEV_REC *p_dev_rec);
-
+#ifdef BLUETOOTH_RTK
+#include "bta_api.h"
+#endif
/* TRUE - authenticated link key is possible */
static const BOOLEAN btm_sec_io_map [BTM_IO_CAP_MAX][BTM_IO_CAP_MAX] =
{
{
p_dev_rec->sec_flags &= ~ (BTM_SEC_LE_LINK_KEY_KNOWN);
p_dev_rec->ble.key_type = BTM_LE_KEY_NONE;
+#ifdef BLUETOOTH_RTK
+ BTA_DmRemoveDevice(p_dev_rec->bd_addr);
+#endif
}
btm_ble_link_encrypted(p_dev_rec->ble.pseudo_addr, encr_enable);
return;
tBT_TRANSPORT transport);
static void smp_br_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf);
+#ifdef BLUETOOTH_RTK
+#include "btcore/include/bdaddr.h"
+BOOLEAN check_cod_hid(const bt_bdaddr_t *remote_bdaddr);
+#endif
/*******************************************************************************
**
** Function smp_l2cap_if_init
osi_free(p_buf);
return;
}
-
+#ifdef BLUETOOTH_RTK
+ bt_bdaddr_t bd_addr_t;
+ memcpy(bd_addr_t.address,&bd_addr[0],BD_ADDR_LEN);
+ if(check_cod_hid(&bd_addr_t)) {
+ SMP_TRACE_DEBUG("smp_data_received it is a hid device, ignore security request!");
+ if(SMP_OPCODE_SEC_REQ == cmd) {
+ osi_free(p_buf);
+ if(p_cb->state == SMP_STATE_IDLE) {
+ L2CA_RemoveFixedChnl (L2CAP_SMP_CID, bd_addr);
+ }
+ return;
+ }
+ }
+#endif
/* reject the pairing request if there is an on-going SMP pairing */
if (SMP_OPCODE_PAIRING_REQ == cmd || SMP_OPCODE_SEC_REQ == cmd)
{
******************************************************************************/
#undef NDEBUG
-#define LOG_TAG "bt_vendor"
+#define LOG_TAG "bt_vendor_uart"
+#define RTKBT_RELEASE_NAME "20170109_TV_ANDROID_7.x"
#include <utils/Log.h>
#include "bt_vendor_rtk.h"
#include "upio.h"
static int init(const bt_vendor_callbacks_t* p_cb, unsigned char *local_bdaddr)
{
+ ALOGI("RTKBT_RELEASE_NAME: %s",RTKBT_RELEASE_NAME);
ALOGI("init");
if (p_cb == NULL)
******************************************************************************/
#define LOG_TAG "bt_hwcfg"
+#define RTKBT_RELEASE_NAME "20170109_TV_ANDROID_7.x"
#include <utils/Log.h>
#include <sys/types.h>
/******************************************************************************
** Constants & Macros
******************************************************************************/
-#define RTK_VERSION "4.1.0"
+#define RTK_VERSION "4.1.1"
#ifndef BTHW_DBG
#define BTHW_DBG FALSE
if (hw_cfg_cb.patch_frag_idx < hw_cfg_cb.patch_frag_cnt)
{
+ iIndexRx = hw_cfg_cb.patch_frag_idx?((hw_cfg_cb.patch_frag_idx-1)%0x7f+1):0;
if (hw_cfg_cb.patch_frag_idx == hw_cfg_cb.patch_frag_cnt - 1)
{
ALOGI("HW_CFG_DL_FW_PATCH: send last fw fragment");
- hw_cfg_cb.patch_frag_idx |= 0x80;
+ iIndexRx |= 0x80;
hw_cfg_cb.patch_frag_len = hw_cfg_cb.patch_frag_tail;
}
else
{
- hw_cfg_cb.patch_frag_idx &= 0x7F;
+ iIndexRx &= 0x7F;
hw_cfg_cb.patch_frag_len = PATCH_DATA_FIELD_MAX_SIZE;
}
}
- is_proceeding = hci_download_patch_h4(p_buf, hw_cfg_cb.patch_frag_idx,
- hw_cfg_cb.total_buf+(hw_cfg_cb.patch_frag_idx&0x7F)*PATCH_DATA_FIELD_MAX_SIZE,
+ is_proceeding = hci_download_patch_h4(p_buf, iIndexRx,
+ hw_cfg_cb.total_buf+(hw_cfg_cb.patch_frag_idx*PATCH_DATA_FIELD_MAX_SIZE),
hw_cfg_cb.patch_frag_len);
break;
memset(&hw_cfg_cb, 0, sizeof(bt_hw_cfg_cb_t));
hw_cfg_cb.dl_fw_flag = 1;
hw_cfg_cb.chip_type = CHIPTYPE_NONE;
+ ALOGI("RTKBT_RELEASE_NAME: %s",RTKBT_RELEASE_NAME);
ALOGI("\nRealtek libbt-vendor_uart Version %s \n",RTK_VERSION);
HC_BT_HDR *p_buf = NULL;
uint8_t *p;
*
******************************************************************************/
-#define LOG_TAG "bt_vendor"
+#define LOG_TAG "bt_vendor_usb"
+#define RTKBT_RELEASE_NAME "20170109_TV_ANDROID_7.x"
#include <fcntl.h>
#include <errno.h>
static int init(const bt_vendor_callbacks_t* p_cb, unsigned char *local_bdaddr,char *bt_device_node)
{
+ ALOGI("RTKBT_RELEASE_NAME: %s",RTKBT_RELEASE_NAME);
ALOGI("init");
if (p_cb == NULL)
-# RELEASE NAME: 20161222_TV_ANDROID_7.x
+# RELEASE NAME: 20170109_TV_ANDROID_7.x
# RTKBT_API_VERSION=3.1.1.0
#BOARD_HAVE_BLUETOOTH := true
-# RELEASE NAME: 20161222_TV_ANDROID_7.x
+# RELEASE NAME: 20170109_TV_ANDROID_7.x
# Bluetooth Device Name; NULL or comment means "ro.product.model"
#Name=Realtek Bluetooth