1 Reply Latest reply on Sep 5, 2015 10:49 AM by rohitk_

    PSOC BLE Needs power cycle to be seen by CySmart App




      I am having major problems with the CySmart Android app disconnecting from the BLE kit, and only reconnecting on cycling the power on the BLE kit.  If I take the phone out of range, and come back into range, it can never re-find the kit, I have to restart the kit.  I can see this being an issue in a product...


      Anyone else have this issue?  If so, any ideas on how to fix it?  I have a case, but it is going slower than molasses.


      My phone is a Moto X with Android 4.4.4, Kernel 3.4.42.


      Project attached - though the problem seems to be for all projects.





        • 1. Re: PSOC BLE Needs power cycle to be seen by CySmart App



          I see in the attached project that the advertisement timeout is set for 30 seconds, but there is no application code that can handle this timeout. The only two cases the advertisement is started is at start of the stack (power up) and disconnection from an existing BLE connection.


          Ideally, another CyBle_GappStartAdvertisement() API should be called under event 'CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP', after checking for current BLE state to be equal to CYBLE_STATE_DISCONNECTED. This will ensure that advertisement is restarted after timeout. Alternatively, you can set the timeout value in BLE component -> Gap Settings -> Advertisement settings to a huge value (65000 seconds).


          I cannot say for certain, but most of the projects employ low power operation where the system is put to deep sleep after being disconnected for sometime. In these cases, the projects are configured to restart advertisement after a user button press (switch SW2) on the kit.