This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

why ble_lbs example button service not responding

I am trying to test the ble_lbs example to understand the basic working principle of the ble custom service using NAN_36 document after compilation followed by the procedure given in the github succed to flash the program in the NRF51DK and i can able to connect it to the MCP once i made connection and bonding i checked the LED characteristics when i write LED off it turn of the LED and viceversa for turn On the LED but it is completely opposite for the button service i press the button on the NRF51DK it is always showing invalid value(0x)04 hardly it being a new leaner its difficult to understand based on the document on some other questions i cma e to know about he concept of this example but whenever i press the button nothing gets changed on the MCP can anybody please provide me some assistance it would be useful for meimage description

  • Hi Karan,

    I saw your pvt msg, and I see that you are very keen to learn about this LBS service. The best way to learn is to put a breakpoint inside the funtion ble_lbs_on_button_change and start your program in debug mode. When you connect, bond, discover and enable services, you press the button. Then you will hit your breakpoint and see what data you are transmitting

    params.p_data = &button_state;
    params.p_len = &len;
    

    button state is the value that is being shown as Invalid value.

    If you want to debug it i recommend you to compile your code with zero optimization. image description. If you have problems then there are more helping users here on forum. It is always good that you are trying to learn new things.

Related