Request: synchronized streaming from multiple devices

I would like to stream data from multiple devices simultaneously, but I cannot start recording from all the devices at the same time. Would it be possible to add a feature to signal when a devices begins measuring data? I realize that perfect synchronization may be difficult through BLE, but I'm finding that the differences in starting time can be order of many seconds even for the gyrometer and accelerometer on the same device. Reducing that delay to something less than a second and knowing about when the streaming or logging has started would be really helpful .

I'm working with an iPhone 5S using the MetaWear RG's with hardware versions 0.3 and firmware 1.1.3.

Comments

  • edited April 2016
    How many devices are you attempting to simultaneously stream and at what data rates? Bluetooth le can't reliably handle data at frequencies higher than 100Hz. If you are flooding the radio with data, it's to be expected that subsequent commands you issue after stream #1 starts will take a while to get issued and data from stream #2 will be delayed, possibly even dropped altogether.

    You are alerted to when streaming has started, by virtue of simply receiving data. However, for the reasons mentioned above, streaming can be unteliable. The only way to get accurate timestamps is to use logging in which the first entry you download will tell you when logging started.
  • I'm limiting data streaming from all connected devices to 100Hz.

    I may be doing something silly, but I also am finding that the devices aren't always starting when I log instead.

    Is the log time stamp from the phone? And I thought the time stamp had a precision of 1 second? Is it possible to get it finer?
  • Sorry, when I say 100Hz what I mean is the throughput.  In other words, if you have two boards streaming at 100Hz, then your mobile device is effectively receiving data at 200Hz because you would be receiving 100 samples from 2 boards every second.  BTLE is not designed for high amounts of data so you need to keep your throughput to 100 samples per second or less.

    You should try starting with 1 board, then 2, etc until you see this starting issue.

    The timestamps are generated in firmware and have millisecond granularity.
  • Sorry. I also meant throughput, i.e. the sum of all devices streaming is 100Hz. I'm not sure if capacity adds linearly with multiple devices?

    I tried putting in a blink LED statement at the start and end of logging to check if the devices are receiving commands at different times. I'm finding that the devices seem to blink at very similar times, but the logs that are produced don't correspond. Sometimes, I'm getting many more logs (or no logs) in some devices as opposed to others that should have started at very similar times. Are there any known issues with stop log and start log commands not being processed?

    The other cause I could imagine is that I'm messing up the arrays in which I'm storing data. I cannot check that because there is some other bug in downloadLogAndStopLoggingAsync, which I will post about...








  • It sounds like that logger is either full, which won't log any more data, or did not fully download.  Stephen has addressed the other logger issue so assuming you are still running into problems after his fix, you need to first test your setup on 1 board as I suggested in my previous post.  If 1 board works fine, then try it for 2, 3, etc. until you see any issues.
This discussion has been closed.