Page 1 of 1

NimBLE Callbacks Dropped

Posted: Fri Jan 20, 2023 8:32 pm
by akolodner25
I am using NimBLE Client to connect to multiple MetaMotionS IMU devices, which are each supposed to be sending a BLE notification at roughly 100Hz to the firmware. However, only the most recent device connected does this; the previous devices have 2 issues: a delay between when the data is sampled and when the ESP32 receives it, and much fewer callbacks. Even if I connect another BLE device but don't use it to stream any data, all the other devices slow down.
I assume the problem is on the ESP side, since each peripheral device is unaware that there are other devices connected. Somewhere, data is being dropped or ignored. I can find the NimBLE code that runs each separate event once it's in the Rx event queue, but I can't find the actual code that generates the event or adds it to the queue (something to happen on a processor interrupt when the MetaMotionS starts to transmit data?). Does anyone know where this is or what might be causing my issue?
(Also, this issue does not occur when using Bluedroid, but I can't use Bluedroid for other reasons)