# Using the new Bluetooth audio profiles

**URL:** <https://forum.webosose.org/t/using-the-new-bluetooth-audio-profiles/738>\
**Category:** UI/UX\
**Created:** [January 20, 2019, 9:27pm UTC](https://forum.webosose.org/t/using-the-new-bluetooth-audio-profiles/738 "2019-01-20T21:27:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![elvispre](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/elvispre/32/100_2.png) [@elvispre](https://forum.webosose.org/u/elvispre)\
**Post date:** [January 20, 2019, 9:27pm UTC](https://forum.webosose.org/t/using-the-new-bluetooth-audio-profiles/738/1 "2019-01-20T21:27:46Z")

</div>

I just built an image from tag builds/webosose/master/49 to try out playing audio through my Bluetooth earphones.

There does not seem to be any way of pairing the devices in the UI. I was expecting Settings to have been extended, perhaps, to enable that, but I still see only General and Network.

Have I not _really_ built the latest code? (I kept my sstate cache folder from last time.)

Is the Bluetooth capability there but I need to write my own software to make use of it?

Just trying to understand. Thanks.

---

<div class="post-metadata">

**Author:** ![gyeorye.lee](https://avatars.discourse-cdn.com/v4/letter/g/bcef8e/32.png) [@gyeorye.lee](https://forum.webosose.org/u/gyeorye.lee)\
**Post date:** [January 29, 2019, 8:37am UTC](https://forum.webosose.org/t/using-the-new-bluetooth-audio-profiles/738/2 "2019-01-29T08:37:55Z")

</div>

Hello elvispre.  
Currently, the pairing the device through UI is not available. You need to use luna send to pair it. The user scene through Settings is under development.

---

<div class="post-metadata">

**Author:** ![apvijayasundaram](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/apvijayasundaram/32/211_2.png) [@apvijayasundaram](https://forum.webosose.org/u/apvijayasundaram)\
**Post date:** [February 1, 2019, 9:54am UTC](https://forum.webosose.org/t/using-the-new-bluetooth-audio-profiles/738/3 "2019-02-01T09:54:21Z")

</div>

Hello Elvispre,  
I hope you were able to pair and play audio on your bluetooth earphone using luna commands.  
If not, you can refer to the below API reference link for commands to pair, connect your bluetooth earphone.  
Link: [http://webosose.org/develop/ls2-api/ls2-api-reference/com-webos-service-bluetooth2/](http://webosose.org/develop/ls2-api/ls2-api-reference/com-webos-service-bluetooth2/)

Hope it helps

You can pair and connect with below commands:  
**Turn on BT**

luna-send -n 1 -f luna://com.webos.service.bluetooth2/adapter/setState '{"powered":true}'

**Expected Response:**

{  
"adapterAddress": "00:00:97:1c:c9:3c",  
"returnValue": true  
}

**Start Discovery**

luna-send -n 1 -f luna://com.webos.service.bluetooth2/adapter/startDiscovery '{}'

**Expected Response:**

{  
"adapterAddress": "00:00:97:1c:c9:3c",  
"returnValue": true  
}

**Search your bluetooth earphone device for example LG HBS700**

luna-send -n 1 -f luna://com.webos.service.bluetooth2/device/getStatus '{}' | grep "LG HBS700" -C 10

**Expected Response:**

{

"serviceClasses": [  
],  
"trusted": false,  
"connectedProfiles": [  
],  
"pairing": false,  
"rssi": -62,  
"name": "LG HSB700",  
"address": "xx:xx:xx:xx:xx:xx",  
"paired": false,  
"typeOfDevice": "bredr",  
"adapterAddress": "",  
"classOfDevice": 5898764,  
"blocked": false  
},

**Cancel discovery**

luna-send -n 1 -f luna://com.webos.service.bluetooth2/adapter/cancelDiscovery '{}'

Expected Response:

{  
"adapterAddress": "00:00:97:1c:c9:3c",  
"returnValue": true  
}

**Pair LG HBS700 deivce, replace xx:xx:xx:xx:xx:xx by your bluetooth earphone address**

luna-send -i -f luna://com.webos.service.bluetooth2/adapter/pair '{ "address": "xx:xx:xx:xx:xx:xx", "subscribe":true}'

Expected Response:

{  
"subscribed": false,  
"returnValue": true,  
"request": "endPairing"  
}

**Bluetooth A2DP device Connect**  
luna-send -i -f luna://com.webos.service.bluetooth2/a2dp/connect '{"address":"xx:xx:xx:xx:xx:xx","subscribe":true}'

Expected Response:

{  
"subscribed": true,  
"adapterAddress": "00:00:97:1c:c9:3c",  
"returnValue": true  
}

---

<div class="post-metadata">

**Author:** ![elvispre](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/elvispre/32/100_2.png) [@elvispre](https://forum.webosose.org/u/elvispre)\
**Post date:** [February 1, 2019, 3:13pm UTC](https://forum.webosose.org/t/using-the-new-bluetooth-audio-profiles/738/4 "2019-02-01T15:13:59Z")

</div>

> [@apvijayasundaram](#):
>
> luna-send -i -f luna://com.webos.service.bluetooth2/a2dp/connect '{"address":"

Thank you very much for the detailed instructions.

I managed to pair my headphones alright, but the connect fails with "Profile backend is not available".

---

<div class="post-metadata">

**Author:** ![elvispre](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/elvispre/32/100_2.png) [@elvispre](https://forum.webosose.org/u/elvispre)\
**Post date:** [February 1, 2019, 4:09pm UTC](https://forum.webosose.org/t/using-the-new-bluetooth-audio-profiles/738/5 "2019-02-01T16:09:35Z")

</div>

If I call adapter/queryAvailable, I only see GATT and SPP in my list. I think this confirms my suspicion that I did not really build the latest code this time...

...And in fact, after a rebuild, I have successfully played some YouTube video sounds through my Bluetooth headphones using webOS OSE 🙂

---

<div class="post-metadata">

**Author:** ![apvijayasundaram](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/apvijayasundaram/32/211_2.png) [@apvijayasundaram](https://forum.webosose.org/u/apvijayasundaram)\
**Post date:** [February 4, 2019, 6:32am UTC](https://forum.webosose.org/t/using-the-new-bluetooth-audio-profiles/738/6 "2019-02-04T06:32:47Z")

</div>

Yes, you figured it right. A2DP not on the list is the reason for "Profile backend is not available".  
I hope the new build with latest code solved the problem.
