This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564: Bluetooth Classic HID Cannot Reconnect on Mobile

Part Number: CC2564

Hello there.  We designed a combo Bluetooth Classic keyboard/mouse using the CC2564MODN and it has been working well on Windows.  Our keyboard/mouse is using SecureSimplePairing as a NoInput/NoOutput device with no Pin code needed.

But testing with Apple and Android mobile products has hit a problem.  The keyboard/mouse pairs with the Phone/Tablet and works perfectly fine.   We see an Open Indication success in the serial log.  But if the Phone/Tablet loses connection, powers off, goes out of range, etc.  the Phone/Tablet does not automatically reconnect to the HID device like our Windows computers do.

So, we added a timeout and are attempting to call HID_Connect_Remote_Device().  This call appears to succeed, but we get an Open Confirmation success.  This indicates the Phone/Tablet is now the Host.  And despite this succeeding, and the Phone/Tablet showing connection, and the Phone/Tablet reporting a connected HID device, the HID reports are not being delivered properly.  

Can you think of anything we might be missing or could try to debug this further?    I've included a log below illustrating the behavior:  

HID Device>OpenStack().
Bluetooth Stack ID: 1.
Device Chipset Version: 4.1
Bluetooth Device Address: 0xA0E6F860A0AE
GAP_Set_Connectability_Mode(cmConnectable).
Loading Devices -
HID_Register_Device_SDP_Record: Function Successful.

HID Device>Local Device Name set to: iKeyBT-87.
GAP_Set_Discoverability_Mode(dmGeneralDiscoverable, 0).
GAP_Set_Pairability_Mode(pmPairableMode_EnableSecureSimplePairing).

atIOCapabilityResponse: 0x10F1F2EA52BC
Remote Capabilities: Display Yes/No, MITM

HID Device>
atIOCapabilityRequest: 0x10F1F2EA52BC
GAP_Authentication_Response() Success.

HID Device>
atUserConfirmationRequest: 0x10F1F2EA52BC

Auto Accepting: 426736
GAP_Authentication_Response() Success.

HID Device>
atSecureSimplePairingComplete.

HID Device>
atLinkKeyCreation: 0x10F1F2EA52BC
Link Key: 0x8E0672525F9EAB070344C381733425E9
Link Key Stored locally.

HID Device>
HID Open Indication, ID: 0x0001, Board: 0x10F1F2EA52BC

HID Device>
HID Set Idle Indication, ID: 0x0001, IdleRate: 0

At this point the keyboard/mouse is working fine on the phone/tablet.....  so I turn bluetooth off and back on forcing a connection close.

HID Device>
HID Close Indication, ID: 0x0001

HID re-connection attempt.
Open Remote HID Device(BD_ADDR = 0x10F1F2EA52BC)
Open Remote HID Device Result was

atLinkKeyRequest: 0x10F1F2EA52BC
GAP_Authentication_Response() Success.

HID Device>
HID Open Confirmation, ID: 0x0002, Status: 0x0000

Notice the Confirmation, as our keyboard/mouse opens a connection to the Phone/Tablet.  This appears to succeed, except no HID transactions are successfully getting through.  

