This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Why the connection from IOS to my keyfob takes such a long time for about 30S after I changed the connection parameter?

#define DEFAULT_ADVERTISING_INTERVAL  320          //1032 = 645MS

//GAP Peripheral Role desired connection parameters

// Whether to enable automatic parameter update request when a connection is formed
#define DEFAULT_ENABLE_UPDATE_REQUEST         TRUE

// Use limited discoverable mode to advertise for 30.72s, and then stop, or
// use general discoverable mode to advertise indefinitely
#define DEFAULT_DISCOVERABLE_MODE             GAP_ADTYPE_FLAGS_LIMITED
//#define DEFAULT_DISCOVERABLE_MODE             GAP_ADTYPE_FLAGS_GENERAL

// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL     200//20

// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL     400//200

// Slave latency to use if automatic parameter update request is enabled
#define DEFAULT_DESIRED_SLAVE_LATENCY         0

// Supervision timeout value (units of 10ms, 1000=10s) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_CONN_TIMEOUT          500

#define DEFAULT_ADV_TIMEOUT                  60 //from 1.3.1, The adv time use units of second instead of milliseconds

  • But when I use the BTool to connect to my keyfob, it is very quick, so what cause so big difference between USB Dongle and IOS devcie?

     

    Chris

  • Hello Sdf,

    Even with the default settings for the Keyfob, the connection time should not be more than a second.  Are you connecting using one of the TI apps like MultiTool or the SensorTag app from the app store?

    If the battery in he Keyfob is new and the distance from the iOS device is the same as if you were using the dongle and if this is a custom iOS app, then the problem is may be on the iOS side or with the iOS device.

    Thanks,

  • Yes, with the default setting, it use the master's connection parameter,but not slaves. But the current is large, it is about 1mA if connected. So I want to decrease the current of keyfob, so I want to update the connetion parameter. Can the param be updated after the characteristic has been read by ios device? Or keyfob need to send update param just after been connected?

  • If you are using the Keyfob as a central device, then you can send an update request to the iOS device acting as a slave.  The BLE device uses more current in Rx than Tx.  The update parameter can be sent after The connection is made, or you can terminate the connection.

    Thanks,