Help us understand the problem. What is going on with this article?

raspberry pi3 で bluetooth スピーカーに接続する

More than 1 year has passed since last update.

ゴール
Raspberry Pi3 から SoundLink Revolve Plus Bluetooth® Speaker に接続する。

Bluetooth関連のパッケージをインストール

bluemanはGUIのBluetoothマネージャーアプリらしい(へー

pi@raspberrypi:~ $ sudo apt-get install pi-bluetooth blueman
 :
Do you want to continue? [Y/n] Y
 :
Fetched 66.5 MB in 2min 31s (440 kB/s)
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/g/graphite2/libgraphite2-3_1.3.6-1~deb8u1_armhf.deb  404  Not Found [IP: 93.93.128.193 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

apt-get を update しろって出た

pi@raspberrypi:~ $ sudo apt-get update
 :
 Fetched 9,927 kB in 53s (185 kB/s)
Reading package lists... Done

再チャレンジ

pi@raspberrypi:~ $ sudo apt-get install pi-bluetooth blueman
 :
Do you want to continue? [Y/n] Y
 :
Processing triggers for systemd (215-17+deb8u7) ...

めちゃ時間がかかる...(20~30minくらい?

サウンド周りのパッケージをインストール

pi@raspberrypi:~ $ sudo apt-get install pulseaudio pavucontrol pulseaudio-module-bluetooth
 :
Do you want to continue? [Y/n] Y
 :
Processing triggers for dbus (1.8.20-0+deb8u1) ...
  • pulseaudio ... サウンドサーバ
  • pavucontrol ... PulseAudioの音量などを調整するもの
  • pulseaudio-module-bluetooth ... PulseAudioのbluetoothモジュール

Raspberry Piを再起動する

Bluetooth関連はパッケージをインストールしたあとは一回再起動したほうが良いらしい。

pi@raspberrypi:~ $ sudo reboot

Broadcast message from pi@raspberrypi on pts/0 (Sun 2017-07-02 23:20:23 JST):

The system is going down for reboot NOW!

pi@raspberrypi:~ $ Connection to raspberrypi.local closed by remote host.
Connection to raspberrypi.local closed.

Bluetoothスピーカーの接続

Bluetooth設定する前に、pulseaudioを立ち上げておく

pi@raspberrypi:~ $ pulseaudio -D

立ち上がるのも、時間がかかる...
次に、bluetoothctlを使って設定する

pi@raspberrypi:~ $ bluetoothctl
[NEW] Controller B8:27:EB:DE:7F:EF raspberrypi [default]
[NEW] Device 04:52:C7:B2:19:F5 Bose Revolve+ SoundLink
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# pair 04:52:C7:B2:19:F5
Attempting to pair with 04:52:C7:B2:19:F5
Pairing successful
[bluetooth]# trust 04:52:C7:B2:19:F5
Changing 04:52:C7:B2:19:F5 trust succeeded
[bluetooth]# connect 04:52:C7:B2:19:F5
Attempting to connect to 04:52:C7:B2:19:F5
Connection successful
[bluetooth]# quit
Agent unregistered
[DEL] Controller B8:27:EB:DE:7F:EF raspberrypi [default]
  • bluetoothctl ... 対話型の設定ツール

もし bluetooth デバイスが見つからない場合は次のコマンドを実行

[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:DE:7F:EF Discovering: yes
[NEW] Device 2C:B4:3A:0C:AD:75 2C-B4-3A-0C-AD-75
[NEW] Device 04:52:C7:B2:19:F5 LE-Bose Revolve+ SoundLink
 :

bluetooth スピーカーに接続できたかチェック

pi@raspberrypi:~ $ speaker-test -t wav

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 192 to 2097152
Period size range from 64 to 699051
Using max buffer size 2097152
Periods = 4
was set period_size = 524288
was set buffer_size = 2097152
 0 - Front Left
Time per period = 1.484907
 :

音が流ればcompleted.

Sam
すまほあぷりえんじにーあ
http://d.hatena.ne.jp/samril/
lifull
日本最大級の不動産・住宅情報サイト「LIFULL HOME'S」を始め、人々の生活に寄り添う様々な情報サービス事業を展開しています。
https://lifull.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした