This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF Toolkit on Android + nRF51822: error on reading characteristic (1)

I have a custom board with an nRF51822, running the ble_app_hrs from the 12.1.0 SDK with softdevice s130, using the internal RC clock in a custom_board.h as follows:

#define NRF_CLOCK_LFCLKSRC {.source 	= NRF_CLOCK_LF_SRC_RC, \
					        .rc_ctiv 		= 1, 				\
					        .rc_temp_ctiv 	= 1, 				\
					        .xtal_accuracy = 0 }

When I try to connect to the running the device using the Android nRF BLE Toolkit, the device list will show the device, but when I try to connect to it, I get a pop-up saying

Error on reading characteristic (1)

Search as I might, I can't find a reference to this error. What am I doing wrong?

Parents
  • I am having some success:

    If I add the following line of code to the ble_stack_init() function in main.c of the ble_app_hrs project:

       ble_enable_params.gatts_enable_params.service_changed = 0;
    

    then I can connect succesfully to the device using the nRF BLE Toolit from my Android phone. So I'd like to change the question a bit to why this is a fix?

    This question devzone.nordicsemi.com/.../ talks about "Setting the gatts_enable_params.service_changed to 0"

    However even the SDK documentation only says of the service_changed parameter that it "Include[s] the Service Changed characteristic in the Attribute Table." The docs do not say that possibly not clearing this may/will cause an error? What is going on here?

Reply
  • I am having some success:

    If I add the following line of code to the ble_stack_init() function in main.c of the ble_app_hrs project:

       ble_enable_params.gatts_enable_params.service_changed = 0;
    

    then I can connect succesfully to the device using the nRF BLE Toolit from my Android phone. So I'd like to change the question a bit to why this is a fix?

    This question devzone.nordicsemi.com/.../ talks about "Setting the gatts_enable_params.service_changed to 0"

    However even the SDK documentation only says of the service_changed parameter that it "Include[s] the Service Changed characteristic in the Attribute Table." The docs do not say that possibly not clearing this may/will cause an error? What is going on here?

Children
No Data
Related