2 Replies Latest reply on Oct 14, 2015 1:52 PM by tdbconsulting_1416776

    Acquiring Client Services UUIDs and Handles

    tdbconsulting_1416776

      Hello Cypress BLE World:

         

      I would like to know which Cypress BLE API function(s) is (are) required to acquire the UUIDs of the Services and the UUIDs and Handles of the Service Characteristics of a connected Client.

         

      For example, the services of a Peripheral Server (implementing the Device Information Service and a Custom Service) are as listed below and includes the UUIDs of the Services (i.e. 180A and  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) and the UUIDs and Handles of the Service Characteristics (e.g. 2A25,000B and 11111111111111111111111111111111,0018):

         

      180A

         

        2A25,000B,V

         

        2A27,000D,V

         

        2A26,000F,V

         

        2A28,0011,V

         

        2A29,0013,V

         

        2A24,0015,V

         

      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

         

        11111111111111111111111111111111,0018,02,14

         

        11111111111111111111111111111111,0019,10,02

         

        22222222222222222222222222222222,001B,08,14

         

        33333333333333333333333333333333,001D,02,14

         

        33333333333333333333333333333333,001E,10,02

         

        44444444444444444444444444444444,0020,08,14

         

      Note: The Service Characteristics with duplicated UUIDS (i.e. 1’s and 3’s above) are those of Read Characteristics employing a Read and Notification that require a separate Handle for each.

         

       

         

      Initially, I thought the function CyBle_GattcDiscoverAllPrimaryServices() was to be called while collecting the results in the CYBLE_EVT_GATTC_READ_BY_GROUP_TYPE_RSP event till completed as indicated by the  CYBLE_EVT_GATTC_ERROR_RSP event as described on Page 156 of 558 of 'PSoC Creator Component Datasheet, Bluetooth Low Energy (BLE) 2.0' (Document Number: 001-97122 Rev. **).

         

      However, calling CyBle_GattcDiscoverAllPrimaryServices() and collecting data in the CYBLE_EVT_GATTC_READ_BY_GROUP_TYPE_RSP event results in the following:

         

      010007000018080008000118090015000A18

         

      1600FFFFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

         

      And the CYBLE_EVT_GATTC_ERROR_RSP event is never activated.

         

      Is it possible that the function CyBle_GattcFindIncludedServices(), as described on Page 158 of 558, is to be called instead?

         

      Unfortunately, as described in the document, there is a lot more work to be done to get that information and I would like to know if that is the function that is to be implemented before I spend a great deal of time coding, confirming, and testing it.

         

      Is it possible that there is a function other than GattcDiscoverAllPrimaryServices() and CyBle_GattcFindIncludedServices() that should be used to get the connected Client Services and Service Characteristics UUIDs and Handles?

         

      Thank you,

         

      Tim

        • 1. Re: Acquiring Client Services UUIDs and Handles
          tdbconsulting_1416776

          Hello again:

             

           

             

          The Cypress BLE API function CyBle_GattcFindIncludedServices(), as described on Page 158 of 558 of the 'PSoC Creator Component Datasheet, Bluetooth Low Energy (BLE) 2.0' was also utilized in an effort to acquire the UUIDs of the Services and the UUIDs and Handles of the Service Characteristics of a connected Client.

             

          However, when called, that function returns the enumeration CYBLE_ERROR_INVALID_PARAMETER, which indicates: “At least one of the input parameters is invalid”.

             

          But the code implemented below shows the parameters are not invalid and for which the compiler does not report an error or warning:

             

             

              CYBLE_API_RESULT_T result;

             

              CYBLE_GATT_ATTR_HANDLE_RANGE_T range;

             

           

             

              result = CyBle_GattcFindIncludedServices(cyBle_connHandle, &range);

             

             

          The result returned above is 1 for CYBLE_ERROR_INVALID_PARAMETER.

             

           

             

          Note, as indicated in the previous comment, that calling CyBle_GattcDiscoverAllPrimaryServices() and collecting data in the CYBLE_EVT_GATTC_READ_BY_GROUP_TYPE_RSP event results in the following:

             

          010007000018080008000118090015000A18

             

          1600FFFFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

             

          But the CYBLE_EVT_GATTC_ERROR_RSP event is never activated.

             

           

             

          If anyone has any suggestions, clues, or hints for how to acquire the UUIDs of the Services and the UUIDs and Handles of the Service Characteristics of a connected Client, that would be greatly appreciated.

             

           

             

          Appreciatively,

             

          Tim

          • 2. Re: Acquiring Client Services UUIDs and Handles
            tdbconsulting_1416776

            Hello Cypress BLE World:

               

            It was discovered that the Cypress BLE API functions CyBle_GattcDiscoverAllPrimaryServices() and CyBle_GattcDiscoverAllCharacteristics() are required to acquire the UUIDs and Handles (and properties) of the Services and Service Characteristics of a connected Client.

               

            Have a nice week and make it a productive one,

               

            Tim