High Frequency Streaming - Callback Problem
I am trying to stream data from 2 devices simultaneously using the C++ API but I am having some problems.
To be more specific, I can connect to both devices but when I enable acceleration sampling, data are processed only from one of
the device structs. Through some debugging I have confirmed that the packets from both devices arrive to my application
correctly and non-stop but for some reason the callback function responsible for handling the received data of the one
sensor is not called by the MetaWear library. This means that the function responsible for processing GATT notifications
receives the packet correctly but when your handler is called nothing happens.
When I connect to only one of the devices I can stream data without any problem (for both devices).
Please note that I have enabled high frequency streaming to both devices using the following functions before enabling acceleration sampling and starting streaming:
mbl_mw_settings_set_connection_parameters(board, 7.5f, 7.5f, 0, 6000);
Something interesting that I have noticed is that there is a certain pattern at the beginning of the stream. From the device that cannot
process data correctly, 3 "smaller" packets arrive, then 1 "bigger" and the callback function is called 3 times. This happens 3 or 4
times and then the "bigger" packets simply stop and the callback function is never called again.
The "smaller' packets are something like this: [ 0x3 0x4 0xe4 0x5 0x6d 0x1 0x27 0x1f ]
whereas the "bigger" ones are like this: [ 0x3 0x1c 0xe4 0x5 0x6d 0x1 0x27 0x1f 0xfc 0x5 0x41 0x1 0xf3 0x1e 0x6 0x6 0x21 0x1 0x2a 0x1e ]
I am using Ubuntu 16.0.4, my BlueZ version is 5.42 and the devices that I use are MetaWearRG sensors.