7 Replies Latest reply on Nov 13, 2014 11:22 PM by userc_6396

    What callback invoked if indication sending but no confirm?

      In my application, my bcm20737s use indication to send data to master. I know that a confirmation will be arrival if the indication is received by master.

      In hello_sensor, user can register confirmation callback here:

      bleprofile_sendIndication(HANDLE_HELLO_SENSOR_VALUE_NOTIFY, (UINT8 *)db_pdu.pdu, db_pdu.len, hello_sensor_indication_cfm);


      But I am confused that if my application send an indication to master and stack do NOT invoke hello_sensor_indication_cfm, what should I do?

        • 1. Re: What callback invoked if indication sending but no confirm?
          BoonT_56

          Can you try using bleprofile_sendIndication? This will caues the client to send back a confirmation packet.

          • 2. Re: What callback invoked if indication sending but no confirm?

            Yes, I can use this function, send indication out and get the confirmation.

            I want to know that what action is needed if I send an indication out, but can’t get the confirmation? Does my application just wait for it?

            • 3. Re: What callback invoked if indication sending but no confirm?
              BoonT_56

              i think this thread could give us some insight to your qns.

               

              Problem when client disconnection during Indication/confirmation phase.

              1 of 1 people found this helpful
              • 4. Re: What callback invoked if indication sending but no confirm?

                Confirmation on Notification?

                For my understanding, BLE supports:

                - Notification: a message from device/slave to master WITHOUT a confirmation from master ("unreliable send")

                - Indication: this is similar message but master device will send acknowledge - this is for reliable transmission

                 

                The WICED Sense uses just Notifications. My guess: you should not see that after Notification the master device will reply and confirm. You had to change the GATT descriptors to "indicate" instead.

                • 5. Re: What callback invoked if indication sending but no confirm?

                  userc_6396 BoonT_56

                   

                  Due to indication transmission is reliable, so I decide to use it. But I want to know if master do NOT send confirmation(ack) to slave, what countermeasure should be taken?

                  I had ever used zigbee stack, it had ack mechanism when transmission. No matter transmission success or not, stack always invoke callback handler to tell application the transmission result. But wiced smart stack do NOT return the result of indication transmission.

                  • 6. Re: What callback invoked if indication sending but no confirm?

                    I am sorry, cannot help, not familiar with the BLE stack on FW side.
                    I would guess, instead of a callback, there should be a timeout. If it is a standard acknowledge for a "synchronous message", Indication - I would think the call for the Indication to send might return with error (or time out indication), or you have an error callback handler. My guess: if all is OK, you do not see any callback (no reason for it, just in case of error, 'ack not received', after timeout an error callback invoked).

                    1 of 1 people found this helpful
                    • 7. Re: What callback invoked if indication sending but no confirm?

                      For my understanding these are the differences:

                      • Notification:
                        server (device) can sent any time, with any speed (repetition ratio) a Notification.
                        It is unreliable because: no ack sent and not sure if received on device (it does not know if client has realized, therefore it might continue as fast as needed).
                        And it can create congestion on client (fast repetitive Notification sent).
                      • Indication:
                        Real handshake: server (device) sends and will await acknowledge. As of my knowledge: server will not send again if ack was not received. A guarantee before next Indication - there must be an ack.
                        It is like a "back pressure": if client does not ack - server will not send again. The client device can decide what server (device) will do and control the speed of Indications and Acks.

                       

                      Good question what slave should do if ack was missing.
                      I guess: it will be stuck forever or: there is a timeout defined (and I think there is one), so that server (device) will try again. No clue what this timeout value is (had to study standard or the books here). I would imagine it is the same timeout used for lost connection (quite long).
                      More serious: if it can result also in disabling the connection, one peer assumes the link is broken and will shutdown RF, state and link goes to "sleep" - it depends on implementation. It might be possible that a FW will assume, a missing ack means "client is not there anymore" and will go to unbound, disengaged state.
                      And: if this is the case: also client has to deal with this timeout and make an assumption (server might be down). It cannot assume the client-server states are still in sync, as "server waiting for my ack still". If link goes down, a new advertisement and re-bond cycle (directed advertisement by server) would be needed.

                      1 of 1 people found this helpful