diff --git a/android/gatt.c b/android/gatt.c
index 5a531d9..e930b5a 100644
--- a/android/gatt.c
+++ b/android/gatt.c
/* TODO handle is_direct flag */
+ /* TODO handle transport flag */
+
status = handle_connect(cmd->client_if, &addr);
ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_GATT, HAL_OP_GATT_CLIENT_CONNECT,
diff --git a/android/hal-gatt.c b/android/hal-gatt.c
index 080852a..82093fa 100644
--- a/android/hal-gatt.c
+++ b/android/hal-gatt.c
}
#endif
-static bt_status_t connect(int client_if, const bt_bdaddr_t *bd_addr,
- bool is_direct)
+static bt_status_t connect_real(int client_if, const bt_bdaddr_t *bd_addr,
+ bool is_direct, int transport)
{
struct hal_cmd_gatt_client_connect cmd;
cmd.client_if = client_if;
cmd.is_direct = is_direct;
+ cmd.transport = transport;
memcpy(cmd.bdaddr, bd_addr, sizeof(*bd_addr));
sizeof(cmd), &cmd, NULL, NULL, NULL);
}
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+static bt_status_t connect(int client_if, const bt_bdaddr_t *bd_addr,
+ bool is_direct, int transport)
+{
+ return connect_real(client_if, bd_addr, is_direct, transport);
+}
+#else
+static bt_status_t connect(int client_if, const bt_bdaddr_t *bd_addr,
+ bool is_direct)
+{
+ return connect_real(client_if, bd_addr, is_direct,
+ BT_TRANSPORT_UNKNOWN);
+}
+#endif
+
static bt_status_t disconnect(int client_if, const bt_bdaddr_t *bd_addr,
int conn_id)
{
diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 3a3ae92..d6e68f1 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
Command parameters: Client Interface (4 octets)
Remote address (6 octets)
Is Direct (1 octet)
+ Transport (4 octets)
Response parameters: <none>
In case of an error, the error response will be returned.
diff --git a/android/hal-msg.h b/android/hal-msg.h
index bcb73b2..8dd00a0 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
int32_t client_if;
uint8_t bdaddr[6];
uint8_t is_direct;
+ int32_t transport;
} __attribute__((packed));
#define HAL_OP_GATT_CLIENT_DISCONNECT 0x05