OSDN Git Service

android-x86/external-bluetooth-bluez.git
9 years agoandroid/pts: Update DID test results
Mariusz Skamra [Mon, 11 May 2015 12:49:48 +0000 (14:49 +0200)]
android/pts: Update DID test results

PTS 6.1 and Android 5.1

9 years agoandroid/pts: Update GAP test results
Mariusz Skamra [Mon, 11 May 2015 12:49:46 +0000 (14:49 +0200)]
android/pts: Update GAP test results

PTS 6.1 and Android 5.1

9 years agoshared/att: Add ext_signed flag to be able to use external crypto
Mariusz Skamra [Mon, 11 May 2015 12:49:45 +0000 (14:49 +0200)]
shared/att: Add ext_signed flag to be able to use external crypto

Due to the issues with CSRK tests ext_signed flag has been added to
allow android/gatt handle signed write operations.

This patch fixes following tests:
GAP__TC_SEC_CSIGN_BV_02_C
GAP__TC_SEC_CSIGN_BI_01_C
GAP__TC_SEC_CSIGN_BI_02_C
GAP__TC_SEC_CSIGN_BI_03_C
GAP__TC_SEC_CSIGN_BI_04_C
SM__TC_SIGN_BV_03_C

9 years agoprofiles/network: Add support for handling extension hdr in ctrl msg
Grzegorz Kolodziejczyk [Thu, 14 May 2015 07:47:10 +0000 (09:47 +0200)]
profiles/network: Add support for handling extension hdr in ctrl msg

Support for extension headers is mandatory functionality. This patch
add support to it and leave responsibility for processing extension
header and sending setup success response to kernel.

This patch is necessary to pass PTS bnep test TC_CTRL_BV_19_C.

9 years agolib/bnep: Update bnep header with BNEPGETSUPPFEAT and setup response
Grzegorz Kolodziejczyk [Thu, 14 May 2015 07:47:09 +0000 (09:47 +0200)]
lib/bnep: Update bnep header with BNEPGETSUPPFEAT and setup response

This patch updates bnep header with get bnep supported features ioctl
xand bnep setup response flag.

9 years agoandroid/pts: Update HFP test results
Mariusz Skamra [Thu, 14 May 2015 17:00:04 +0000 (19:00 +0200)]
android/pts: Update HFP test results

PTS 6.1 and Android 5.1

9 years agoandroid/pts: Update PBAP test results
Mariusz Skamra [Tue, 19 May 2015 12:55:01 +0000 (14:55 +0200)]
android/pts: Update PBAP test results

PTS 6.1 and Android 5.1

9 years agotools: Provide HOME environment variable before calling qemu
Marcel Holtmann [Tue, 19 May 2015 10:19:11 +0000 (12:19 +0200)]
tools: Provide HOME environment variable before calling qemu

9 years agoemulator: Pretend to support host flow control command
Johan Hedberg [Tue, 19 May 2015 08:00:51 +0000 (11:00 +0300)]
emulator: Pretend to support host flow control command

9 years agotools: Add initial HCI User Channel tester
Szymon Janc [Tue, 28 Apr 2015 18:21:11 +0000 (20:21 +0200)]
tools: Add initial HCI User Channel tester

This adds basic tests only.

9 years agounit/test-gdbus-client: Don't run tests if setup fails
Luiz Augusto von Dentz [Mon, 18 May 2015 18:32:33 +0000 (21:32 +0300)]
unit/test-gdbus-client: Don't run tests if setup fails

This will make all gdbus tests be ignored if D-Bus is not available and
one cannot be created with dbus-run-session.

9 years agobuild: Check if dbus-run-session for unit tests
Luiz Augusto von Dentz [Tue, 5 May 2015 09:27:09 +0000 (12:27 +0300)]
build: Check if dbus-run-session for unit tests

This checks if dbus-run-session is available and then add it to
AM_TESTS_ENVIRONMENT so tests using D-Bus run in its own session.

9 years agoadapter: Fix memory leak
Andrei Emeltchenko [Mon, 18 May 2015 07:13:12 +0000 (10:13 +0300)]
adapter: Fix memory leak

In case of error with dbus stuff free allocated memory and set filter
to NULL.

9 years agotester: Test DHKey generation in controller
Andrei Emeltchenko [Fri, 15 May 2015 13:46:26 +0000 (16:46 +0300)]
tester: Test DHKey generation in controller

Test that appropriate command status event and LE Meta events are
generated.

9 years agobtdev: Add DHKey generation command to emulator
Andrei Emeltchenko [Fri, 15 May 2015 13:46:25 +0000 (16:46 +0300)]
btdev: Add DHKey generation command to emulator

Add LE Generate DHKey Command available in Bluetooth Spec 4.2.
Controller sends Command Status and LE Meta event LE Generate DHKey
Complete.
...
> HCI Event: Command Status (0x0f) plen 4
      LE Generate DHKey (0x08|0x0026) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 34
      LE Generate DHKey Complete (0x09)
        Status: Success (0x00)
        Diffie-Hellman key:<key>
...

9 years agotester: Add test for LE Read Local PK
Andrei Emeltchenko [Fri, 15 May 2015 13:46:24 +0000 (16:46 +0300)]
tester: Add test for LE Read Local PK

Test that public/private key pair is generated.

9 years agobtdev: Add LE Read Local Public Key cmd to emulator
Andrei Emeltchenko [Fri, 15 May 2015 13:46:23 +0000 (16:46 +0300)]
btdev: Add LE Read Local Public Key cmd to emulator

Support LE Read Local P-256 Public Key Command introduced in Bluetooth
Spec 4.2. The Controller shall generate a new P-256 public/private key
pair upon receipt of this command so private key is saved to btdev.

9 years agotester: Add HCI LE Rand command
Andrei Emeltchenko [Fri, 15 May 2015 13:46:22 +0000 (16:46 +0300)]
tester: Add HCI LE Rand command

Check status only

9 years agotester: Add HCI LE Encrypt command test
Andrei Emeltchenko [Fri, 15 May 2015 13:46:21 +0000 (16:46 +0300)]
tester: Add HCI LE Encrypt command test

Use RFC 4493 "The AES-CMAC Algorithm" sample test vectors to test HCI
controller encryption.

9 years agobtdev: Refactor Le Rand using Linux crypto infrastructure
Andrei Emeltchenko [Fri, 15 May 2015 13:46:20 +0000 (16:46 +0300)]
btdev: Refactor Le Rand using Linux crypto infrastructure

Use standard Linux crypto infrastructure for emulating HCI LE Rand
command.

9 years agobtdev: Add LE Encrypt command support to emulator
Andrei Emeltchenko [Fri, 15 May 2015 13:46:19 +0000 (16:46 +0300)]
btdev: Add LE Encrypt command support to emulator

Add basic crypto support to btdev using Linux crypto infrastructure.

9 years agodoc/test-coverage: Update mgmt-tester test count
Szymon Janc [Thu, 14 May 2015 10:50:30 +0000 (12:50 +0200)]
doc/test-coverage: Update mgmt-tester test count

9 years agotools/mgmt-tester: Add Device Found test with invalid ADV_DATA
Szymon Janc [Thu, 14 May 2015 10:50:29 +0000 (12:50 +0200)]
tools/mgmt-tester: Add Device Found test with invalid ADV_DATA

This test verify if kernel correctly terminates EIR when invalid
ADV_DATA (length includes non-significant part) was received from
 remote device.

9 years agoemulator/bthost: Add support for setting custom ADV data
Szymon Janc [Thu, 14 May 2015 10:50:28 +0000 (12:50 +0200)]
emulator/bthost: Add support for setting custom ADV data

This allows to set any ADV data and not just flags.

9 years agogatt: Fix NULL pointer dereference
Andrei Emeltchenko [Fri, 15 May 2015 14:17:01 +0000 (17:17 +0300)]
gatt: Fix NULL pointer dereference

Safely return in case of error.

9 years agolib: Update company identifiers
Marcel Holtmann [Sat, 16 May 2015 23:22:51 +0000 (01:22 +0200)]
lib: Update company identifiers

9 years agobuild: Always build Android support for releases
Marcel Holtmann [Sat, 16 May 2015 23:08:37 +0000 (01:08 +0200)]
build: Always build Android support for releases

9 years agotools: Limit CPUID check to IA platforms
Marcel Holtmann [Sat, 16 May 2015 23:06:26 +0000 (01:06 +0200)]
tools: Limit CPUID check to IA platforms

9 years agotools: Handle the common profile & service ecode
Gowtham Anandha Babu [Tue, 14 Apr 2015 11:37:48 +0000 (17:07 +0530)]
tools: Handle the common profile & service ecode

Handles the common profile and service error codes sent over the
Attribute Protocol in btgatt-client and monitor.

9 years agocore/advertising: Fix not waiting Add Advertising response
Luiz Augusto von Dentz [Tue, 12 May 2015 20:06:46 +0000 (23:06 +0300)]
core/advertising: Fix not waiting Add Advertising response

When registering a new instance it must wait MGMT_OP_ADD_ADVERTISING
before replying to the client since the command can still fail.

9 years agoAUTHORS: mention Jaganath's contributions
Johan Hedberg [Fri, 15 May 2015 06:57:21 +0000 (09:57 +0300)]
AUTHORS: mention Jaganath's contributions

9 years agoandroid/pts: Update HDP pixits, pics, and test results for PTS 6.1
Grzegorz Kolodziejczyk [Fri, 8 May 2015 13:31:53 +0000 (15:31 +0200)]
android/pts: Update HDP pixits, pics, and test results for PTS 6.1

This patch updates test pixits, pics, and results for HDP profile
against android 5.1.

9 years agoandroid/pts: Update GAVDP pixits, pics and test results for PTS 6.1
Grzegorz Kolodziejczyk [Fri, 8 May 2015 13:31:52 +0000 (15:31 +0200)]
android/pts: Update GAVDP pixits, pics and test results for PTS 6.1

This patch updates test pixits, pics and results for GAVDP profile
against android 5.1.

9 years agoandroid/avdtptest: Return error code when exiting on failure
Szymon Janc [Wed, 13 May 2015 15:01:10 +0000 (17:01 +0200)]
android/avdtptest: Return error code when exiting on failure

Should improve scripting support.

9 years agoandroid/avdtptest: Fix NULL local stream endpoint queue
Mariusz Skamra [Tue, 12 May 2015 08:06:21 +0000 (10:06 +0200)]
android/avdtptest: Fix NULL local stream endpoint queue

This patch fixes missing queue_new()

9 years agoandroid/pts: Update BNEP PTS 6.1 results for android 5.1
Grzegorz Kolodziejczyk [Mon, 11 May 2015 15:17:34 +0000 (17:17 +0200)]
android/pts: Update BNEP PTS 6.1 results for android 5.1

This patch updates BNEP PTS 6.1 results for android 5.1 and kernel
4.1.0-rc1+.

9 years agoandroid/pts: Update BNEP PTS 6.0 results for android 5.0
Grzegorz Kolodziejczyk [Mon, 13 Apr 2015 13:14:47 +0000 (15:14 +0200)]
android/pts: Update BNEP PTS 6.0 results for android 5.0

This patch updates BNEP PTS 6.0 results for android 5.0 witch added
support for handling extension headers of BNEP control frames.

9 years agoandroid/pts: Update SDP test results
Mariusz Skamra [Wed, 13 May 2015 11:59:10 +0000 (13:59 +0200)]
android/pts: Update SDP test results

PTS 6.1 and Android 5.1

9 years agoandroid/pts: Update ScPP test results
Mariusz Skamra [Tue, 12 May 2015 11:37:56 +0000 (13:37 +0200)]
android/pts: Update ScPP test results

PTS 6.1 and Android 5.1

9 years agoandroid/pts: Update RFCOMM test results
Mariusz Skamra [Tue, 12 May 2015 09:34:22 +0000 (11:34 +0200)]
android/pts: Update RFCOMM test results

PTS 6.1 and Android 5.1

9 years agoandroid/pts: Update HSP test results
Mariusz Skamra [Wed, 13 May 2015 14:09:29 +0000 (16:09 +0200)]
android/pts: Update HSP test results

PTS 6.1 and Android 5.1

9 years agoandroid/pts: Update DIS test results
Mariusz Skamra [Tue, 12 May 2015 06:53:09 +0000 (08:53 +0200)]
android/pts: Update DIS test results

PTS 6.1 and Android 5.1

9 years agoandroid/pts: Update PAN PTS 6.1 results for android 5.1
Grzegorz Kolodziejczyk [Mon, 11 May 2015 15:17:33 +0000 (17:17 +0200)]
android/pts: Update PAN PTS 6.1 results for android 5.1

This patch updates test case list and results for PAN profile against
android 5.1.

9 years agoemulator: Fix ACL packet types from controller to host
Johan Hedberg [Wed, 13 May 2015 11:52:50 +0000 (14:52 +0300)]
emulator: Fix ACL packet types from controller to host

The ACL packet type 0x00 is only allowed from host to controller. When
the packet is received at the remote end and is sent from controller
to host the type needs to be converted to 0x02.

9 years agomonitor: Fix typo in link policy field names
Marcel Holtmann [Tue, 12 May 2015 16:05:59 +0000 (18:05 +0200)]
monitor: Fix typo in link policy field names

9 years agomonitor: Add decoding of BNEP Extension Header pkt
Gowtham Anandha Babu [Thu, 7 May 2015 10:22:19 +0000 (15:52 +0530)]
monitor: Add decoding of BNEP Extension Header pkt

      BNEP: General Ethernet (0x00|1)
         dst 00:00:00:00:00:00 src 00:00:00:00:00:00 [proto 0x0300]
           Ext Control(0x00|1) len 0x0f
             Filter MultAddr Set (0x05)
               Length: 0x000c
               03:00:00:20:00:00 - 03:00:00:20:00:00
           Ext Unknown(0x7f|0) len 0x0a
        ac ac ac ac ac ac ac ac ac 3c
        3b 3a 39 38 37 36 35 34 33 32 31 30 2f 2e 2d 2c

9 years agomonitor: Add decoding of common rsp msg pkt
Gowtham Anandha Babu [Thu, 7 May 2015 10:22:18 +0000 (15:52 +0530)]
monitor: Add decoding of common rsp msg pkt

      BNEP: Control (0x01|0)
         Setup Conn Rsp (0x02)
           Rsp msg: Operation Successful(0x0000)

      BNEP: Control (0x01|0)
         Filter NetType Rsp (0x04)
           Rsp msg: Operation Successful(0x0000)

      BNEP: Control (0x01|0)
         Filter MultAddr Rsp (0x06)
           Rsp msg: Operation Failed - Invalid Dst Srv UUID(0x0001)

9 years agomonitor: Add decoding of Filter MultAddr Set pkt
Gowtham Anandha Babu [Thu, 7 May 2015 10:22:17 +0000 (15:52 +0530)]
monitor: Add decoding of Filter MultAddr Set pkt

      BNEP: Control (0x01|0)
         Filter MultAddr Set (0x05)
           Length: 0x000c
           01:00:00:00:00:00 - ff:ff:ff:ff:ff:ff

9 years agomonitor: Add decoding of Filter NetType Set pkt
Gowtham Anandha Babu [Thu, 7 May 2015 10:22:16 +0000 (15:52 +0530)]
monitor: Add decoding of Filter NetType Set pkt

      BNEP: Control (0x01|0)
         Filter NetType Set (0x03)
           Length: 0x0004
           0x86dd - 0x86dd

9 years agomonitor: Add decoding of Setup Conn Req pkt
Gowtham Anandha Babu [Thu, 7 May 2015 10:22:15 +0000 (15:52 +0530)]
monitor: Add decoding of Setup Conn Req pkt

      BNEP: Control (0x01|0)
         Setup Conn Req (0x01)
           Size: 0x02
           Dst: 0x1116(NAP)
           Src: 0x1115(PANU)

9 years agomonitor: Add decoding of Cmd Not Understood pkt
Gowtham Anandha Babu [Thu, 7 May 2015 10:22:14 +0000 (15:52 +0530)]
monitor: Add decoding of Cmd Not Understood pkt

      BNEP: Control (0x01|0)
         Command Not Understood (0x00)
           Type: 0xff

9 years agoaudio/avrcp: Reduce the interval of position changed
Luiz Augusto von Dentz [Fri, 8 May 2015 09:07:26 +0000 (12:07 +0300)]
audio/avrcp: Reduce the interval of position changed

Using UINT32_MAX overflow in Android implementation as it multiple the
value by 1000 to get the interval in miliseconds which seem to truncate
the value causing it to send position changed too frequently flooding
the channel.

9 years agoandroid/gatt: Fix updating mtu for no registered app
Grzegorz Kolodziejczyk [Wed, 29 Apr 2015 09:15:53 +0000 (11:15 +0200)]
android/gatt: Fix updating mtu for no registered app

Gatt shouldn't notify about updating mtu if no apps are registered.
Without this patch, while connecting crash can occur.

9 years agoandroid/gatt: Send notify mtu change for BR/EDR success conn
Grzegorz Kolodziejczyk [Wed, 29 Apr 2015 09:15:52 +0000 (11:15 +0200)]
android/gatt: Send notify mtu change for BR/EDR success conn

This patch fixes sending mtu change notification for BR/EDR gatt
connections. For unsuccessful connection, notify mtu change shouldn't be
sent. This avoid sending bogus mtu values as notify mtu change.

9 years agoandroid/gatt: Remove redundant comment line
Grzegorz Kolodziejczyk [Wed, 29 Apr 2015 09:15:51 +0000 (11:15 +0200)]
android/gatt: Remove redundant comment line

This patch removes redundant line from multiple line comment.

9 years agoandroid/client: Fix missing new line character
Grzegorz Kolodziejczyk [Wed, 29 Apr 2015 09:15:50 +0000 (11:15 +0200)]
android/client: Fix missing new line character

New line character is missing for haltest_info. Without this logs are
distorted after receiving configure mtu callback log.

9 years agoandroid/pts: Update GATT PTS 6.1 TC_GPA_SR_BV_11_C result
Grzegorz Kolodziejczyk [Fri, 24 Apr 2015 17:06:56 +0000 (19:06 +0200)]
android/pts: Update GATT PTS 6.1 TC_GPA_SR_BV_11_C result

This patch updates GATT PTS 6.1 TC_GPA_SR_BV_11_C result by PTS errata
number and result.

9 years agoandroid/pts: Update GATT PTS 6.1 results for android 5.1
Grzegorz Kolodziejczyk [Fri, 24 Apr 2015 17:02:38 +0000 (19:02 +0200)]
android/pts: Update GATT PTS 6.1 results for android 5.1

This patch updates test case list, result, pics and major part of
client test case instructions for GATT profile against android 5.1.

9 years agoandroid/gatt: Fix autoconnect
Mariusz Skamra [Thu, 30 Apr 2015 11:26:18 +0000 (13:26 +0200)]
android/gatt: Fix autoconnect

This patch fixes autoconnect issue, however there is also race hazard in
Android Gatt framework. If app uses autoconnect while connecting,
direct flag is set to false. Then bt_gatt_add_autoconnect should be called
to add this app's id to autoconnect_apps queue.

9 years agopolicy: Fix not incrementing attempts
Luiz Augusto von Dentz [Wed, 6 May 2015 13:59:43 +0000 (16:59 +0300)]
policy: Fix not incrementing attempts

The number of attempts and intervals maybe different causing the attempts
to not be incremented properly.

9 years agoaudio/avrcp: Use position changed event to resync
Luiz Augusto von Dentz [Mon, 4 May 2015 10:18:20 +0000 (13:18 +0300)]
audio/avrcp: Use position changed event to resync

Some player do not change state when backward is pressed only once,
instead it will just start the track from the beginning.

To fix this subscribe to playback position changed event since it is
mandatory to be sent in the following conditions:

 - TG has reached the registered playback Interval time.
 - Changed PLAY STATUS.
 - Changed Current Track.
 - Reached end or beginning of track.

9 years agocore/device: Implement GattServices property
Arman Uguray [Tue, 5 May 2015 02:00:56 +0000 (19:00 -0700)]
core/device: Implement GattServices property

This patch implements the new GattServices property, which gets updated
when a device's associated bt_gatt_client becomes ready.

9 years agocore/gatt: Add btd_gatt_client_foreach_service
Arman Uguray [Tue, 5 May 2015 01:59:59 +0000 (18:59 -0700)]
core/gatt: Add btd_gatt_client_foreach_service

This patch introduces btd_gatt_client_foreach_service which allows
users to iterate through the object paths of currently exported
GattService1 objects.

9 years agodoc/device-api: Add GattServices
Arman Uguray [Mon, 4 May 2015 23:34:00 +0000 (16:34 -0700)]
doc/device-api: Add GattServices

This patch introduces the GattServices property that contains the object
paths of exported GattService1 objects. The purpose of this property is
to signal when all GATT services on a remote device have been
discovered.

9 years agotools/gatt-service: Fix clang compile error
Arman Uguray [Mon, 4 May 2015 23:28:14 +0000 (16:28 -0700)]
tools/gatt-service: Fix clang compile error

This patch fixes the following compile warning when bluez is compiled
using clang:

