GATT server and client communication is broken because of Ventura

-- a BLE GATT server runs with one service and two characteristics on MacBook air

authCharacteristic = [[CBMutableCharacteristic alloc] initWithType:[CBUUID UUIDWithString:AUTH_CHARACTERISTIC_UUID] properties:CBCharacteristicPropertyIndicate | CBCharacteristicPropertyRead | CBCharacteristicPropertyWrite value:nil permissions:CBAttributePermissionsReadEncryptionRequired | CBAttributePermissionsWriteEncryptionRequired]; noauthCharacteristic = [[CBMutableCharacteristic alloc] initWithType:[CBUUID UUIDWithString:NOAUTH_CHARACTERISTIC_UUID] properties:CBCharacteristicPropertyIndicate |CBCharacteristicPropertyRead | CBCharacteristicPropertyWrite value:nil permissions:CBAttributePermissionsReadable | CBAttributePermissionsWriteable]; btscService = [[CBMutableService alloc] initWithType:[CBUUID UUIDWithString:BTSC_SERVICE_UUID] primary:YES];

-- a GATT client app runs on iPhone SE

[[[self.currentConnection device] peripheral] writeValue:piece forCharacteristic:authCharacteristic type:CBCharacteristicWriteWithResponse];

-- The communication between the client and server using the above settings work good on Big Sur and Monterey, but reports the errors on Ventura. Here is the error log

didWriteValueForCharacteristic[ error: Error Domain=CBATTErrorDomain Code=15 "Encryption is insufficient." UserInfo={NSLocalizedDescription=Encryption is insufficient.}, character: FF00, value {length = 10, bytes = 0x000800010000bcf0b086}] didWriteValueForCharacteristic[ error: Error Domain=CBATTErrorDomain Code=5 "Authentication is insufficient." UserInfo={NSLocalizedDescription=Authentication is insufficient.}, character: FF00, value {length = 4, bytes = 0x00020009}]

  • a GATT client app runs on Pixel 5A to communicate with the same GATT server on Ventura. Have the similar issue. Analyzed the BLE packages in Wireshark and MacOS Console.app. Here is a doc to describe the issue https://drive.google.com/file/d/1-MqCd_QvHOZocKyk-GImrWOcuArHJROI/view?usp=share_link
GATT server and client communication is broken because of Ventura
 
 
Q