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.

CC2650MODA: CC2650 BLE data rate

Part Number: CC2650MODA
Other Parts Discussed in Thread: ADS1115, CC2640

Device - CC2650MODA

I am using a simple_peripheral example for BLE. My task is to get data from external ADC and sent it over to BLE. ADC interface and BLE code are working fine. But when I change the ADC value it does not reflects in the BLE value immediately. There is a delay of 3-4 secs to change the value over BLE. Following are the specification of the code. Can someone tell me which parameters should be changed to get the data over BLE immediately?

// Advertising interval when device is discoverable (units of 625us, 160=100ms)
#define DEFAULT_ADVERTISING_INTERVAL 160

// Limited discoverable mode advertises for 30.72s, and then stops
// General discoverable mode advertises indefinitely
#define DEFAULT_DISCOVERABLE_MODE GAP_ADTYPE_FLAGS_GENERAL

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

// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 800
#else //!FEATURE_OAD
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 8

// Maximum connection interval (units of 1.25ms, 8=10ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 8
#endif // FEATURE_OAD

// 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 1000

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

// Connection Pause Peripheral time value (in seconds)
#define DEFAULT_CONN_PAUSE_PERIPHERAL 6

// How often to perform periodic event (in msec)
#define SBP_PERIODIC_EVT_PERIOD 5000 //5000

#ifdef FEATURE_OAD
// The size of an OAD packet.
#define OAD_PACKET_SIZE ((OAD_BLOCK_SIZE) + 2)

  • Hey Sahil,

    I've assigned an expert to comment on your post. Can you clarify what the size of the payload is, and how you send the data to be transferred (from the application point of view)?

  • Hi Sahil,

    On top of answering the questions that Ammar posted, can you also provide answers to the following questions? Which SDK version are you using? Can you clarify how you are sending the data? Are you sending the data over notifications/indications or by updating a characteristic?

    Best Regards,

    Jan

  • Kindly find the specifications below:

    SDK- BLE SDK 2 02 01 18

    TI-RTOS 2 20 1 08

    I taking data through ADS1115 IC over the i2c interface. 

    Following is the firmware code to send the data-

    void sendData(){
    System_printf("I am in the send data function\n");
    System_flush();
    convrawadcDataAvg = (uint8) rawadcDataAvg;
    SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR1, sizeof ( uint8 ), &convrawadcDataAvg );
    SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR4, sizeof ( uint8 ), &convrawadcDataAvg );

    }

    Code for profile settings-

    // Characteristic Value 1
    {
    { ATT_BT_UUID_SIZE, simpleProfilechar1UUID },
    GATT_PERMIT_READ | GATT_PERMIT_WRITE,
    0,
    &simpleProfileChar1
    },

    // Characteristic 4 configuration
    {
    { ATT_BT_UUID_SIZE, clientCharCfgUUID },
    GATT_PERMIT_READ | GATT_PERMIT_WRITE ,
    0,
    (uint8 *)&simpleProfileChar4Config
    },

  • Kindly find the specifications below:

    SDK- BLE SDK 2 02 01 18

    TI-RTOS 2 20 1 08

    I taking data through ADS1115 IC over the i2c interface. 

    Following is the firmware code to send the data-

    void sendData(){
    System_printf("I am in the send data function\n");
    System_flush();
    convrawadcDataAvg = (uint8) rawadcDataAvg;
    SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR1, sizeof ( uint8 ), &convrawadcDataAvg );
    SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR4, sizeof ( uint8 ), &convrawadcDataAvg );

    }

    Code for profile settings-

    // Characteristic Value 1
    {
    { ATT_BT_UUID_SIZE, simpleProfilechar1UUID },
    GATT_PERMIT_READ | GATT_PERMIT_WRITE,
    0,
    &simpleProfileChar1
    },

    // Characteristic 4 configuration
    {
    { ATT_BT_UUID_SIZE, clientCharCfgUUID },
    GATT_PERMIT_READ | GATT_PERMIT_WRITE ,
    0,
    (uint8 *)&simpleProfileChar4Config
    },

  • Hi Sahil,

    If the data is being transported via characteristic, then it is up to the central device to read the new data. However, it is possible to enable notifications on these characteristics which will cause the central to be notified when there is new data available. Characteristic 4 has the notify property. In order to make use of this property, the central must enable notifications for this characteristic by writing 0x0001 to the client characteristic configuration for characteristic 4. For more information on how to enable notifications for these characteristics please reference Section 5.3.2 GATT Services and Profiles of the SWRU393_CC2640_BLE_Software_Developer's_Guide.pdf available in the SDK. Section 5.3.4.2.5 Get and Set functions may also be helpful here.

    Best Regards,

    Jan

  •  the central must enable notifications for this characteristic by writing 0x0001 to the client characteristic configuration for characteristic 4.

    as per this point 

    1. Can we direct move to notify property (without writing 0x0001). What are changes to be done to direct notify?