Other Parts Discussed in Thread: CC2541, BLE-STACK, CC2640
I'm am new to BLE development and I use cc2541 for the purpose. Previously, I have modified the HidEmuKbd example to emulate a key press on a keyboard when a key on my custom circuit was pushed. Now I want to create a custom profile so that data can be passed back and forth between cc2541 and the smartphone/PC etc. After a bit of searching, i understood that the best way to do this is to modify the SimpleBLEPeripheral example and make use of services, characteristics,attributes etc.
Now I would like to know what exactly the SimpleBLEPeriheral does and which part of the code i have to modify so that I can pass data to the connected device and back. Say I want to pass the light intensity from an LDR connected to cc2541 to my phone or activate an LED on the cc2541 when I push a virtual button on my phone.
Thanks.