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.

CCS/LAUNCHXL-CC2640R2: Why after pairing, on Notify characterstic is not reading the data??

Part Number: LAUNCHXL-CC2640R2


Tool/software: Code Composer Studio

Hi all,

why after pairing, if I write a data on WRITE characterstic, on NOTIFT characteristic is not reading the data?

My configuration as PAIRING is:

#define DEFAULT_PAIRING_MODE                  GAPBOND_PAIRING_MODE_WAIT_FOR_REQ
// Default MITM mode
#define DEFAULT_MITM_MODE                     TRUE
// Default bonding mode, TRUE to bond
#define DEFAULT_BONDING_MODE                  FALSE
// Default GAP bonding I/O capabilities
#define DEFAULT_IO_CAPABILITIES               GAPBOND_IO_CAP_DISPLAY_ONLY

PROFILES:

      // DataIn Characteristic Value
      {
        { ATT_UUID_SIZE, SimpleStreamServer_DataInUUID },
        GATT_PERMIT_ENCRYPT_WRITE,
        0,
        SimpleStreamServer_DataInVal
      },
    // DataOut Characteristic Declaration
    {
      { ATT_BT_UUID_SIZE, characterUUID },
      GATT_PERMIT_READ,
      0,
      &SimpleStreamServer_DataOutProps
    },
      // DataOut Characteristic Value
      {
        { ATT_UUID_SIZE, SimpleStreamServer_DataOutUUID },
        0,
        0,
        SimpleStreamServer_DataOutVal
      },
      // DataOut CCCD
      {
        { ATT_BT_UUID_SIZE, clientCharCfgUUID },
        GATT_PERMIT_ENCRYPT_READ | GATT_PERMIT_ENCRYPT_WRITE,
        0,
        (uint8 *)&SimpleStreamServer_DataOutConfig
      },

 

I've already tried to do SimpleStreamServer_DataOutConfig without ENCRYPTION but don't work...

PLEASE A NEED AN EXAMPLE OF TI WHERE IS IMPLEMENTED AS ABOVE I EXPLAINED.

 

Regards,

Alfredo

  • Alfredo Di Martino said:

    Part Number: LAUNCHXL-CC2640R2

    Tool/software: Code Composer Studio

    Hi all,

    why after pairing, if I write a data on WRITE characterstic, on NOTIFT characteristic is not reading the data?

    My configuration as PAIRING is:

    #define DEFAULT_PAIRING_MODE                  GAPBOND_PAIRING_MODE_WAIT_FOR_REQ
    // Default MITM mode
    #define DEFAULT_MITM_MODE                     TRUE
    // Default bonding mode, TRUE to bond
    #define DEFAULT_BONDING_MODE                  FALSE
    // Default GAP bonding I/O capabilities
    #define DEFAULT_IO_CAPABILITIES               GAPBOND_IO_CAP_DISPLAY_ONLY

    PROFILES:

          // DataIn Characteristic Value
          {
            { ATT_UUID_SIZE, SimpleStreamServer_DataInUUID },
            GATT_PERMIT_ENCRYPT_WRITE,
            0,
            SimpleStreamServer_DataInVal
          },
        // DataOut Characteristic Declaration
        {
          { ATT_BT_UUID_SIZE, characterUUID },
          GATT_PERMIT_READ,
          0,
          &SimpleStreamServer_DataOutProps
        },
          // DataOut Characteristic Value
          {
            { ATT_UUID_SIZE, SimpleStreamServer_DataOutUUID },
            0,
            0,
            SimpleStreamServer_DataOutVal
          },
          // DataOut CCCD
          {
            { ATT_BT_UUID_SIZE, clientCharCfgUUID },
            GATT_PERMIT_ENCRYPT_READ | GATT_PERMIT_ENCRYPT_WRITE,
            0,
            (uint8 *)&SimpleStreamServer_DataOutConfig
          },

     

    I've already tried to do SimpleStreamServer_DataOutConfig without ENCRYPTION but don't work...

    PLEASE A NEED AN EXAMPLE OF TI WHERE IS IMPLEMENTED AS ABOVE I EXPLAINED.

     

    There is also another problem: disconnection after the pairing is done… How is possible?

     

    Regards,

    Alfredo

  • Hi Alfredo,

    Our simple_peripheral example on the CC2640R2 shows how to set notifications using Characteristic 4 (see simple_gatt_profile.c). Make sure that &SimpleStreamServer_DataOutProps is set to GATT_PROP_NOTIFY.

    Then, to enable notifications, you need to write to 0x01 to the CCCD of that characteristic. This can be done using the LightBlue (you can hit Listen for Notifications).

    Please go through our Simplelink Academy module that covers notifications here: dev.ti.com/.../ble_01_basic.html

  • Hi Ammar,

    thanks soo much for your support, but I think the problem is of another nature… because my project have 2 task and probably are in conflicts.

    B.R.,

    Alfredo