简体   繁体   English

是否可以将十六进制数据快速发送到 A2DP 蓝牙设备?

[英]Is possible send hexadecimal data to A2DP Bluetooth Device in swift?

I am developing an application on iOS that connects to a Bluetooth A2DP device but I can not send instructions in hexadecimal to make it work.我正在 iOS 上开发一个连接到蓝牙 A2DP 设备的应用程序,但我无法以十六进制发送指令以使其工作。 Somebody could help me?有人可以帮助我吗? I can not find information.我找不到信息。

With AVAudioSession.sharedInstance().currentRoute I can see the UID and the name of the device but not send data.使用 AVAudioSession.sharedInstance().currentRoute 我可以看到 UID 和设备名称,但不能发送数据。

let route  = AVAudioSession.sharedInstance().currentRoute
    let outPort = route.outputs.first
    if let outPort = outPort {
        print("out port name:\(outPort.portName)")
   }

Could you help me?你可以帮帮我吗?

Thanks!谢谢!

You should check MFi and ExternalAccessory framework in order to make your device communicates with iOS A2DP.您应该检查 MFi 和 ExternalAccessory 框架,以使您的设备与 iOS A2DP 通信。 From iOS App side, it is very high level of perspective.从 iOS App 方面来看,这是非常高水平的视角。 you only care about sending audio data using AVAudioEngine, AudioUnit, or whatever else.您只关心使用 AVAudioEngine、AudioUnit 或其他任何方式发送音频数据。 Check these urls might help you https://mfi.apple.com/MFiWeb/getFAQ.action#1-2 https://developer.apple.com/documentation/externalaccessory检查这些网址可能会对您有所帮助https://mfi.apple.com/MFiWeb/getFAQ.action#1-2 https://developer.apple.com/documentation/externalaccessory

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何以编程方式扫描并连接到iOS上的Bluetooth A2DP设备 - How to scan and connect to Bluetooth A2DP device on iOS programmatically iOS上的蓝牙A2DP API支持? - Bluetooth A2DP API Support on iOS? 如何快速(IOS 8)连接和发送/接收数据到蓝牙设备(OBDII)? - How to connect and send/receive data to bluetooth device (OBDII) in swift (IOS 8)? AVAudioSession 不会自动连接蓝牙 A2DP 音频? - AVAudioSession does not automatically connect to Bluetooth A2DP audio? 如何在iPhone上使用A2DP连接到远程设备 - How to connect to a remote device using A2DP on iPhone 是否可以通过蓝牙将数据从iPhone App发送到BT 2.0和非MFI兼容设备? - Is it possible to send data from iPhone App to BT 2.0 & non MFI compliant device via Bluetooth? 如何使用蓝牙4.0(BLE)如何使A2DP蓝牙配置文件工作? 我需要AptX编解码器吗? - How are you able to get an A2DP bluetooth profile to work using bluetooth 4.0 (BLE)? Do I need an AptX codec? iOS蓝牙双模; 同时将BLE(GATT)连接到已连接的BR / EDR(A2DP / HFP)立体声耳机 - iOS Bluetooth dual-mode; connect BLE (GATT) to an already connected BR/EDR (A2DP/HFP) stereo headset simultaneously 在 Swift 中使用蓝牙从 iOS 设备获取数据 - Get Data from iOS device using Bluetooth in Swift Swift 3数据没有从iPhone应用程序发送到蓝牙设备 - Swift 3 data not sending to bluetooth device from iPhone app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM