diff --git a/port/arduino/BTstack.cpp b/port/arduino/BTstack.cpp index f99c282d0..f9a6e750b 100644 --- a/port/arduino/BTstack.cpp +++ b/port/arduino/BTstack.cpp @@ -197,7 +197,7 @@ static void extract_service(le_service_t * service, uint8_t * packet){ service->start_group_handle = little_endian_read_16(packet, 4); service->end_group_handle = little_endian_read_16(packet, 6); service->uuid16 = 0; - swap128(&packet[8], service->uuid128); + reverse_128(&packet[8], service->uuid128); if (uuid_has_bluetooth_prefix(service->uuid128)){ service->uuid16 = big_endian_read_32(service->uuid128, 0); } @@ -209,7 +209,7 @@ static void extract_characteristic(le_characteristic_t * characteristic, uint8_t characteristic->end_handle = little_endian_read_16(packet, 8); characteristic->properties = little_endian_read_16(packet, 10); characteristic->uuid16 = 0; - swap128(&packet[12], characteristic->uuid128); + reverse_128(&packet[12], characteristic->uuid128); if (uuid_has_bluetooth_prefix(characteristic->uuid128)){ characteristic->uuid16 = big_endian_read_32(characteristic->uuid128, 0); }