diff --git a/android/adapter.c b/android/adapter.c
index cae3187..5621e67 100644
--- a/android/adapter.c
+++ b/android/adapter.c
#include <errno.h>
+#include <glib.h>
+
#include "lib/bluetooth.h"
#include "src/shared/mgmt.h"
#include "lib/mgmt.h"
#include "log.h"
+#include "hal-msg.h"
+#include "ipc.h"
#include "adapter.h"
struct bt_adapter {
return adapter;
}
+
+void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
+ uint16_t len)
+{
+ switch (opcode) {
+ default:
+ ipc_send_error(io, HAL_SERVICE_ID_BLUETOOTH, HAL_ERROR_FAILED);
+ break;
+ }
+}
diff --git a/android/adapter.h b/android/adapter.h
index d8ad191..bfd4932 100644
--- a/android/adapter.h
+++ b/android/adapter.h
bool bt_adapter_init(uint16_t index, struct mgmt *mgmt_if,
bt_adapter_ready func);
+
+void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
+ uint16_t len);
diff --git a/android/main.c b/android/main.c
index d4916ca..f3e2baa 100644
--- a/android/main.c
+++ b/android/main.c
case HAL_SERVICE_ID_CORE:
handle_service_core(msg->opcode, buf + sizeof(*msg), msg->len);
break;
+ case HAL_SERVICE_ID_BLUETOOTH:
+ bt_adapter_handle_cmd(hal_cmd_io, msg->opcode, msg->payload,
+ msg->len);
+ break;
default:
ipc_send_error(hal_cmd_io, msg->service_id, HAL_ERROR_FAILED);
break;