This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Send data from the peripheral to the master

Hi,

Hello everybody, I'm newbie is this forum and I'm starting to familiarize myself with BLE technology.

For that, i bought the CC2540DK and read a start guide (swru300) to understand how CC2540EM and board works.I have installed BLE-CC2540-1.3.2. 

I followed the tutorial using SimpleBLEPeripheral and SimpleBLECental applications and have started to study the source code. Now, my propose is change the roles, in other words, send data from the peripheral to master, for example, send a character in a five-second interval. I want to keep the connection form, ie, the master discovers the devices and connects(as the tutorial). Thereafter the peripheral device starts sending information, like a sensor.

In tuturial the master(centarl) is a gatt cliente and the slave(peripheral) is a gatt server. For my propose, is necessary change this roles ? When an application wants to send data, it must necessarily be a gatt client?

I apologize for the long text but I'm just starting, I've read the guides proposed inclusivie guide containing samples of applications but  i have difficulties in structuring the code for my purpose.

I appreciate the attention, 

Regards