2 Replies Latest reply on Jun 22, 2019 6:42 AM by user_4264721

    Read data BLE between PSoC6 and CySmart




      Im looking to use BLE for my application and I got some troubles with the communication. In fact, I can send datas form CySmart and get it on my PSoC6 without any troubles by using CY_BLE_EVT_GATTS_WRITE_REQ. But I cant read datas from my PSoC6 on CySmart.


      First I thought that they was a similar way for reading, like a CY_BLE_EVT_GATTS_READ_REQ but by looking on the forum, I found that I dont need to do anything to get the values updated. I just need to use the function CyBle_GattsWriteAttributeValue(). I tried this but it doesn't work, I still receive only 0 on my datas.


      I looked on the forum, especially on that topic how to make 'read' callback between PSOC6 ~ mobile(CYsmart) but I didn't find an answer. I already looked on the 2 topics linked on the other one, but I couldnt find any answer. So Im asking you some help!


      Here is the code I tried, I got a BLE task and this is the code I wrote.


      test is only a random value I initialize to get something to read.

      However, I cant find a solution that works so maybe anyone can help me or show me a simple example of a similar application ?


      Thank you very much!