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

How can I write characteristic values int or float from central

Hi I am using the SDK 12 and I am doing some test using the experimiental_app_ble_blinky central and peripheral parts.

I see in this example it use boolean values to indicate estatus.

If I modify the size the characteristics how can I write(central side) values int or float in case I want to sent 6 characters.

err_code = ble_lbs_led_status_send(&m_ble_lbs_c,button_action);

button_action allow just boolean type I cant see where change it

thanks

Parents
  • I edited the size in the peripheral side and in the central(client) side I did the following:

    enter code herep_msg->req.write_req.gattc_value[0]        = status;		
    p_msg->req.write_req.gattc_value[1]        = 0x01;
    p_msg->req.write_req.gattc_value[2]        = 0x02;
    

    for testing so after this change I am not able to receive in the peripheral the written cmd. and after this when I tried to notificate to the central I got fatal error in the peripheral side

Reply
  • I edited the size in the peripheral side and in the central(client) side I did the following:

    enter code herep_msg->req.write_req.gattc_value[0]        = status;		
    p_msg->req.write_req.gattc_value[1]        = 0x01;
    p_msg->req.write_req.gattc_value[2]        = 0x02;
    

    for testing so after this change I am not able to receive in the peripheral the written cmd. and after this when I tried to notificate to the central I got fatal error in the peripheral side

Children
No Data
Related