Multiple MetaMotionR connection


I purchased 10 or so MetaMotionR earlier and I am writing iOS app to read the accelerometer data from MetaMotionR.
Can I connect multiple MetaMotionR into one iPhone and read the accelerometer data simultaneously from multiple MetaMotionR?
If yes, could you please share an example script to connect multiple MetaMotionR with one iOS app?



  • edited June 26

    The iPhone allows only up to 6 connections at once and I have only been able to get 3 sensors connected at the same time reliably (that's iOS for you).
    Basically you cannot do this with an iOS App; you need to do it with a mini Linux PC like a raspberryPi.

  • Hi Laura,
    Thanks for the information.
    So, an iOS app in an iPhone can connect 3 MetaMotionR at the same time and acquire synchronous data from the 3 sensors at the same time. Is my understanding correct?
    If yes, would it be possible to share the key elements of the script for multi-sensor connection and synchronous data recording?


  • @qpal1012
    You are correct.
    There is no hidden elements or secret sauce, we simply use our APIs which rely on the Bluetooth Core libraries from Apple. You can check out our sample App as a good starting point.

  • Hi Laura
    we have developed an POC App with using following Package in Phone Gap.

    wondering is it mean we can connect multiple MetaMotionR using same connect command and asynchronously to connect MetaMotionR sensors or any other command to be used .

    I started looking at Swift sample app and here is my question
    can we able to connect multiple sensors and able to start acquiring accelerometer data and stop ... how to handle and download the for each sensor recorded accelerometer data ?
    device.connectAndSetup().continueWith(.mainThread) { t in
    it would be helpful if any reference

  • @Srinivasa,
    You want to replicate the code for each MetaSensor:

    var tasks: [Task<MetaWear>] = []
        for device in devices {
            var disconnectTask: Task<MetaWear>?
            tasks.append(device.connectAndSetup().continueOnSuccessWithTask(device.apiAccessExecutor) { t -> Task<MetaWear> in
                return t
            }.continueWithTask { _ in
                return device.connectAndSetup()
            }.continueOnSuccessWithTask(device.apiAccessExecutor) { t -> Task<Int32> in
                disconnectTask = t
                return CommandLog.start(device, configs: SensorConfig.sensors)
            }.continueOnSuccessWithTask(device.apiAccessExecutor) { _ -> Task<MetaWear> in
                return disconnectTask!
Sign In or Register to comment.