0

how to read values for characterstic.

vijyendra gravatar image

asked 2017-04-20 23:56:34 +0100

updated 2017-04-20 23:57:11 +0100

I am not able to read value from characteristics. Always getting isNotify=NO.

edit retag flag offensive close delete report spam

3 answers

Sort by ยป oldest newest most voted
0
endnode gravatar image

answered 2017-04-21 00:18:01 +0100

Are you reading GATT Characteristic as GATT Client over BLE link or are you reading it just internally on GATT Server by sending some SD function call from application to Nordic Soft Device? According to tags you use S132 so probably nRF52832 chip but anyway can you provide proper description of your system (what exact HW and SW/FW you run on both sides of the link)?

edit flag offensive delete publish link more
0
run_ar gravatar image

answered 2017-04-21 14:19:27 +0100

updated 2017-04-21 14:19:53 +0100

Did you read the Core Bluetooth Programming guide? reading the value of a characteristic is described here.

edit flag offensive delete publish link more
0
vijyendra gravatar image

answered 2017-04-21 00:46:50 +0100

Hi, I am developng iOS app using n52 device and just want to get description for each cahracter. but isNotifying Bool value always coming as NO so readValueForCharacteristic:characteristic never called. I tried to commented out that isNotifying flag and its working. Any lead will be appreciated. thanks

if (characteristic.isNotifying) {
    NSString *stringFromData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    [peripheral readValueForCharacteristic:characteristic];

    NSLog(@"Data ====== %@", @"ccdc");

} else { [centralManager cancelPeripheralConnection:peripheral];
}

edit flag offensive delete publish link more

Comments

Sorry, this doesn't make much sense. You hardly develop iOS application on nRF52 device, so I assume there is something else running on Nordic chip (where you got the FW and what is it doing?) Then your code is probably iOS code which is not mainstream topic here, I'm afraid you will hardly get different answer then "get Nordic example iOS apps from Github, try to make them work as they are first and then continue with little modifications and testing after each change towards your goal".

endnode ( 2017-04-21 00:56:18 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

2 followers

Stats

Asked: 2017-04-20 23:56:34 +0100

Seen: 348 times

Last updated: april 21