hci.c (61972f0a5991f636a79984a06846aade0648e1e5) | hci.c (7efb077f0eb98cc26e6c2f3e53c215c55739b344) |
---|---|
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 --- 3329 unchanged lines hidden (view full) --- 3338 gap_event[1] = 36 - 2; 3339 gap_event[2] = GAP_SUBEVENT_LE_CONNECTION_COMPLETE; 3340 switch (hci_event_le_meta_get_subevent_code(hci_event)){ 3341 case HCI_SUBEVENT_LE_CONNECTION_COMPLETE: 3342 memcpy(&gap_event[3], &hci_event[3], 11); 3343 memset(&gap_event[14], 0, 12); 3344 memcpy(&gap_event[26], &hci_event[14], 7); 3345 memset(&gap_event[33], 0xff, 3); | 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 --- 3329 unchanged lines hidden (view full) --- 3338 gap_event[1] = 36 - 2; 3339 gap_event[2] = GAP_SUBEVENT_LE_CONNECTION_COMPLETE; 3340 switch (hci_event_le_meta_get_subevent_code(hci_event)){ 3341 case HCI_SUBEVENT_LE_CONNECTION_COMPLETE: 3342 memcpy(&gap_event[3], &hci_event[3], 11); 3343 memset(&gap_event[14], 0, 12); 3344 memcpy(&gap_event[26], &hci_event[14], 7); 3345 memset(&gap_event[33], 0xff, 3); |
3346 // Some Controllers incorrectly report a resolved identity address in HCI_SUBEVENT_LE_CONNECTION_COMPLETE. 3347 // If an address is resolved, we're working with it, but this event does not provide it. 3348 // As a workaround, we map identity addresses to regular addresses. 3349 gap_event[7] = gap_event[7] & 1; |
|
3346 break; 3347 case HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE_V1: 3348 memcpy(&gap_event[3], &hci_event[3], 30); 3349 memset(&gap_event[33], 0xff, 3); 3350 break; 3351 case HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE_V2: 3352 memcpy(&gap_event[3], &hci_event[3], 33); 3353 break; --- 7551 unchanged lines hidden --- | 3350 break; 3351 case HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE_V1: 3352 memcpy(&gap_event[3], &hci_event[3], 30); 3353 memset(&gap_event[33], 0xff, 3); 3354 break; 3355 case HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE_V2: 3356 memcpy(&gap_event[3], &hci_event[3], 33); 3357 break; --- 7551 unchanged lines hidden --- |