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.

CC2564C: SPPLEDemo reconnection issue

Part Number: CC2564C

Hello,

I'm using cc2564C with STM32F401 MCU to build a project that has BT 3.0 (HID profile)and BLE(custom profile) features. I followed the demo code HIDDemo + SPPLEDemo, it works fine with my iPhone.

Auto reconnection is working well in BT3.0 by calling "ConnectRemoteHIDHost" in HID Demo, as I know normally Central device scans and connects the peripheral device for reconnection, but is it possible to do it in SPPLEDemo for issuing the connection action from the peripheral device (cc2564c) to iPhone if iPhone as a Central device just like calling "ConnectRemoteHIDHost" in HID Demo?

Thanks,

Kevin

  • Hi Kevin,

    Sorry for the late reply. 

    Kevin Lam61 said:
    but is it possible to do it in SPPLEDemo for issuing the connection action from the peripheral device (cc2564c) to iPhone if iPhone as a Central device just like calling "ConnectRemoteHIDHost" in HID Demo?

    The connection procedure for the BLE connection includes the advertiser (that eventually becomes the LE peripheral after connection) and the scanner (that eventually becomes the LE central after the connection). If you are using the SPPLEDemo as the advertiser for auto-reconnect, it is not enough since the scanner (e.g. the phone) needs to receive these advertisements and initiate the connection. So the auto-reconnect functionality for the BLE part will require the following implementations on both sides. 

    1. The SPPLEDemo application would automatically start the connectable advertisement as soon as it is disconnected from a remote device. I believe the Disconnection event in the GAP_LE_Event_Callback at the application layer would be a good point for this implementation.

    2. Moreover, the phone would need to actively scan for these advertisements when not connected to the SPPLEDemo and initiate the LE connection when it receives the advertisements from the SPPLEDemo. Not sure on the details of this implementation since it can very according to the OS type. But your smartphone app developer would have a better idea on how to implement this part.

    The LE connection procedure is quite different than the classic BT (i.e. HID profile). Thus, the automatic reconnect implementations between the two are quite different.

    Best regards,

    Vihang