Inconsistent streaming data rate

I'm streaming data from a CPro that's on the 1.2.0 firmware using the Android 2.5.0 api. I've noticed that the data rate I'm actually getting is slightly lower than what I specified as the output data rate. If I stream accel data at  ODR_25_HZ, I actually receive data at 23Hz. If I stream data at  ODR_50_HZ, I receive data at 47Hz. ODR_100_HZ gives me data at 78Hz. Is this normal? I thought that the data rates should be nearly exactly what the specified output data rate is set to. Without a known data rate, I can't associate a time with each sample.

Comments

  • As mentioned in your previous thread, the btle connection interval limits how frequently data exchanges happen between the mobile device and the board.  Unless you are connecting to an unknown board, your app should know what settings were used to configure the sensors.
  • As discussed in the previous thread, I'm not relying on the message timestamp because it isn't accurate. The problem in seeing now is that I'm not receiving the correct number of samples over a long period of time. For example, the numbers above were calculated by counting how many samples were received over a minute. In the 50Hz case I would expect to receive roughly 3000 samples over a minute. Instead I'm only getting about 2800. Over 2 minutes I'm only getting 5600. And the longer I run the worse the discrepancy gets. In
  • I guess I'm assuming that because I can obviously get data at 78Hz, I shouldn't have any problem getting data at 50Hz (with the understanding that lots of samples will get grouped together into a single btle packet). What I've been seeing, though, is a continual loss (or large delay) in receiving samples. If I run for 10 minutes I end up missing nearly a minute worth of data.
  • What phone and android model are you using, and what is the distance between your phone and board?  

    On my Nexus 5 running Android M, I can stream 50Hz reliably granted my phone and board are very close to each other.  For higher frequencies or further distance, data can be dropped.
  • Sony z3. Lollipop 5.5.1. In testing the phone and board are very close. Is there any error reporting if samples are getting dropped?
  • I'll try running the tests on my nexus 9 tonight
This discussion has been closed.