iphone5运行linux,使用linux和iphone 5的HFP配置文件

廖弘量
2023-12-01

拥有ofono和bluez就足够了 .

但是,最新版本的bluez / ofono和pulseaudio不支持HSP和HFP配置文件 . Pulseaudio发行说明称bluez5.x仅支持A2DP . 如果您使用的是bluez4.x,ofono和pulseaudio 4.x / 5.x,您可能仍然可以正常工作 .

ofono会将您的iPhone 5s视为您的调制解调器 . 一旦你通过bluetoothctl或任何其他GUI配对并连接iPhone,你就可以运行以下ofono测试,看看ofono是否正确选择了它 . 尝试在终端上使用 ofonod -n -d 运行ofonod来监视调试日志,并且可能也会以详细的方式运行pulseaudio( pulseaudio -k && pulseaudio -v )

bash$ cd */ofono-1.x/test

该目录包含用于测试ofono功能的示例dbus脚本 .

bash$ ./list-modems

[ /hfp/org/bluez/hci0/dev_94_94_26_88_XX_XX ]

Type = hfp

Interfaces = org.ofono.Siri org.ofono.VoiceCallManager org.ofono.CallVolume org.ofono.Handsfree org.ofono.NetworkRegistration

Features = net

Serial = 94:94:26:88:XX:XX

Online = 1

Powered = 1

Lockdown = 0

Emergency = 0

Name = XXXXXX’s iPhone

[ org.ofono.Siri ]

EyesFreeMode = disabled

Enabled = 1

[ org.ofono.VoiceCallManager ]

EmergencyNumbers = 08 000 999 110 112 911 118 119

[ org.ofono.CallVolume ]

Muted = 0

SpeakerVolume = 50

MicrophoneVolume = 50

[ org.ofono.Handsfree ]

VoiceRecognition = 0

InbandRinging = 1

Features = three-way-calling echo-canceling-and-noise-reduction voice-recognition release-all-held release-specified-active-call private-chat create-multiparty

BatteryChargeLevel = 4

SubscriberNumbers = +XXXXXXXXXXXX

EchoCancelingNoiseReduction = 1

[ org.ofono.NetworkRegistration ]

Status = registered

Name = XXX XXXXXX

Mode = auto-only

Strength = 60

如果您看到类似于上面的输出,请启用调制解调器并尝试使用以下命令拨号,并在创建或拒绝SCO套接字时观察调试日志 . 当然,看看音频是否路由到Ubuntu .

bash$ ./enable-modem

bash$ ./dial-number +XXXXXXXXXXXX

...

同样,尝试调用你的iPhone并观察ofono,pulseaudio日志 . bash $ ./answer-calls

看起来像pulseaudio的人正试图使用bluez5.x和ofono,但似乎还没有公开的补丁 . 这个bug正在跟踪:https://bugs.freedesktop.org/show_bug.cgi?id=73325

 类似资料: