From b92a20c60e5a4409179efc5b659411d3c0c7b6f6 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 1 Sep 2015 16:49:20 +0100 Subject: fix bugs, and better end handling --- ble.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ble.c') diff --git a/ble.c b/ble.c index 7bf7231..24871b9 100644 --- a/ble.c +++ b/ble.c @@ -553,6 +553,23 @@ ble_send_cp (BLE * ble, uint8_t * buf, size_t len) } + +int +ble_send_cp_noresp (BLE * ble, uint8_t * buf, size_t len) +{ + printf ("Sending control:\n"); + hexdump (buf, len); + + if (!bt_gatt_client_write_without_response + (ble->gatt, ble->cp_handle, false, buf, len)) + { + printf ("Failed to initiate write procedure\n"); + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} + + #if 0 int ble_send_data (BLE * ble, uint8_t * buf, size_t len) -- cgit v1.2.3