1 /****************************************************************************** 2 * 3 * Copyright (C) 2015 Google, Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 #pragma once 20 21 #include "device/include/interop.h" 22 23 typedef struct { 24 bt_bdaddr_t addr; 25 size_t length; 26 interop_feature_t feature; 27 } interop_addr_entry_t; 28 29 static const interop_addr_entry_t interop_addr_database[] = { 30 // Nexus Remote (Spike) 31 // Note: May affect other Asus brand devices 32 {{{0x08, 0x62, 0x66, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS}, 33 {{{0x38, 0x2c, 0x4a, 0xc9, 0, 0}}, 34 4, 35 INTEROP_DISABLE_LE_SECURE_CONNECTIONS}, 36 {{{0x38, 0x2c, 0x4a, 0xe6, 0, 0}}, 37 4, 38 INTEROP_DISABLE_LE_SECURE_CONNECTIONS}, 39 {{{0x54, 0xa0, 0x50, 0xd9, 0, 0}}, 40 4, 41 INTEROP_DISABLE_LE_SECURE_CONNECTIONS}, 42 {{{0xac, 0x9e, 0x17, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS}, 43 {{{0xf0, 0x79, 0x59, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS}, 44 45 {{{0x08, 0x62, 0x66, 0, 0, 0}}, 3, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S}, 46 {{{0x38, 0x2c, 0x4a, 0xc9, 0, 0}}, 4, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S}, 47 {{{0x38, 0x2c, 0x4a, 0xe6, 0, 0}}, 4, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S}, 48 {{{0x54, 0xa0, 0x50, 0xd9, 0, 0}}, 4, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S}, 49 {{{0xac, 0x9e, 0x17, 0, 0, 0}}, 3, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S}, 50 {{{0xf0, 0x79, 0x59, 0, 0, 0}}, 3, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S}, 51 52 // Ausdom M05 - unacceptably loud volume 53 {{{0xa0, 0xe9, 0xdb, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 54 55 // BMW car kits (Harman/Becker) 56 {{{0x9c, 0xdf, 0x03, 0, 0, 0}}, 3, INTEROP_AUTO_RETRY_PAIRING}, 57 58 // Flic smart button 59 {{{0x80, 0xe4, 0xda, 0x70, 0, 0}}, 60 4, 61 INTEROP_DISABLE_LE_SECURE_CONNECTIONS}, 62 63 // iKross IKBT83B HS - unacceptably loud volume 64 {{{0x00, 0x14, 0x02, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 65 66 // JayBird BlueBuds X - low granularity on volume control 67 {{{0x44, 0x5e, 0xf3, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 68 {{{0xd4, 0x9c, 0x28, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 69 70 // JayBird Family 71 {{{0x00, 0x18, 0x91, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY}, 72 73 // LG Tone HBS-730 - unacceptably loud volume 74 {{{0x00, 0x18, 0x6b, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 75 {{{0xb8, 0xad, 0x3e, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 76 77 // LG Tone HV-800 - unacceptably loud volume 78 {{{0xa0, 0xe9, 0xdb, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 79 80 // Motorola Key Link 81 {{{0x1c, 0x96, 0x5a, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS}, 82 83 // Motorola Roadster 84 {{{0x00, 0x24, 0x1C, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 85 86 // Mpow Cheetah - unacceptably loud volume 87 {{{0x00, 0x11, 0xb1, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 88 89 // Nissan car kits (ALPS) - auto-pairing fails and rejects next pairing 90 {{{0x34, 0xc7, 0x31, 0, 0, 0}}, 3, INTEROP_DISABLE_AUTO_PAIRING}, 91 92 // SOL REPUBLIC Tracks Air - unable to adjust volume back off from max 93 {{{0xa4, 0x15, 0x66, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 94 95 // Subaru car kits (ALPS) - auto-pairing fails and rejects next pairing 96 {{{0x00, 0x07, 0x04, 0, 0, 0}}, 3, INTEROP_DISABLE_AUTO_PAIRING}, 97 {{{0xe0, 0x75, 0x0a, 0, 0, 0}}, 3, INTEROP_DISABLE_AUTO_PAIRING}, 98 99 // Swage Rokitboost HS - unacceptably loud volume 100 {{{0x00, 0x14, 0xf1, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 101 102 // VW Car Kit - not enough granularity with volume 103 {{{0x00, 0x26, 0x7e, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 104 {{{0x90, 0x03, 0xb7, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 105 106 // Unknown keyboard (carried over from auto_pair_devlist.conf) 107 {{{0x00, 0x0F, 0xF6, 0, 0, 0}}, 3, INTEROP_KEYBOARD_REQUIRES_FIXED_PIN}, 108 109 // Kinivo BTC-450 - volume is erratic when using Absolute Volume 110 {{{0x00, 0x18, 0x91, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, 111 112 // Kenwood KMM-BT518HD - no audio when A2DP codec sample rate is changed 113 {{{0x00, 0x1d, 0x86, 0, 0, 0}}, 3, INTEROP_DISABLE_AVDTP_RECONFIGURE}, 114 }; 115 116 typedef struct { 117 char name[20]; 118 size_t length; 119 interop_feature_t feature; 120 } interop_name_entry_t; 121 122 static const interop_name_entry_t interop_name_database[] = { 123 // Carried over from auto_pair_devlist.conf migration 124 {"Audi", 4, INTEROP_DISABLE_AUTO_PAIRING}, 125 {"BMW", 3, INTEROP_DISABLE_AUTO_PAIRING}, 126 {"Parrot", 6, INTEROP_DISABLE_AUTO_PAIRING}, 127 {"Car", 3, INTEROP_DISABLE_AUTO_PAIRING}, 128 129 // Nissan Quest rejects pairing after "0000" 130 {"NISSAN", 6, INTEROP_DISABLE_AUTO_PAIRING}, 131 132 // Subaru car kits ("CAR M_MEDIA") 133 {"CAR", 3, INTEROP_DISABLE_AUTO_PAIRING}, 134 135 // Pixel C Keyboard doesn't respond to service changed indications. 136 {"Pixel C Keyboard", 16, INTEROP_GATTC_NO_SERVICE_CHANGED_IND}, 137 138 // Kenwood KMM-BT518HD - no audio when A2DP codec sample rate is changed 139 {"KMM-BT51*HD", 11, INTEROP_DISABLE_AVDTP_RECONFIGURE}, 140 }; 141