add BLE issue comment

This commit is contained in:
phaseloop
2025-12-16 13:30:06 +00:00
parent 62ab1a31e7
commit 4e969c0432

View File

@@ -274,6 +274,24 @@ void NRF52Bluetooth::setup()
Bluefruit.Periph.setDisconnectCallback(onDisconnect);
// Do not change Slave Latency to value other than 0 !!!
// There is probably a bug in SoftDevice + certain Apple iOS versions being
// brain damaged causing connectivity problems.
// On one side it seems SoftDevice is using SlaveLatency value even
// if connection parameter negotation failed and phone sees it as connectivity errors.
// On the other hand Apple can randomly refuse any parameter negotiation and shutdown connection
// even if you meet Apple Developer Guidelines for BLE devices. Because f* you, that's why.
// While this API call sets preferred connection parameters (PPCP) - many phones ignore it (yeah) and it seems SoftDevice
// will try to renegotiate connection parameters based on those values after phone connection.
// So those are relatively safe values so Apple braindead firmware won't get angry and at least we may try
// to negotiate some longer connection interval to save battery.
// See https://github.com/meshtastic/firmware/pull/8858 for measurements. We are dealing with microamp savings anyway so not worth
// dying on a hill here.
Bluefruit.Periph.setConnSlaveLatency(0);
// 1.25 ms units - so min, max is 15, 100 ms range.
Bluefruit.Periph.setConnInterval(12, 80);