Metahub: Specify BLE Dongle for Each Sensor

Using the included json configuration file, I connected the four sensors at once. I was wondering how in the configuration file would you specify a sensor to use hci0 or hci1, etc. Below is the json file, basically same as done in tutorials and example.

{
    "command": "stream",
    "devices": [
        {"mac": "F6:38:5E:EA:XX:XX","name": "Right Foot"},
        {"mac": "E4:D8:C0:XX:XX:XX","name": "Right Thigh"},
        {"mac": "D0:4D:D5:XX:XX:XX","name": "Left Foot"},
        {"mac": "CA:C2:2E:XX:XX:XX","name": "Left Thigh"}
    ],
    "sensors": {
        "Euler Angles": {"accRange": 4.0, "gyroRange": 500.0}
    }
}

I was hoping it would be something to add when specifying the sensors and figured since there are two dongles, that it was something easily overlooked either in the tutorial Laura wrote or in the other tutorials. Both USB devices work , hciconfig shows them up and running just fine as hci1 and hci0.

Thank you.

Comments

  • The reason I am asking is when using 2 sensors, I am getting data at least every 10ms, while using 4 sensors, the delivered readings may be over 100ms, but still would like to know about specifying the dongle.

  • I thought I scoured the forums hard enough, but that post explains everything, thank you for your time.

  • So for anyone who wants to run two devices at once from command line (this example is Euler Angles:

    sudo NOBLE_HCI_DEVICE_ID=1 npm start -- --device MA:CA:DD:RE:SS:XX --sensor Euler\ Angles='{"accRange":4.0,"gyroRange":500.0}' --device MA:CA:DD:RE:SS:YY --sensor Euler\ Angles='{"accRange":4.0,"gyroRange":500.0}' --command stream
    

    command stream isn't needed

    Thanks again!

Sign In or Register to comment.