Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] android: Make toool compile on Android 4.2.2
@ 2013-10-17  7:11 Andrei Emeltchenko
  2013-10-17  7:11 ` [PATCH 2/2] android: trivial typo fix Andrei Emeltchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Andrei Emeltchenko @ 2013-10-17  7:11 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

On our current target the tools cannot be compiled.
---
 android/client/if-bt.c    |    4 ++++
 android/client/if-main.h  |    3 +++
 android/client/textconv.c |    2 ++
 3 files changed, 9 insertions(+)

diff --git a/android/client/if-bt.c b/android/client/if-bt.c
index a0a4bd9..7b4e71e 100644
--- a/android/client/if-bt.c
+++ b/android/client/if-bt.c
@@ -277,7 +277,9 @@ static bt_callbacks_t bt_callbacks = {
 	.acl_state_changed_cb = acl_state_changed_cb,
 	.thread_evt_cb = thread_evt_cb,
 	.dut_mode_recv_cb = dut_mode_recv_cb,
+#if PLATFORM_SDK_VERSION > 17
 	.le_test_mode_cb = le_test_mode_cb
+#endif
 };
 
 static void init_p(int argc, const char **argv)
@@ -577,8 +579,10 @@ static void get_profile_interface_p(int argc, const char **argv)
 		pif = &dummy; /* TODO: chenge when if_hh is there */
 	else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
 		pif = &dummy; /* TODO: chenge when if_pan is there */
+#if PLATFORM_SDK_VERSION > 17
 	else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
 		pif = &dummy; /* TODO: chenge when if_rc is there */
+#endif
 	else
 		haltest_error("%s is not correct for get_profile_interface\n",
 		     id);
diff --git a/android/client/if-main.h b/android/client/if-main.h
index 9cac7ef..1cebb72 100644
--- a/android/client/if-main.h
+++ b/android/client/if-main.h
@@ -35,7 +35,10 @@
 #include <hardware/bt_sock.h>
 #include <hardware/bt_hf.h>
 #include <hardware/bt_hl.h>
+
+#if PLATFORM_SDK_VERSION > 17
 #include <hardware/bt_rc.h>
+#endif
 
 #include "textconv.h"
 
diff --git a/android/client/textconv.c b/android/client/textconv.c
index eebad70..f38e368 100644
--- a/android/client/textconv.c
+++ b/android/client/textconv.c
@@ -94,7 +94,9 @@ INTMAP(bt_property_type_t, -1, "(unknown)")
 	DELEMENT(BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT),
 	DELEMENT(BT_PROPERTY_REMOTE_FRIENDLY_NAME),
 	DELEMENT(BT_PROPERTY_REMOTE_RSSI),
+#if PLATFORM_SDK_VERSION > 17
 	DELEMENT(BT_PROPERTY_REMOTE_VERSION_INFO),
+#endif
 	DELEMENT(BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP),
 ENDMAP
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] android: trivial typo fix
  2013-10-17  7:11 [PATCH 1/2] android: Make toool compile on Android 4.2.2 Andrei Emeltchenko
@ 2013-10-17  7:11 ` Andrei Emeltchenko
  2013-10-17  8:06 ` [PATCH 1/2] android: Make toool compile on Android 4.2.2 Jerzy Kasenberg
  2013-10-17  8:50 ` [PATCHv2 0/2] Fxies for Android client tool Andrei Emeltchenko
  2 siblings, 0 replies; 11+ messages in thread
From: Andrei Emeltchenko @ 2013-10-17  7:11 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

---
 android/client/if-bt.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/android/client/if-bt.c b/android/client/if-bt.c
