5 Replies Latest reply on Jul 14, 2016 6:02 AM by martin.thuering_1536551

    UUID in PSoC BLE

    rfc_1549836

      Hello,
      I'm building a simple central BLE application, with two pioneer kits. For services management, I use Ble_GattcDiscoverPrimaryServiceByUuid() API to get the service know by UUID.

         

      If UUID is 16 bits long the function work and the events CYBLE_EVT_GATTC_FIND_BY_TYPE_VALUE_RSP followed by CYBLE_EVT_GATTC_ERROR_RSP returns.

         

      The structure and initialization of UUID is:

         

      View attachment, because spam filter block my code :( :( :(

         

      The UUID on peripheral side is 0xff11, so I think that the little-endian format is adopted for memory order.

         

      If I use 128 bits UUID (of course both for central and peripheral) I don't have the CYBLE_EVT_GATTC_FIND_BY_TYPE_VALUE_RSP event, but only CYBLE_EVT_GATTC_ERROR_RSP and no data returns.

         

       

         

      /* structure to be passed for discovering service by UUID */
      const CYBLE_GATT_VALUE_T    SNSrvUuidInfo = {
                                                              (uint8 *) SNSrv, \
                                                              CYBLE_GATT_128_BIT_UUID_SIZE,\
                                                              CYBLE_GATT_128_BIT_UUID_SIZE \
                                                            };

         

       

         

      In this case the UUIS initialization and structure are:
      //  UUID :    00   00   ff   11   00   00   10   00   80   00   00   80   5f   9b   34   fb
      const uint8 SNSrv[16] =     { 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, \
                                    0x00, 0x10,0x00, 0x00, 0x11, 0xff, 0x00, 0x00 };

         


      Even in this case the UUID, showed in peripheral's custom service (0000ff11-0000-1000-8000-00805F9B34FB), is written on reverse order in structure.

         

      Where is my mistake, why the 128 bit version doesn't work?
      Thanks, Fabrizio