* Re: [PATCH] android/client: Don't alignt name property while printing
From: Johan Hedberg @ 2013-10-31 13:48 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth
In-Reply-To: <1383225721-7579-1-git-send-email-szymon.janc@tieto.com>
Hi Szymon,
On Thu, Oct 31, 2013, Szymon Janc wrote:
> Received name property is guaranteed to be NULL terminated so there is
> no need to use length specifier. This also fix really long space while
> printing due to text alignment to the right.
> ---
> android/client/if-bt.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied (after the obvious typo fix for the subject). Thanks.
Johan
^ permalink raw reply
* [PATCH] android/hidhost: Fix not unregistering HID
From: Andrei Emeltchenko @ 2013-10-31 13:51 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
If HID is not unregistered it cannot be registered again and we get
following error:
...
E/BluetoothHidServiceJni( 2849): Failed to initialize Bluetooth HID, status: 1
...
---
android/hal-hidhost.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c
index a72410b..a81fea5 100644
--- a/android/hal-hidhost.c
+++ b/android/hal-hidhost.c
@@ -301,12 +301,17 @@ static bt_status_t hh_init(bthh_callbacks_t *callbacks)
static void hh_cleanup(void)
{
+ struct hal_cmd_unregister_module cmd;
+
DBG("");
if (!interface_ready())
return;
bt_hh_cbacks = NULL;
+
+ hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_OP_UNREGISTER_MODULE,
+ sizeof(cmd), &cmd, 0, NULL, NULL);
}
static bthh_interface_t hh_if = {
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH 1/2] Bluetooth: Remove debug statement for features complete event
From: Johan Hedberg @ 2013-10-31 13:56 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <1383220473-33584-1-git-send-email-marcel@holtmann.org>
Hi Marcel,
On Thu, Oct 31, 2013, Marcel Holtmann wrote:
> The complete list of local features are available through debugfs and
> so there is no need to add a debug print here.
>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
> net/bluetooth/hci_event.c | 6 ------
> 1 file changed, 6 deletions(-)
Both patches have been applied to bluetooth-next. Thanks.
Johan
^ permalink raw reply
* [PATCH] android: Add support for setting adapters name
From: Grzegorz Kolodziejczyk @ 2013-10-31 14:00 UTC (permalink / raw)
To: linux-bluetooth
---
android/adapter.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
android/hal-msg.h | 2 ++
2 files changed, 55 insertions(+)
diff --git a/android/adapter.c b/android/adapter.c
index 15b65e5..5dadc2e 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -129,6 +129,27 @@ static void scan_mode_changed(void)
g_free(ev);
}
+static void adapter_name_changed(const uint8_t *name)
+{
+ struct hal_ev_adapter_props_changed *ev;
+ uint8_t buf[sizeof(*ev) + sizeof(struct hal_property) +
+ HAL_MAX_NAME_LENGTH];
+
+ memset(buf, 0, sizeof(buf));
+ ev = (void *) buf;
+
+ ev->num_props = 1;
+ ev->status = HAL_STATUS_SUCCESS;
+ ev->props[0].type = HAL_PROP_ADAPTER_NAME;
+ ev->props[0].len = HAL_MAX_NAME_LENGTH;
+ memcpy(ev->props->val, name, HAL_MAX_NAME_LENGTH);
+
+ DBG("Adapter name changed to: %s", ev->props->val);
+
+ ipc_send(notification_io, HAL_SERVICE_ID_BLUETOOTH,
+ HAL_EV_ADAPTER_PROPS_CHANGED, sizeof(buf), ev, -1);
+}
+
static void settings_changed(uint32_t settings)
{
uint32_t changed_mask;
@@ -286,6 +307,37 @@ static bool set_mode(uint16_t opcode, uint8_t mode)
return false;
}
+static void set_adapter_name_complete(uint8_t status, uint16_t length,
+ const void *param, void *user_data)
+{
+ const struct mgmt_cp_set_local_name *rp = param;
+
+ if (status != MGMT_STATUS_SUCCESS) {
+ error("Failed to set name: %s (0x%02x)",
+ mgmt_errstr(status), status);
+ return;
+ }
+
+ adapter_name_changed(rp->name);
+}
+
+static bool set_adapter_name(uint8_t *name, uint16_t len)
+{
+ struct mgmt_cp_set_local_name cp;
+
+ memset(&cp, 0, sizeof(cp));
+ memcpy(cp.name, name, len);
+
+ if (mgmt_send(adapter->mgmt, MGMT_OP_SET_LOCAL_NAME, adapter->index,
+ sizeof(cp), &cp, set_adapter_name_complete, NULL,
+ NULL) > 0)
+ return true;
+
+ error("Failed to set name");
+
+ return false;
+}
+
static void read_info_complete(uint8_t status, uint16_t length, const void *param,
void *user_data)
{
@@ -472,6 +524,7 @@ static uint8_t set_property(void *buf, uint16_t len)
case HAL_PROP_ADAPTER_SCAN_MODE:
return set_scan_mode(cmd->val, cmd->len);
case HAL_PROP_ADAPTER_NAME:
+ return set_adapter_name(cmd->val, cmd->len);
case HAL_PROP_ADAPTER_DISC_TIMEOUT:
default:
DBG("Unhandled property type 0x%x", cmd->type);
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 80b47d6..506d10c 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -89,6 +89,8 @@ struct hal_cmd_get_adapter_prop {
uint8_t type;
} __attribute__((packed));
+#define HAL_MAX_NAME_LENGTH 249
+
#define HAL_PROP_ADAPTER_NAME 0x01
#define HAL_PROP_ADAPTER_ADDR 0x02
#define HAL_PROP_ADAPTER_UUIDS 0x03
--
1.8.4.1
^ permalink raw reply related
* Re: [PATCH 00/10] Add GATT support to haltest
From: Johan Hedberg @ 2013-10-31 14:03 UTC (permalink / raw)
To: Jerzy Kasenberg; +Cc: linux-bluetooth
In-Reply-To: <1383216315-30627-1-git-send-email-jerzy.kasenberg@tieto.com>
Hi Jerzy,
On Thu, Oct 31, 2013, Jerzy Kasenberg wrote:
> This patachset adds code to call GATT hal methods.
> Compiles on Android 4.3 and host.
> On 4.2 it's source code is not included.
>
> Status that is used in callbacks is currently printed as number.
> This number corresponds to series of defines from file:
> external/bluedroid/stack/include/gatt_api.h
> This file looks like implementation detail for bluedroid.
> It's to be decided it defines should be copied to bluez source code.
> Until that status is printed as numbers.
> Same applies to tGATT_WRITE_TYPE which is used as argument in
> write_characteristic and write_descriptor.
>
> Jerzy Kasenberg (10):
> android/client: Add skeleton for GATT interface
> android/client: Add GATT client callbacks code
> android/client: Add complex GATT type formating
> android/client: Add init/cleanup for GATT
> android/client: Add helper macros to verify args
> android/client: Add GATT client method calls
> android/client: Add GATT complex type parsing
> android/client: Add tab completion to GATT client
> android/client: Add GATT server callbacks code
> android/client: Add GATT server methods
>
> android/Android.mk | 7 +
> android/Makefile.am | 2 +
> android/client/haltest.c | 5 +
> android/client/if-bt.c | 2 +
> android/client/if-gatt.c | 1733 ++++++++++++++++++++++++++++++++++++++++++++++
> android/client/if-main.h | 14 +
> 6 files changed, 1763 insertions(+)
> create mode 100644 android/client/if-gatt.c
All patches have been applied. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] android/hidhost: Fix not unregistering HID
From: Johan Hedberg @ 2013-10-31 14:04 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
In-Reply-To: <1383227514-22944-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
On Thu, Oct 31, 2013, Andrei Emeltchenko wrote:
> If HID is not unregistered it cannot be registered again and we get
> following error:
> ...
> E/BluetoothHidServiceJni( 2849): Failed to initialize Bluetooth HID, status: 1
> ...
> ---
> android/hal-hidhost.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c
> index a72410b..a81fea5 100644
> --- a/android/hal-hidhost.c
> +++ b/android/hal-hidhost.c
> @@ -301,12 +301,17 @@ static bt_status_t hh_init(bthh_callbacks_t *callbacks)
>
> static void hh_cleanup(void)
> {
> + struct hal_cmd_unregister_module cmd;
> +
> DBG("");
>
> if (!interface_ready())
> return;
>
> bt_hh_cbacks = NULL;
> +
> + hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_OP_UNREGISTER_MODULE,
> + sizeof(cmd), &cmd, 0, NULL, NULL);
> }
Did you test this at all? It looks completely broken to me since you
pass an uninitialized variable to hal_ipc_cmd. You should be at least
setting the right service id for HID in the cmd struct.
Johan
^ permalink raw reply
* Re: [PATCH] android/hidhost: Fix not unregistering HID
From: Andrei Emeltchenko @ 2013-10-31 14:08 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <20131031140458.GB27325@x220.p-661hnu-f1>
Hi Johan,
On Thu, Oct 31, 2013 at 04:04:58PM +0200, Johan Hedberg wrote:
> Hi Andrei,
>
> On Thu, Oct 31, 2013, Andrei Emeltchenko wrote:
> > If HID is not unregistered it cannot be registered again and we get
> > following error:
> > ...
> > E/BluetoothHidServiceJni( 2849): Failed to initialize Bluetooth HID, status: 1
> > ...
> > ---
> > android/hal-hidhost.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c
> > index a72410b..a81fea5 100644
> > --- a/android/hal-hidhost.c
> > +++ b/android/hal-hidhost.c
> > @@ -301,12 +301,17 @@ static bt_status_t hh_init(bthh_callbacks_t *callbacks)
> >
> > static void hh_cleanup(void)
> > {
> > + struct hal_cmd_unregister_module cmd;
> > +
> > DBG("");
> >
> > if (!interface_ready())
> > return;
> >
> > bt_hh_cbacks = NULL;
> > +
> > + hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_OP_UNREGISTER_MODULE,
> > + sizeof(cmd), &cmd, 0, NULL, NULL);
> > }
>
> Did you test this at all? It looks completely broken to me since you
> pass an uninitialized variable to hal_ipc_cmd. You should be at least
> setting the right service id for HID in the cmd struct.
Sorry, I will send the right one (after testing)
Best regards
Andrei Emeltchenko
^ permalink raw reply
* RE: l2cap sockets not properly multiplexed on ARM
From: Tim Tisdall @ 2013-10-31 14:14 UTC (permalink / raw)
To: Alexander Holler, Marcel Holtmann; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <D9B9EB3A112B8F489DFFA00A6D5C0FE203241BE2@AD-BR-EX-2.adroot.flemingc.local>
Okay, I got the same issue on an x86 machine running "Linux debian 3.2.0-4-486 #1 Debian 3.2.51-1 i686 GNU/Linux". So, it's not only the ARM machines.
What versions of the kernel are currently supported by the bluetooth team? (ie when there are bug fixes, how far back will you backport those fixes?) Am I coming across some issue that's already been fixed in newer versions of the kernel?
-Tim
^ permalink raw reply
* RE: l2cap sockets not properly multiplexed on ARM
From: Tim Tisdall @ 2013-10-31 14:18 UTC (permalink / raw)
To: Alexander Holler, Marcel Holtmann; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <D9B9EB3A112B8F489DFFA00A6D5C0FE203241C36@AD-BR-EX-2.adroot.flemingc.local>
Sorry, forgot to mention how I set up my testing environment... I download=
ed the latest version of Debian 7.2 which uses the 3.2 kernel and ran it as=
a live image off a USB drive. So, you guys should be able to recreate it =
(if you wish) by snagging http://cdimage.debian.org/debian-cd/current-live/=
i386/iso-hybrid/debian-live-7.2-i386-standard.iso and then following http:/=
/www.debian.org/CD/faq/#write-usb to create a live usb image.=0A=
=0A=
^ permalink raw reply
* Re: l2cap sockets not properly multiplexed on ARM
From: Marcel Holtmann @ 2013-10-31 14:19 UTC (permalink / raw)
To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth@vger.kernel.org
In-Reply-To: <D9B9EB3A112B8F489DFFA00A6D5C0FE203241C36@AD-BR-EX-2.adroot.flemingc.local>
Hi Tim,
> Okay, I got the same issue on an x86 machine running "Linux debian 3.2.0-4-486 #1 Debian 3.2.51-1 i686 GNU/Linux". So, it's not only the ARM machines.
>
> What versions of the kernel are currently supported by the bluetooth team? (ie when there are bug fixes, how far back will you backport those fixes?) Am I coming across some issue that's already been fixed in newer versions of the kernel?
the upstream people are not backporting anything. The closest you get with upstream is if a patch is cheery picked into -stable. For everything else it is the distro’s job to backport.
Regards
Marcel
^ permalink raw reply
* Re: l2cap sockets not properly multiplexed on ARM
From: Marcel Holtmann @ 2013-10-31 14:20 UTC (permalink / raw)
To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth@vger.kernel.org
In-Reply-To: <D9B9EB3A112B8F489DFFA00A6D5C0FE203241BE2@AD-BR-EX-2.adroot.flemingc.local>
Hi Tim,
>> As Anderson Lizardo already mentioned, maybe first verify that the x86
>> kernel 3.4 doesn't have the same problem and that it's really a problem
>> of the ARM kernel. Up to now he didn't say what kernel version he uses
>> on x86.
>
> here's my desktop version:
> $ uname -a
> Linux tzing 3.8.0-32-generic #47-Ubuntu SMP Tue Oct 1 22:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>
> I'm trying to get an older version of the kernel running on another machine and then I'll report back
I actually need to know if bluetooth-next tree still has this issue. That is first and foremost the one thing that needs to be checked.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH] android: Add support for setting adapters name
From: Andrei Emeltchenko @ 2013-10-31 14:21 UTC (permalink / raw)
To: Grzegorz Kolodziejczyk; +Cc: linux-bluetooth
In-Reply-To: <1383228038-4306-1-git-send-email-grzegorz.kolodziejczyk@tieto.com>
Hi Grzegorz,
On Thu, Oct 31, 2013 at 03:00:38PM +0100, Grzegorz Kolodziejczyk wrote:
> ---
> android/adapter.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> android/hal-msg.h | 2 ++
> 2 files changed, 55 insertions(+)
>
> diff --git a/android/adapter.c b/android/adapter.c
> index 15b65e5..5dadc2e 100644
> --- a/android/adapter.c
> +++ b/android/adapter.c
> @@ -129,6 +129,27 @@ static void scan_mode_changed(void)
> g_free(ev);
> }
>
> +static void adapter_name_changed(const uint8_t *name)
> +{
> + struct hal_ev_adapter_props_changed *ev;
> + uint8_t buf[sizeof(*ev) + sizeof(struct hal_property) +
> + HAL_MAX_NAME_LENGTH];
> +
> + memset(buf, 0, sizeof(buf));
> + ev = (void *) buf;
> +
> + ev->num_props = 1;
> + ev->status = HAL_STATUS_SUCCESS;
> + ev->props[0].type = HAL_PROP_ADAPTER_NAME;
> + ev->props[0].len = HAL_MAX_NAME_LENGTH;
Do we need to pass always HAL_MAX_NAME_LENGTH ?
Best regards
Andrei Emeltchenko
> + memcpy(ev->props->val, name, HAL_MAX_NAME_LENGTH);
> +
> + DBG("Adapter name changed to: %s", ev->props->val);
> +
> + ipc_send(notification_io, HAL_SERVICE_ID_BLUETOOTH,
> + HAL_EV_ADAPTER_PROPS_CHANGED, sizeof(buf), ev, -1);
> +}
> +
> static void settings_changed(uint32_t settings)
> {
> uint32_t changed_mask;
> @@ -286,6 +307,37 @@ static bool set_mode(uint16_t opcode, uint8_t mode)
> return false;
> }
>
> +static void set_adapter_name_complete(uint8_t status, uint16_t length,
> + const void *param, void *user_data)
> +{
> + const struct mgmt_cp_set_local_name *rp = param;
> +
> + if (status != MGMT_STATUS_SUCCESS) {
> + error("Failed to set name: %s (0x%02x)",
> + mgmt_errstr(status), status);
> + return;
> + }
> +
> + adapter_name_changed(rp->name);
> +}
> +
> +static bool set_adapter_name(uint8_t *name, uint16_t len)
> +{
> + struct mgmt_cp_set_local_name cp;
> +
> + memset(&cp, 0, sizeof(cp));
> + memcpy(cp.name, name, len);
> +
> + if (mgmt_send(adapter->mgmt, MGMT_OP_SET_LOCAL_NAME, adapter->index,
> + sizeof(cp), &cp, set_adapter_name_complete, NULL,
> + NULL) > 0)
> + return true;
> +
> + error("Failed to set name");
> +
> + return false;
> +}
> +
> static void read_info_complete(uint8_t status, uint16_t length, const void *param,
> void *user_data)
> {
> @@ -472,6 +524,7 @@ static uint8_t set_property(void *buf, uint16_t len)
> case HAL_PROP_ADAPTER_SCAN_MODE:
> return set_scan_mode(cmd->val, cmd->len);
> case HAL_PROP_ADAPTER_NAME:
> + return set_adapter_name(cmd->val, cmd->len);
> case HAL_PROP_ADAPTER_DISC_TIMEOUT:
> default:
> DBG("Unhandled property type 0x%x", cmd->type);
> diff --git a/android/hal-msg.h b/android/hal-msg.h
> index 80b47d6..506d10c 100644
> --- a/android/hal-msg.h
> +++ b/android/hal-msg.h
> @@ -89,6 +89,8 @@ struct hal_cmd_get_adapter_prop {
> uint8_t type;
> } __attribute__((packed));
>
> +#define HAL_MAX_NAME_LENGTH 249
> +
> #define HAL_PROP_ADAPTER_NAME 0x01
> #define HAL_PROP_ADAPTER_ADDR 0x02
> #define HAL_PROP_ADAPTER_UUIDS 0x03
> --
> 1.8.4.1
>
> --
> 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
* [PATCH 1/5] android: Add support for starting and cancelling device discovery
From: Jakub Tyszkowski @ 2013-10-31 14:25 UTC (permalink / raw)
To: linux-bluetooth
Android will cancel ongoing discovery after some period of time so there
is no need for another timeout inside the daemon itself.
---
android/adapter.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 107 insertions(+), 1 deletion(-)
diff --git a/android/adapter.c b/android/adapter.c
index 02f356d..a12ccb3 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -26,8 +26,9 @@
#include <glib.h>
#include "lib/bluetooth.h"
-#include "src/shared/mgmt.h"
+#include "lib/sdp.h"
#include "lib/mgmt.h"
+#include "src/shared/mgmt.h"
#include "log.h"
#include "hal-msg.h"
#include "ipc.h"
@@ -52,6 +53,8 @@ struct bt_adapter {
uint32_t supported_settings;
uint32_t current_settings;
+
+ bool discovering;
};
static struct bt_adapter *adapter;
@@ -349,6 +352,35 @@ static void user_passkey_notify_callback(uint16_t index, uint16_t length,
ev->passkey);
}
+static void mgmt_discovering_event(uint16_t index, uint16_t length,
+ const void *param, void *user_data)
+{
+ const struct mgmt_ev_discovering *ev = param;
+ struct hal_ev_discovery_state_changed cp;
+
+ if (length < sizeof(*ev)) {
+ error("Too small discovering event");
+ return;
+ }
+
+ DBG("hci%u type %u discovering %u", adapter->index, ev->type,
+ ev->discovering);
+
+ if (adapter->discovering == !!ev->discovering)
+ return;
+
+ adapter->discovering = !!ev->discovering;
+
+ DBG("new discovering state %u", ev->discovering);
+
+ cp.state = adapter->discovering ? HAL_DISCOVERY_STATE_STARTED :
+ HAL_DISCOVERY_STATE_STOPPED;
+
+ ipc_send(notification_io, HAL_SERVICE_ID_BLUETOOTH,
+ HAL_EV_DISCOVERY_STATE_CHANGED,
+ sizeof(cp), &cp, -1);
+}
+
static void register_mgmt_handlers(void)
{
mgmt_register(adapter->mgmt, MGMT_EV_NEW_SETTINGS, adapter->index,
@@ -379,6 +411,10 @@ static void register_mgmt_handlers(void)
mgmt_register(adapter->mgmt, MGMT_EV_PASSKEY_NOTIFY, adapter->index,
user_passkey_notify_callback, NULL, NULL);
+ mgmt_register(adapter->mgmt, MGMT_EV_DISCOVERING, adapter->index,
+ mgmt_discovering_event,
+ NULL, NULL);
+
}
static void load_link_keys_complete(uint8_t status, uint16_t length,
@@ -551,6 +587,7 @@ void bt_adapter_init(uint16_t index, struct mgmt *mgmt, bt_adapter_ready cb)
adapter->mgmt = mgmt_ref(mgmt);
adapter->index = index;
+ adapter->discovering = false;
adapter->ready = cb;
if (mgmt_send(mgmt, MGMT_OP_READ_INFO, index, 0, NULL,
@@ -624,6 +661,46 @@ static bool get_property(void *buf, uint16_t len)
}
}
+static bool start_discovery(void)
+{
+ struct mgmt_cp_start_discovery cp;
+ uint8_t type = 1 << BDADDR_BREDR;
+
+ if (adapter->current_settings & type)
+ cp.type = type;
+ else
+ cp.type = 0;
+
+ DBG("type=0x%x", type);
+
+ if (mgmt_send(adapter->mgmt, MGMT_OP_START_DISCOVERY, adapter->index,
+ sizeof(cp), &cp, NULL, NULL, NULL) > 0)
+ return true;
+
+ error("Failed to start discovery");
+ return false;
+}
+
+static bool stop_discovery(void)
+{
+ struct mgmt_cp_stop_discovery cp;
+ uint8_t type = 1 << BDADDR_BREDR;
+
+ if (adapter->current_settings & type)
+ cp.type = type;
+ else
+ cp.type = 0;
+
+ DBG("type=0x%x", type);
+
+ if (mgmt_send(adapter->mgmt, MGMT_OP_STOP_DISCOVERY, adapter->index,
+ sizeof(cp), &cp, NULL, NULL, NULL) > 0)
+ return true;
+
+ error("Failed to start discovery");
+ return false;
+}
+
static uint8_t set_scan_mode(void *buf, uint16_t len)
{
uint8_t *mode = buf;
@@ -987,6 +1064,35 @@ void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
status = ssp_reply(buf, len);
if (status != HAL_STATUS_SUCCESS)
goto error;
+ break;
+ case HAL_OP_START_DISCOVERY:
+ if (adapter->discovering) {
+ status = HAL_STATUS_DONE;
+ goto error;
+ }
+
+ if (!(adapter->current_settings & MGMT_SETTING_POWERED)) {
+ status = HAL_STATUS_NOT_READY;
+ goto error;
+ }
+
+ if (!start_discovery())
+ goto error;
+
+ break;
+ case HAL_OP_CANCEL_DISCOVERY:
+ if (!adapter->discovering) {
+ status = HAL_STATUS_DONE;
+ goto error;
+ }
+
+ if (!(adapter->current_settings & MGMT_SETTING_POWERED)) {
+ status = HAL_STATUS_NOT_READY;
+ goto error;
+ }
+
+ if (!stop_discovery())
+ goto error;
break;
default:
--
1.8.4.1
^ permalink raw reply related
* [PATCH 2/5] android: Add device discovery mgmt event handling
From: Jakub Tyszkowski @ 2013-10-31 14:25 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1383229534-17157-1-git-send-email-jakub.tyszkowski@tieto.com>
This patch provides basic handling of device found events from management
interface. Temporary device adress list is being used to determine which
devices has already been reported and device property changed event should
be sent instead of device found event.
---
android/Android.mk | 2 +
android/Makefile.am | 2 +
android/adapter.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 111 insertions(+), 2 deletions(-)
diff --git a/android/Android.mk b/android/Android.mk
index e47f4a9..ef9ebf3 100644
--- a/android/Android.mk
+++ b/android/Android.mk
@@ -32,6 +32,8 @@ LOCAL_SRC_FILES := \
../src/sdpd-service.c \
../src/sdpd-request.c \
../src/sdpd-server.c \
+ ../src/glib-helper.c \
+ ../src/eir.c \
../lib/sdp.c \
../lib/bluetooth.c \
../lib/hci.c \
diff --git a/android/Makefile.am b/android/Makefile.am
index 05a124e..989b54d 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -7,6 +7,8 @@ android_bluetoothd_SOURCES = android/main.c \
android/utils.h \
src/sdpd-database.c src/sdpd-server.c \
src/sdpd-service.c src/sdpd-request.c \
+ src/glib-helper.h src/glib-helper.c \
+ src/eir.h src/eir.c \
src/shared/util.h src/shared/util.c \
src/shared/mgmt.h src/shared/mgmt.c \
android/adapter.h android/adapter.c \
diff --git a/android/adapter.c b/android/adapter.c
index a12ccb3..154dd06 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -29,6 +29,8 @@
#include "lib/sdp.h"
#include "lib/mgmt.h"
#include "src/shared/mgmt.h"
+#include "src/glib-helper.h"
+#include "src/eir.h"
#include "log.h"
#include "hal-msg.h"
#include "ipc.h"
@@ -58,6 +60,7 @@ struct bt_adapter {
};
static struct bt_adapter *adapter;
+static GSList *found_devices = NULL;
static void mgmt_local_name_changed_event(uint16_t index, uint16_t length,
const void *param, void *user_data)
@@ -373,14 +376,113 @@ static void mgmt_discovering_event(uint16_t index, uint16_t length,
DBG("new discovering state %u", ev->discovering);
- cp.state = adapter->discovering ? HAL_DISCOVERY_STATE_STARTED :
- HAL_DISCOVERY_STATE_STOPPED;
+ if (adapter->discovering) {
+ cp.state = HAL_DISCOVERY_STATE_STARTED;
+ } else {
+ g_slist_free_full(found_devices, g_free);
+ found_devices = NULL;
+
+ cp.state = HAL_DISCOVERY_STATE_STOPPED;
+ }
ipc_send(notification_io, HAL_SERVICE_ID_BLUETOOTH,
HAL_EV_DISCOVERY_STATE_CHANGED,
sizeof(cp), &cp, -1);
}
+static int bdaddr_cmp(gconstpointer a, gconstpointer b)
+{
+ const bdaddr_t *bda = a;
+ const bdaddr_t *bdb = b;
+
+ return bacmp(bdb, bda);
+}
+
+static void update_found_device(const bdaddr_t *bdaddr, uint8_t bdaddr_type,
+ int8_t rssi, bool confirm,
+ const uint8_t *data, uint8_t data_len)
+{
+ bool is_new_dev = false;
+ struct eir_data eir;
+ GSList *l;
+ bdaddr_t *remote = NULL;
+ int err;
+
+ memset(&eir, 0, sizeof(eir));
+
+ err = eir_parse(&eir, data, data_len);
+ if (err < 0) {
+ error("Error parsing EIR data: %s (%d)", strerror(-err), -err);
+ return;
+ }
+
+ l = g_slist_find_custom(found_devices, bdaddr, bdaddr_cmp);
+ if (l)
+ remote = l->data;
+
+ if (!remote) {
+ char addr[18];
+
+ remote = g_new0(bdaddr_t, 1);
+ bacpy(remote, bdaddr);
+
+ found_devices = g_slist_prepend(found_devices, remote);
+ is_new_dev = true;
+
+ ba2str(remote, addr);
+ DBG("New device found: %s", addr);
+ }
+
+ if (is_new_dev) {
+ /* TODO: notify device found */
+ } else {
+ /* TODO: notify device state changed */
+ }
+
+ /* TODO: name confirmation */
+
+ eir_data_free(&eir);
+}
+
+static void mgmt_device_found_event(uint16_t index, uint16_t length,
+ const void *param, void *user_data)
+{
+ const struct mgmt_ev_device_found *ev = param;
+ const uint8_t *eir;
+ uint16_t eir_len;
+ uint32_t flags;
+ bool confirm_name;
+ char addr[18];
+
+ if (length < sizeof(*ev)) {
+ error("Too short device found event (%u bytes)", length);
+ return;
+ }
+
+ eir_len = btohs(ev->eir_len);
+ if (length != sizeof(*ev) + eir_len) {
+ error("Device found event size mismatch (%u != %zu)",
+ length, sizeof(*ev) + eir_len);
+ return;
+ }
+
+ if (eir_len == 0)
+ eir = NULL;
+ else
+ eir = ev->eir;
+
+ flags = btohl(ev->flags);
+
+ ba2str(&ev->addr.bdaddr, addr);
+ DBG("hci%u addr %s, rssi %d flags 0x%04x eir_len %u eir %u",
+ index, addr, ev->rssi, flags, eir_len, *eir);
+
+ confirm_name = flags & MGMT_DEV_FOUND_CONFIRM_NAME;
+
+ update_found_device(&ev->addr.bdaddr, ev->addr.type, ev->rssi,
+ confirm_name, eir, eir_len);
+}
+
static void register_mgmt_handlers(void)
{
mgmt_register(adapter->mgmt, MGMT_EV_NEW_SETTINGS, adapter->index,
@@ -415,6 +517,9 @@ static void register_mgmt_handlers(void)
mgmt_discovering_event,
NULL, NULL);
+ mgmt_register(adapter->mgmt, MGMT_EV_DEVICE_FOUND,
+ adapter->index, mgmt_device_found_event,
+ NULL, NULL);
}
static void load_link_keys_complete(uint8_t status, uint16_t length,
--
1.8.4.1
^ permalink raw reply related
* [PATCH 3/5] android: Add name property length define
From: Jakub Tyszkowski @ 2013-10-31 14:25 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1383229534-17157-1-git-send-email-jakub.tyszkowski@tieto.com>
Add define for adapter and remote device name property.
---
android/hal-msg.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/android/hal-msg.h b/android/hal-msg.h
index b792411..8a344d8 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -89,6 +89,8 @@ struct hal_cmd_get_adapter_prop {
uint8_t type;
} __attribute__((packed));
+#define HAL_MAX_NAME_LENGTH 249
+
#define HAL_PROP_ADAPTER_NAME 0x01
#define HAL_PROP_ADAPTER_ADDR 0x02
#define HAL_PROP_ADAPTER_UUIDS 0x03
--
1.8.4.1
^ permalink raw reply related
* [PATCH 4/5] android: Add device found notifications passing
From: Jakub Tyszkowski @ 2013-10-31 14:25 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1383229534-17157-1-git-send-email-jakub.tyszkowski@tieto.com>
This patch adds remote device found and remote device properties changed
notifications passing using IPC.
---
android/adapter.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 82 insertions(+), 2 deletions(-)
diff --git a/android/adapter.c b/android/adapter.c
index 154dd06..e72e45b 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -398,11 +398,45 @@ static int bdaddr_cmp(gconstpointer a, gconstpointer b)
return bacmp(bdb, bda);
}
+static int fill_device_props(struct hal_property *prop, bdaddr_t *addr,
+ uint32_t cod, int8_t rssi, char *name)
+{
+ uint8_t num_props = 0;
+
+ /* fill cod */
+ prop->type = HAL_PROP_DEVICE_CLASS;
+ prop->len = sizeof(cod);
+ memcpy(prop->val, &cod, prop->len);
+ prop = ((void *) prop) + sizeof(*prop) + sizeof(cod);
+ num_props++;
+
+ /* fill rssi */
+ prop->type = HAL_PROP_DEVICE_RSSI;
+ prop->len = sizeof(rssi);
+ memcpy(prop->val, &rssi, prop->len);
+ prop = ((void *) prop) + sizeof(*prop) + sizeof(rssi);
+ num_props++;
+
+ /* fill name */
+ if (name) {
+ prop->type = HAL_PROP_DEVICE_NAME;
+ prop->len = HAL_MAX_NAME_LENGTH;
+ strncpy((char *) prop->val, name, HAL_MAX_NAME_LENGTH - 1);
+ prop = ((void *) prop) + sizeof(*prop) + HAL_MAX_NAME_LENGTH;
+ num_props++;
+ }
+
+ return num_props;
+}
+
static void update_found_device(const bdaddr_t *bdaddr, uint8_t bdaddr_type,
int8_t rssi, bool confirm,
const uint8_t *data, uint8_t data_len)
{
bool is_new_dev = false;
+ size_t props_size = 0;
+ size_t buff_size = 0;
+ void *buf;
struct eir_data eir;
GSList *l;
bdaddr_t *remote = NULL;
@@ -433,10 +467,56 @@ static void update_found_device(const bdaddr_t *bdaddr, uint8_t bdaddr_type,
DBG("New device found: %s", addr);
}
+ props_size += sizeof(struct hal_property) + sizeof(eir.class);
+ props_size += sizeof(struct hal_property) + sizeof(rssi);
+
+ if (eir.name)
+ props_size += sizeof(struct hal_property) + HAL_MAX_NAME_LENGTH;
+
if (is_new_dev) {
- /* TODO: notify device found */
+ struct hal_ev_device_found *ev = NULL;
+ struct hal_property *prop = NULL;
+
+ /* with new device we also send bdaddr prop */
+ props_size += sizeof(struct hal_property) + sizeof(eir.addr);
+
+ buff_size = sizeof(struct hal_ev_device_found) + props_size;
+ buf = g_new0(char, buff_size);
+ ev = buf;
+ prop = ev->props;
+
+ /* fill first prop with bdaddr */
+ prop->type = HAL_PROP_DEVICE_ADDR;
+ prop->len = sizeof(bdaddr_t);
+ bdaddr2android(bdaddr, prop->val);
+ prop = ((void *) prop) + sizeof(*prop) + sizeof(bdaddr_t);
+ ev->num_props += 1;
+
+ /* fill eir, name, and cod props */
+ ev->num_props += fill_device_props(prop, remote, eir.class,
+ rssi, eir.name);
+
+ ipc_send(notification_io, HAL_SERVICE_ID_BLUETOOTH,
+ HAL_EV_DEVICE_FOUND,
+ buff_size, ev, -1);
+ g_free(buf);
} else {
- /* TODO: notify device state changed */
+ struct hal_ev_remote_device_props *ev = NULL;
+
+ buff_size = sizeof(*ev) + props_size;
+ buf = g_new0(char, buff_size);
+ ev = buf;
+
+ ev->num_props = fill_device_props(ev->props, remote, eir.class,
+ rssi, eir.name);
+
+ ev->status = HAL_STATUS_SUCCESS;
+ bdaddr2android(bdaddr, ev->bdaddr);
+
+ ipc_send(notification_io, HAL_SERVICE_ID_BLUETOOTH,
+ HAL_EV_REMOTE_DEVICE_PROPS,
+ buff_size, ev, -1);
+ g_free(buf);
}
/* TODO: name confirmation */
--
1.8.4.1
^ permalink raw reply related
* [PATCH 5/5] android: Add support for remote device name confirmation
From: Jakub Tyszkowski @ 2013-10-31 14:25 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1383229534-17157-1-git-send-email-jakub.tyszkowski@tieto.com>
---
android/adapter.c | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/android/adapter.c b/android/adapter.c
index e72e45b..10d4a8e 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -390,6 +390,28 @@ static void mgmt_discovering_event(uint16_t index, uint16_t length,
sizeof(cp), &cp, -1);
}
+static void confirm_name_complete(uint8_t status, uint16_t length,
+ const void *param, void *user_data)
+{
+ if (status != MGMT_STATUS_SUCCESS)
+ error("Failed to confirm name: %s (0x%02x)",
+ mgmt_errstr(status), status);
+}
+
+static void confirm_device_name(const bdaddr_t *addr, uint8_t addr_type)
+{
+ struct mgmt_cp_confirm_name cp;
+
+ memset(&cp, 0, sizeof(cp));
+ bacpy(&cp.addr.bdaddr, addr);
+ cp.addr.type = addr_type;
+
+ if (mgmt_reply(adapter->mgmt, MGMT_OP_CONFIRM_NAME, adapter->index,
+ sizeof(cp), &cp, confirm_name_complete,
+ NULL, NULL) == 0)
+ error("Failed to send confirm name request");
+}
+
static int bdaddr_cmp(gconstpointer a, gconstpointer b)
{
const bdaddr_t *bda = a;
@@ -519,7 +541,13 @@ static void update_found_device(const bdaddr_t *bdaddr, uint8_t bdaddr_type,
g_free(buf);
}
- /* TODO: name confirmation */
+ if (confirm) {
+ char addr[18];
+
+ ba2str(bdaddr, addr);
+ info("Device %s needs name confirmation.", addr);
+ confirm_device_name(bdaddr, bdaddr_type);
+ }
eir_data_free(&eir);
}
--
1.8.4.1
^ permalink raw reply related
* RE: l2cap sockets not properly multiplexed on ARM
From: Tim Tisdall @ 2013-10-31 14:29 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: Alexander Holler, linux-bluetooth@vger.kernel.org
In-Reply-To: <F9B30CD6-4DCB-4F58-9322-E18969867664@holtmann.org>
> I actually need to know if bluetooth-next tree still has this issue. That=
is first and foremost the one thing that needs to be checked.=0A=
=0A=
I really doubt it's an issue with bluetooth-next as it's only been an issue=
with kernel versions 3.4.X and older.=0A=
=0A=
I'm not familiar with how kernel development goes, so I'm not sure I comple=
tely understand what "bluetooth-next" entails. Aren't there different main=
tainers for the different major versions of the kernel and don't they updat=
e the in-built modules where ever possible? Is "bluetooth-next" tied to a =
particular kernel version or does it support a range of versions as it's a =
module?=
^ permalink raw reply
* Re: l2cap sockets not properly multiplexed on ARM
From: Marcel Holtmann @ 2013-10-31 14:41 UTC (permalink / raw)
To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth@vger.kernel.org
In-Reply-To: <D9B9EB3A112B8F489DFFA00A6D5C0FE203241DC5@AD-BR-EX-2.adroot.flemingc.local>
Hi Tim,
>> I actually need to know if bluetooth-next tree still has this issue. That is first and foremost the one thing that needs to be checked.
>
> I really doubt it's an issue with bluetooth-next as it's only been an issue with kernel versions 3.4.X and older.
>
> I'm not familiar with how kernel development goes, so I'm not sure I completely understand what "bluetooth-next" entails. Aren't there different maintainers for the different major versions of the kernel and don't they update the in-built modules where ever possible? Is "bluetooth-next" tied to a particular kernel version or does it support a range of versions as it's a module?
bluetooth-next is what will become kernel 3.13 at some point when Linus releases it. It is code that is on its way towards official Linux trees.
If bluetooth-next works as expected, then you could just git bisect and root cause the patch that fixed it. However first you have to establish if bluetooth-next kernel works or not.
Regards
Marcel
^ permalink raw reply
* [PATCH 1/2] android/hidhost: Fix not unregistering HID
From: Andrei Emeltchenko @ 2013-10-31 14:45 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
If HID is not unregistered it cannot be registered again and we get
following error:
...
E/BluetoothHidServiceJni( 2849): Failed to initialize Bluetooth HID, status: 1
...
---
android/hal-hidhost.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c
index a72410b..e148dc2 100644
--- a/android/hal-hidhost.c
+++ b/android/hal-hidhost.c
@@ -301,12 +301,19 @@ static bt_status_t hh_init(bthh_callbacks_t *callbacks)
static void hh_cleanup(void)
{
+ struct hal_cmd_unregister_module cmd;
+
DBG("");
if (!interface_ready())
return;
bt_hh_cbacks = NULL;
+
+ cmd.service_id = HAL_SERVICE_ID_HIDHOST;
+
+ hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_OP_UNREGISTER_MODULE,
+ sizeof(cmd), &cmd, 0, NULL, NULL);
}
static bthh_interface_t hh_if = {
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/2] android/hid: Add error message to error print
From: Andrei Emeltchenko @ 2013-10-31 14:45 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1383230705-18110-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
android/hid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/android/hid.c b/android/hid.c
index 5caa25b..4075ecb 100644
--- a/android/hid.c
+++ b/android/hid.c
@@ -419,7 +419,7 @@ bool bt_hid_register(GIOChannel *io, const bdaddr_t *addr)
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
BT_IO_OPT_INVALID);
if (!ctrl_io) {
- error("Failed to listen on control channel");
+ error("Failed to listen on ctrl channel: %s", err->message);
g_error_free(err);
return false;
}
@@ -429,7 +429,7 @@ bool bt_hid_register(GIOChannel *io, const bdaddr_t *addr)
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
BT_IO_OPT_INVALID);
if (!intr_io) {
- error("Failed to listen on interrupt channel");
+ error("Failed to listen on intr channel: %s", err->message);
g_io_channel_unref(ctrl_io);
g_error_free(err);
return false;
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH 1/5] android: Add support for starting and cancelling device discovery
From: Johan Hedberg @ 2013-10-31 14:52 UTC (permalink / raw)
To: Jakub Tyszkowski; +Cc: linux-bluetooth
In-Reply-To: <1383229534-17157-1-git-send-email-jakub.tyszkowski@tieto.com>
Hi Jakub,
On Thu, Oct 31, 2013, Jakub Tyszkowski wrote:
> Android will cancel ongoing discovery after some period of time so there
> is no need for another timeout inside the daemon itself.
>
> ---
> android/adapter.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 107 insertions(+), 1 deletion(-)
All five patches have been applied. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH 1/2] android/hidhost: Fix not unregistering HID
From: Johan Hedberg @ 2013-10-31 14:58 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
In-Reply-To: <1383230705-18110-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
On Thu, Oct 31, 2013, Andrei Emeltchenko wrote:
> If HID is not unregistered it cannot be registered again and we get
> following error:
> ...
> E/BluetoothHidServiceJni( 2849): Failed to initialize Bluetooth HID, status: 1
> ...
> ---
> android/hal-hidhost.c | 7 +++++++
> 1 file changed, 7 insertions(+)
Both patches have been applied. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] android: Add support for setting adapters name
From: Grzegorz Kolodziejczyk @ 2013-10-31 15:16 UTC (permalink / raw)
To: Andrei Emeltchenko, Grzegorz Kolodziejczyk, linux-bluetooth
In-Reply-To: <20131031142138.GM27517@aemeltch-MOBL1>
Hi Andrei,
On 31 October 2013 15:21, Andrei Emeltchenko
<andrei.emeltchenko.news@gmail.com> wrote:
>
> Hi Grzegorz,
>
> On Thu, Oct 31, 2013 at 03:00:38PM +0100, Grzegorz Kolodziejczyk wrote:
> > ---
> > android/adapter.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > android/hal-msg.h | 2 ++
> > 2 files changed, 55 insertions(+)
> >
> > diff --git a/android/adapter.c b/android/adapter.c
> > index 15b65e5..5dadc2e 100644
> > --- a/android/adapter.c
> > +++ b/android/adapter.c
> > @@ -129,6 +129,27 @@ static void scan_mode_changed(void)
> > g_free(ev);
> > }
> >
> > +static void adapter_name_changed(const uint8_t *name)
> > +{
> > + struct hal_ev_adapter_props_changed *ev;
> > + uint8_t buf[sizeof(*ev) + sizeof(struct hal_property) +
> > + HAL_MAX_NAME_LENGTH];
> > +
> > + memset(buf, 0, sizeof(buf));
> > + ev = (void *) buf;
> > +
> > + ev->num_props = 1;
> > + ev->status = HAL_STATUS_SUCCESS;
> > + ev->props[0].type = HAL_PROP_ADAPTER_NAME;
> > + ev->props[0].len = HAL_MAX_NAME_LENGTH;
>
> Do we need to pass always HAL_MAX_NAME_LENGTH ?
>
Yes, HAL expect 249 byte size array. IPC should map to HAL calls,
where name is expected to have 249 bytes.
Best regards,
Grzegorz Kołodziejczyk
^ permalink raw reply
* [PATCH 1/5] android: Fix typo in get_remote_services command
From: Szymon Janc @ 2013-10-31 15:25 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Marcin Kraglak
From: Marcin Kraglak <marcin.kraglak@tieto.com>
Change-Id: Ia38b82b4b7fdbd6e52389b34e1cdbbcfd098958c
---
android/hal-msg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 8a344d8..c0af083 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -148,8 +148,8 @@ struct hal_cmd_get_remote_service_rec {
uint8_t uuid[16];
} __attribute__((packed));
-#define HAL_OP_GET_REMOTE_SERVICE 0x0a
-struct hal_cmd_get_remote_service {
+#define HAL_OP_GET_REMOTE_SERVICES 0x0a
+struct hal_cmd_get_remote_services {
uint8_t bdaddr[6];
} __attribute__((packed));
--
1.8.4.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox