Bluetooth disconnect when bonding

This problem occur only ios 11. ios 10 ver didn't occur.


I received under message when I bonding device with passkey method.

<CBPeripheral: 0x1c010ff60, identifier = 54A5F97C-EE68-FDE3-3CEE-1C2A1E9CB560, name = MEMO3880, state = disconnected>, err : Error Domain=CBErrorDomain Code=6 "The connection has timed out unexpectedly." UserInfo={NSLocalizedDescription=The connection has timed out unexpectedly.}


But device is bonded in iphone. I can check at setting -> bluetooth -> list.


Why they disconnect every time in ios 11 ver.




iphone's version is ios 10 then bluetooth connection normaly operate.




I attach my devices logs to understanding


ios 10 device log

Oct 19 17:06:55 Jin-Hongui-iPhone BTServer[60] <Notice>: encryptionStatusChangedCb handle:0x155f00d80 status=0 address=<private> isPairing=1

Oct 19 17:06:55 Jin-Hongui-iPhone BTServer[60] <Notice>: Encryption is now enabled for device "75EBC587-CFEE-45D1-8628-809523A3AB61" (<private>)

Oct 19 17:06:55 Jin-Hongui-iPhone BTServer[60] <Notice>: smpPairingCompleted address=<private> status=0

Oct 19 17:06:55 Jin-Hongui-iPhone BTServer[60] <Notice>: Pairing succeeded to device "<private>"

Oct 19 17:06:55 Jin-Hongui-iPhone BTServer[60] <Notice>: LE_Security_DeriveLinkKeyForAddress with result 102

Oct 19 17:06:55 Jin-Hongui-iPhone BTServer[60] <Notice>: Beginning GAP name update sequence for device "<private>"

Oct 19 17:06:55 Jin-Hongui-iPhone BTServer[60] <Notice>: Received XPC message "CBMsgIdCharacteristicReadValue" from session "HUINNO.MEMO-central-883-1"

Oct 19 17:06:55 Jin-Hongui-iPhone BTServer[60] <Notice>: Writing keys to disk for device <private>

Oct 19 17:06:55 Jin-Hongui-iPhone MEMO[883] <Notice>: <--- hCmdAck for hCmdStartPairing. *This log means app receive info from peripheral device.

*It's nomaly scenario

Oct 19 17:06:55 Jin-Hongui-iPhone MEMO[883] <Notice>: --------------- End 3.3 Pairing Procedure ---------------



ios 11 device log

Oct 19 16:17:28 iPhone bluetoothd[85] <Notice>: Adding "<private>" (<private>) to the cache.

Oct 19 16:17:28 iPhone bluetoothd[85] <Notice>: Added "<private>" to the cache (irk=<private>, okToRePair=0) status=0

Oct 19 16:17:28 iPhone bluetoothd[85] <Fault>: LE_Security_DeriveLinkKeyForAddress <private> with result 102 ltkType=0

Oct 19 16:17:28 iPhone bluetoothd[85] <Notice>: Beginning GAP name update sequence for device "<private>"

Oct 19 16:17:28 iPhone bluetoothd[85] <Notice>: Writing keys to disk for device <private> (isWatch=0)

Oct 19 16:17:28 iPhone bluetoothd[85] <Notice>: writeKeyForDevice is calling BTKCSetLEData sync=0

Oct 19 16:17:28 iPhone bluetoothd[85] <Notice>: BTKCSetLEData calling _BTKCGetDataCopy

Oct 19 16:17:28 iPhone securityd[118] <Notice>: inserted <genp,rowid=1794,cdat=2017-10-19 07:17:28 +0000,mdat=2017-10-19 07:17:28 +0000,desc=null,icmt=null,crtr=null,type=null,scrp=null,labl=D5FCE9B7-DF95-B1E6-397D-4CC20BFF72EB,alis=null,invi=null,nega=null,cusi=null,prot=null,acct=Public 85:A0:A1:11:A9:45,svce=BluetoothLE,gena=null,data=02b9:030000800B000000...|1d6ce6e9fa8f7af2,agrp=com.apple.bluetooth,pdmn=dku,sync=0,tomb=0,sha1=3E3E407FC1931E408B334DB20B2B241814A7B9DA,vwht=null,tkid=null,v_Data=<?>,v_pk=EAEAF8F144A74E53107CCF494B5DB71FB38C1785,accc=null,u_Tomb=null,musr=,UUID=4F7BFFCD-207A-4ECF-9257-C7B76030F544,sysb=null,pcss=null,pcsk=null,pcsi=null,persistref=>




In ios 11, LE_SecurityDeriveLinkKeyForAddress was fault. Maybe, is this correlate with problem?

Please help me how to fix it.


ios 10 device full logs

https://slack-files.com/T62NKLQCQ-F7MG2KPGE-8e6d44960b

ios 11 device full logs

https://slack-files.com/T62NKLQCQ-F7MFV21AA-f13dd87223

Replies

I have the same problem with U.

I update the iOS system version to 11.1.1 , It's OK now.


I need more time to check the bug is Fix or not.

Did you have an Apple Watch paired on the problematic phone ? I had the exact same problem and it is linked to Apple Watch. Seems to be corrected on iOS 11.2