Commit Graph

1856 Commits

Author SHA1 Message Date
Marcel Holtmann
0da8d99975 tools: Remove permission check from hcidump utility 2014-04-16 19:48:29 -07:00
Szymon Janc
6ad13748da tools/hciattach: Fix missing includes
According to writev manual one should include <sys/uio.h> to use it.

This fix following warnings with bionic:
external/bluetooth/bluez/tools/hciattach_tialt.c: In function
    'texas_load_firmware':
external/bluetooth/bluez/tools/hciattach_tialt.c:142:4: warning:
    implicit declaration of function 'writev'
    [-Wimplicit-function-declaration]
target thumb C: hciattach <= external/bluetooth/bluez/tools/
    hciattach_ath3k.c
target thumb C: hciattach <= external/bluetooth/bluez/tools/
    hciattach_qualcomm.c
external/bluetooth/bluez/tools/hciattach_qualcomm.c: In function
    'qualcomm_load_firmware':
external/bluetooth/bluez/tools/hciattach_qualcomm.c:147:4: warning:
    implicit declaration of function 'writev'
    [-Wimplicit-function-declaration]
2014-04-15 13:12:04 -07:00
Luiz Augusto von Dentz
4899119cb2 tools/obexctl: Add support for listing phonebook size
This adds option -l which in case of PBAP will use GetSize before listing
the contacts of the current folder.
2014-04-09 13:59:29 +03:00
Loic Poulain
8366eae6d7 tools: add bcm43xx specific init in hciattach
Add a bcm43xx specific init sequence in hciattach
in order to initialize bcm43xx controllers.
2014-04-04 20:10:08 +03:00
Szymon Janc
58c09774c8 tools: Fix bccmd build with GCC 4.9
Make sure accessing array[63 * 2 + 4] is legal.

tools/bccmd.c: In function ‘cmd_buildname’:
tools/bccmd.c:406:18: error: iteration 63u invokes undefined behavior
     [-Werror=aggressive-loop-optimizations]
   name[i] = array[(i * 2) + 4];
