Check Bluetooth services of a remote device

With following mechanism, we can check the bluetooth profiles and services of a remote device, 1) Switch on bluetooth and make it discoverable ( in my case its Samsung Mobile ) 2) On ubuntu, check mac id using below command, $ hcitool inqInquiring …38:EC:E4:50:2C:F7    clock offset: 0x1164    class: 0x5a020c 3) Now to check services and … Read more

Using hcitool to get bluetooth device information

Below commands are shown for communication between Linux Laptop and Samsung Mobile to get Mobile bluetooth device information using hcitool. For this, first make sure laptop bluetooth is turned ON and then switch ON the Bluetooth of Mobile and Make it discoverable/visible to all nearby bluetooth devices. Lets try to understand what is hcitool, $ … Read more

How Android Bluetooth Profiles are enabled & Services activated ?

How Android Bluetooth profiles are enabled ? Ans: Check packages/apps/Bluetooth/res/values/config.xml <resources> 16 <bool name=”profile_supported_a2dp”>true</bool> 30</resources> If you want to disable the above profile, change from “true” to “false” Check related lxr The above flags are used during initialisation as below, in file, packages/apps/Bluetooth/src/com/android/bluetooth/btservice/ Resource flag to indicate whether profile is supported or not. private static … Read more

Understanding Bluetooth Basics – Pairing and Handshaking process

What is Bluetooth? Bluetooth is a standardized protocol for sending and receiving data via a 2.4GHz wireless link. It’s a secure protocol, and it’s perfect for short-range, low-power, low-cost, wireless transmissions between electronic devices. How Bluetooth Works ? The Bluetooth protocol operates at 2.4GHz in the same unlicensed ISM frequency band where RF protocols like … Read more

How to capture bluetooth packets on Android

When we want to capture bluetooth packets for some debugging in Android, we can follow below procedure. Enable Bluetooth and then make sure you have also enabled developer options. Go to developer options, and enable “Enable Bluetooth HCI Snoop Log” then do the operations of what you need to capture from bluetooth, Now, connected your … Read more

adb shell command to Turn ON Bluetooth & make it discoverable

We can turn on the Bluetooth using adb command as below, $ adb shell am start -a android.bluetooth.adapter.action.REQUEST_ENABLE once you type this on your desktop/laptop, Android will prompt the user on Mobile / Android device for allowing permissions to turn ON the bluetooth, like below We can make the Bluetooth Discoverable using adb command as … Read more

How to check if Bluetooth device is UP or NOT using l2ping ?

If you want to know the bluetooth device you want to connect to is alive or not, i.e. whether that device’s bluetooth is ON or not and wheter it can respond to our other request like enquiry for information etc. For this l2ping helps us. L2ping sends a L2CAP echo request to the Bluetooth MAC … Read more

Configure ubuntu 16.04 as Bluetooth A2DP Sink, i.e. Play Songs from mobile and listen on laptop/desktop speaker over Bluetooth

Create a file as below, $ vim /etc/bluetooth/audio.conf [bash] # This section contains options which are not specific to any # particular interface [General] Enable=Source,Sink,Headset,Gateway,Control,Media Disable=Socket [/bash] Install Blueman as, $ sudo apt-get install blueman $ sudo apt-get install pulseaudio-module-bluetooth Start blueman manager as, $ blueman-manager You may see a window like below, Start Bluetooth … Read more