Data stability

Good evening, we've changed to the new 3.0 SDK and the transmission of the sensor fusion data seems to be unstable. After a couple of seconds (or minutes, it's kind of random) the data stops transmitting to the mbl_mw_datasignal_subscribe method. Is there any other config we're missing? We've checked all the information provided by the documentation, both iOS and CPP. Thanks.

Comments

  • edited September 4

    Does the same behavior occur when using the MetaBase app?

    Post the relevant portions of your code so we can see if anything is wrong with your SDK usage.

  • Thanks Eric for the fast reply.
    We will try today if the MetBase app has the same behaviour.
    In the meantime, here is the code we use for the actual data retrieving in iOS, please let me know if we are missing something.

            //Sensor Fusion SETUP
            mbl_mw_sensor_fusion_set_mode(self.currentDevice!.board, MBL_MW_SENSOR_FUSION_MODE_M4G)
            mbl_mw_sensor_fusion_set_acc_range(self.currentDevice!.board, MBL_MW_SENSOR_FUSION_ACC_RANGE_8G)
            mbl_mw_sensor_fusion_write_config(self.currentDevice!.board)
    
            // Actual Data retrieving request
            let linear_acc = mbl_mw_sensor_fusion_get_data_signal(self.currentDevice!.board, MBL_MW_SENSOR_FUSION_DATA_LINEAR_ACC)
            mbl_mw_datasignal_subscribe(linear_acc!, bridge(obj: self)) { (context, data) in
                let dataSignal = data!.pointee.valueAs() as MblMwCartesianFloat
                DispatchQueue.main.async{
                    StateMachine.sharedInstance.newCandidate(value: (x: Double(dataSignal.x), y: Double(dataSignal.y), z: Double(dataSignal.z)))
                }
            }
            mbl_mw_sensor_fusion_enable_data(self.currentDevice!.board, MBL_MW_SENSOR_FUSION_DATA_LINEAR_ACC)
            mbl_mw_sensor_fusion_start(self.currentDevice!.board)
    
  • We've just checked with the Metawear app. We connected the app to a MetaMotionR and start streaming data.
    The first test stopped streaming data after 15 minutes of data transmission. The second test stopped after 20 minutes, and the last test was streaming data after 22 minutes.

  • Try changing the ble connection parameters after you have connected to the remote device:
    https://mbientlab.com/csdocs/0/advanced_features.html#high-frequency-streaming

    Do you experience the same issue when you were using the older releases? How about if you use another platform (Windows, Android)?

  • We've just added the method to change the BLE Connection params with the following command:

        mbl_mw_settings_set_connection_parameters(board, 7.5f, 7.5f, 0, 6000);
    

    However, after several minutes, the sensor stopped transmitting data...
    Yes, the same issue was present in the older Swift SDK. We are only using iOS for now, next week we'll start using Android devices as well, but we need to fix the data streaming stability first. We've used several MetaMotionR devices.

  • edited September 10

    How are you using the device?

    Is the device simply disconnecting, or is it resetting / running out of power?

  • No, it just stop transmitting data, it is connected and everything seems to be fine. We've just found that this usually happens on a high BLE activity environment (such as an office with lots of wireless headphones, mouses, keyboards, ...), is this normal?

  • edited September 18

    No, those other devices should not cause the reported behavior. It would make sense if the board lost connection but you say that is not the case.

    What are the firmware and hardware versions of the boards?

Sign In or Register to comment.