• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "raw_address.h"
23 
24 typedef struct {
25   RawAddress addr;
26   size_t length;
27   interop_feature_t feature;
28 } interop_addr_entry_t;
29 
30 static const interop_addr_entry_t interop_addr_database[] = {
31     // Nexus Remote (Spike)
32     // Note: May affect other Asus brand devices
33     {{{0x08, 0x62, 0x66, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
34     {{{0x38, 0x2c, 0x4a, 0xc9, 0, 0}},
35      4,
36      INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
37     {{{0x38, 0x2c, 0x4a, 0xe6, 0, 0}},
38      4,
39      INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
40     {{{0x54, 0xa0, 0x50, 0xd9, 0, 0}},
41      4,
42      INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
43     {{{0xac, 0x9e, 0x17, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
44     {{{0xf0, 0x79, 0x59, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
45 
46     {{{0x08, 0x62, 0x66, 0, 0, 0}}, 3, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S},
47     {{{0x38, 0x2c, 0x4a, 0xc9, 0, 0}}, 4, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S},
48     {{{0x38, 0x2c, 0x4a, 0xe6, 0, 0}}, 4, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S},
49     {{{0x54, 0xa0, 0x50, 0xd9, 0, 0}}, 4, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S},
50     {{{0xac, 0x9e, 0x17, 0, 0, 0}}, 3, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S},
51     {{{0xf0, 0x79, 0x59, 0, 0, 0}}, 3, INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S},
52 
53     // Ausdom M05 - unacceptably loud volume
54     {{{0xa0, 0xe9, 0xdb, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
55 
56     // BMW car kits (Harman/Becker)
57     {{{0x9c, 0xdf, 0x03, 0, 0, 0}}, 3, INTEROP_AUTO_RETRY_PAIRING},
58 
59     // Flic smart button
60     {{{0x80, 0xe4, 0xda, 0x70, 0, 0}},
61      4,
62      INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
63 
64     // iKross IKBT83B HS - unacceptably loud volume
65     {{{0x00, 0x14, 0x02, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
66 
67     // JayBird BlueBuds X - low granularity on volume control
68     {{{0x44, 0x5e, 0xf3, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
69     {{{0xd4, 0x9c, 0x28, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
70 
71     // Bose QuiteComfort 35, SoundSport and similar (because of older firmware)
72     {{{0x04, 0x52, 0xc7, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY},
73 
74     // JayBird Family
75     {{{0x00, 0x18, 0x91, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY},
76 
77     // Sony MBH-10
78     {{{0x20, 0x15, 0x06, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY},
79 
80     // Uconnect
81     {{{0x00, 0x54, 0xaf, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY},
82     {{{0x30, 0x14, 0x4a, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY},
83 
84     // LG Tone HBS-730 - unacceptably loud volume
85     {{{0x00, 0x18, 0x6b, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
86     {{{0xb8, 0xad, 0x3e, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
87 
88     // LG Tone HV-800 - unacceptably loud volume
89     {{{0xa0, 0xe9, 0xdb, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
90 
91     // Motorola Key Link
92     {{{0x1c, 0x96, 0x5a, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
93 
94     // Motorola Roadster
95     {{{0x00, 0x24, 0x1C, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
96 
97     // Mpow Cheetah - unacceptably loud volume
98     {{{0x00, 0x11, 0xb1, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
99 
100     // Nissan car kits (ALPS) - auto-pairing fails and rejects next pairing
101     {{{0x34, 0xc7, 0x31, 0, 0, 0}}, 3, INTEROP_DISABLE_AUTO_PAIRING},
102 
103     // SOL REPUBLIC Tracks Air - unable to adjust volume back off from max
104     {{{0xa4, 0x15, 0x66, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
105 
106     // Subaru car kits (ALPS) - auto-pairing fails and rejects next pairing
107     {{{0x00, 0x07, 0x04, 0, 0, 0}}, 3, INTEROP_DISABLE_AUTO_PAIRING},
108     {{{0xe0, 0x75, 0x0a, 0, 0, 0}}, 3, INTEROP_DISABLE_AUTO_PAIRING},
109 
110     // Swage Rokitboost HS - unacceptably loud volume
111     {{{0x00, 0x14, 0xf1, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
112 
113     // VW Car Kit - not enough granularity with volume
114     {{{0x00, 0x26, 0x7e, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
115     {{{0x90, 0x03, 0xb7, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
116 
117     // Unknown keyboard (carried over from auto_pair_devlist.conf)
118     {{{0x00, 0x0F, 0xF6, 0, 0, 0}}, 3, INTEROP_KEYBOARD_REQUIRES_FIXED_PIN},
119 
120     // Kenwood KMM-BT518HD - no audio when A2DP codec sample rate is changed
121     {{{0x00, 0x1d, 0x86, 0, 0, 0}}, 3, INTEROP_DISABLE_AVDTP_RECONFIGURE},
122 
123     // NAC FORD-2013 - Lincoln
124     {{{0x00, 0x26, 0xb4, 0, 0, 0}}, 3, INTEROP_DISABLE_ROLE_SWITCH},
125 
126     // Toyota Prius - 2015
127     {{{0xfc, 0xc2, 0xde, 0, 0, 0}}, 3, INTEROP_DISABLE_ROLE_SWITCH},
128 
129     // OBU II Bluetooth dongle
130     {{{0x00, 0x04, 0x3e, 0, 0, 0}}, 3, INTEROP_DISABLE_ROLE_SWITCH},
131 
132     // Roman R9020
133     {{{0x00, 0x23, 0x01, 0, 0, 0}}, 3, INTEROP_DISABLE_ROLE_SWITCH},
134 
135     // Jabra Storm
136     {{{0x1c, 0x48, 0xf9, 0, 0, 0}}, 3, INTEROP_DISABLE_ROLE_SWITCH},
137 
138     // Jeep Uconnect
139     {{{0x00, 0x54, 0xaf, 0, 0, 0}}, 3, INTEROP_DISABLE_ROLE_SWITCH},
140 };
141 
142 typedef struct {
143   char name[20];
144   size_t length;
145   interop_feature_t feature;
146 } interop_name_entry_t;
147 
148 static const interop_name_entry_t interop_name_database[] = {
149     // Carried over from auto_pair_devlist.conf migration
150     {"Audi", 4, INTEROP_DISABLE_AUTO_PAIRING},
151     {"BMW", 3, INTEROP_DISABLE_AUTO_PAIRING},
152     {"Parrot", 6, INTEROP_DISABLE_AUTO_PAIRING},
153     {"Car", 3, INTEROP_DISABLE_AUTO_PAIRING},
154 
155     // Nissan Quest rejects pairing after "0000"
156     {"NISSAN", 6, INTEROP_DISABLE_AUTO_PAIRING},
157 
158     // Subaru car kits ("CAR M_MEDIA")
159     {"CAR", 3, INTEROP_DISABLE_AUTO_PAIRING},
160 
161     // Pixel C Keyboard doesn't respond to service changed indications.
162     {"Pixel C Keyboard", 16, INTEROP_GATTC_NO_SERVICE_CHANGED_IND},
163 
164     // Kenwood KMM-BT518HD - no audio when A2DP codec sample rate is changed
165     {"KMM-BT51*HD", 11, INTEROP_DISABLE_AVDTP_RECONFIGURE},
166 };
167