tools/gatt-service.c:77:19: error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifier]
static const char const *ias_alert_level_props[] = {
                  ^

9 years agotools/mgmt-tester: Remove unused set_adv_data_2
Arman Uguray [Mon, 4 May 2015 23:28:13 +0000 (16:28 -0700)]
tools/mgmt-tester: Remove unused set_adv_data_2

This patch removes the unused variable "set_adv_data_2" from
tools/mgmt-tester.c. The remaining set_adv_data_* variables have also
been renamed to keep the numbering sequential.

9 years agotools/smp-tester: Remove unused variable.
Arman Uguray [Mon, 4 May 2015 23:28:12 +0000 (16:28 -0700)]
tools/smp-tester: Remove unused variable.

This patch removes three unused variables from tools/smp-tester.c.

9 years agoplugins/policy: Fix clang compile error
Arman Uguray [Mon, 4 May 2015 23:28:11 +0000 (16:28 -0700)]
plugins/policy: Fix clang compile error

This patch fixes the following error when bluez is compiled with clang:

plugins/policy.c:780:6: error: cast from 'int *' to 'size_t *' (aka 'unsigned long *') increases required alignment from 4 to 8 [-Werror,-Wcast-align]
(size_t *) &reconnect_intervals_len,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

9 years agoprofiles/hog: Fix Invalid Handle error
Arman Uguray [Fri, 1 May 2015 19:42:49 +0000 (12:42 -0700)]
profiles/hog: Fix Invalid Handle error

This patch fixes an Invalid Handle error that gets returned while
discovering the "External Report Reference" descriptors, where an
invalid handle range of "0x00 - 0xff" was being used. 0x0000 is an
invalid handle in ATT so this patch fixes changes the range to
"0x0001 - 0xffff".

9 years agocore/advertising: Don't expose with no kernel support
Michael Janssen [Wed, 29 Apr 2015 22:49:56 +0000 (15:49 -0700)]
core/advertising: Don't expose with no kernel support

Currently we expose LEAdvertisingManager1 even if there isn't kernel
support for the MGMT command which implements the feature.  This changes
it to be registered after we confirm with MGMT that both Add Advertising
is available and that a non-zero number of advertisements can be added.

9 years agohog: fix HoG reconnect handling in attio_connected_cb()
Petri Gynther [Thu, 30 Apr 2015 21:40:20 +0000 (14:40 -0700)]
hog: fix HoG reconnect handling in attio_connected_cb()

On HoG device reconnect, attio_connected_cb() should re-enable
HoG report notification callbacks for only those HoG reports that
have a valid CCC handle and notifications enabled on the device.

Note that the call:
enable_report_notifications(r, false)

only reinstalls the callback for HoG report notifications. It doesn't
rewrite the HoG report notification enable bit on the HoG device.

9 years agohog: enable HoG report notifications only after uHID is ready
Petri Gynther [Thu, 30 Apr 2015 21:40:10 +0000 (14:40 -0700)]
hog: enable HoG report notifications only after uHID is ready

HoG report notifications should be enabled only after the uHID device
has been created. uHID layer cannot process HoG reports any earlier.

9 years agohog: rework HoG report notifications enable
Petri Gynther [Thu, 30 Apr 2015 21:40:01 +0000 (14:40 -0700)]
hog: rework HoG report notifications enable

1. Store HoG report CCC handle in the report data structure, so that
   it can be used when needed.
2. Rename write_ccc() to enable_report_notifications().
3. In enable_report_notifications():
   - first register the callback for HoG report notifications
   - then enable the notifications on the HoG device
4. In report_ccc_written_cb():
   - improve the emitted messages

9 years agotools/btgatt-client: Rename sec_level to security
Luiz Augusto von Dentz [Tue, 28 Apr 2015 12:40:07 +0000 (15:40 +0300)]
tools/btgatt-client: Rename sec_level to security

9 years agoshared/gatt-client: Rename sec_level to security
Luiz Augusto von Dentz [Tue, 28 Apr 2015 12:38:34 +0000 (15:38 +0300)]
shared/gatt-client: Rename sec_level to security

9 years agoshared/att: Rename sec_level to security
Luiz Augusto von Dentz [Tue, 28 Apr 2015 12:34:34 +0000 (15:34 +0300)]
shared/att: Rename sec_level to security

9 years agomonitor: Fix Host Number of Completed Packets command parsing
Johan Hedberg [Tue, 28 Apr 2015 18:25:27 +0000 (21:25 +0300)]
monitor: Fix Host Number of Completed Packets command parsing

9 years agoperipheral: Add initial code for btsensor application
Marcel Holtmann [Tue, 28 Apr 2015 16:19:12 +0000 (09:19 -0700)]
peripheral: Add initial code for btsensor application

9 years agotools/btproxy: Return proper type in setup_proxy
Szymon Janc [Tue, 28 Apr 2015 12:43:23 +0000 (14:43 +0200)]
tools/btproxy: Return proper type in setup_proxy

This function retuns bool.

9 years agotest/example-gatt-server: Add encrypt attributes
Luiz Augusto von Dentz [Mon, 27 Apr 2015 08:27:07 +0000 (11:27 +0300)]
test/example-gatt-server: Add encrypt attributes

This adds new attributes that requires encryption for TestService.

9 years agocore/gatt: Add Flags property to GattDescriptor
Luiz Augusto von Dentz [Mon, 27 Apr 2015 08:07:00 +0000 (11:07 +0300)]
core/gatt: Add Flags property to GattDescriptor

This adds the implementation of Flags property to GattDescriptor
interface and properly convert it to permissions when adding the
descriptor to the database.

9 years agodoc/gatt-api: Add Flags property to GattDescriptor
Luiz Augusto von Dentz [Mon, 27 Apr 2015 07:40:47 +0000 (10:40 +0300)]
doc/gatt-api: Add Flags property to GattDescriptor

This adds Flags property to GattDescriptor so the server can define
permissions and authentication requirements for descriptors.

9 years agoshared/gatt-server: Check attribute permissions
Luiz Augusto von Dentz [Thu, 23 Apr 2015 13:26:13 +0000 (15:26 +0200)]
shared/gatt-server: Check attribute permissions

9 years agoshared/att: Add own security definitions
Luiz Augusto von Dentz [Thu, 23 Apr 2015 12:07:59 +0000 (14:07 +0200)]
shared/att: Add own security definitions

This defines security level at ATT level so it is not necessary to use
transport specific defines.

9 years agocore/gatt: Add support for encryption flags
Luiz Augusto von Dentz [Thu, 23 Apr 2015 09:03:47 +0000 (11:03 +0200)]
core/gatt: Add support for encryption flags

This adds support to encryption related flags as defined in the
documentation.

9 years agodoc/gatt-api: Add encryption flags
Luiz Augusto von Dentz [Wed, 22 Apr 2015 07:12:24 +0000 (09:12 +0200)]
doc/gatt-api: Add encryption flags

This add encryption flags which can be used when registering a service to
require encryption when accessing a characteristic.

9 years agoclient: main: add support for SetDiscoveryFilter
Jakub Pawlowski [Tue, 28 Apr 2015 07:04:55 +0000 (00:04 -0700)]
client: main: add support for SetDiscoveryFilter

This patch adds set-scan-filter-* commands to sample DBus client that
might be used to modify discovery filter.

set-scan-filter-uuids - sets filter uuids field
set-scan-filter-rssi - sets filter rssi and clears pathloss
set-scan-filter-pathloss - sets filter pathloss and clears rssi
set-scan-filter-transport - sets filter transport
set-scan-filter-clear - clears filter

Sample output:
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# set-scan-filter-uuids babe
SetDiscoveryFilter success
[bluetooth]# set-scan-filter-transport le
SetDiscoveryFilter success
[bluetooth]# set-scan-filter-rssi -69
SetDiscoveryFilter success
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes
[CHG] Device 44:89:1C:C5:67:94 RSSI: -66
[CHG] Device 44:89:1C:C5:67:94 TxPower: -21
[CHG] Device 44:89:1C:C5:67:94 RSSI: -65
[CHG] Device 44:89:1C:C5:67:94 RSSI: -58
[CHG] Device 44:89:1C:C5:67:94 RSSI: -64
[CHG] Device 44:89:1C:C5:67:94 RSSI: -59
[CHG] Device 44:89:1C:C5:67:94 RSSI: -65
[CHG] Device 44:89:1C:C5:67:94 RSSI: -59
[CHG] Device 44:89:1C:C5:67:94 RSSI: -64
[bluetooth]# set-scan-filter-rssi -90
SetDiscoveryFilter success
[CHG] Device 44:89:1C:C5:67:94 RSSI: -76
[CHG] Device 44:89:1C:C5:67:94 RSSI: -82
[CHG] Device 44:89:1C:C5:67:94 RSSI: -75
[CHG] Device 44:89:1C:C5:67:94 RSSI: -81
[CHG] Device 44:89:1C:C5:67:94 RSSI: -76
[CHG] Device 44:89:1C:C5:67:94 RSSI: -76
[CHG] Device 44:89:1C:C5:67:94 RSSI: -81
[CHG] Device 44:89:1C:C5:67:94 RSSI: -75
[CHG] Device 44:89:1C:C5:67:94 RSSI: -82
[CHG] Device 44:89:1C:C5:67:94 RSSI: -82
[bluetooth]# scan off
[CHG] Device 44:89:1C:C5:67:94 TxPower is nil
[CHG] Device 44:89:1C:C5:67:94 RSSI is nil
Discovery stopped
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: no

9 years agosrc/profile: Set service to connecting in ext_connect
Hsin-Yu Chao [Fri, 24 Apr 2015 17:36:09 +0000 (10:36 -0700)]
src/profile: Set service to connecting in ext_connect

For the profile connection initiated by remote device,
ext_connect() function is triggered without advance the state
of device's service to BTD_SERVICE_STATE_CONNECTING.
This is causing a problems when the later 'NewConnection'
dbus method call is made to registered application. If
the remote device gets disconnected during the period of
time waiting for the reply of 'NewConnection' method, the
btd_service_disconnect() call will fail at the service state
check and never handle the profile disconnection due to that
state was incorrectly left as BTD_SERVICE_STATE_DISCONNECTED.
Fix the problem by use service_accept() call in ext_connect()
to assure the service state has changed. Also modify the logic
of service state check in btd_service_connecting_complete()
to prevent the problem when the 'NewConnect' reply changes
service state to BTD_SERVICE_STATE_CONNECTED while the device
has already disconnected before it arrives.

9 years agotest/example-advertisement: Use IncludeTxPower
Arman Uguray [Fri, 24 Apr 2015 00:13:08 +0000 (17:13 -0700)]
test/example-advertisement: Use IncludeTxPower

This patch changes the example-advertisement script to use
IncludeTxPower rather than IncludeTXPower.

9 years agocore/advertising: Rename IncludeTXPower
Arman Uguray [Fri, 24 Apr 2015 00:11:59 +0000 (17:11 -0700)]
core/advertising: Rename IncludeTXPower

This patch renames IncludeTXPower to IncludeTxpower to keep consistency
across D-Bus interfaces.

9 years agodoc/advertising-api.txt: Rename IncludeTXPower
Arman Uguray [Fri, 24 Apr 2015 00:10:58 +0000 (17:10 -0700)]
doc/advertising-api.txt: Rename IncludeTXPower

This patch renames IncludeTXPower to IncludeTxPower to keep consistency
across D-Bus interfaces.

9 years agoclient: Make command info print TxPower and RSSI
Jakub Pawlowski [Sat, 18 Apr 2015 01:09:32 +0000 (18:09 -0700)]
client: Make command info print TxPower and RSSI

This makes command info to also print TxPower and RSSI if available.

9 years agocore: Add implementation of TxPower
Jakub Pawlowski [Sat, 18 Apr 2015 01:09:31 +0000 (18:09 -0700)]
core: Add implementation of TxPower

This adds 'TxPower' property to Device interface.

9 years agodoc/device-api: Add TxPower
Jakub Pawlowski [Sat, 18 Apr 2015 01:09:30 +0000 (18:09 -0700)]
doc/device-api: Add TxPower

This adds TxPower from advertisement data.

9 years agomonitor: Add support for decoding bnep DestOnly pkt
Gowtham Anandha Babu [Tue, 21 Apr 2015 09:14:29 +0000 (14:44 +0530)]
monitor: Add support for decoding bnep DestOnly pkt

      BNEP: Compressed Ethernet DestOnly (0x04|0)
         dst 00:00:00:00:00:00 [proto 0x0000]
        00 00 00 00 00 00 61 62 63 64 65 66 30 31 32 33
        34 35 36 37 38 39 5f 62 6e 65 70 5f 74 65 73 74

9 years agomonitor: Add support for decoding bnep SrcOnly pkt
Gowtham Anandha Babu [Tue, 21 Apr 2015 09:14:28 +0000 (14:44 +0530)]
monitor: Add support for decoding bnep SrcOnly pkt

      BNEP: Compressed Ethernet SrcOnly (0x03|0)
         src 00:00:00:00:00:00 [proto 0x0300]
        3c 3b 3a 39 38 37 36 35 34 33 32 31 30 2f 2e 2d
        2c 2b 2a 29 28 27 26 25 24 23 22 21 20 1f 1e 1d

9 years agomonitor: Add support for decoding bnep Compressed pkt
Gowtham Anandha Babu [Tue, 21 Apr 2015 09:14:27 +0000 (14:44 +0530)]
monitor: Add support for decoding bnep Compressed pkt

      BNEP: Compressed Ethernet (0x02|0)
         [proto 0x0300]
        3c 3b 3a 39 38 37 36 35 34 33 32 31 30 2f 2e 2d
        2c 2b 2a 29 28 27 26 25 24 23 22 21 20 1f 1e 1d

9 years agomonitor: Add support for decoding bnep Control pkt
Gowtham Anandha Babu [Tue, 21 Apr 2015 09:14:26 +0000 (14:44 +0530)]
monitor: Add support for decoding bnep Control pkt

      BNEP: Control (0x01|0)
         Filter MultAddr Set (0x05)
        00 30 ff ff ff ff ff ff ff ff ff ff ff ff 33 33
        00 00 00 01 33 33 00 00 00 01 01 00 5e 00 00 01

9 years agomonitor: Add support for decoding bnep General pkt
Gowtham Anandha Babu [Tue, 21 Apr 2015 09:14:25 +0000 (14:44 +0530)]
monitor: Add support for decoding bnep General pkt

      BNEP: General Ethernet (0x00|0)
         dst 00:00:00:00:00:00 src 00:00:00:00:00:00 [proto 0x0300]
        3c 3b 3a 39 38 37 36 35 34 33 32 31 30 2f 2e 2d
        2c 2b 2a 29 28 27 26 25 24 23 22 21 20 1f 1e 1d

9 years agomonitor: Add support for AVRCP GeneralReject
Bharat Panda [Tue, 21 Apr 2015 12:05:47 +0000 (17:35 +0530)]
monitor: Add support for AVRCP GeneralReject

Support for AVRCP GeneralReject added to btmon.