mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
[NearbyConnections] Fix IOS incorrect endpoint info from GATT server
1. Put the entire regular advertisement onto the gatt server 2. Provide the gatt read characterestics with offset. PiperOrigin-RevId: 731102862
This commit is contained in:
@@ -961,9 +961,7 @@ bool BleV2::StartRegularAdvertisingLocked(
|
||||
// Begin building the regular BLE advertisement.
|
||||
BleAdvertisementData advertising_data;
|
||||
ByteArray medium_advertisement_bytes =
|
||||
medium_.IsExtendedAdvertisementsAvailable()
|
||||
? medium_advertisement.ByteArrayWithExtraField()
|
||||
: ByteArray(medium_advertisement);
|
||||
medium_advertisement.ByteArrayWithExtraField();
|
||||
|
||||
// Start extended advertisement first if available.
|
||||
bool extended_regular_advertisement_success = false;
|
||||
|
||||
@@ -327,7 +327,8 @@ static char *const kGNCBLEGATTServerQueueLabel = "com.nearby.GNCBLEGATTServer";
|
||||
[_peripheralManager respondToRequest:request withResult:CBATTErrorAttributeNotFound];
|
||||
return;
|
||||
}
|
||||
request.value = value;
|
||||
request.value =
|
||||
[value subdataWithRange:NSMakeRange(request.offset, value.length - request.offset)];
|
||||
[_peripheralManager respondToRequest:request withResult:CBATTErrorSuccess];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user