Simple transfer of value via BLE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am hardware design who is very very new to doing software. I have the Bluetooth LE Pioneer Kit (CY8CKIT-042-BLE). I want to do a very simple thing. I want to measure an analog signal input (basically a variable DC source) and then send the value via BLE to the BLE dongle (I think you call it the client...correct?). I know how to use PSoC Creator to measure the analog signal. I even ran a test where I blinked the blue LED at a different rate based on the voltage level of the analog input. What I don't understand is how do I transfer that value via BLE. I know I have to pull in the BLE block to my schematic but past that I am really lost. I don't know how I have to set the BLE block up and what to do on the dongle end of things. I would think this would be the most simple task. Any detailed help would be very much appreciated.

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Look at the BLE component documentation. There are also introductions to Cpyress BLE available which explain all you need (e.g. the getting started with BLE document).

View solution in original post

0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Look at the BLE component documentation. There are also introductions to Cpyress BLE available which explain all you need (e.g. the getting started with BLE document).

0 Likes
Anonymous
Not applicable

Hey drag BLE to ur design. double click to open properties. Configure ur BLE as GAP role: peripheral and GATT server. Do other nominal settings as described in code examples of BLE, u can easily find in psoc creator.

   

All you need to do is add a custom service, which will contain the value of voltage u measured. Add field voltage measurement.Set the property of service as read, write and notify. Measure the value and send notification. use the api

   

CyBle_GattsNotification(

   

cyBle_connHandle,

   

&val

   

);

   

in ur dongle click enable notifications.

0 Likes
Anonymous
Not applicable

Thanks dalip.sharma_20. I will try that. I have followed the example tutorials and looked at the BLE guide. It just hasn't clicked yet how to jump over to do just what I need. I'm close to being able to use api to set up GAP and GATT parameters. I'm still not sure how to get my analog measurement value linked to the parameters in the custom service. I am also having a hard time as to what I need to add to the main.c file. I'm not a software guy and don't know C so that surely isn't helping. I'm guessing the code you provided is what goes in the main.c file.

0 Likes