1 Reply Latest reply on Apr 21, 2020 10:45 AM by GaneshD_41

    BLE PSoC 6 Interfaces

    mayo_4653166

      hello everybody

      I have some questions.

      First i want to know what is the difference between write and WriteWithoutResponse in BLE Properties? my mean is How a BLE can response a Central device?

      and my second question is what is Attribute MTU size? is it related to Response to the central device? I hope i have been able to correctly put what i have meant.

      let me explain my whole project!

      i have bought a AS7026CG module (a biosensor) that its interface is I2C. I want to connect it to my BLE device(CYCPROTO-063- BLE) with I2C interface and put module's data into the BLE's GATT DB and read it continuously from my own C# APP  my question is the GATT size is Only 20 Bytes but the data is almost large ?How can i read it continuously and show it in my own C# application?( How should my app recognize that the data is changing?) I hope I have managed to make myself understood

      Please help

      Thank you so much

       

       

        • 1. Re: BLE PSoC 6 Interfaces
          GaneshD_41

          Hi,

           

          >>"First i want to know what is the difference between write and WriteWithoutResponse in BLE Properties? my mean is How a BLE can response a Central device?"

          --> If PSoC 6 BLE Client wants to write to the BLE Server it can write through Write or WriteWithoutResponse.

          --> When Client uses Write API the server has to respond with WriteResponse(). The client will receive event corresponding to write response also. From this the Client application understands that write has happened successully.

          --> When client uses writewithoutresponse the server need not has to send the response or acknowledgement.

           

          >>"what is Attribute MTU size? is it related to Response to the central device?"

          --> MTU means Maximum Transmission Unit. It is the amount of data that is transmitted in one Transmission unit. Link layer and physical layer handles this. You can keep this at maximum (512).

           

          >>"is Only 20 Bytes but the data is almost large ?"

          --> No. It is not large. You can transmit easily. The maximum size of characteristic can be 512 bytes.

           

          >>"How can i read it continuously and show it in my own C# application?"

          --> This can be done in 2 ways.

          1. Your Client can read the data at fixed intervals. You have to use GATTRead APIs for this.

          2. Your server can also send data to client whenever necessary. For this you have to use notification. Notification is similar to Write but the direction is from Server to Client.

          For your application, you have to write the I2C data into the characteristics of the server. Then the client can read the data or server can send the notifications.

           

          I hope the above explanation helps. Please refer PSoC Creator code examples on BLE. These helps you to understand the firmware flow of BLE. Also please refer BLE throughput code example from the link below. This helps you to understand how to use Notification API.

           

          https://www.cypress.com/documentation/code-examples/ce222046-psoc-6-mcu-bluetooth-low-energy-ble-connectivity-ble-throug…

           

          Thanks

          Ganesh