如何在iOS 11.4中使用bluetoothManager发送数据

时间:2018-09-21 17:14:21

标签: ios ios-bluetooth

我可以配对设备并使用蓝牙管理器连接这些设备。但是我被困在这里,因为我无法交换数据。

以下是配对的设备代码:

  1. 首次添加通知

    [[NSNotificationCenter defaultCenter]
     addObserver:self
     selector:@selector(bluetoothPairingUserNumericComparision:)
     name:@"BluetoothPairingUserNumericComparisionNotification"
     object:nil
    ];
    
    [[NSNotificationCenter defaultCenter]
     addObserver:self
     selector:@selector(bluetoothPairingPINResultSuccess:)
     name:@"BluetoothPairingPINResultSuccessNotification"
     object:nil
    ];
    
  2. 第二:

    init bluetoothmanager
    scanwithservice:0xFFFFFFFFF
    acceptSSP:0 fordevices:devices
    connectDevices:devices withservices:0x000020000
    

此后,我不知道如何发送数据。

0 个答案:

没有答案