* [PATCH 1/2] android/handsfree-client: Fix connection state defines
@ 2015-02-06 11:29 Szymon Janc
2015-02-06 11:29 ` [PATCH 2/2] android/handsfree-client: Fix missing connected state notification Szymon Janc
2015-02-09 12:31 ` [PATCH 1/2] android/handsfree-client: Fix connection state defines Szymon Janc
0 siblings, 2 replies; 3+ messages in thread
From: Szymon Janc @ 2015-02-06 11:29 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
Connected state was missing.
---
android/hal-ipc-api.txt | 5 +++--
android/hal-msg.h | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
index 515cf4e..77f2f57 100644
--- a/android/hal-ipc-api.txt
+++ b/android/hal-ipc-api.txt
@@ -2473,8 +2473,9 @@ Notifications:
Valid State values: 0x00 = Disconnected
0x01 = Connecting
- 0x02 = SLC Connected
- 0x03 = Disconnecting
+ 0x02 = Connected
+ 0x03 = SLC Connected
+ 0x04 = Disconnecting
Peer Features is a bitmask of the supported features. Currently
available bits:
diff --git a/android/hal-msg.h b/android/hal-msg.h
index ecc1150..0ec07c7 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -2107,8 +2107,9 @@ struct hal_ev_gatt_server_congestion {
#define HAL_HF_CLIENT_CONN_STATE_DISCONNECTED 0x00
#define HAL_HF_CLIENT_CONN_STATE_CONNECTING 0x01
-#define HAL_HF_CLIENT_CONN_STATE_SLC_CONNECTED 0x02
-#define HAL_HF_CLIENT_CONN_STATE_DISCONNECTING 0x03
+#define HAL_HF_CLIENT_CONN_STATE_CONNECTED 0x02
+#define HAL_HF_CLIENT_CONN_STATE_SLC_CONNECTED 0x03
+#define HAL_HF_CLIENT_CONN_STATE_DISCONNECTING 0x04
#define HAL_HF_CLIENT_PEER_FEAT_3WAY 0x00000001
#define HAL_HF_CLIENT_PEER_FEAT_ECNR 0x00000002
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] android/handsfree-client: Fix missing connected state notification
2015-02-06 11:29 [PATCH 1/2] android/handsfree-client: Fix connection state defines Szymon Janc
@ 2015-02-06 11:29 ` Szymon Janc
2015-02-09 12:31 ` [PATCH 1/2] android/handsfree-client: Fix connection state defines Szymon Janc
1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2015-02-06 11:29 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
There is additional state 'connected' that should be entered when
RFCOMM is connected but before SLC is completed.
---
android/handsfree-client.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/android/handsfree-client.c b/android/handsfree-client.c
index e1f2c16..0e2bd40 100644
--- a/android/handsfree-client.c
+++ b/android/handsfree-client.c
@@ -1748,6 +1748,8 @@ static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
goto failed;
}
+ device_set_state(dev, HAL_HF_CLIENT_CONN_STATE_CONNECTED);
+
return;
failed:
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] android/handsfree-client: Fix connection state defines
2015-02-06 11:29 [PATCH 1/2] android/handsfree-client: Fix connection state defines Szymon Janc
2015-02-06 11:29 ` [PATCH 2/2] android/handsfree-client: Fix missing connected state notification Szymon Janc
@ 2015-02-09 12:31 ` Szymon Janc
1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2015-02-09 12:31 UTC (permalink / raw)
To: linux-bluetooth
On Friday 06 of February 2015 12:29:52 Szymon Janc wrote:
> Connected state was missing.
> ---
> android/hal-ipc-api.txt | 5 +++--
> android/hal-msg.h | 5 +++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/android/hal-ipc-api.txt b/android/hal-ipc-api.txt
> index 515cf4e..77f2f57 100644
> --- a/android/hal-ipc-api.txt
> +++ b/android/hal-ipc-api.txt
> @@ -2473,8 +2473,9 @@ Notifications:
>
> Valid State values: 0x00 = Disconnected
> 0x01 = Connecting
> - 0x02 = SLC Connected
> - 0x03 = Disconnecting
> + 0x02 = Connected
> + 0x03 = SLC Connected
> + 0x04 = Disconnecting
>
> Peer Features is a bitmask of the supported features. Currently
> available bits:
> diff --git a/android/hal-msg.h b/android/hal-msg.h
> index ecc1150..0ec07c7 100644
> --- a/android/hal-msg.h
> +++ b/android/hal-msg.h
> @@ -2107,8 +2107,9 @@ struct hal_ev_gatt_server_congestion {
>
> #define HAL_HF_CLIENT_CONN_STATE_DISCONNECTED 0x00
> #define HAL_HF_CLIENT_CONN_STATE_CONNECTING 0x01
> -#define HAL_HF_CLIENT_CONN_STATE_SLC_CONNECTED 0x02
> -#define HAL_HF_CLIENT_CONN_STATE_DISCONNECTING 0x03
> +#define HAL_HF_CLIENT_CONN_STATE_CONNECTED 0x02
> +#define HAL_HF_CLIENT_CONN_STATE_SLC_CONNECTED 0x03
> +#define HAL_HF_CLIENT_CONN_STATE_DISCONNECTING 0x04
>
> #define HAL_HF_CLIENT_PEER_FEAT_3WAY 0x00000001
> #define HAL_HF_CLIENT_PEER_FEAT_ECNR 0x00000002
Both applied.
--
BR
Szymon Janc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-09 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-06 11:29 [PATCH 1/2] android/handsfree-client: Fix connection state defines Szymon Janc
2015-02-06 11:29 ` [PATCH 2/2] android/handsfree-client: Fix missing connected state notification Szymon Janc
2015-02-09 12:31 ` [PATCH 1/2] android/handsfree-client: Fix connection state defines Szymon Janc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).