Firstly, I don't think you can change the PIN of a bluetooth device. It is certainly hard-coded and you can't do anything about it.
Secondly, the right question to ask for your problem is: How do I specify a different PIN than 0000 when pairing a bluetooth device on android ?
So you better ask /your favortie search engine/ about that:
For me, the reason I was getting no sink in pulseaudio was using hcitool
instead of bluetoothctl
to connect the headset. With bluez5
, the latter is preferred, and the former isn't guaranteed to work.
But even having a pavucontrol
-selectable sink did not give me sound. I've certainly heard noise level change between sink sleep and unsuspend transitions, but still no sound ended up actually playing (with unmuted sink at max volume). Also, pulseaudio refused to use the A2DP profile saying module-bluez5-device.c: Profile 'a2dp' not valid or not supported by device
eventhough bluetoothctl <<< "info 00:11:22:33:44:55"
was clearly listing Audio Sink UUID 0000110b-0000-1000-8000-00805f9b34fb
. So PA was using HSP/HFP or whatever, and that means hardcoded 8kHz mono.
In the end, how I got actually working A2DP on Ubuntu 16.04.1 was to compile pulseaudio 9.0
from source. Very predictable build; a short transcript for those who know some compiling:
git clone --branch master git://anongit.freedesktop.org/pulseaudio/pulseaudio \
&& cd pulseaudio
./autogen.sh
./configure \
--enable-bluez5 \
--enable-bluez5-native-headset \
--with-speex \
&& make -sj3
Just find and apt install
those -dev
packages configure
asks for. make
took ~100 seconds to complete.
Then quick in-place test:
echo 'autospawn=no' > ~/.config/pulse/client.conf; killall pulseaudio
src/pulseaudio --daemonize=no --log-level=info -F /etc/pulse/default.pa
At this point I got it working.
$ src/pulseaudio --version
pulseaudio 9.0-129-gf7b8
For final touch, I'd package that up into a .deb
, install systemwide via dpkg -i
and undo the autospawn=no
change.
Best Answer
You can go to settings>Power and there you should see connected devices and their battery