2014-04-03 10:19:21 +03:00
Szymon Janc
989ff1d03d tools/btmgmt: Fix bogus comment in eir_get_flags function
This was due to copy-and-paste.
2014-04-02 13:43:00 +03:00
Szymon Janc
aca6d609da tools/btmgmt: Add option to pass adress type to disconnect command
This is needed to disconnect LE devices.
2014-04-02 13:42:09 +03:00
Szymon Janc
4b294a9486 tools/btmgmt: Print AD flags for LE devices
This is usefull for GAP qualification tests.
2014-04-01 17:09:41 +03:00
Claudio Takahasi
a8c00286f8 tools: Add emitting descriptor PropertiesChanged
This patch forces emitting PropertiesChanged signal when the descriptor
Value changes. Internally, BlueZ tracks the signal emitted to update
the GDBusProxy properties.
2014-03-31 16:14:16 +03:00
Claudio Takahasi
379a8c7651 tools: Add Get/Set descriptor
This patch adds get and set callbacks to allow managing "Value" property
of the user defined descriptor related to IAS Alert Level.
2014-03-31 16:14:16 +03:00
Claudio Takahasi
062d5fc4c1 tools: Add testing descriptor for IAS Alert Level
This patch adds a testing purpose only characteristic descriptor to
allow reading and writing descriptor's "Value" property.
2014-03-31 16:14:16 +03:00
Marcel Holtmann
1e19efd1b9 tools: Remove device name cache feature from hcitool 2014-03-30 16:29:27 -07:00
Alvaro Silva
12947cc943 test: Add permissions for Alert Level of gatt-service
This patch adds properties to Alert Level characteristic of the
Immediate Alert Service. IAS specification defines Write Without
Response as mandatory.
2014-03-28 14:22:00 +02:00
Claudio Takahasi
ee51e8a5a5 tools: Use unaligned access macros from util.h 2014-03-25 13:47:19 +02:00
Claudio Takahasi
958f256524 tools: Fix coding style checking boolean
This patch fixes tools/gatt-service.c coding style, using !foo instead
of foo == FALSE.
2014-03-24 16:28:42 +02:00
Claudio Takahasi
a3c32f0f61 tools: Emit property changed when Value changes
This patch extends gatt-service tool, emitting PropertiesChanged for
"Value" when a new value is set. This flow represents the handling of
ATT Write Command or Write Request which is translated to a GDBusProxy
set property. PropertiesChanged will be tracked by the characteristic
GDBusProxy in order to detect "Value" changes.
2014-03-24 15:40:20 +02:00
Alvaro Silva
4987c5bc20 tools: Add setting Value property of gatt-service
This patch extends the gatt-service.c example adding a generic callback
to allow set the characteristic Value. It doesn't check for
characteristic properties yet.
2014-03-24 15:39:58 +02:00
Alvaro Silva
bbee29a968 tools: Add reading Value property of gatt-service
This patch extends the gatt-service.c example adding the callback to
allow reading the Value property. At the moment, it is a generic
callback and it doesn't consider characteristic value property
restrictions.
2014-03-24 15:39:48 +02:00
Alvaro Silva
2c71dcff91 tools: Add Alert Level characteristic to gatt-service
This patch registers the Alert Level characteristic object related to
Immediate Alert Service. It adds the characteristic UUID property only.
2014-03-24 15:39:00 +02:00
Claudio Takahasi
d5f3308f9c tools: Fix coding style when testing pointer
This patch fixes tools/gatt-service.c coding style, using !ptr instead
of ptr == NULL.
2014-03-24 11:02:53 +02:00
Claudio Takahasi
14dc47eb00 Replace bt_get_le64() by get_le64() 2014-03-21 10:41:42 +02:00
Claudio Takahasi
d1ee63ca3f Replace bt_get_le32() by get_le32() 2014-03-21 10:40:48 +02:00
Claudio Takahasi
a646737b7e Replace bt_get_le16() by get_le16() 2014-03-21 10:39:56 +02:00
Lukasz Rymanowski
a7e9d922d8 tools/mgmt-tester: Remove dead code 2014-03-20 16:16:08 +02:00
Lukasz Rymanowski
0e39770adc tools/mgmt-tester: Minor fix in Stop discovery Success 1 test
Set directly setup_send params for start discovery. It will be easier to
follow the test.
2014-03-20 16:16:06 +02:00
Lukasz Rymanowski
e2741eedc3 tools/mgmt-tester: Refactor setup_start_discovery function
This patch removes handling hook register from this
function and its callback as this is no longer necessary for any stop
discovery tests.

This patch also adds setup_send_param and setup_send_len  parameters to
test data so it is easy to control start discovery command parameters.
It is useful for tests:
Stop Discovery - Invalid parameters 1
Stop Discovery - BR/EDR (Inquiry) Success 1
2014-03-20 15:05:15 +02:00
Lukasz Rymanowski
a316c44dcc tools/mgmt-tester: Remove not used condition 2014-03-20 14:20:12 +02:00
Lukasz Rymanowski
89d1fca0a6 tools/mgmt-tester: Update Stop Discovery-BR/EDR (Inquiry) Success 1
With new way of handling inquiry in btdev there is no need to register
inquiry event hook
2014-03-20 14:19:53 +02:00
Lukasz Rymanowski
4fdee4cb15 tools/mgmt-tester: Fix for Stop discovery test
Test "Stop Discovery - BR/EDR (Inquiry) Success 1" uses hciemu_type
BREDR but uses power settings to enable LE and tries to set LE:

  mgmt: [0x0002] command 0x000d
  mgmt: < 0d 00 02 00 01 00 01                             .......
  mgmt: > 02 00 02 00 03 00 0d 00 0c                       .........
  mgmt: [0x0002] command 0x0d status: 0x0c

