Category Archives: SKILLS

HOW TO STREAM AUDIO THROUGH BLUETOOTH BETWEEN A PI-BOX AND ANDROID(FAILED)

Here is some usefull skills:

sudo apt-get -o Acquire::http::proxy=”socks5h://192.168.1.11:1080/” update

sudo killall pulseaudio
pulseaudio -D
pulseaudio –start

hciconfig hci0 piscan
sudo hciconfig -a
查看蓝牙控制器信息
sudo hciconfig hci0 up
打开蓝牙控制器

test tools:
btmon
dmesg | grep -i blue
sudo systemctl restart bluetooth

sudo hcitool lescan
l2ping 68:DB:54:F6:E6:3C
sdptool browse 68:DB:54:F6:E6:3C

sudo rfcomm connect hci0 68:DB:54:F6:E6:3C
sudo gatttool -t random -b 68:DB:54:F6:E6:3C -I

mpg123 test.mp3

sudo bluetoothctl
打开蓝牙管理器

power on
discoverable on
agent on
scan on
trust
pair
connect
info
devices
paired-devices

pacmd list-cards

pacmd list-sources
pacmd set-default-source 2

pacmd list-sinks
pacmd set-default-sink 1
pacmd set-default-sink bluez_sink.1C_52_16_50_F0_B5

pacmd list-sink-inputs
pacmd move-sink-input 3 1

pactl list short sources

pactl list short sinks
pactl set-default-sink 1

pactl list short sink-inputs
pactl move-sink-input 3 1

pactl list cards
pactl set-card-profile 1 headset_head_unit
pacmd set-card-profile bluez_card.68_DB_54_F6_E6_3C a2dp_sink

alsamixer