[Swift] Directly connect to a device via its mac address

Hi all,

I have seen how to connect to a device with its mac address on Android like this :

    final BluetoothManager btManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
    final BluetoothDevice remoteDevice = btManager.getAdapter().getRemoteDevice(macAddr);

    board = serviceBinder.getMetaWearBoard(remoteDevice);
    board.connectAsync().onSuccessTask( ... )

But I'm trying to do the same on iOS (I'm using Swift 3). Is there an equivalent ? I have not seen any detail in the API about connecting directly yo a board.

Thanks a lot
Best

Comments

  • As far as I am aware, you cannot connect by MAC address on iOS.
  • Ok, thanks for the answer. Actually it turns out that it's not really working on Android either (I've tried the freefall sample app on 3 different devices and it never manages to connect, whereas using the start app, making a scan and connecting works correctly) — any input on that ? Do you know where it could come from ?

    Thanks
  • I've actually open an issue on that specific problem FYI https://github.com/mbientlab/MetaWear-SDK-Android/issues/13
This discussion has been closed.