From 2fcb0e39032df5c1b72e4523fddfdf29f1a816ce Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Tue, 19 Nov 2013 16:51:49 +0100 Subject: [PATCH] android/hal-bluetooth: Add support for dut mode configure command This command is used to enter or exit DUT mode. --- android/hal-bluetooth.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c index c74a9b3d2..bd7d25730 100644 --- a/android/hal-bluetooth.c +++ b/android/hal-bluetooth.c @@ -746,12 +746,17 @@ static const void *get_profile_interface(const char *profile_id) static int dut_mode_configure(uint8_t enable) { - DBG(""); + struct hal_cmd_dut_mode_conf cmd; + + DBG("enable %u", enable); if (!interface_ready()) return BT_STATUS_NOT_READY; - return BT_STATUS_UNSUPPORTED; + cmd.enable = enable; + + return hal_ipc_cmd(HAL_SERVICE_ID_BLUETOOTH, HAL_OP_DUT_MODE_CONF, + sizeof(cmd), &cmd, 0, NULL, NULL); } static int dut_mode_send(uint16_t opcode, uint8_t *buf, uint8_t len) -- 2.47.3