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.

CC2650 BLE-STACK-2-1 Disconnect

Other Parts Discussed in Thread: CC2560

Hi,

oes the GAPRole_TerminateConnection function of the CC2560 BLE-STACK-2-1 terminate the connection by using the MD bit in the link layer or does it force a disconnection?

Many thanks and best regards

Marcus

  • Hello Marcus,
    It looked in the code and it seems like it will end the connection by sending a LL_TERMINATE_IND packet to the peer to indicate termination. It should be easy to verify this by setting up a link and observing the air traffic with the packet sniffer.
  • Hi Eirik,

    many thanks.

    Do we have a way in the BLE-STACK-2-1 to terminate a connection by using the MD bit?

    Many thanks and best regards

    Marcus

  • Sorry, I am confused. The MD (More Data) bit, of the Header of the Data Channel PDU, is used to indicate that the device has more data to send. If neither device has set the MD bit in their packets, the packet from the slave closes the connection event. This means that the connection will still be active, but there will be no data traffic over the air until the next connection event. The MD bit has nothing to do with termination of connections. Closing the connection event is not the same as connection termination.
  • Hi Eirik,

    Ok.
    let me ask in a different way.
    Is there way to manually set and clear the MD bit through the API or does the link layer handle this somehow?


    Many thanks
    Marcus
  • Hi Eirik,

    is my understanding correct.

    We do not really support the MD bit. this may lead to the matter of the fact that TI Stack may terminate the link while the remote device still wants to send something.

    The solution to this is try to handle this in the application layer?

    Many thanks and best regards

    Marcus 

  • Hello Marcus,

    No:

    The TI stack has implemented the Bluetooth core specification and the link layer support the :

    If either or both of the devices have set the MD bit, the master may continue the connection event by sending another packet, and the slave should listen after sending its packet. If a packet is not received from the slave by the master, the master will close the connection event. If a packet is not received from the master by the slave, the slave will close the connection event. This means that the slave should listen if the MD bit is set, but it does not have to and can close the connection and terminate the connection before the additional data is received.

    "4.5.6  Closing Connection Events" in Bluetooth® Core Specification.

    and Yes:

    Depending on what you do, you need to handle this in the application. If for example you have queued notifications you must simply wait until the next connection event before more notifications is sent to the peer device.