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

Add a supplementary button and led on Blinky android ap

How can I add an extra button and led on Blinky Android app ?

i did that for nrf-ble-blinky example, but I do not know what to do for the Android app

Parents Reply Children
  • Hi

    The LBS service is configured by ble_lbs.c, in the function called ble_lbs_init(..)

    Both the button and LED characteristic supports a single byte only, but you can change this by modifying the init_len and max_len fields in the add_char_params struct to a higher value, and making sure the is_var_len field is set to true to allow variably sized updates. 

    Then you should be able to send strings of varying lengths from the nRF52 side to the phone, and vice versa. 

    For reference please have a look at the ble_app_uart example which uses the ble_nus.c service implementation. It is very similar to the blinky service, except it uses variably sized characteristics for TX and RX, rather than single byte characteristics.

    Best regards
    Torbjørn

Related