bluez5: include hcitool patches (increase "conn" limit and "refresh" typo)
Add a couple of bluez patches: one for increasing the number of connection showed with "hcitool con" command and remove "refresh" option in hcitool help that is not supported. The qca6564 chip can support more than 10 simultaneous BLE connections. https://jira.digi.com/browse/DEL-2735 Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
parent
c90aaaaadd
commit
6e76f9f7e4
|
|
@ -0,0 +1,22 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Fri, 8 Jul 2016 12:19:33 +0200
|
||||
Subject: [PATCH] hcitool: do not show unsupported refresh option
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
tools/hcitool.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/hcitool.c b/tools/hcitool.c
|
||||
index 02c4ebe1b71b..229c22c49909 100644
|
||||
--- a/tools/hcitool.c
|
||||
+++ b/tools/hcitool.c
|
||||
@@ -568,7 +568,7 @@ static struct option scan_options[] = {
|
||||
|
||||
static const char *scan_help =
|
||||
"Usage:\n"
|
||||
- "\tscan [--length=N] [--numrsp=N] [--iac=lap] [--flush] [--class] [--info] [--oui] [--refresh]\n";
|
||||
+ "\tscan [--length=N] [--numrsp=N] [--iac=lap] [--flush] [--class] [--info] [--oui]\n";
|
||||
|
||||
static void cmd_scan(int dev_id, int argc, char **argv)
|
||||
{
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Fri, 8 Jul 2016 10:42:57 +0200
|
||||
Subject: [PATCH] hcitool: increase the shown connection limit to 20
|
||||
|
||||
Created a variable to set the number of connections to shown and increase that
|
||||
value so we can list more current LE connections.
|
||||
|
||||
https://jira.digi.com/browse/DEL-2735
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
tools/hcitool.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tools/hcitool.c b/tools/hcitool.c
|
||||
index 229c22c49909..ae70c9c0d3b4 100644
|
||||
--- a/tools/hcitool.c
|
||||
+++ b/tools/hcitool.c
|
||||
@@ -69,6 +69,8 @@
|
||||
#define EIR_TX_POWER 0x0A /* transmit power level */
|
||||
#define EIR_DEVICE_ID 0x10 /* device ID */
|
||||
|
||||
+#define MAX_CONNECTIONS_SHOWN 20 /* Max number of "hcitool conn" items to shown */
|
||||
+
|
||||
#define for_each_opt(opt, long, short) while ((opt=getopt_long(argc, argv, short ? short:"+", long, NULL)) != -1)
|
||||
|
||||
static volatile int signal_received = 0;
|
||||
@@ -156,12 +158,12 @@ static int conn_list(int s, int dev_id, long arg)
|
||||
if (id != -1 && dev_id != id)
|
||||
return 0;
|
||||
|
||||
- if (!(cl = malloc(10 * sizeof(*ci) + sizeof(*cl)))) {
|
||||
+ if (!(cl = malloc(MAX_CONNECTIONS_SHOWN * sizeof(*ci) + sizeof(*cl)))) {
|
||||
perror("Can't allocate memory");
|
||||
exit(1);
|
||||
}
|
||||
cl->dev_id = dev_id;
|
||||
- cl->conn_num = 10;
|
||||
+ cl->conn_num = MAX_CONNECTIONS_SHOWN;
|
||||
ci = cl->conn_info;
|
||||
|
||||
if (ioctl(s, HCIGETCONNLIST, (void *) cl)) {
|
||||
@@ -190,12 +192,12 @@ static int find_conn(int s, int dev_id, long arg)
|
||||
struct hci_conn_info *ci;
|
||||
int i;
|
||||
|
||||
- if (!(cl = malloc(10 * sizeof(*ci) + sizeof(*cl)))) {
|
||||
+ if (!(cl = malloc(MAX_CONNECTIONS_SHOWN * sizeof(*ci) + sizeof(*cl)))) {
|
||||
perror("Can't allocate memory");
|
||||
exit(1);
|
||||
}
|
||||
cl->dev_id = dev_id;
|
||||
- cl->conn_num = 10;
|
||||
+ cl->conn_num = MAX_CONNECTIONS_SHOWN;
|
||||
ci = cl->conn_info;
|
||||
|
||||
if (ioctl(s, HCIGETCONNLIST, (void *) cl)) {
|
||||
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
|
||||
|
||||
SRC_URI += "file://bluez-init"
|
||||
SRC_URI += " \
|
||||
file://bluez-init \
|
||||
file://0021-hcitool-do-not-show-unsupported-refresh-option.patch \
|
||||
file://0022-hcitool-increase-the-shown-connection-limit-to-20.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_ccimx6ul = " \
|
||||
file://0001-bluetooth-Add-bluetooth-support-for-QCA6174-chip.patch \
|
||||
|
|
|
|||
Loading…
Reference in New Issue