Showing results for 
Search instead for 
Did you mean: 

Studio Bluetooth

New Contributor II


Module: CYBT-413034-02

Wiced Studio: 6.4 with MFi

iPad: iPad mini 4, iOS 13.6.1

Sample source: \20719-B1_Bluetooth\apps\demo\apple_mfi\hci_iap2_spp


LocalName, ExternalAccessoryProtocolName in hci_iap2.c

My experience

Most of cases, Pairing and connection was made well at first time.

But "Reconnection" is issue, most of reconnection try was failed. Or connected for 10~15 seconds and then disconnected.

I also prepare iOS log but I cannot tell appropriate log in console.(Please let me know if you need)

How to recover

When the error happen, I remove the pairing from iPad list, then made connect it was working well.

Snoop log was made with BTSpy.

Reproduce Steps

1. Search and make a connection in iPad settings(bluetooth).

Connection was made in Settings and iPad app connected

(Log 1.pairing_connect_in_app)

2. disconnect from App

(Log 2.disconnect_in_app)

3. disconnect bt connection in iPad settings(bluetooth)

(Log 3.disconnect_in_settgins)

4. Try to connect again in iPad settings(bluetooth)

(Log 4.reconnect_try)

We also have another Bluetooth module(CSR, One of our company's product) and it connect & reconnect well with same iPad and app.

Please review log and provide a solution.

3 Replies
New Contributor II

I'm reviewing logs and I found wrong in log

Log: 4.reconnect_try/0901_1.txt

15:09:38.509 1 [iap2_handle_request_auth_certificate] return certificate 918 bytes offset:27

Log tell us BT module send certi file to iPad but cannot receive from iOS.

We have to see air sniff log but we don't have air sniff equipment.

We cannot argue to Apple, because my another project don't have this issue.


[Well connected]

15:02:06.179 1 RFCOMM Connected  isInit: 0  Serv: 0x0002   Conn: 0x0002 e8 b2 ac 14 29 f5

15:02:06.181 1 send detect port:2 rc:0


15:02:06.903 1 auth_chip_read register:49 count:0

15:02:06.905 1 after copy data len:908

15:02:06.914 1 [iap2_handle_request_auth_certificate] return certificate 918 bytes offset:27

15:02:06.999 1 send tx buf:2 off:6 len:941 rc:0

15:02:07.005 1 send tx buf:2 off:7 len:21 rc:0

15:02:07.104 1 iap2_recv_data state:0

15:02:07.110 1 iap2_recv_data: processing 40 byte complete packet (40 total)

15:02:07.114 1 RequestAuthenticationChallengeResponse


15:02:07.127 1 Write Challenge Data (33)

[Reconnection failed]

15:09:38.218 1 RFCOMM Connected  isInit: 0  Serv: 0x0002   Conn: 0x0002 e8 b2 ac 14 29 f5

15:09:38.220 1 send detect port:2 rc:0


15:09:38.498 1 auth_chip_read register:49 count:0

15:09:38.500 1 after copy data len:908

15:09:38.509 1 [iap2_handle_request_auth_certificate] return certificate 918 bytes offset:27

15:09:38.594 1 send tx buf:2 off:6 len:941 rc:0

15:09:38.601 1 send tx buf:2 off:7 len:21 rc:0


15:09:44.115 RCVD [1] Event from HCI.  Name: HCI_Disconnection_Complete   (Hex Code: 0x05  Param Len: 4)

15:09:44.116                                   Status : Success (0x00)

15:09:44.116                        Connection Handle : 11 (0x000b)

15:09:44.116                                   Reason : 8 (0x08)

15:09:44.116                                            Connection Timeout

New Contributor II

I made another case of issue.

This time no rfcomm was open

please see no_rfcomm_open.7z

And I also upload iPad log(connected well with pairing and reconnect failure)

New Contributor II

I repeat my test and here is summary.

Sample source




uint8_t LocalName[]                     = { 'R', 'F', 'R', '9', '0', '0', 0 };

uint8_t ModelIdentifier[]               = { 'R', 'F', 'R', '9', '0', '0', 0 };

uint8_t Manufacturer[]                  = { 'B', 'L', 'U', 'E', 'B', 'I', 'R', 'D', 0 };

uint8_t SerialNumber[]                  = { 'S', 'E', 'R', 'I', 'A', 'L', '0', '1', 0 };

uint8_t FirmwareVersion[]               = { 'R', 'F', 'R', '9', '0', '0', '-', '2', '0', '1', '9', '0', '3', '1', '5',   0 };

uint8_t HardwareVersion[]               = { 'R', 'E', 'V', '0', '1', 0 };

uint8_t ExternalAccessoryProtocolName[] = { 'c','o','m','.','b','l','u','e','b','i','r','d','c','o','r','p','.','r','f','r','9','0','0', 0};

uint8_t AppMatchTeamId[]              = { 'X' ,'4' ,'2' ,'4' ,'U' ,'J' ,'2' ,'7' ,'E' ,'E', 0 };

Error cases

case 1. SDP Stop

When iOS connecting cypress, SDP procedure is abandoned, so that rfcomm cannot open.

iOS indicate error 832.

[iOS log]iOS_Connection_ErrorLog.7z/0903_sdp_stop/0903_iOs_fail_log.txt

Line 615: 오류 11:07:15.948586+0900 bluetoothd SDP CleanupAndReportError  STATUS 832 (status=832)

Line 617: 오류 11:07:15.950176+0900 bluetoothd Service attribute response error with status 832, need to disconnect

Line 752: 오류 11:07:21.981895+0900 bluetoothd Timeout waiting for DISCONNECT_RSP (status=65535)

case 2. auth Stop

When iOS connecting cypress, SDP is done. And cypress send certificat to iOS.

Snoop log show cypress send certificate but iOS did not start parse certificate.

[iOS log]iOS_Connection_ErrorLog.7z/ 0903_auth_stop/0903_iOS_Fail_log.txt

Authentication begin at 16:30

기본 16:30:41.275706+0900 accessoryd Starting Accessory Authentication...

Disconnect the connection

기본 16:30:47.122015+0900 bluetoothd Destroying connection... (connectionUUID: <private>)

HW relation

First of all, I'm not sure if it is iOS error but my previous project with CSR is fine all same test.

case 1. No HW dependency

case 2. Certificate

In order to clarify reading certificate error, I copy my certificate at local variable at first reading.



And I backup it when it connected.

After then, I used to test with backup certificate otherwise case 2 still happen.


iPad device is next to Cypress module. I believe it is very strong rf condition.

According to snoop log, cypress send something and iOS made the error.

I think Cypress provide your opinion first.