I am working on a project where an nRF52 is a multi-role BLE device. It is an advertising Peripheral, to which smartphones can connect, and a Central which scans for and connects to up to 3 accessories. Let's call the multi-role device the Hub, and its peripherals Accessories.
The Hub's peripheral side has an advertising interval of 200ms. Preferred conn params are conn interval of 30-170ms, with slave latency of 3 and supervision timeout of 2200ms. The Hub's Central side has a scan interval of 100ms, a scan window of 50ms, and has two sets of connection parameters for different Accessory types. One set (for 2/3 of the accessories) is 30-60ms conn interval with 30 slave latency, and 5590ms supervision timeout, and the other being 30-630ms conn interval, slave latency 6, and 13,240ms supervision timeout.
Smartphones (multiple Android and iOS handsets and tablets) can connect just fine to the Hub when the Hub has no Accessories connected. The Hub receives commands from the smartphone via a service very much like NUS, and those react within a few hundred milliseconds. This is fine, because the commands are issued by users and trigger motors to move.
The problem arises when one or more Accessories are connected to the Hub. Once Accessories are connected, the Hub's advertising packets are sporadic (not every 200ms like they should be), connecting through our app takes longer than usual, and command latency goes up sporadically as well, sometimes up to 2 seconds! Also, on some Samsung Android tablets and a Note 9, the Hub has lost connection while in use, with no apparent reason. I have not been able to get an iPhone to lose connection, and iPhones have less command latency than Android devices in general, but it is still a noticeable difference when there are Accessories connected to the Hub.
I am looking for general advice about multiple connections. Is there some way to measure radio utilization that I am missing, and it's getting overloaded? Do I need to prioritize something?
Updates: As I read softDevice documentation, I found that the default GAP config event_length is 3.75ms, and the minimum is 2.5ms. In my softdevice_init function I set ble_cfg.conn_cfg.params.gap_conn_cfg.event_length to 320 decimal, so that would be 400ms! I am going to try with a value of 3, which is the default and would give 3.75ms event length.