8000 Changes for #92 · headcloudmonkey/esp32-snippets@2f550ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f550ac

Browse files
committed
Changes for nkolban#92
1 parent 5b074fb commit 2f550ac

File tree

2 files changed

+272
-0
lines changed

2 files changed

+272
-0
lines changed

cpp_utils/BLEUtils.cpp

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,264 @@ static std::map<std::string, BLEClient *> g_addressMap;
3131
static std::map<uint16_t, BLEClient *> g_connIdMap;
3232
*/
3333

34+
typedef struct {
35+
uint32_t assignedNumber;
36+
std::string name;
37+
} member_t;
38+
39+
static const member_t members_ids[] = {
40+
{0xFE08, "Microsoft"},
41+
{0xFE09, "Pillsy, Inc."},
42+
{0xFE0A, "ruwido austria gmbh"},
43+
{0xFE0B, "ruwido austria gmbh"},
44+
{0xFE0C, "Procter & Gamble"},
45+
{0xFE0D, "Procter & Gamble"},
46+
{0xFE0E, "Setec Pty Ltd"},
47+
{0xFE0F, "Philips Lighting B.V."},
48+
{0xFE10, "Lapis Semiconductor Co., Ltd."},
49+
{0xFE11, "GMC-I Messtechnik GmbH"},
50+
{0xFE12, "M-Way Solutions GmbH"},
51+
{0xFE13, "Apple Inc."},
52+
{0xFE14, "Flextronics International USA Inc."},
53+
{0xFE15, "Amazon Fulfillment Services, Inc."},
54+
{0xFE16, "Footmarks, Inc."},
55+
{0xFE17, "Telit Wireless Solutions GmbH"},
56+
{0xFE18, "Runtime, Inc."},
57+
{0xFE19, "Google Inc."},
58+
{0xFE1A, "Tyto Life LLC"},
59+
{0xFE1B, "Tyto Life LLC"},
60+
{0xFE1C, "NetMedia, Inc."},
61+
{0xFE1D, "Illuminati Instrument Corporation"},
62+
{0xFE1E, "Smart Innovations Co., Ltd"},
63+
{0xFE1F, "Garmin International, Inc."},
64+
{0xFE20, "Emerson"},
65+
{0xFE21, "Bose Corporation"},
66+
{0xFE22, "Zoll Medical Corporation"},
67+
{0xFE23, "Zoll Medical Corporation"},
68+
{0xFE24, "August Home Inc"},
69+
{0xFE25, "Apple, Inc. "},
70+
{0xFE26, "Google Inc."},
71+
{0xFE27, "Google Inc."},
72+
{0xFE28, "Ayla Networks"},
73+
{0xFE29, "Gibson Innovations"},
74+
{0xFE2A, "DaisyWorks, Inc."},
75+
{0xFE2B, "ITT Industries"},
76+
{0xFE2C, "Google Inc."},
77+
{0xFE2D, "SMART INNOVATION Co.,Ltd"},
78+
{0xFE2E, "ERi,Inc."},
79+
{0xFE2F, "CRESCO Wireless, Inc"},
80+
{0xFE30, "Volkswagen AG"},
81+
{0xFE31, "Volkswagen AG"},
82+
{0xFE32, "Pro-Mark, Inc."},
83+
{0xFE33, "CHIPOLO d.o.o."},
84+
{0xFE34, "SmallLoop LLC"},
85+
{0xFE35, "HUAWEI Technologies Co., Ltd"},
86+
{0xFE36, "HUAWEI Technologies Co., Ltd"},
87+
{0xFE37, "Spaceek LTD"},
88+
{0xFE38, "Spaceek LTD"},
89+
{0xFE39, "TTS Tooltechnic Systems AG & Co. KG"},
90+
{0xFE3A, "TTS Tooltechnic Systems AG & Co. KG"},
91+
{0xFE3B, "Dolby Laboratories"},
92+
{0xFE3C, "Alibaba"},
93+
{0xFE3D, "BD Medical"},
94+
{0xFE3E, "BD Medical"},
95+
{0xFE3F, "Friday Labs Limited"},
96+
{0xFE40, "Inugo Systems Limited"},
97+
{0xFE41, "Inugo Systems Limited"},
98+
{0xFE42, "Nets A/S "},
99+
{0xFE43, "Andreas Stihl AG & Co. KG"},
100+
{0xFE44, "SK Telecom "},
101+
{0xFE45, "Snapchat Inc"},
102+
{0xFE46, "B&O Play A/S "},
103+
{0xFE47, "General Motors"},
104+
{0xFE48, "General Motors"},
105+
{0xFE49, "SenionLab AB"},
106+
{0xFE4A, "OMRON HEALTHCARE Co., Ltd."},
107+
{0xFE4B, "Philips Lighting B.V."},
108+
{0xFE4C, "Volkswagen AG"},
109+
{0xFE4D, "Casambi Technologies Oy"},
110+
{0xFE4E, "NTT docomo"},
111+
{0xFE4F, "Molekule, Inc."},
112+
{0xFE50, "Google Inc."},
113+
{0xFE51, "SRAM"},
114+
{0xFE52, "SetPoint Medical"},
115+
{0xFE53, "3M"},
116+
{0xFE54, "Motiv, Inc."},
117+
{0xFE55, "Google Inc."},
118+
{0xFE56, "Google Inc."},
119+
{0xFE57, "Dotted Labs"},
120+
{0xFE58, "Nordic Semiconductor ASA"},
121+
{0xFE59, "Nordic Semiconductor ASA"},
122+
{0xFE5A, "Chronologics Corporation"},
123+
{0xFE5B, "GT-tronics HK Ltd"},
124+
{0xFE5C, "million hunters GmbH"},
125+
{0xFE5D, "Grundfos A/S"},
126+
{0xFE5E, "Plastc Corporation"},
127+
{0xFE5F, "Eyefi, Inc."},
128+
{0xFE60, "Lierda Science & Technology Group Co., Ltd."},
129+
{0xFE61, "Logitech International SA"},
130+
{0xFE62, "Indagem Tech LLC"},
131+
{0xFE63, "Connected Yard, Inc."},
132+
{0xFE64, "Siemens AG"},
133+
{0xFE65, "CHIPOLO d.o.o."},
134+
{0xFE66, "Intel Corporation"},
135+
{0xFE67, "Lab Sensor Solutions"},
136+
{0xFE68, "Qualcomm Life Inc"},
137+
{0xFE69, "Qualcomm Life Inc"},
138+
{0xFE6A, "Kontakt Micro-Location Sp. z o.o."},
139+
{0xFE6B, "TASER International, Inc."},
140+
{0xFE6C, "TASER International, Inc."},
141+
{0xFE6D, "The University of Tokyo"},
142+
{0xFE6E, "The University of Tokyo"},
143+
{0xFE6F, "LINE Corporation"},
144+
{0xFE70, "Beijing Jingdong Century Trading Co., Ltd."},
145+
{0xFE71, "Plume Design Inc"},
146+
{0xFE72, "St. Jude Medical, Inc."},
147+
{0xFE73, "St. Jude Medical, Inc."},
148+
{0xFE74, "unwire"},
149+
{0xFE75, "TangoMe"},
150+
{0xFE76, "TangoMe"},
151+
{0xFE77, "Hewlett-Packard Company"},
152+
{0xFE78, "Hewlett-Packard Company"},
153+
{0xFE79, "Zebra Technologies"},
154+
{0xFE7A, "Bragi GmbH"},
155+
{0xFE7B, "Orion Labs, Inc."},
156+
{0xFE7C, "Telit Wireless Solutions (Formerly Stollmann E+V GmbH)"},
157+
{0xFE7D, "Aterica Health Inc."},
158+
{0xFE7E, "Awear Solutions Ltd"},
159+
{0xFE7F, "Doppler Lab"},
160+
{0xFE80, "Doppler Lab"},
161+
{0xFE81, "Medtronic Inc."},
162+
{0xFE82, "Medtronic Inc."},
163+
{0xFE83, "Blue Bite"},
164+
{0xFE84, "RF Digital Corp"},
165+
{0xFE85, "RF Digital Corp"},
166+
{0xFE86, "HUAWEI Technologies Co., Ltd. ( )"},
167+
{0xFE87, "Qingdao Yeelink Information Technology Co., Ltd. ( )"},
168+
{0xFE88, "SALTO SYSTEMS S.L."},
169+
{0xFE89, "B&O Play A/S"},
170+
{0xFE8A, "Apple, Inc."},
171+
{0xFE8B, "Apple, Inc."},
172+
{0xFE8C, "TRON Forum"},
173+
{0xFE8D, "Interaxon Inc."},
174+
{0xFE8E, "ARM Ltd"},
175+
{0xFE8F, "CSR"},
176+
{0xFE90, "JUMA"},
177+
{0xFE91, "Shanghai Imilab Technology Co.,Ltd"},
178+
{0xFE92, "Jarden Safety & Security"},
179+
{0xFE93, "OttoQ Inc."},
180+
{0xFE94, "OttoQ Inc."},
181+
{0xFE95, "Xiaomi Inc."},
182+
{0xFE96, "Tesla Motor Inc."},
183+
{0xFE97, "Tesla Motor Inc."},
184+
{0xFE98, "Currant, Inc."},
185+
{0xFE99, "Currant, Inc."},
186+
{0xFE9A, "Estimote"},
187+
{0xFE9B, "Samsara Networks, Inc"},
188+
{0xFE9C, "GSI Laboratories, Inc."},
189+
{0xFE9D, "Mobiquity Networks Inc"},
190+
{0xFE9E, "Dialog Semiconductor B.V."},
191+
{0xFE9F, "Google Inc."},
192+
{0xFEA0, "Google Inc."},
193+
{0xFEA1, "Intrepid Control Systems, Inc."},
194+
{0xFEA2, "Intrepid Control Systems, Inc."},
195+
{0xFEA3, "ITT Industries"},
196+
{0xFEA4, "Paxton Access Ltd"},
197+
{0xFEA5, "GoPro, Inc."},
198+
{0xFEA6, "GoPro, Inc."},
199+
{0xFEA7, "UTC Fire and Security"},
200+
{0xFEA8, "Savant Systems LLC"},
201+
{0xFEA9, "Savant Systems LLC"},
202+
{0xFEAA, "Google Inc."},
203+
{0xFEAB, "Nokia Corporation"},
204+
{0xFEAC, "Nokia Corporation"},
205+
{0xFEAD, "Nokia Corporation"},
206+
{0xFEAE, "Nokia Corporation"},
207+
{0xFEAF, "Nest Labs Inc."},
208+
{0xFEB0, "Nest Labs Inc."},
209+
{0xFEB1, "Electronics Tomorrow Limited"},
210+
{0xFEB2, "Microsoft Corporation"},
211+
{0xFEB3, "Taobao"},
212+
{0xFEB4, "WiSilica Inc."},
213+
{0xFEB5, "WiSilica Inc."},
214+
{0xFEB6, "Vencer Co, Ltd"},
215+
{0xFEB7, "Facebook, Inc."},
216+
{0xFEB8, "Facebook, Inc."},
217+
{0xFEB9, "LG Electronics"},
218+
{0xFEBA, "Tencent Holdings Limited"},
219+
{0xFEBB, "adafruit industries"},
220+
{0xFEBC, "Dexcom, Inc. "},
221+
{0xFEBD, "Clover Network, Inc."},
222+
{0xFEBE, "Bose Corporation"},
223+
{0xFEBF, "Nod, Inc."},
224+
{0xFEC0, "KDDI Corporation"},
225+
{0xFEC1, "KDDI Corporation"},
226+
{0xFEC2, "Blue Spark Technologies, Inc."},
227+
{0xFEC3, "360fly, Inc."},
228+
{0xFEC4, "PLUS Location Systems"},
229+
{0xFEC5, "Realtek Semiconductor Corp."},
230+
{0xFEC6, "Kocomojo, LLC"},
231+
{0xFEC7, "Apple, Inc."},
232+
{0xFEC8, "Apple, Inc."},
233+
{0xFEC9, "Apple, Inc."},
234+
{0xFECA, "Apple, Inc."},
235+
{0xFECB, "Apple, Inc."},
236+
{0xFECC, "Apple, Inc."},
237+
{0xFECD, "Apple, Inc."},
238+
{0xFECE, "Apple, Inc."},
239+
{0xFECF, "Apple, Inc."},
240+
{0xFED0, "Apple, Inc."},
241+
{0xFED1, "Apple, Inc."},
242+
{0xFED2, "Apple, Inc."},
243+
{0xFED3, "Apple, Inc."},
244+
{0xFED4, "Apple, Inc."},
245+
{0xFED5, "Plantronics Inc."},
246+
{0xFED6, "Broadcom Corporation"},
247+
{0xFED7, "Broadcom Corporation"},
248+
{0xFED8, "Google Inc."},
249+
{0xFED9, "Pebble Technology Corporation"},
250+
{0xFEDA, "ISSC Technologies Corporation"},
251+
{0xFEDB, "Perka, Inc."},
252+
{0xFEDC, "Jawbone"},
253+
{0xFEDD, "Jawbone"},
254+
{0xFEDE, "Coin, Inc."},
255+
{0xFEDF, "Design SHIFT"},
256+
{0xFEE0, "Anhui Huami Information Technology Co."},
257+
{0xFEE1, "Anhui Huami Information Technology Co."},
258+
{0xFEE2, "Anki, Inc."},
259+
{0xFEE3, "Anki, Inc."},
260+
{0xFEE4, "Nordic Semiconductor ASA"},
261+
{0xFEE5, "Nordic Semiconductor ASA"},
262+
{0xFEE6, "Silvair, Inc."},
263+
{0xFEE7, "Tencent Holdings Limited"},
264+
{0xFEE8, "Quintic Corp."},
265+
{0xFEE9, "Quintic Corp."},
266+
{0xFEEA, "Swirl Networks, Inc."},
267+
{0xFEEB, "Swirl Networks, Inc."},
268+
{0xFEEC, "Tile, Inc."},
269+
{0xFEED, "Tile, Inc."},
270+
{0xFEEE, "Polar Electro Oy"},
271+
{0xFEEF, "Polar Electro Oy"},
272+
{0xFEF0, "Intel"},
273+
{0xFEF1, "CSR"},
274+
{0xFEF2, "CSR"},
275+
{0xFEF3, "Google Inc."},
276+
{0xFEF4, "Google Inc."},
277+
{0xFEF5, "Dialog Semiconductor GmbH"},
278+
{0xFEF6, "Wicentric, Inc."},
279+
{0xFEF7, "Aplix Corporation"},
280+
{0xFEF8, "Aplix Corporation"},
281+
{0xFEF9, "PayPal, Inc."},
282+
{0xFEFA, "PayPal, Inc."},
283+
{0xFEFB, "Telit Wireless Solutions (Formerly Stollmann E+V GmbH)"},
284+
{0xFEFC, "Gimbal, Inc."},
285+
{0xFEFD, "Gimbal, Inc."},
286+
{0xFEFE, "GN ReSound A/S"},
287+
{0xFEFF, "GN Netcom"},
288+
{0, "" }
289+
};
290+
291+
34292
typedef struct {
35293
uint32_t assignedNumber;
36294
std::string name;
@@ -1588,6 +1846,19 @@ std::string BLEUtils::gattStatusToString(esp_gatt_status_t status) {
15881846
} // gattStatusToString
15891847

15901848

1849+
1850+
std::string BLEUtils::getMember(uint32_t memberId) {
1851+
member_t* p = (member_t *)members_ids;
1852+
1853+
while (p->name.length() > 0) {
1854+
if (p->assignedNumber == memberId) {
1855+
return p->name;
1856+
}
1857+
p++;
1858+
}
1859+
return "Unknown";
1860+
}
1861+
15911862
/**
15921863
* @brief convert a GAP search event to a string.
15931864
* @param [in] searchEvt

cpp_utils/BLEUtils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class BLEUtils {
3838
static void registerByAddress(BLEAddress address, BLEClient* pDevice);
3939
static void registerByConnId(uint16_t conn_id, BLEClient* pDevice);
4040
static std::string gattCharacteristicUUIDToString(uint32_t characteristicUUID);
41+
static std::string getMember(uint32_t memberId);
4142
static std::string buildPrintData(uint8_t* source, size_t length);
4243
static void dumpGattClientEvent(
4344
esp_gattc_cb_event_t event,

0 commit comments

Comments
 (0)
0