3 Replies Latest reply on Mar 10, 2016 9:38 PM by userc_40298

    Sending multiple notification with ble


      I continuous send 256Bytes to the phone in the notification mode.A packet is 20bytes and last packet is 16bytes.But the test failed,Only we can get three packets on the phone.The code stopped in this line: 


          while(CyBle_GattGetBusyStatus() == CYBLE_STACK_STATE_BUSY); 


      On the other hand,What is the maximum number of packets that CYBLE could process per connection event in  notification mode?



        • 1. Re: Sending multiple notification with ble



          If you add some delay betweene each packets, are you able to send the notifcaitons properly? Can you reduce the connection interval and see if it is working?


          Also, the max. MTU Size is 512 Bytes,




          -Madhu Sudhan

          • 2. Re: Sending multiple notification with ble



            You need to take care of two things (in case you are not):


            1) Check if the stack memory is free to queue the notification data you send from application


            Before sending notifications, check if (CyBle_GattGetBusyStatus() == CYBLE_STACK_STATE_FREE). If yes, then send the notification, else wait for the memory to be cleared.




            2) You should call CyBle_ProcesEvents() atleast once, after calling the GattsNotification API. Calling multiple GattsNotification API before calling CyBle_ProcessEvents does not process the notification and only queues it, which overflows the internal memory.




            Additionally, you can set a higher MTU for the notification characteristic and let client request to update the MTU size.

            • 3. Re: Sending multiple notification with ble

              If you are doing an Android app make sure you have the connection priority set to low latency if you don't already. You can set it back to balanced or low power after the transfer is done.