Getting this RuntimeException onConnectionStateChanged reported non-zero status: 8
Hey,
I am using two CPRO Devices with Firmware 1.2.1.
I can connect them correctly. The streaming of the accelerometer and gyroscope data also works fine. (Both in three axis!)
After some time (more than 2 minutes) I am getting this exception and loose the connection to one of my devices. Then my app is crashing, because of fatal exceptions by calling the Modules -> NullPointerException:
This is the first error which appears in the logcat:
05-24 21:54:39.851 30133-1913/com.basti12354.accelerometer E/External Sensors: Error connectingjava.lang.RuntimeException: onConnectionStateChanged reported non-zero status: 8at com.mbientlab.metawear.MetaWearBleService$2$2.run(MetaWearBleService.java:909)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)at java.util.concurrent.FutureTask.run(FutureTask.java:237)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)at java.lang.Thread.run(Thread.java:818)
I can't find anything about non-zero status 8 and I have no idea whats wrong with my app.
I am using an HTC One and LG G4 (both are using Android 5.0.2.)
This discussion has been closed.
Comments
How fast can I stream data from my MetaWear?
The Bluetooth LE radio can handle
data throughput of up to 100Hz. For example, you can stream 1 sensor at
100Hz. However when using multiple sensors, you must decrease the
sample rate i.e. sampling 2 sensors at 50Hz each.
How much data can be stored on the devices?
You can store approximately 5KB of data (~10K log entries).
Given that gyro and accelerometer consume 2 log entries per XYZ data, 30 seconds is not feasible. If you are willing to sacrifice accuracy for log space, you should be able to log for 30-45 seconds
The relevant information is in bold. Since you have 4 data creators and 1 consumer, you are bounded by the bandwidth of your 1 consumer so your second idea is the best approach.