Other Parts Discussed in Thread: CC2650, BLE-STACK, LAUNCHXL-CC2650, CC2541,
I've been experiencing some serious issues with my application connecting to iOS. It seems initially the device will be found and bond correctly, but following after this the connecting is dropped regularly.
When viewing the power consumption on an oscilloscope I can see the exact moment the connection is dropped and when it is re-established. The timing between these can be completely random. Sometimes the connection will last for 10 seconds, sometimes it will last for 5 minutes. I should note that I have experienced nothing but a stable connection using android.
For the application the connection parameters have been set like so:
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic parameter update request is enabled #define DEFAULT_DESIRED_MIN_CONN_INTERVAL 264//330ms // Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled #define DEFAULT_DESIRED_MAX_CONN_INTERVAL 288//360ms // Slave latency to use if automatic parameter update request is enabled #define DEFAULT_DESIRED_SLAVE_LATENCY 4 // Supervision timeout value (units of 10ms, 1000=10s) if automatic parameter update request is enabled #define DEFAULT_DESIRED_CONN_TIMEOUT 600 // Whether to enable automatic parameter update request when a connection is formed #define DEFAULT_ENABLE_UPDATE_REQUEST TRUE // Connection Pause Peripheral time value (in seconds) #define DEFAULT_CONN_PAUSE_PERIPHERAL 10 // Advertising interval when device is discoverable (units of 625us, 160=100ms) #define DEFAULT_ADVERTISING_INTERVAL 244 // 150.5ms adv interval #define ADV_TYPE_GENERAL_ADV_INT 2056 // 1285ms adv interval // 1022.5 / 1285 max?
And in the initialisation function the following is done:
uint16_t desiredMinInterval = DEFAULT_DESIRED_MIN_CONN_INTERVAL; uint16_t desiredMaxInterval = DEFAULT_DESIRED_MAX_CONN_INTERVAL; uint16_t desiredSlaveLatency = DEFAULT_DESIRED_SLAVE_LATENCY; uint16_t desiredConnTimeout = DEFAULT_DESIRED_CONN_TIMEOUT; uint8_t enableUpdateRequest = DEFAULT_ENABLE_UPDATE_REQUEST; GAPRole_SetParameter(GAPROLE_MIN_CONN_INTERVAL, sizeof(uint16_t), desiredMinInterval); GAPRole_SetParameter(DEFAULT_DESIRED_MAX_CONN_INTERVAL, sizeof(uint16_t), desiredMaxInterval); GAPRole_SetParameter(DEFAULT_DESIRED_SLAVE_LATENCY, sizeof(uint16_t), desiredSlaveLatency); GAPRole_SetParameter(DEFAULT_DESIRED_CONN_TIMEOUT, sizeof(uint16_t), desiredConnTimeout); GAPRole_SetParameter(GAPROLE_PARAM_UPDATE_ENABLE, sizeof(uint8_t), &enableUpdateRequest);
As a side note: For some reason this example origingally called a GAPRole_SendUpdateParam(...) function here, which seems pointless since it requires a connection to be in place to work and this is never the case by this point in the initialisation. Something to fix in project zero example if it hasn't been already
So as you can see all of the parameters are within apple's specification:
MaxConnInt = 360ms
MinConnInt = 330ms
Slave Latency = 4
ConnSupervisionTimeout = 6
- MaxConnInt * (SL+1) < 2 seconds : YES
- Min ConnInt < MaxConnInt-20ms : YES
- Slave Latency <= 4 : YES
- ConnSupervisionTimeout ≤ 6 seconds :YES
- MaxConnInt * (SL + 1) * 3 < connSupervisionTimeout : YES
Why do these problems persist?