index 7b4e71e..6aadeef 100644
--- a/android/client/if-bt.c
+++ b/android/client/if-bt.c
@@ -568,20 +568,20 @@ static void get_profile_interface_p(int argc, const char **argv)
 	RETURN_IF_NULL(if_bluetooth);
 
 	if (strcmp(BT_PROFILE_HANDSFREE_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_hf is there */
+		pif = &dummy; /* TODO: change when if_hf is there */
 	else if (strcmp(BT_PROFILE_ADVANCED_AUDIO_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_av is there */
+		pif = &dummy; /* TODO: change when if_av is there */
 	else if (strcmp(BT_PROFILE_HEALTH_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_hl is there */
+		pif = &dummy; /* TODO: change when if_hl is there */
 	else if (strcmp(BT_PROFILE_SOCKETS_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_sock is there */
+		pif = &dummy; /* TODO: change when if_sock is there */
 	else if (strcmp(BT_PROFILE_HIDHOST_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_hh is there */
+		pif = &dummy; /* TODO: change when if_hh is there */
 	else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_pan is there */
+		pif = &dummy; /* TODO: change when if_pan is there */
 #if PLATFORM_SDK_VERSION > 17
 	else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_rc is there */
+		pif = &dummy; /* TODO: change when if_rc is there */
 #endif
 	else
 		haltest_error("%s is not correct for get_profile_interface\n",
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] android: Make toool compile on Android 4.2.2
  2013-10-17  7:11 [PATCH 1/2] android: Make toool compile on Android 4.2.2 Andrei Emeltchenko
  2013-10-17  7:11 ` [PATCH 2/2] android: trivial typo fix Andrei Emeltchenko
@ 2013-10-17  8:06 ` Jerzy Kasenberg
  2013-10-17  8:11   ` Andrei Emeltchenko
  2013-10-17  8:50 ` [PATCHv2 0/2] Fxies for Android client tool Andrei Emeltchenko
  2 siblings, 1 reply; 11+ messages in thread
From: Jerzy Kasenberg @ 2013-10-17  8:06 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

Shouldn't PLATFORM_SDK_VERSION be defined in Android.mk?

LOCAL_CFLAGS := -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)

-- 
Best regards
Jerzy Kasenberg

On 17 October 2013 09:11, Andrei Emeltchenko
<Andrei.Emeltchenko.news@gmail.com> wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> On our current target the tools cannot be compiled.
> ---
>  android/client/if-bt.c    |    4 ++++
>  android/client/if-main.h  |    3 +++
>  android/client/textconv.c |    2 ++
>  3 files changed, 9 insertions(+)
>
> diff --git a/android/client/if-bt.c b/android/client/if-bt.c
> index a0a4bd9..7b4e71e 100644
> --- a/android/client/if-bt.c
> +++ b/android/client/if-bt.c
> @@ -277,7 +277,9 @@ static bt_callbacks_t bt_callbacks = {
>         .acl_state_changed_cb = acl_state_changed_cb,
>         .thread_evt_cb = thread_evt_cb,
>         .dut_mode_recv_cb = dut_mode_recv_cb,
> +#if PLATFORM_SDK_VERSION > 17
>         .le_test_mode_cb = le_test_mode_cb
> +#endif
>  };
>
>  static void init_p(int argc, const char **argv)
> @@ -577,8 +579,10 @@ static void get_profile_interface_p(int argc, const char **argv)
>                 pif = &dummy; /* TODO: chenge when if_hh is there */
>         else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
>                 pif = &dummy; /* TODO: chenge when if_pan is there */
> +#if PLATFORM_SDK_VERSION > 17
>         else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
>                 pif = &dummy; /* TODO: chenge when if_rc is there */
> +#endif
>         else
>                 haltest_error("%s is not correct for get_profile_interface\n",
>                      id);
> diff --git a/android/client/if-main.h b/android/client/if-main.h
> index 9cac7ef..1cebb72 100644
> --- a/android/client/if-main.h
> +++ b/android/client/if-main.h
> @@ -35,7 +35,10 @@
>  #include <hardware/bt_sock.h>
>  #include <hardware/bt_hf.h>
>  #include <hardware/bt_hl.h>
> +
> +#if PLATFORM_SDK_VERSION > 17
>  #include <hardware/bt_rc.h>
> +#endif
>
>  #include "textconv.h"
>
> diff --git a/android/client/textconv.c b/android/client/textconv.c
> index eebad70..f38e368 100644
> --- a/android/client/textconv.c
> +++ b/android/client/textconv.c
> @@ -94,7 +94,9 @@ INTMAP(bt_property_type_t, -1, "(unknown)")
>         DELEMENT(BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT),
>         DELEMENT(BT_PROPERTY_REMOTE_FRIENDLY_NAME),
>         DELEMENT(BT_PROPERTY_REMOTE_RSSI),
> +#if PLATFORM_SDK_VERSION > 17
>         DELEMENT(BT_PROPERTY_REMOTE_VERSION_INFO),
> +#endif
>         DELEMENT(BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP),
>  ENDMAP
>
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] android: Make toool compile on Android 4.2.2
  2013-10-17  8:06 ` [PATCH 1/2] android: Make toool compile on Android 4.2.2 Jerzy Kasenberg
@ 2013-10-17  8:11   ` Andrei Emeltchenko
  2013-10-17  8:16     ` Jerzy Kasenberg
  0 siblings, 1 reply; 11+ messages in thread
From: Andrei Emeltchenko @ 2013-10-17  8:11 UTC (permalink / raw)
  To: Jerzy Kasenberg; +Cc: linux-bluetooth

Hi Jerzy,

On Thu, Oct 17, 2013 at 10:06:52AM +0200, Jerzy Kasenberg wrote:
> Hi Andrei,
> 
> Shouldn't PLATFORM_SDK_VERSION be defined in Android.mk?

No, it works as is for me. Do you have errors?

Best regards 
Andrei Emeltchenko 

> 
> LOCAL_CFLAGS := -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
> 
> -- 
> Best regards
> Jerzy Kasenberg
> 
> On 17 October 2013 09:11, Andrei Emeltchenko
> <Andrei.Emeltchenko.news@gmail.com> wrote:
> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> >
> > On our current target the tools cannot be compiled.
> > ---
> >  android/client/if-bt.c    |    4 ++++
> >  android/client/if-main.h  |    3 +++
> >  android/client/textconv.c |    2 ++
> >  3 files changed, 9 insertions(+)
> >
> > diff --git a/android/client/if-bt.c b/android/client/if-bt.c
> > index a0a4bd9..7b4e71e 100644
> > --- a/android/client/if-bt.c
> > +++ b/android/client/if-bt.c
> > @@ -277,7 +277,9 @@ static bt_callbacks_t bt_callbacks = {
> >         .acl_state_changed_cb = acl_state_changed_cb,
> >         .thread_evt_cb = thread_evt_cb,
> >         .dut_mode_recv_cb = dut_mode_recv_cb,
> > +#if PLATFORM_SDK_VERSION > 17
> >         .le_test_mode_cb = le_test_mode_cb
> > +#endif
> >  };
> >
> >  static void init_p(int argc, const char **argv)
> > @@ -577,8 +579,10 @@ static void get_profile_interface_p(int argc, const char **argv)
> >                 pif = &dummy; /* TODO: chenge when if_hh is there */
> >         else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
> >                 pif = &dummy; /* TODO: chenge when if_pan is there */
> > +#if PLATFORM_SDK_VERSION > 17
> >         else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
> >                 pif = &dummy; /* TODO: chenge when if_rc is there */
> > +#endif
> >         else
> >                 haltest_error("%s is not correct for get_profile_interface\n",
> >                      id);
> > diff --git a/android/client/if-main.h b/android/client/if-main.h
> > index 9cac7ef..1cebb72 100644
> > --- a/android/client/if-main.h
> > +++ b/android/client/if-main.h
> > @@ -35,7 +35,10 @@
> >  #include <hardware/bt_sock.h>
> >  #include <hardware/bt_hf.h>
> >  #include <hardware/bt_hl.h>
> > +
> > +#if PLATFORM_SDK_VERSION > 17
> >  #include <hardware/bt_rc.h>
> > +#endif
> >
> >  #include "textconv.h"
> >
> > diff --git a/android/client/textconv.c b/android/client/textconv.c
> > index eebad70..f38e368 100644
> > --- a/android/client/textconv.c
> > +++ b/android/client/textconv.c
> > @@ -94,7 +94,9 @@ INTMAP(bt_property_type_t, -1, "(unknown)")
> >         DELEMENT(BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT),
> >         DELEMENT(BT_PROPERTY_REMOTE_FRIENDLY_NAME),
> >         DELEMENT(BT_PROPERTY_REMOTE_RSSI),
> > +#if PLATFORM_SDK_VERSION > 17
> >         DELEMENT(BT_PROPERTY_REMOTE_VERSION_INFO),
> > +#endif
> >         DELEMENT(BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP),
> >  ENDMAP
> >
> > --
> > 1.7.10.4
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] android: Make toool compile on Android 4.2.2
  2013-10-17  8:11   ` Andrei Emeltchenko
@ 2013-10-17  8:16     ` Jerzy Kasenberg
  2013-10-17  8:28       ` Andrei Emeltchenko
  0 siblings, 1 reply; 11+ messages in thread
From: Jerzy Kasenberg @ 2013-10-17  8:16 UTC (permalink / raw)
  To: Andrei Emeltchenko, Jerzy Kasenberg, linux-bluetooth

Hi Andrei,

No error, but since it's not defined code is never included in version above 17

-- 
Best regards
Jerzy Kasenberg

On 17 October 2013 10:11, Andrei Emeltchenko
<Andrei.Emeltchenko.news@gmail.com> wrote:
> Hi Jerzy,
>
> On Thu, Oct 17, 2013 at 10:06:52AM +0200, Jerzy Kasenberg wrote:
>> Hi Andrei,
>>
>> Shouldn't PLATFORM_SDK_VERSION be defined in Android.mk?
>
> No, it works as is for me. Do you have errors?
>
> Best regards
> Andrei Emeltchenko
>
>>
>> LOCAL_CFLAGS := -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
>>
>> --
>> Best regards
>> Jerzy Kasenberg
>>
>> On 17 October 2013 09:11, Andrei Emeltchenko
>> <Andrei.Emeltchenko.news@gmail.com> wrote:
>> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>> >
>> > On our current target the tools cannot be compiled.
>> > ---
>> >  android/client/if-bt.c    |    4 ++++
>> >  android/client/if-main.h  |    3 +++
>> >  android/client/textconv.c |    2 ++
>> >  3 files changed, 9 insertions(+)
>> >
>> > diff --git a/android/client/if-bt.c b/android/client/if-bt.c
>> > index a0a4bd9..7b4e71e 100644
>> > --- a/android/client/if-bt.c
>> > +++ b/android/client/if-bt.c
>> > @@ -277,7 +277,9 @@ static bt_callbacks_t bt_callbacks = {
>> >         .acl_state_changed_cb = acl_state_changed_cb,
>> >         .thread_evt_cb = thread_evt_cb,
>> >         .dut_mode_recv_cb = dut_mode_recv_cb,
>> > +#if PLATFORM_SDK_VERSION > 17
>> >         .le_test_mode_cb = le_test_mode_cb
>> > +#endif
>> >  };
>> >
>> >  static void init_p(int argc, const char **argv)
>> > @@ -577,8 +579,10 @@ static void get_profile_interface_p(int argc, const char **argv)
>> >                 pif = &dummy; /* TODO: chenge when if_hh is there */
>> >         else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
>> >                 pif = &dummy; /* TODO: chenge when if_pan is there */
>> > +#if PLATFORM_SDK_VERSION > 17
>> >         else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
>> >                 pif = &dummy; /* TODO: chenge when if_rc is there */
>> > +#endif
>> >         else
>> >                 haltest_error("%s is not correct for get_profile_interface\n",
>> >                      id);
>> > diff --git a/android/client/if-main.h b/android/client/if-main.h
>> > index 9cac7ef..1cebb72 100644
>> > --- a/android/client/if-main.h
>> > +++ b/android/client/if-main.h
>> > @@ -35,7 +35,10 @@
>> >  #include <hardware/bt_sock.h>
>> >  #include <hardware/bt_hf.h>
>> >  #include <hardware/bt_hl.h>
>> > +
>> > +#if PLATFORM_SDK_VERSION > 17
>> >  #include <hardware/bt_rc.h>
>> > +#endif
>> >
>> >  #include "textconv.h"
>> >
>> > diff --git a/android/client/textconv.c b/android/client/textconv.c
>> > index eebad70..f38e368 100644
>> > --- a/android/client/textconv.c
>> > +++ b/android/client/textconv.c
>> > @@ -94,7 +94,9 @@ INTMAP(bt_property_type_t, -1, "(unknown)")
>> >         DELEMENT(BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT),
>> >         DELEMENT(BT_PROPERTY_REMOTE_FRIENDLY_NAME),
>> >         DELEMENT(BT_PROPERTY_REMOTE_RSSI),
>> > +#if PLATFORM_SDK_VERSION > 17
>> >         DELEMENT(BT_PROPERTY_REMOTE_VERSION_INFO),
>> > +#endif
>> >         DELEMENT(BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP),
>> >  ENDMAP
>> >
>> > --
>> > 1.7.10.4
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> > the body of a message to majordomo@vger.kernel.org
>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] android: Make toool compile on Android 4.2.2
  2013-10-17  8:16     ` Jerzy Kasenberg
@ 2013-10-17  8:28       ` Andrei Emeltchenko
  0 siblings, 0 replies; 11+ messages in thread
From: Andrei Emeltchenko @ 2013-10-17  8:28 UTC (permalink / raw)
  To: Jerzy Kasenberg; +Cc: linux-bluetooth

On Thu, Oct 17, 2013 at 10:16:18AM +0200, Jerzy Kasenberg wrote:
> Hi Andrei,
> 
> No error, but since it's not defined code is never included in version above 17
>

OK, got it. I thought those flags are added automatically to build by
Android.

Best regards 
Andrei Emeltchenko  
> -- 
> Best regards
> Jerzy Kasenberg
> 
> On 17 October 2013 10:11, Andrei Emeltchenko
> <Andrei.Emeltchenko.news@gmail.com> wrote:
> > Hi Jerzy,
> >
> > On Thu, Oct 17, 2013 at 10:06:52AM +0200, Jerzy Kasenberg wrote:
> >> Hi Andrei,
> >>
> >> Shouldn't PLATFORM_SDK_VERSION be defined in Android.mk?
> >
> > No, it works as is for me. Do you have errors?
> >
> > Best regards
> > Andrei Emeltchenko
> >
> >>
> >> LOCAL_CFLAGS := -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
> >>
> >> --
> >> Best regards
> >> Jerzy Kasenberg
> >>
> >> On 17 October 2013 09:11, Andrei Emeltchenko
> >> <Andrei.Emeltchenko.news@gmail.com> wrote:
> >> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> >> >
> >> > On our current target the tools cannot be compiled.
> >> > ---
> >> >  android/client/if-bt.c    |    4 ++++
> >> >  android/client/if-main.h  |    3 +++
> >> >  android/client/textconv.c |    2 ++
> >> >  3 files changed, 9 insertions(+)
> >> >
> >> > diff --git a/android/client/if-bt.c b/android/client/if-bt.c
> >> > index a0a4bd9..7b4e71e 100644
> >> > --- a/android/client/if-bt.c
> >> > +++ b/android/client/if-bt.c
> >> > @@ -277,7 +277,9 @@ static bt_callbacks_t bt_callbacks = {
> >> >         .acl_state_changed_cb = acl_state_changed_cb,
> >> >         .thread_evt_cb = thread_evt_cb,
> >> >         .dut_mode_recv_cb = dut_mode_recv_cb,
> >> > +#if PLATFORM_SDK_VERSION > 17
> >> >         .le_test_mode_cb = le_test_mode_cb
> >> > +#endif
> >> >  };
> >> >
> >> >  static void init_p(int argc, const char **argv)
> >> > @@ -577,8 +579,10 @@ static void get_profile_interface_p(int argc, const char **argv)
> >> >                 pif = &dummy; /* TODO: chenge when if_hh is there */
> >> >         else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
> >> >                 pif = &dummy; /* TODO: chenge when if_pan is there */
> >> > +#if PLATFORM_SDK_VERSION > 17
> >> >         else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
> >> >                 pif = &dummy; /* TODO: chenge when if_rc is there */
> >> > +#endif
> >> >         else
> >> >                 haltest_error("%s is not correct for get_profile_interface\n",
> >> >                      id);
> >> > diff --git a/android/client/if-main.h b/android/client/if-main.h
> >> > index 9cac7ef..1cebb72 100644
> >> > --- a/android/client/if-main.h
> >> > +++ b/android/client/if-main.h
> >> > @@ -35,7 +35,10 @@
> >> >  #include <hardware/bt_sock.h>
> >> >  #include <hardware/bt_hf.h>
> >> >  #include <hardware/bt_hl.h>
> >> > +
> >> > +#if PLATFORM_SDK_VERSION > 17
> >> >  #include <hardware/bt_rc.h>
> >> > +#endif
> >> >
> >> >  #include "textconv.h"
> >> >
> >> > diff --git a/android/client/textconv.c b/android/client/textconv.c
> >> > index eebad70..f38e368 100644
> >> > --- a/android/client/textconv.c
> >> > +++ b/android/client/textconv.c
> >> > @@ -94,7 +94,9 @@ INTMAP(bt_property_type_t, -1, "(unknown)")
> >> >         DELEMENT(BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT),
> >> >         DELEMENT(BT_PROPERTY_REMOTE_FRIENDLY_NAME),
> >> >         DELEMENT(BT_PROPERTY_REMOTE_RSSI),
> >> > +#if PLATFORM_SDK_VERSION > 17
> >> >         DELEMENT(BT_PROPERTY_REMOTE_VERSION_INFO),
> >> > +#endif
> >> >         DELEMENT(BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP),
> >> >  ENDMAP
> >> >
> >> > --
> >> > 1.7.10.4
> >> >
> >> > --
> >> > To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> >> > the body of a message to majordomo@vger.kernel.org
> >> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCHv2 0/2] Fxies for Android client tool
  2013-10-17  7:11 [PATCH 1/2] android: Make toool compile on Android 4.2.2 Andrei Emeltchenko
  2013-10-17  7:11 ` [PATCH 2/2] android: trivial typo fix Andrei Emeltchenko
  2013-10-17  8:06 ` [PATCH 1/2] android: Make toool compile on Android 4.2.2 Jerzy Kasenberg
@ 2013-10-17  8:50 ` Andrei Emeltchenko
  2013-10-17  8:50   ` [PATCHv2 1/2] android: trivial typo fix Andrei Emeltchenko
  2013-10-17  8:50   ` [PATCHv2 2/2] android: Make toool compile on Android 4.2.2 Andrei Emeltchenko
  2 siblings, 2 replies; 11+ messages in thread
From: Andrei Emeltchenko @ 2013-10-17  8:50 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

Make tool buildable on android-ia and trivial typo fix.

Changes:
	* v2: Fixed issue not including files for 4.3 reported by Jerzy.

Andrei Emeltchenko (2):
  android: trivial typo fix
  android: Make toool compile on Android 4.2.2

 android/Android.mk        |    2 ++
 android/client/if-bt.c    |   18 +++++++++++-------
 android/client/if-main.h  |    3 +++
 android/client/textconv.c |    2 ++
 4 files changed, 18 insertions(+), 7 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCHv2 1/2] android: trivial typo fix
  2013-10-17  8:50 ` [PATCHv2 0/2] Fxies for Android client tool Andrei Emeltchenko
@ 2013-10-17  8:50   ` Andrei Emeltchenko
  2013-10-17 11:59     ` Johan Hedberg
  2013-10-17  8:50   ` [PATCHv2 2/2] android: Make toool compile on Android 4.2.2 Andrei Emeltchenko
  1 sibling, 1 reply; 11+ messages in thread
From: Andrei Emeltchenko @ 2013-10-17  8:50 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

---
 android/client/if-bt.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/android/client/if-bt.c b/android/client/if-bt.c
index a0a4bd9..90ef732 100644
--- a/android/client/if-bt.c
+++ b/android/client/if-bt.c
@@ -566,19 +566,19 @@ static void get_profile_interface_p(int argc, const char **argv)
 	RETURN_IF_NULL(if_bluetooth);
 
 	if (strcmp(BT_PROFILE_HANDSFREE_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_hf is there */
+		pif = &dummy; /* TODO: change when if_hf is there */
 	else if (strcmp(BT_PROFILE_ADVANCED_AUDIO_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_av is there */
+		pif = &dummy; /* TODO: change when if_av is there */
 	else if (strcmp(BT_PROFILE_HEALTH_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_hl is there */
+		pif = &dummy; /* TODO: change when if_hl is there */
 	else if (strcmp(BT_PROFILE_SOCKETS_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_sock is there */
+		pif = &dummy; /* TODO: change when if_sock is there */
 	else if (strcmp(BT_PROFILE_HIDHOST_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_hh is there */
+		pif = &dummy; /* TODO: change when if_hh is there */
 	else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_pan is there */
+		pif = &dummy; /* TODO: change when if_pan is there */
 	else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
-		pif = &dummy; /* TODO: chenge when if_rc is there */
+		pif = &dummy; /* TODO: change when if_rc is there */
 	else
 		haltest_error("%s is not correct for get_profile_interface\n",
 		     id);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCHv2 2/2] android: Make toool compile on Android 4.2.2
  2013-10-17  8:50 ` [PATCHv2 0/2] Fxies for Android client tool Andrei Emeltchenko
  2013-10-17  8:50   ` [PATCHv2 1/2] android: trivial typo fix Andrei Emeltchenko
@ 2013-10-17  8:50   ` Andrei Emeltchenko
  2013-10-18  8:09     ` Szymon Janc
  1 sibling, 1 reply; 11+ messages in thread
From: Andrei Emeltchenko @ 2013-10-17  8:50 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

On our current target the tools cannot be compiled.
---
 android/Android.mk        |    2 ++
 android/client/if-bt.c    |    4 ++++
 android/client/if-main.h  |    3 +++
 android/client/textconv.c |    2 ++
 4 files changed, 11 insertions(+)

diff --git a/android/Android.mk b/android/Android.mk
index f59afc6..e63add9 100644
--- a/android/Android.mk
+++ b/android/Android.mk
@@ -92,6 +92,8 @@ LOCAL_SRC_FILES := \
 	client/textconv.c \
 	client/if-bt.c \
 
+LOCAL_CFLAGS := -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
+
 LOCAL_SHARED_LIBRARIES := libhardware
 
 LOCAL_MODULE_TAGS := optional
diff --git a/android/client/if-bt.c b/android/client/if-bt.c
index 90ef732..6aadeef 100644
--- a/android/client/if-bt.c
+++ b/android/client/if-bt.c
@@ -277,7 +277,9 @@ static bt_callbacks_t bt_callbacks = {
 	.acl_state_changed_cb = acl_state_changed_cb,
 	.thread_evt_cb = thread_evt_cb,
 	.dut_mode_recv_cb = dut_mode_recv_cb,
+#if PLATFORM_SDK_VERSION > 17
 	.le_test_mode_cb = le_test_mode_cb
+#endif
 };
 
 static void init_p(int argc, const char **argv)
@@ -577,8 +579,10 @@ static void get_profile_interface_p(int argc, const char **argv)
 		pif = &dummy; /* TODO: change when if_hh is there */
 	else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
 		pif = &dummy; /* TODO: change when if_pan is there */
+#if PLATFORM_SDK_VERSION > 17
 	else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
 		pif = &dummy; /* TODO: change when if_rc is there */
+#endif
 	else
 		haltest_error("%s is not correct for get_profile_interface\n",
 		     id);
diff --git a/android/client/if-main.h b/android/client/if-main.h
index 9cac7ef..1cebb72 100644
--- a/android/client/if-main.h
+++ b/android/client/if-main.h
@@ -35,7 +35,10 @@
 #include <hardware/bt_sock.h>
 #include <hardware/bt_hf.h>
 #include <hardware/bt_hl.h>
+
+#if PLATFORM_SDK_VERSION > 17
 #include <hardware/bt_rc.h>
+#endif
 
 #include "textconv.h"
 
diff --git a/android/client/textconv.c b/android/client/textconv.c
index eebad70..f38e368 100644
--- a/android/client/textconv.c
+++ b/android/client/textconv.c
@@ -94,7 +94,9 @@ INTMAP(bt_property_type_t, -1, "(unknown)")
 	DELEMENT(BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT),
 	DELEMENT(BT_PROPERTY_REMOTE_FRIENDLY_NAME),
 	DELEMENT(BT_PROPERTY_REMOTE_RSSI),
+#if PLATFORM_SDK_VERSION > 17
 	DELEMENT(BT_PROPERTY_REMOTE_VERSION_INFO),
+#endif
 	DELEMENT(BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP),
 ENDMAP
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCHv2 1/2] android: trivial typo fix
  2013-10-17  8:50   ` [PATCHv2 1/2] android: trivial typo fix Andrei Emeltchenko
@ 2013-10-17 11:59     ` Johan Hedberg
  0 siblings, 0 replies; 11+ messages in thread
From: Johan Hedberg @ 2013-10-17 11:59 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

On Thu, Oct 17, 2013, Andrei Emeltchenko wrote:
> ---
>  android/client/if-bt.c |   14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

This patch has been applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCHv2 2/2] android: Make toool compile on Android 4.2.2
  2013-10-17  8:50   ` [PATCHv2 2/2] android: Make toool compile on Android 4.2.2 Andrei Emeltchenko
@ 2013-10-18  8:09     ` Szymon Janc
  0 siblings, 0 replies; 11+ messages in thread
From: Szymon Janc @ 2013-10-18  8:09 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> On our current target the tools cannot be compiled.
> ---
>  android/Android.mk        |    2 ++
>  android/client/if-bt.c    |    4 ++++
>  android/client/if-main.h  |    3 +++
>  android/client/textconv.c |    2 ++
>  4 files changed, 11 insertions(+)
> 
> diff --git a/android/Android.mk b/android/Android.mk
> index f59afc6..e63add9 100644
> --- a/android/Android.mk
> +++ b/android/Android.mk
> @@ -92,6 +92,8 @@ LOCAL_SRC_FILES := \
>  	client/textconv.c \
>  	client/if-bt.c \
>  
> +LOCAL_CFLAGS := -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)

I suppose we should also define this for autotools build. Otherwise this
will not be build on Linux.

> +
>  LOCAL_SHARED_LIBRARIES := libhardware
>  
>  LOCAL_MODULE_TAGS := optional
> diff --git a/android/client/if-bt.c b/android/client/if-bt.c
> index 90ef732..6aadeef 100644
> --- a/android/client/if-bt.c
> +++ b/android/client/if-bt.c
> @@ -277,7 +277,9 @@ static bt_callbacks_t bt_callbacks = {
>  	.acl_state_changed_cb = acl_state_changed_cb,
>  	.thread_evt_cb = thread_evt_cb,
>  	.dut_mode_recv_cb = dut_mode_recv_cb,
> +#if PLATFORM_SDK_VERSION > 17
>  	.le_test_mode_cb = le_test_mode_cb
> +#endif
>  };
>  
>  static void init_p(int argc, const char **argv)
> @@ -577,8 +579,10 @@ static void get_profile_interface_p(int argc, const char **argv)
>  		pif = &dummy; /* TODO: change when if_hh is there */
>  	else if (strcmp(BT_PROFILE_PAN_ID, id) == 0)
>  		pif = &dummy; /* TODO: change when if_pan is there */
> +#if PLATFORM_SDK_VERSION > 17
>  	else if (strcmp(BT_PROFILE_AV_RC_ID, id) == 0)
>  		pif = &dummy; /* TODO: change when if_rc is there */
> +#endif
>  	else
>  		haltest_error("%s is not correct for get_profile_interface\n",
>  		     id);
> diff --git a/android/client/if-main.h b/android/client/if-main.h
> index 9cac7ef..1cebb72 100644
> --- a/android/client/if-main.h
> +++ b/android/client/if-main.h
> @@ -35,7 +35,10 @@
>  #include <hardware/bt_sock.h>
>  #include <hardware/bt_hf.h>
>  #include <hardware/bt_hl.h>
> +
> +#if PLATFORM_SDK_VERSION > 17
>  #include <hardware/bt_rc.h>
> +#endif
>  
>  #include "textconv.h"
>  
> diff --git a/android/client/textconv.c b/android/client/textconv.c
> index eebad70..f38e368 100644
> --- a/android/client/textconv.c
> +++ b/android/client/textconv.c
> @@ -94,7 +94,9 @@ INTMAP(bt_property_type_t, -1, "(unknown)")
>  	DELEMENT(BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT),
>  	DELEMENT(BT_PROPERTY_REMOTE_FRIENDLY_NAME),
>  	DELEMENT(BT_PROPERTY_REMOTE_RSSI),
> +#if PLATFORM_SDK_VERSION > 17
>  	DELEMENT(BT_PROPERTY_REMOTE_VERSION_INFO),
> +#endif
>  	DELEMENT(BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP),
>  ENDMAP
>  
> 

-- 
BR
Szymon Janc



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-10-18  8:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17  7:11 [PATCH 1/2] android: Make toool compile on Android 4.2.2 Andrei Emeltchenko
2013-10-17  7:11 ` [PATCH 2/2] android: trivial typo fix Andrei Emeltchenko
2013-10-17  8:06 ` [PATCH 1/2] android: Make toool compile on Android 4.2.2 Jerzy Kasenberg
2013-10-17  8:11   ` Andrei Emeltchenko
2013-10-17  8:16     ` Jerzy Kasenberg
2013-10-17  8:28       ` Andrei Emeltchenko
2013-10-17  8:50 ` [PATCHv2 0/2] Fxies for Android client tool Andrei Emeltchenko
2013-10-17  8:50   ` [PATCHv2 1/2] android: trivial typo fix Andrei Emeltchenko
2013-10-17 11:59     ` Johan Hedberg
2013-10-17  8:50   ` [PATCHv2 2/2] android: Make toool compile on Android 4.2.2 Andrei Emeltchenko
2013-10-18  8:09     ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox