3 Replies Latest reply on Sep 15, 2015 8:19 AM by tdbconsulting_1416776

    CYBLE-002201 List Services

    tdbconsulting_1416776

      Hello Cypress World:

         

      I have been digging through the Cypress CYBLE-002201 API functions that are described in the 558 page “PSoC Creator Component Datasheet, Bluetooth Low Energy (BLE) 2.0” (Document Number: 001-97122 Rev. **). I would like to know which API functions are used to identify the UUIDs and Handles of the Services and Characteristics for the configured BLE device.

         

      The Microchip RN4020 lists the UUIDs and Handles of all Services and Characteristics by simply sending it the “LS” (List Services) command over the UART for which the RN4020 replies over the UART with a list such as that given below:

         

      180A

         

        2A25,000B,V

         

        2A27,000D,V

         

        2A26,000F,V

         

        2A28,0011,V

         

        2A29,0013,V

         

        2A24,0015,V

         

      180F

         

        2A19,0018,V

         

        2A19,0019,C

         

      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

         

        11111111111111111111111111111111,001C,02,14

         

        11111111111111111111111111111111,001D,10,02

         

        22222222222222222222222222222222,001F,08,14

         

        33333333333333333333333333333333,0021,02,14

         

        33333333333333333333333333333333,0022,10,02

         

        44444444444444444444444444444444,0024,08,14

         

        55555555555555555555555555555555,0026,02,14

         

        55555555555555555555555555555555,0027,10,02

         

        66666666666666666666666666666666,0029,08,14

         

      END

         

      Any clues for how to acquire that information using the Cypress CYBLE-002201 APIs would be greatly appreciated.

         

      Thank you,

         

      Tim

        • 1. Re: CYBLE-002201 List Services
          rohit.kumar

          Tim,

             

          Are you looking for API functions in Central mode or Peripheral mode?

             

          If you are a central device and want the UUIDs and handles of the connected peripheral device, then you need to use the 'CyBle_GattcStartDiscovery' API.

             

          For Peripheral Devices, these information is set in the BLE component GUI or available in the BLE generated files. For example, the handles for custom UUIDs will be available in BLE_custom.h file.

          • 2. Re: CYBLE-002201 List Services
            tdbconsulting_1416776

            Hello Roit:

               

            Thank you for the information. The mode is Peripheral.

               

            The 16 bit standard UUIDs and Handles were discovered as #defines in the associated header files. However, even after a workspace search for the last 16 bits (e.g. 34FB) of the Custom 128 bit UUID given in the PSoC BLE Configuration (e.g. 00000000-0000-1000-8000-00805F9B34FB), that UUID is nowhere to be found in the code, including BLE_custom.c and BLE_custom.h.

               

            Thanks,

               

            Tim

            • 3. Re: CYBLE-002201 List Services
              tdbconsulting_1416776

              For those interested, the Custom 128 bit UUIDs are given in the file BLE_gatt.c in the variable cyBle_attUuid128[][] as 16 byte values for 128 bits (i.e. 16 x 8 bit bytes = 128 bits). For example, UUID AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA will be given as:

                 

              { 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu }