You are here

Reading an Attribute on PRoC4 | Cypress Semiconductor

Reading an Attribute on PRoC4

Summary: 1 Reply, Latest post by Bob Marlowe on 30 Nov 2015 03:37 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
gregor dörig's picture
6 posts

Hi everyone,

I'm pretty new to the whole Bluetooth topic and even to programming any ARM processor, so please excuse if the following questions sound a bit "simple" :-). I searched through the forums and wasn't able to solve the following problem:

I simply want to read out an attribute, that I've created in the BLE component in PSoC Creator (it's called BTCommand and has length 12).

So here's my code:


data_handle = BTCommand_HANDLE;
uint8 data_length = 12;
uint8 val[data_length];
val_handle.attrHandle = data_handle;
val_handle.value.val = val;

val_handle.value.len = data_length;
error = CyBle_GattsReadAttributeValue(&val_handle, &cyBle_connHandle, CYBLE_GATT_DB_LOCALLY_INITIATED);


So, the first time i execute the code, it seems to work and in the variable called val, i can afterwards see the content of the attribute (that i've created). So I guess it basically works.

The problem is that right after the execution, the processor get's into a unknown state (or something similar) and actually ends up in the "CySysSleep" routing (and never get's out again). I seems strange to me, since i don't send the module into sleep mode...

The "error" value is "CYBLE_GATT_ERR_NONE" after first execution, so this seems to be correct.

Maybe someone knows how exactly to read out a simple attribute and knows what i'm doing wrong. Would appreciate the help...




user_1377889's picture
9300 posts

Welcome in the forum, Gregor.

You are in the wrong forum here, so it might be that someone knowing the answer to your question will not read it.

I would suggest you to ask again using the PSoC4 BLE or PRoC forum.



Log in to post new comments.