1 Reply Latest reply on Mar 20, 2020 4:26 AM by PY_21

    Phone Alert Status Service Cy_BLE_PASSS_GetCharacteristicValue

    pime_2449811

      Hi,

      I am using "Phone Alert Status Service" for BLE communication for my PSoC6 project.  I am trying to write 2 bytes of data to characteristic: "Ringer Control Point".  The following is the code:

       

      uint8_t test[2]={0};

      /* Read the input from the GATT database */

      cy_en_ble_api_result_t m_result=Cy_BLE_PASSS_GetCharacteristicValue(CY_BLE_PASS_CP, 2, test);

      if(m_result==CY_BLE_SUCCESS){

        //turn LED on

          cyhal_gpio_write((cyhal_gpio_t)CYBSP_USER_LED2, CYBSP_LED_STATE_ON);

      }

       

      If I input two bytes: e.g. 0x01 0x02 writing is not successful;  When I input one byte: e.g. 0x01, it works.  I do not understand why "Cy_BLE_PASSS_GetCharacteristicValue" fails with writing more than one byte and I'd appreciated if some one can provide a solution.