Connect OnePlus Bullet Wireless Z Bluetooth earphones to Ubuntu 16.04 / Linux
Published: 2020-09-02 21:35:41


I received the new OnePlus Bullet Wireless Z (Black) earphones today as a gift. I tried to connect the device with my POCO F1 phone and it connected without a problem. Although POCO F1 does not support AAC codec - which means the earphones are connected to my phone via SBC codec. You can read more about Bluetooth codec  [here](https://www.soundguys.com/understanding-bluetooth-codecs-15352/) . Basically, my POCO F1 will only be able to send data on Sub-band Codec (SBC!) and with lower quality. But it works on the phone! 

![Screenshot from 2020-07-25 14-15-29.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1595666744316/8jcg9X3YT.png)

However, the problem came when I tried to connect the earphones with my Ubuntu 16.04 distro. While connecting the earphones, you can pair the device with the OS easily by simply searching for the Bluetooth and selecting the earphones. 


![2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1595666803914/2b3Y0TBGq.png)

But when trying to play some music, the system played the sound via the laptop (in-built sound system). 

![3.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1595666828860/PV0pH_evK.png)

When you connect the Bluetooth earphones to your laptop, it sometimes does not show as an output device in your sound settings. We basically need to tell the system that this earphone is indeed are an output device. This is the most common problem that people will face - with any Bluetooth device trying to connect to Linux, however, there can be problems in your drivers too.
You can find any missing drivers using `dmesg` command on the terminal: I found out some problems in the output like `Bluetooth: hci0: unexpected event for opcode 0xfc2f` and `Couldn't get size: 0x800000000000000e`  [Here](https://gist.github.com/MXmaster2s/7dd341ce7339da105c10dd1d1dea2475)  is a complete output from the terminal if you want to check and compare with yours. The drivers can be found  [here](https://github.com/winterheart/broadcom-bt-firmware) 

However, If you are able to use other Bluetooth headsets on your device, most probably the drivers are working fine and we can go ahead. For me, I was able to use Apple Bluetooth earphones without any problem, hence I knew the errors in the `dmesg` output were not really serious.
Now connect your earphones to the laptop and make sure you can see the earphones in the list. We can check the Bluetooth devices connected to the system using the `bluetoothctl` command on the terminal:

![4.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1595666958648/FivI4H0uw.png)

We can use the command info <Device MAC ID> and we can see that the earphones are connected to the system. 

![5.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1595666987677/hrSZ-XGdS.png)

But still, the sound system is still unable to recognise the device as an output device

![6.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1595667015517/dmRz3GuA0.png)

We can download a Bluetooth manager by entering the command `sudo apt-get install` and `sudo apt-get install blueman`

Inside Bluetooth manager (blueman) you need to right-click on the device and disconnect it. Now again connect the device using the option ‘headset’ and you should be able to see that the device now has been recognised as a sound output device 

![7.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1595667058924/i53iIZWeY.png)

We can now go back to the sound settings and select the earphones as an output device 

![8.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1595667087420/DL0gx4xZG.png)

Make sure to select the mode as ‘High Fidelity Playback’ and test the sound. You should now be able to play music on your new Bluetooth earphones.

The above method was successful for me. Do let me know if this helps you or not by commenting below!