are you using bluetooth classic or BLE? see this thread for BLE, for bluetooth classic it is similar
Taifun