![](/img/trans.png)
[英]How to scan and connect to Bluetooth A2DP device on iOS programmatically
[英]Is possible send hexadecimal data to A2DP Bluetooth Device in swift?
我正在 iOS 上开发一个连接到蓝牙 A2DP 设备的应用程序,但我无法以十六进制发送指令以使其工作。 有人可以帮助我吗? 我找不到信息。
使用 AVAudioSession.sharedInstance().currentRoute 我可以看到 UID 和设备名称,但不能发送数据。
let route = AVAudioSession.sharedInstance().currentRoute
let outPort = route.outputs.first
if let outPort = outPort {
print("out port name:\(outPort.portName)")
}
你可以帮帮我吗?
谢谢!
您应该检查 MFi 和 ExternalAccessory 框架,以使您的设备与 iOS A2DP 通信。 从 iOS App 方面来看,这是非常高水平的视角。 您只关心使用 AVAudioEngine、AudioUnit 或其他任何方式发送音频数据。 检查这些网址可能会对您有所帮助https://mfi.apple.com/MFiWeb/getFAQ.action#1-2 https://developer.apple.com/documentation/externalaccessory
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.