You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何从无音量/电源键的初代亚马逊Fire TV遥控器读取语音数据?

Fixing Fire TV Remote (Version 1) Mic Audio Capture on Raspberry Pi 4

Hey there! Let's get that Fire TV Remote's built-in mic working on your Pi. The hangup after receiving AT+BRSF=253 is all about missing required AT command responses—this remote uses Bluetooth HFP (Hands-Free Profile) for audio, so we need to complete the initial handshake before it sends audio data.

Step 1: Understand the AT Command Handshake

When you connect via rfcomm, the remote starts an HFP initialization sequence. If you don't respond correctly to each command, it stops dead. Here's the full expected handshake you need to handle:

  1. Remote sends: AT+BRSF=253
    • Reply with: +BRSF: 253\r\n followed by OK\r\n
  2. Next, remote sends: AT+CIND=? (queries indicator statuses)
    • Reply with: +CIND: ("service",(0,1)),("call",(0,1))\r\n then OK\r\n
  3. Then: AT+CIND? (checks current indicator state)
    • Reply with: +CIND: 0,0\r\n then OK\r\n
  4. Finally: AT+CMEE=1 (enables extended error messages)
    • Reply with: OK\r\n

Step 2: Test the Handshake Manually

First, confirm this works with a terminal tool like screen:

  1. Connect the rfcomm port:
    sudo rfcomm connect /dev/rfcomm1 FC:65:DE:E8:E8:FD 1
    
  2. Open another terminal to interact with the port:
    screen /dev/rfcomm1 115200
    
  3. When you see AT+BRSF=253 appear, type the responses exactly as listed (press Enter after each line). Once the handshake is done, the remote should activate the mic and start sending audio over the SCO channel.

Step 3: Automate the Handshake with a Script

Manually typing responses isn't practical. Here's a simple Python script to handle the AT commands automatically. First install the pyserial library:

sudo apt install python3-serial

Create firetv_mic_handshake.py:

import serial
import time

ser = serial.Serial('/dev/rfcomm1', 115200, timeout=1)

try:
    while True:
        line = ser.readline().decode('utf-8').strip()
        if not line:
            continue
        print(f"Received: {line}")
        
        if line == "AT+BRSF=253":
            ser.write("+BRSF: 253\r\nOK\r\n".encode('utf-8'))
        elif line == "AT+CIND=?":
            ser.write("+CIND: (\"service\",(0,1)),(\"call\",(0,1))\r\nOK\r\n".encode('utf-8'))
        elif line == "AT+CIND?":
            ser.write("+CIND: 0,0\r\nOK\r\n".encode('utf-8'))
        elif line == "AT+CMEE=1":
            ser.write("OK\r\n".encode('utf-8'))
        time.sleep(0.1)
except KeyboardInterrupt:
    ser.close()
    print("Disconnected")

Run the script right after connecting the rfcomm port:

python3 firetv_mic_handshake.py

Step 4: Capture the Audio Stream

Once the handshake is complete, the remote uses a Bluetooth SCO channel for audio. Use bluealsa to capture this stream (install it first if needed):

sudo apt install bluealsa

Start recording with:

bluealsa-record -d FC:65:DE:E8:E8:FD -f S16_LE -r 16000 -c 1 -t wav -f firetv_mic_recording.wav

This records 16-bit, 16kHz mono audio to a WAV file.

Step 5: Tie It to the Mic Button

Since you already detect the mic button press, automate the workflow:

  1. Write a shell script that runs rfcomm connect, starts the Python handshake script, and launches bluealsa-record.
  2. Use your existing button event listener to trigger this script when the mic button is pressed, and stop all processes when it's released.

Quick Bluetooth Config Check

Make sure your Pi's Bluetooth stack supports HFP/SCO:

  1. Edit /etc/bluetooth/main.conf and ensure these lines are set:
    Enable=Source,Sink,Media,Socket
    SCOMTU=64
    
  2. Restart Bluetooth:
    sudo systemctl restart bluetooth
    

内容的提问来源于stack exchange,提问作者Dennis Zierahn

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 08:11:41