Commit Graph

22877 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
e59ef82d91 core: Mention defaults for ReconnectUUIDs
This documents the defaults used for ReconnectUUIDs.
2015-04-08 10:23:14 +03:00
Marcel Holtmann
449479f83b tools: Add command for automatically power on with all features 2015-04-07 23:48:41 -07:00
Loic Poulain
953c2eeaa2 tools: Add protocol option for btattach utility 2015-04-07 17:49:05 +02:00
Luiz Augusto von Dentz
0b4137c4b5 test/test-nap: Run indefinitely
This makes test-nap run indefinitely until ctrl+c is pressed.
2015-04-07 18:04:33 +03:00
Michael Janssen
8232c1a035 core: Only start Advertising Manager when experimental
Check the experimental flag, there is no value in starting the
Advertising Manager when there is no method for advertising.

This also makes startup quieter when experimental is not set.
2015-04-07 18:04:25 +03:00
Michael Janssen
c68f5c6b15 gdbus: Add g_dbus_get_flags function
The g_dbus_get_flags function enables detection of when the
G_DBUS_FLAG_ENABLE_EXPERIMENTAL is set.
2015-04-07 18:04:04 +03:00
Michael Janssen
4cb6151466 test: improvements to example-advertisement
Improves the example-advertisement script in two ways:

It uses 16-bit service UUIDs so that it does not overflow the
Advertisement Data

It turns the adapter's power on so that it works out of the box.
2015-04-07 18:04:00 +03:00
Michael Janssen
e2cad2d15b core/advertising: Add and Remove AD using MGMT
Updates the advertising manager to add and remove the LE Advertising Data
using MGMT interface commands.
2015-04-07 18:03:54 +03:00
Michael Janssen
892fe97f3b shared/ad: implement bt_ad_generate
Implements the function to provide a raw version of the advertising data
packet for passing to the kernel.
2015-04-07 17:45:11 +03:00
Michael Janssen
0dd8773fa1 Update TODO for LE Advertising 2015-04-07 17:45:11 +03:00
Michael Janssen
e3b1d2fa81 core/advertising: Parse ServiceData
Parse the ServiceData property of LEAdvertisement1
2015-04-07 17:45:11 +03:00
Michael Janssen
afc287cca0 core/advertising: Parse ManufacturerSpecificData
Parse the ManufacturerSpecificData property of the LEAdvertisement1
2015-04-07 17:45:11 +03:00
Michael Janssen
9b0922dea7 core/advertising: Parse SolicitUUIDs
Parse the SolicitUUIDs property of the LEAdvertisement1 object.
2015-04-07 17:45:10 +03:00
Michael Janssen
815d35416c core/advertising: Parse ServiceUUIDs
Parse the ServiceUUIDs property of the LEAdvertisement1 object.
2015-04-07 17:45:10 +03:00
Michael Janssen
0f92fc819c core/advertising: use bt_ad
Start using the newly introduced struct bt_ad API.
2015-04-07 17:45:10 +03:00
Michael Janssen
729e9c0355 shared: add bt_ad structure
The bt_ad structure provides an abstraction for easy translation of defined
Advertisement Data fields into the resulting raw bytes needed by the Bluetooth
HCI LE Set Advertising Data command.
2015-04-07 17:45:10 +03:00
Johan Hedberg
d5f5063d14 tools/btmgmt: Add SSP Hash & Rand decoding to local OOB data 2015-04-07 14:28:27 +03:00
Mariusz Skamra
148c7b2e1f android/build: Fix btmgmt build
target Executable: btmgmt (out/target/product/mako/obj/EXECUTABLES/btmgmt_intermediates/LINKED/btmgmt)
external/bluetooth/bluez/tools/btmgmt.c:1477: error: undefined reference to 'hci_bustostr'
collect2: error: ld returned 1 exit status
2015-04-07 10:54:20 +02:00
Mariusz Skamra
548c6edf2e shared/gatt-client: Expose gatt_db
This patch adds the bt_gatt_client_get_db function, which allows
to get a reference to db from client structure. This is useful
when as a client we need to have an access db, to explore some
attributes.
2015-04-07 10:58:42 +03:00
Marcel Holtmann
bb13efeebd doc: Mention the supported Core specification version 4.2 2015-04-07 00:45:56 -07:00
Marcel Holtmann
a0a03828fb tools: Add fallback if KVM support is not available 2015-04-06 20:45:39 -07:00
Marcel Holtmann
96b4ad68e5 tools: Set environment variable for D-Bus system bus address 2015-04-04 16:46:42 -07:00
Marcel Holtmann
27dbe4dc9e tools: Enabled the UART vendor detection if possible 2015-04-04 16:16:15 -07:00
Marcel Holtmann
9c0d87699f tools: Update protocol and flags constants from UART driver 2015-04-04 16:14:37 -07:00
Marcel Holtmann
7d103ce152 monitor: Add support for decoding the return link keys event 2015-04-04 23:14:56 +02:00
Marcel Holtmann
0d9afd0f25 tools: Add bnep-tester execution to overall test list 2015-04-04 14:02:41 -07:00
Marcel Holtmann
913e56dc11 tools: Add skeleton for BNEP kernel testing utility 2015-04-04 14:00:17 -07:00
Marcel Holtmann
6be2f08c9c tools: Include headers with lib/ prefix instead of bluetooth/ prefix 2015-04-04 13:50:35 -07:00
Marcel Holtmann
b29bcb6e1b doc: Add minimal sample kernel config for test-runner tool 2015-04-04 13:33:13 -07:00
Marcel Holtmann
b8b4a51690 doc: Remote empty line at the beginning of the document 2015-04-04 13:28:07 -07:00
Marcel Holtmann
24e70fc0d0 tools: Fix add advertising test case for TX power flag 2015-04-03 13:31:10 -07:00
Marcel Holtmann
7f631a1e10 tools: Print bus information from extended index list 2015-04-02 21:45:40 -07:00
Marcel Holtmann
8c1402a8f8 tools: Add support for adding serial device passthrough 2015-04-02 21:29:52 -07:00
Marcel Holtmann
03c47650ec tools: Handle the process termination status with more details 2015-04-02 19:41:56 -07:00
Marcel Holtmann
e03edc2801 core: Use bool for __terminated variable 2015-04-02 19:28:30 -07:00
Marcel Holtmann
9fb60a2933 client: Use bool for __terminated variable 2015-04-02 19:27:13 -07:00
Marcel Holtmann
83f34df7f8 shared: Use bool for __terminated variable 2015-04-02 19:26:41 -07:00
Johan Hedberg
2ca2bdce02 tools: Fix build-error on 32-bit systems
The %zX format specifier for st_size causes the following warning:

tools/create-image.c:120:5: error: format ‘%zX’ expects argument of type ‘size_t’, but argument 10 has type ‘__off_t’ [-Werror=format=]
      st.st_size, 0, 0, 0, 0, namelen + 1, 0, name);
      ^

The best way to solve this (as off_t doesn't have a standard format
specifier) is to use 'j' and do a typecast to uintmax_t.
2015-04-02 11:33:20 +03:00
Luiz Augusto von Dentz
1db97762e9 shared/gatt-client: Fix possible crash
Similar to issue found with unit test it is necessary to protect
bt_gatt_client instance before calling the callback otherwise it may
destroy it causing a crash.
2015-04-02 11:04:36 +03:00
Luiz Augusto von Dentz
e3e4b3f110 shared/gatt-client: Fix invalid read on TP/GAW/CL/BV-05-C
This fixes TP/GAW/CL/BV-05-C which destroy bt_gatt_client instance on
the called producing the following bracktrace:

   at 0x445C7C: start_next_long_write.isra.2 (gatt-client.c:2393)
   by 0x4462A8: execute_write_cb (gatt-client.c:2429)
   by 0x44099B: handle_rsp (att.c:640)
   by 0x44099B: can_read_data (att.c:813)
   by 0x44E4BA: watch_callback (io-glib.c:170)
   by 0x4E7E7FA: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.4200.2)
   by 0x4E7EB97: ??? (in /usr/lib64/libglib-2.0.so.0.4200.2)
   by 0x4E7EEC1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.4200.2)
   by 0x43E791: tester_run (tester.c:831)
   by 0x43A685: main (test-gatt.c:3935)
 Address 0x5b12fd8 is 104 bytes inside a block of size 208 free'd
   at 0x4C2ACE9: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x446820: bt_gatt_client_unref (gatt-client.c:1694)
   by 0x43AB7C: destroy_context (test-gatt.c:342)
   by 0x43AB7C: context_quit (test-gatt.c:370)
   by 0x43AD0F: test_long_write_cb (test-gatt.c:1029)
   by 0x446290: execute_write_cb (gatt-client.c:2426)
   by 0x44099B: handle_rsp (att.c:640)
   by 0x44099B: can_read_data (att.c:813)
   by 0x44E4BA: watch_callback (io-glib.c:170)
   by 0x4E7E7FA: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.4200.2)
   by 0x4E7EB97: ??? (in /usr/lib64/libglib-2.0.so.0.4200.2)
   by 0x4E7EEC1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.4200.2)
   by 0x43E791: tester_run (tester.c:831)
   by 0x43A685: main (test-gatt.c:3935)
2015-04-02 11:04:36 +03:00
Stefan Seyfried
0aa12f8377 build: enable glibc's malloc checks for the test suite
Setting MALLOC_CHECK_=3 causes additional checks in glibc for malloc()
usage errors, abort()ing the test if those trigger. MALLOC_PERTURB_=69
causes free()'d memory to be poisoned with 0x45, leading to crashes in
case of use-after-free.
Together, both are useful for spotting more errors during "make check"
2015-04-02 11:04:35 +03:00
Marcel Holtmann
fa3be045a6 tools: Add simple utility for creating CPIO / initramfs images 2015-04-02 00:03:47 -07:00
Arman Uguray
82f8a71a45 build: Include test/example-gatt-client
Added test/example-gatt-client to Makefile.tools.
2015-04-01 18:01:26 -07:00
Arman Uguray
f95f762c73 test: Add Python GATT client example
This patch introduces test/example-gatt-client which implements a simple
D-Bus client application for a remote Heart Rate service.
2015-04-01 18:01:05 -07:00
Arman Uguray
156df086a3 build: Rename LE test scripts in Makefile.tools
Renamed test/advertisement-example to test/example-advertisement and
also added test/example-gatt-server to Makefile.tools
2015-04-01 17:57:52 -07:00
Arman Uguray
b7e71ee8eb test/example-gatt-server: Align string constants
Aligned the string constants for better readability.
2015-04-01 17:38:26 -07:00
Marcel Holtmann
55ae8e29c0 emulator: Handle event for LE connection update complete indication 2015-04-01 15:45:03 -07:00
Marcel Holtmann
ddcdb8591f tools: Look for local copies of the QEMU binaries 2015-04-01 14:51:32 -07:00
Marcel Holtmann
edc57cc19a doc: Update number of SMP end to end test cases 2015-04-01 14:39:09 -07:00
Marcel Holtmann
1856a335d8 tools: Add testing target to run all known test scripts 2015-04-01 14:31:50 -07:00