This patch fixes this minor issue
2014-03-20 14:19:39 +02:00
Johan Hedberg
8203def286 tools/ibeacon: Convert to using shared/timeout.h 2014-03-20 09:36:29 +02:00
Johan Hedberg
7d6bc43bca tools/btinfo: Convert to using shared/timeout.h 2014-03-20 09:36:14 +02:00
Johan Hedberg
4625ed3d40 tools/3dsp: Convert to using shared/timeout.h 2014-03-20 09:35:56 +02:00
Johan Hedberg
696e561c08 tools/l2cap-tester: Fix setting connectable for LE server tests 2014-03-17 22:46:40 +02:00
Johan Hedberg
7c19e6d2e5 tools/smp-tester: Use consistent name for test data variable 2014-03-17 22:10:26 +02:00
Johan Hedberg
f4b0ae435f tools/smp-tester: Remove redundant smp_ prefix from variables 2014-03-17 22:07:46 +02:00
Johan Hedberg
7942c48b4c tools/smp-tester: Convert to using shared/crypto.c 2014-03-17 19:01:35 +02:00
Claudio Takahasi
b62eb18e6c Replace bt_put_le32() by put_le32() 2014-03-14 15:30:44 +02:00
Claudio Takahasi
7899d71215 Replace bt_put_le16() by put_le16() 2014-03-14 15:29:35 +02:00
Johan Hedberg
d8f265bd98 tools/smp-tester: Fix setting connectable for server tests 2014-03-14 12:53:50 +02:00
Johan Hedberg
8cf50c848a tools/smp-tester: Expect signing key with recent kernels 2014-03-14 12:53:31 +02:00
Petri Gynther
6ed68591ad bdaddr: Remove *_CP_SIZE defines
Remove *_CP_SIZE defines and use sizeof(cp) instead.
2014-03-10 22:29:44 +02:00
Petri Gynther
11b8a2a669 bdaddr: Add Marvell support 2014-03-10 22:23:27 +02:00
Marcel Holtmann
328d84e1e6 tools: Add some extra debug prints to GATT service example 2014-03-09 12:13:22 -07:00
Johan Hedberg
3cad7aca5f tools/mgmt-tester: Fix own_addr_type for non-connectable advertising
Newer kernels always a private address for non-connectable advertising.
2014-03-07 11:28:28 +02:00
Marcel Holtmann
ea05fb38b1 build: Move gatt-service test utility into tools directory 2014-03-06 09:46:57 -08:00
Natanael Copa
af5c3d500c various header include fixes for building with musl libc
we need:
 sys/stat.h for mode_t
 limits.h for PATH_MAX

Fixes compile errors:
In file included from tools/hciconfig.c:45:0:
./src/textfile.h:27:1: error: unknown type name 'mode_t'
 int create_file(const char *filename, const mode_t mode);
 ^

tools/csr_usb.c: In function 'read_value':
tools/csr_usb.c:71:12: error: 'PATH_MAX' undeclared (first use in this function)
  char path[PATH_MAX];
            ^
2014-03-05 22:31:21 +02:00
Lukasz Rymanowski
e966826ce3 monitor: Use miliseconds instead of seconds in the timeout 2014-03-05 14:04:54 +01:00
Marcin Kraglak
03ae0d71e0 tools/sco-tester: Remove not used function argument 2014-03-05 14:02:02 +02:00
Andrei Emeltchenko
c93c7c95ed tools/ibeacon: Fix using uninitialized value
Fixes warning:
tools/ibeacon.c:150:14: warning: The left expression of the compound
assignment is an uninitialized value. The computed value will also be
garbage
        cmd.data[2] |= 0x02;            /* LE General Discoverable Mode
*/
        ~~~~~~~~~~~ ^
1 warning generated.
2014-03-03 16:54:45 +02:00
Marcel Holtmann
a545949b1e tools: Add two simple LE white list test commands 2014-02-28 20:31:56 -08:00