Raspberry Pi/Raspian:无法通过 arecord 从蓝牙耳机录制声音,但也没有错误消息
Raspberry Pi/Raspian: Recording sound on from Bluetooth Headset via arecord not working, but also no error messages
我有一个带有最新无头 Stretch 版本的 Pi 3b+。 Pis 内部蓝牙已停用,因为我需要它的引脚用于插入它们的另一个设备。相反,我使用的是 Edimax Wifi/Bluetooth-USB-Dongle.
在系统上我手动编译并更新bluez/bluetoothd到v5.50和bluealsa到1.3.1版本。
当系统启动时,日志中的一切看起来都很好。 journalctl | grep 蓝色 returns:
Feb 12 13:24:54 raspberrypi kernel: bluetooth hci0: Direct firmware load for rtl_bt/rtl8723b_config.bin failed with error -2
Feb 12 13:24:55 raspberrypi bluetoothd[336]: Bluetooth daemon 5.50
Feb 12 13:24:55 raspberrypi bluetoothd[336]: Starting SDP server
Feb 12 13:24:55 raspberrypi systemd[1]: Started Raspberry Pi bluetooth helper.
Feb 12 13:24:55 raspberrypi bluetoothd[336]: Bluetooth management interface 1.14 initialized
Feb 12 13:24:55 raspberrypi bluetoothd[336]: Failed to set privacy: Rejected (0x0b)
Feb 12 13:24:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:571: Starting controller loop
Feb 12 13:24:56 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:675: Registering endpoint: /A2DP/SBC/Source/1
Feb 12 13:24:56 raspberrypi bluetoothd[336]: Endpoint registered: sender=:1.6 path=/A2DP/SBC/Source/1
Feb 12 13:24:56 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:910: Registering profile: /HSP/AudioGateway
Feb 12 13:24:56 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:910: Registering profile: /HFP/AudioGateway
Feb 12 13:24:56 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/main.c:302: Starting main dispatching loop
据我所知,Feb 12 13:24:55 raspberrypi bluetoothd[336]: Failed to set privacy: Rejected (0x0b) 可以忽略。
我可以使用
连接到设备
sudo bluetoothctl
scan on
pair XYZ
trust XYZ
connect XYZ
设备信息看起来像是正确检测到的设备:
Device 00:23:01:04:95:CC (public)
Name: Voice-BoomBox
Alias: Voice-BoomBox
Class: 0x00240404
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
之后我在日志中仍然找不到任何可疑的东西:
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:857: Profile method call: org.bluez.Profile1.NewConnection()
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 0 -> 2
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:104: Created new IO thread: HFP Audio Gateway
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:797: HFP Audio Gateway configured for device 00:23:01:04:95:CC
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 0 -> 2
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:104: Created new IO thread: HFP Audio Gateway
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/io.c:1195: Starting IO loop: HFP Audio Gateway
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:573: Starting RFCOMM loop: HFP Audio Gateway
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: SET: command:+BRSF, value:59
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:+BRSF, value:992
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 0 -> 2
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: TEST: command:+CIND, value:(null)
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:+CIND, value:("call",(0,1)),("callsetup",(0-3)),("service",(0-1)),("signal",(0-5)),("roam",(0-1)),("battchg",(0-5)),("callheld",(0-2))
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 2 -> 5
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: GET: command:+CIND, value:(null)
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:+CIND, value:0,0,0,0,0,0,0
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 5 -> 7
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: SET: command:+CMER, value:3, 0, 0, 1
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 7 -> 8
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 8 -> 9
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 9 -> 13
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: SET: command:+VGS, value:15
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: GET: command:+BTRH, value:(null)
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: CMD: command:+CLCC, value:(null)
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: Unsupported AT message: CMD: command:+CLCC, value:(null)
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:ERROR
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: SET: command:+CSRSF, value:0,0,0,1,0,0,0
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: Unsupported AT message: SET: command:+CSRSF, value:0,0,0,1,0,0,0
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:ERROR
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:608: Endpoint method call: org.bluez.MediaEndpoint1.SelectConfiguration()
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:608: Endpoint method call: org.bluez.MediaEndpoint1.SetConfiguration()
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:540: A2DP Source (SBC) configured for device 00:23:01:04:95:CC
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:542: Configuration: channels: 2, sampling: 48000
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 0 -> 0
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:675: Registering endpoint: /A2DP/SBC/Source/2
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:26:30 raspberrypi bluetoothd[336]: Endpoint registered: sender=:1.6 path=/A2DP/SBC/Source/2
通过aplay播放声音时(aplay -D bluealsa:HCI=hci0,DEV=00:23:01:04:95:CC,PROFILE=a2dp test16.wav) 声音播放正确。
现在想通过arecord录音。我试过了:
arecord -D bluealsa:HCI=hci0,DEV=00:23:01:04:95:CC,PROFILE=sco record.wav
arecord -f S16_LE -D bluealsa:HCI=hci0,DEV=00:23:01:04:95:CC,PROFILE=sco record.wav
sudo arecord -f cd -D bluealsa:HCI=hci0,DEV=00:23:01:04:95:CC,PROFILE=sco record.wav
但是 none 它记录了任何东西。但我的日志中仍然没有任何可疑之处。
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:638: Received new connection: 17
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:651: New client accepted: 17
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:353: PCM requested for 00:23:01:04:95:CC type 2 stream 1
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 2 -> 2
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:948: New SCO link: 18 (MTU: R:48 W:48)
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:455: PCM close for 00:23:01:04:95:CC type 2 stream 1
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:981: Closing PCM: 19
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:958: Closing SCO: 18
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:605: Client closed connection: 17
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
有人能提示这里出了什么问题吗?
如果以后有人超越我的问题,我的问题是这样解决的:
对于蓝牙,我使用的是 Edimax BT/WiFi-Dongle (EW-7611ULB)。 Edimax 本身说您需要为较新的 Linux 内核(>v3.19)编译固件。他们还为此提供了教程 here。我遵循了这些步骤,之后还检查了我的 jornal/logs。一切看起来都很好,因为在使用加密狗时播放音频可以正常工作,我认为固件工作正常。
我真的失去了想法,已经在考虑尝试使用 pulseaudio,但后来我使用了另一个 BT 加密狗(来自 LogiLink 的东西),并且可以立即录制语音。
我有一个带有最新无头 Stretch 版本的 Pi 3b+。 Pis 内部蓝牙已停用,因为我需要它的引脚用于插入它们的另一个设备。相反,我使用的是 Edimax Wifi/Bluetooth-USB-Dongle.
在系统上我手动编译并更新bluez/bluetoothd到v5.50和bluealsa到1.3.1版本。
当系统启动时,日志中的一切看起来都很好。 journalctl | grep 蓝色 returns:
Feb 12 13:24:54 raspberrypi kernel: bluetooth hci0: Direct firmware load for rtl_bt/rtl8723b_config.bin failed with error -2
Feb 12 13:24:55 raspberrypi bluetoothd[336]: Bluetooth daemon 5.50
Feb 12 13:24:55 raspberrypi bluetoothd[336]: Starting SDP server
Feb 12 13:24:55 raspberrypi systemd[1]: Started Raspberry Pi bluetooth helper.
Feb 12 13:24:55 raspberrypi bluetoothd[336]: Bluetooth management interface 1.14 initialized
Feb 12 13:24:55 raspberrypi bluetoothd[336]: Failed to set privacy: Rejected (0x0b)
Feb 12 13:24:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:571: Starting controller loop
Feb 12 13:24:56 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:675: Registering endpoint: /A2DP/SBC/Source/1
Feb 12 13:24:56 raspberrypi bluetoothd[336]: Endpoint registered: sender=:1.6 path=/A2DP/SBC/Source/1
Feb 12 13:24:56 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:910: Registering profile: /HSP/AudioGateway
Feb 12 13:24:56 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:910: Registering profile: /HFP/AudioGateway
Feb 12 13:24:56 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/main.c:302: Starting main dispatching loop
据我所知,Feb 12 13:24:55 raspberrypi bluetoothd[336]: Failed to set privacy: Rejected (0x0b) 可以忽略。
我可以使用
连接到设备sudo bluetoothctl
scan on
pair XYZ
trust XYZ
connect XYZ
设备信息看起来像是正确检测到的设备:
Device 00:23:01:04:95:CC (public)
Name: Voice-BoomBox
Alias: Voice-BoomBox
Class: 0x00240404
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
之后我在日志中仍然找不到任何可疑的东西:
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:857: Profile method call: org.bluez.Profile1.NewConnection()
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 0 -> 2
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:104: Created new IO thread: HFP Audio Gateway
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:797: HFP Audio Gateway configured for device 00:23:01:04:95:CC
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 0 -> 2
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:104: Created new IO thread: HFP Audio Gateway
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/io.c:1195: Starting IO loop: HFP Audio Gateway
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:573: Starting RFCOMM loop: HFP Audio Gateway
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: SET: command:+BRSF, value:59
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:+BRSF, value:992
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 0 -> 2
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: TEST: command:+CIND, value:(null)
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:+CIND, value:("call",(0,1)),("callsetup",(0-3)),("service",(0-1)),("signal",(0-5)),("roam",(0-1)),("battchg",(0-5)),("callheld",(0-2))
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:28 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 2 -> 5
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: GET: command:+CIND, value:(null)
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:+CIND, value:0,0,0,0,0,0,0
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 5 -> 7
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: SET: command:+CMER, value:3, 0, 0, 1
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 7 -> 8
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 8 -> 9
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:114: HFP state transition: 9 -> 13
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: SET: command:+VGS, value:15
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: GET: command:+BTRH, value:(null)
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:OK
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: CMD: command:+CLCC, value:(null)
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: Unsupported AT message: CMD: command:+CLCC, value:(null)
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:ERROR
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/at.c:160: AT message: SET: command:+CSRSF, value:0,0,0,1,0,0,0
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: Unsupported AT message: SET: command:+CSRSF, value:0,0,0,1,0,0,0
Feb 12 13:26:29 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/rfcomm.c:96: Sending AT message: RESP: command:(null), value:ERROR
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:608: Endpoint method call: org.bluez.MediaEndpoint1.SelectConfiguration()
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:608: Endpoint method call: org.bluez.MediaEndpoint1.SetConfiguration()
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:540: A2DP Source (SBC) configured for device 00:23:01:04:95:CC
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:542: Configuration: channels: 2, sampling: 48000
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 0 -> 0
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/bluez.c:675: Registering endpoint: /A2DP/SBC/Source/2
Feb 12 13:26:30 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:26:30 raspberrypi bluetoothd[336]: Endpoint registered: sender=:1.6 path=/A2DP/SBC/Source/2
通过aplay播放声音时(aplay -D bluealsa:HCI=hci0,DEV=00:23:01:04:95:CC,PROFILE=a2dp test16.wav) 声音播放正确。
现在想通过arecord录音。我试过了:
arecord -D bluealsa:HCI=hci0,DEV=00:23:01:04:95:CC,PROFILE=sco record.wav
arecord -f S16_LE -D bluealsa:HCI=hci0,DEV=00:23:01:04:95:CC,PROFILE=sco record.wav
sudo arecord -f cd -D bluealsa:HCI=hci0,DEV=00:23:01:04:95:CC,PROFILE=sco record.wav
但是 none 它记录了任何东西。但我的日志中仍然没有任何可疑之处。
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:638: Received new connection: 17
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:651: New client accepted: 17
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:353: PCM requested for 00:23:01:04:95:CC type 2 stream 1
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 2 -> 2
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:948: New SCO link: 18 (MTU: R:48 W:48)
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:455: PCM close for 00:23:01:04:95:CC type 2 stream 1
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:981: Closing PCM: 19
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:958: Closing SCO: 18
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:605: Client closed connection: 17
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
有人能提示这里出了什么问题吗?
如果以后有人超越我的问题,我的问题是这样解决的:
对于蓝牙,我使用的是 Edimax BT/WiFi-Dongle (EW-7611ULB)。 Edimax 本身说您需要为较新的 Linux 内核(>v3.19)编译固件。他们还为此提供了教程 here。我遵循了这些步骤,之后还检查了我的 jornal/logs。一切看起来都很好,因为在使用加密狗时播放音频可以正常工作,我认为固件工作正常。
我真的失去了想法,已经在考虑尝试使用 pulseaudio,但后来我使用了另一个 BT 加密狗(来自 LogiLink 的东西),并且可以立即录制语音。