Issue connecting 7+ sensors to a raspi

Hello ! I'm trying to use some of the Metawear C sensors in a project (basically 15 of them). I'm facing the following issue with those :
When I try to connect more than seven bluetooth sensors to a raspberry pi 3B (on differents bluetooth dongles, for example 3 sensors on 3 differents dongles -> 9 sensors), I have various problems (eg : can't connect to the 8th, the program crashes [resource busy], got some disconnections,...).

I use the MetaWear API, with the warble lib in C++ on the raspberry pi (raspbian), and some ASUS USB-BT400 dongles along with it. I tried too with the sensors shiped with the MetaHub Gateway, with worse results.

I just wanted to know if other developers have had this issue already, and if it could come from the raspi periphericals, the linux core, the bluetooth dongles, or the sensors.

Finally, I would like to know if it is better to gather data with a streaming or a polling protocol to use such an important number of sensors (and read all our data within 100ms) ; and if the MetaWear API is thread-safe.

Thanks !


    • Do you have better luck if you keep it to 6 devices per process?
    • Depends on what sensore you are using. For example, IMUs stream data, temperature requires polling
    • I do not recommend concurrently using a MblMwMetawearBoard object from multiple threads
  • Hello !
    I am from the PaulPom team, he's going to be on hollidays...
    We can connect up to 3~4 devices successfully on the same dongle and in the same process and thread, but if we try more we go through connection time-out for some devices.
    When lucky, we can use up to 7 devices distributed over 3 dongles (in one thread or several threads, no matter).
    We have to use IMU sensor in fusion mode, we have tried stream mode but with many deconnection problems, so we have tried with polling (using a passthrough data processor and triggering it at regular interval) and found it a bit more stable.
    We do not use MblMwMetawearBoard object amongst multiple threads.
    It is saying on your site that it is possible to connect up to 20 sensors to a metahub (we have one)(can we connect them at same time ?), but we failed to do this. Have you any code example that allows this ?
    Any idea or advice will be greatly appreciate !
    Thank's a lot !

  • edited December 2018

    Post a minimal script that reliably replicates this issue and a log of the BT adapter activity when it happens.

    What language are you using for your workflow?

Sign In or Register to comment.