是否可以在iOS中使用RFCOMM? [英] Is it possible use RFCOMM in iOS?
问题描述
我在iOS开发中相对较新.
I'm relatively new in iOS development.
我想制作一个跨平台的蓝牙应用程序,在Android中,我使用RFCOMM发送自定义数据,例如字符串.当我用谷歌搜索"iOS蓝牙"时,我在结果中找到了Core Bluetooth
框架,它似乎是为低能耗的连接而设计的.由于两个原因,我只想使用RFCOMM而不是其他配置文件:
I want to make a cross-platform Bluetooth app, in Android, I use RFCOMM to send custom data, like strings. When I googled 'iOS Bluetooth', I've found the Core Bluetooth
framework in the results, it seems to be made for low-energy connections. I only want to use RFCOMM instead of other profiles because of two reasons:
- 我使用RFCOMM发送自定义数据,例如字符串.
- 我希望我的应用程序能够与非Apple设备连接.
- I use RFCOMM to send custom data, like strings.
- I want my app to be able to connect with non-apple devices.
是否甚至可以在iOS中使用RFCOMM?如果没有,是否有任何解决方法可与非Apple设备连接?
Is it even possible to use RFCOMM in iOS? If not, are there any workarounds to connect with non-apple devices?
推荐答案
否,ios上的核心蓝牙"仅支持BLE设备,并且仅在相当高的水平上支持.只有一个特定的配置文件(GATT)
no, 'core bluetooth' on ios only supports BLE devices and only on a rather high level. there is only one specific profile being offered (GATT)
现在,如果您希望使用RFCCOMM(SPP的一部分),则可以使用外部附件"框架,但您只能将自己的应用程序与设备一起使用(例如:您制造了它,现在将一个应用程序编写为用它).您还需要苹果公司的许可,所以.......不是一个真正的选择
Now if you want RFCCOMM (part of SPP) you might be able to leverage the 'External Accessory' framework BUT you can only use only your app with a your device (as in: you manufactured it and now wrote an app to use it). You would also need a license from apple so ....... not really an option
这篇关于是否可以在iOS中使用RFCOMM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!