I am using BlueZ stack for Bluetooth connection between Smart-phone(AG-Audio Gateway) and Embedded board(HF-Handsfree).
On which layer of Bluez ( HCI, L2CAP, RFCOMM) we will get reason of Bluetooth disconnection. So we can differentiate following type of disconnection:
- Smart-Phone SIMPLE DISCONNECT, but phone is still have HF Embedded device in its paired list.
- Smart-Phone FORGET HF device during bluetooth connection.
- Disconnection because HF device went out of Smart-Phone bluetooth Range