这些天我正在开展一个项目,我们需要将非MFI蓝牙设备连接到iPhone,而且该设备不支持成为BLE外围设备客户端,因此我们必须在经典蓝牙上执行此操作.
我设法配对并使用演示项目BeeTeeBluetoothManager.framework
的指南将设备连接到iPhone
但我不知道如何发送和recv数据,我在类转储标头中找不到API.
看来,问题就出在这三structs:BTAccessoryManagerImpl
和BTSessionImpl
和BTDeviceImpl
,但我不能让他们的定义.
@class NSMutableDictionary;
struct BTSessionImpl { };
struct BTDeviceImpl { };
@interface BluetoothManager : NSObject {
struct BTAccessoryManagerImpl { } *_accessoryManager;
BOOL _audioConnected;
int _available;
NSMutableDictionary *_btAddrDict;
NSMutableDictionary *_btDeviceDict;
struct BTDiscoveryAgentImpl { } *_discoveryAgent;
struct BTLocalDeviceImpl { } *_localDevice;
struct BTPairingAgentImpl { } *_pairingAgent;
BOOL _scanningEnabled;
BOOL _scanningInProgress;
unsigned int _scanningServiceMask;
struct BTSessionImpl *_session; // struct BTSessionImpl { } *_session;
}
+ (int)lastInitError;
+ (id)sharedInstance;
- (struct BTAccessoryManagerImpl …
Run Code Online (Sandbox Code Playgroud)