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.

Changing simpleprofile cc2540. Using SIMPLEPROFILE_CHAR5.

Other Parts Discussed in Thread: CC2540

We used following projects for studying BLE and CC2540 SimpleBLECentral and SimpleBLEPeripheral that was included in BLE software. This software implements the five simple GATT profiles. Testing showed, that development is working with only two profiles – first one (1 byte read/write), second (1 byte only read).

Profile selection is made by using the GATT_ReadUsingCharUUID method . For first two this method returns “Success” status, reading/writing data is possible (for second profile only reading).

Testing of third profile showed, that method GATT_ReadUsingCharUUID returns error status (error code 0x01).

Testing fifth profile showed similar situation (when trying to use this profile, use an encrypted connection).

We need a single session is to pass an array of data cells.

What are we doing wrong?


BR.

  • Hello Denis,

    If the characteristic does not have the correct privilege, it will return an error when you try to read an attribute that does not have read permission, or in the case of an encrypted characteristic, the connection must be paired.

    You can find this information in both the BLE v1.3 Software Developers Guide and Attribute Profile (ATT) AND GENERIC ATTRIBUTE PROFILE (GATT) .

    In the SWRU271D (Software Dev Guide) page 23, figure 6 SimpleGATTprofile Attribute List, you can see that profile 3 is notify only.  For characteristic 5 it can be read, only if it is paired.  The details are on page 22 of the guide.

    Thanks,

  • Thanks, greenja

    greenja said:

     For characteristic 5 it can be read, only if it is paired.  The details are on page 22 of the guide.

    Devices are paired before i try to read Char5 .

  • If you are trying to do this through Btool, I believe there is a box that has to be checked for encrypted data on the second tab that allows for pass key to be sent.

  • Devices are paired before calling GATT_ReadUsingCharUUID(); This methods returns error status.

  • greenja said:
    If you are trying to do this through Btoo

    No, i have to send data between two cc2540.

  • The only reason I can think of is that the devices are not paired.  You may be able to use Packet Sniffer to verify that pairing has taken place, unless you are using the SmartRF05 or other development kit.

    Try using Btool and connect and pair with each CC2540 separately and then read the characteristic.  If both devices work with Btool, then you will know that they are not pairing when a connection between the two of them is established.

  • greenja, thank you.

    I'm using SmartRF05. Central dev. showed "paired sucess" on the display, but peripheral don't show this message.