CoreBluetooth and BluetoothManager, device is not BLE

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 06:59:47

问题


Connect and receive data via bluetooth.

We are developing an app for a client. It is a toy for babies that connects via bluetooth and we're having trouble connecting and transferring data.

After all the research we did, we found two alternatives: CoreBluetooth and BluetoothManager. As far as I know CoreBluetooth only connects with Bluetooth Low Energy (I think it is the latest bluetooth version) and with it I am not able to find my client's device. With the second option, BluetoothManager i can find the device but I can not transfer data.

This makes me think that my client device is not BLE. Is there any way to connect and transfer data with this device, considering that CoreBluetooth doesn't locate the device and only BluetoothManager does?

Could you please provide alternatives and/or examples of how to make this communication? And if you can not do, let me know in order to tell my client.


回答1:


To communicate with lower versions of Bluetooth you need to use ExternalAccessory framework, but it is for MFi devices, so I guess you need to sign to Apple MFi Program: https://developer.apple.com/programs/mfi/

This answer describes possible ways of working with Bluetooth on iOS: https://stackoverflow.com/a/16852224/4495995




回答2:


CoreBluetooth is only intended to connect to devices equipped with Bluetooth Low Energy. Which while it does share some concepts with its namesake, is a completely different technology. So as of Bluetooth 4.0 we have:

  1. Low Energy (or Smart) - slower, simpler, energy efficient
  2. Basic Rate / Extended Data Rate (or Classic, High Speed, Smart Ready) - older, more complex, faster, less energy efficient

It seems that because of the energy efficiency as a normal developer you are only allowed to use BLE. If you want to use BR/EDR you need to apply for to the MFi Program, and use special hardware.



来源:https://stackoverflow.com/questions/28473059/corebluetooth-and-bluetoothmanager-device-is-not-ble

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!