Thank you,

  - Jason

  • Hello Jason,

    The applications we provide - are sample applications that come to show the functionality - therefore there might be some issues in them.

    In order for me to help you - can you please add logs (FW logs, Sniffer logs and UPS logs)
    so i can see what exactly is the issue and help solve it.

    BR,
    Chen Loewy
  • Hello Chen,

       I actually think we managed to figure it out.  Even after using this stack for 3 years it is still very confusing at times.  Though trial and error we found a sequence of command issuing that appears to be working well through testing with multiple end devices.    

       Finding a way to obtain an economic Bluetooth Sniffer has proven challenging despite the number of successful commercial designs we produce.  What do you recommend?  It seems as though the lack of Bluetooth sniffer logs always results in us having to use trial-and-error to get these things sorted out.  But given how most of our Bluetooth designs have a total budget LESS than that of a single sniffer product - and the reviews on them are often hit or miss, we've never been able to get one.

    Thanks,

     - Jason

     

  • Hello Jason,

    I'm glad to hear you've find a way that works for you.
    I understand that obtaining a sniffer can be expensive.
    I know that you can rent one for a lot less.

    I think you can always begin with the UPS and FW logs (which don't require any external tool) and see if we can have enough data from these.

    Once again glad that you've solved the issue.
    If you need anything we are here.

    Chen Loewy
  • Hello Chen. So in this case I had included the firmware logs in the original post. Was there something additional you would have liked to have seen here?

    What are UPS logs exactly? HCI bus traffic logs? Other than hooking up a logic analyzer and capturing the data, does another method exist for acquiring these?

    We’ve tested a few sniffers in the past with mixed results. What does TI use when supporting their product line?

    Thanks,

    - Jason
  • Hi Jason,

    I must have missed it.
    Is it in another thread or sent over email? because when i scroll upwards i can't see any attached log file.

    We usually check the FW logs, UART logs and if possible UPS/profile data.

    BR,
    Chen Loewy
  • Hello Chen,

       I didn't attach a file, but copied the log output into the original message.  I've attached it this time in case something was preventing it from displaying.

       This is the Display("") calls going out the UART.  Where would I access additional FW logs? 

       And please let me know if you can provide any suggestions on what Bluetooth Classic sniffers TI prefers.  

    HID Device>OpenStack().
    Bluetooth Stack ID: 1.
    Device Chipset Version: 4.1
    Bluetooth Device Address: 0xA0E6F860A0AE
    GAP_Set_Connectability_Mode(cmConnectable).
    Loading Devices -
    HID_Register_Device_SDP_Record: Function Successful.
    
    HID Device>Local Device Name set to: iKeyBT-87.
    GAP_Set_Discoverability_Mode(dmGeneralDiscoverable, 0).
    GAP_Set_Pairability_Mode(pmPairableMode_EnableSecureSimplePairing).
    
    atIOCapabilityResponse: 0x10F1F2EA52BC
    Remote Capabilities: Display Yes/No, MITM
    
    HID Device>
    atIOCapabilityRequest: 0x10F1F2EA52BC
    GAP_Authentication_Response() Success.
    
    HID Device>
    atUserConfirmationRequest: 0x10F1F2EA52BC
    
    Auto Accepting: 426736
    GAP_Authentication_Response() Success.
    
    HID Device>
    atSecureSimplePairingComplete.
    
    HID Device>
    atLinkKeyCreation: 0x10F1F2EA52BC
    Link Key: 0x8E0672525F9EAB070344C381733425E9
    Link Key Stored locally.
    
    HID Device>
    HID Open Indication, ID: 0x0001, Board: 0x10F1F2EA52BC
    
    HID Device>
    HID Set Idle Indication, ID: 0x0001, IdleRate: 0
    
    At this point the keyboard/mouse is working fine on the phone/tablet.....  so I turn bluetooth off and back on forcing a connection close.
    
    HID Device>
    HID Close Indication, ID: 0x0001
    
    HID re-connection attempt.
    Open Remote HID Device(BD_ADDR = 0x10F1F2EA52BC)
    Open Remote HID Device Result was
    
    atLinkKeyRequest: 0x10F1F2EA52BC
    GAP_Authentication_Response() Success.
    
    HID Device>
    HID Open Confirmation, ID: 0x0002, Status: 0x0000

       

    Thanks,

    - Jason

       

  • Hello Jason,

    In order to get FW logs you will need to connect the TX DBG pin.
    You will need to download TI Wireless tools - and use the logger tool.

    processors.wiki.ti.com/.../CC256x_Logger_User_Guide
  • Hello Jason,

    I didn't get any response to this email and closing this one.
    please open a new one if you have any more questions regarding this issue.

    Chen Loewy