This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Data Transmission and Reception over BLE

Hi, I am new to BLE Development. Currently I am using NORDIC Development board (SDK Ver 5.2 &Soft device S110). I want to write a small program to establish the connection and do some data exchange between Central and Peripheral. With the help of nAN-36, i understood the procedure to o establish the connection. Suppose if want to transfer few bytes of data ( <20 Bytes >20Bytes )from Central to Peripheral and again loopback to Central, how I can do the same with GATT APIs and L2CAP Interface. I will be very much thankful if someone through some idea in this regard. Thanks & Regards, Raju

  • FormerMember
    0 FormerMember

    One way to do this by (modifying the reference nAN-36):

    1. When the peripheral gets a value in any writable attribute from a central, the write handler is called. It is led_write_handler in main.c in nAN-36.
    2. In the write handler, notify the central using another attribute with the data received. Then the notified attribute will be updated in the central with the value it sent originally.

    I guess this brief description is not good enough to give a clear idea, but start playing with the nAN-36 code, testing with the nrf Master Control app and you'll get a hang of it. Cheers, Prithvi

Related