Linux bluetooth development
 help / color / mirror / Atom feed
* Re: [PATCH] android/pts: Updated AVCTP PICS and PIXITs for PTS 5.3
From: Szymon Janc @ 2014-10-22  7:55 UTC (permalink / raw)
  To: Ruslan Mstoi; +Cc: linux-bluetooth
In-Reply-To: <1413961860-11390-1-git-send-email-ruslan.mstoi@linux.intel.com>

Hi Ruslan,

On Wednesday 22 of October 2014 10:11:00 Ruslan Mstoi wrote:
> ---
>  android/pics-avctp.txt  | 2 +-
>  android/pixit-avctp.txt | 6 +++---
>  android/pts-avctp.txt   | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/android/pics-avctp.txt b/android/pics-avctp.txt
> index 5900d00..0afa33c 100644
> --- a/android/pics-avctp.txt
> +++ b/android/pics-avctp.txt
> @@ -1,6 +1,6 @@
>  AVCTP PICS for the PTS tool.
>  
> -PTS version: 5.2
> +PTS version: 5.3
>  
>  * - different than PTS defaults
>  # - not yet implemented/supported
> diff --git a/android/pixit-avctp.txt b/android/pixit-avctp.txt
> index 3c6a864..06a0798 100644
> --- a/android/pixit-avctp.txt
> +++ b/android/pixit-avctp.txt
> @@ -1,6 +1,6 @@
>  AVCTP PIXIT for the PTS tool.
>  
> -PTS version: 5.2
> +PTS version: 5.3
>  
>  * - different than PTS defaults
>  & - should be set to IUT Bluetooth address
> @@ -12,7 +12,7 @@ Parameter Name			Value
>  -------------------------------------------------------------------------------
>  TSPX_avctp_psm			0017
>  TSPX_avctp_profile_id		110E
> -TSPX_connect_avdtp		FALSE (*)
> +TSPX_connect_avdtp		TRUE
>  TSPX_avctp_tester_command_data
>  TSPX_avctp_tester_response_data
>  TSPX_avctp_iut_command_data
> @@ -25,7 +25,7 @@ TSPX_class_of_device		20050C
>  TSPX_player_feature_bitmask	0000000000000007FFF00070000000000
>  TSPX_avrcp_version
>  TSPX_establish_avdtp_stream	TRUE
> -TSPX_tester_av_role
> +TSPX_tester_av_role		SNK
>  TSPX_time_guard			300000
>  TSPX_avrcp_only			FALSE
>  TSPX_use_implicit_send		TRUE
> diff --git a/android/pts-avctp.txt b/android/pts-avctp.txt
> index a461ee9..fd22ee1 100644
> --- a/android/pts-avctp.txt
> +++ b/android/pts-avctp.txt
> @@ -1,7 +1,7 @@
>  PTS test results for AVCTP
>  
> -PTS version: 5.2
> -Tested: 10-July-2014
> +PTS version: 5.3
> +Tested: 22-October-2014
>  Android version: 4.4.4
>  
>  Results:
> 

Applied, thanks.

-- 
Best regards, 
Szymon Janc

^ permalink raw reply

* [PATCH] android/pts: Updated AVCTP PICS and PIXITs for PTS 5.3
From: Ruslan Mstoi @ 2014-10-22  7:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Ruslan Mstoi

---
 android/pics-avctp.txt  | 2 +-
 android/pixit-avctp.txt | 6 +++---
 android/pts-avctp.txt   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/android/pics-avctp.txt b/android/pics-avctp.txt
index 5900d00..0afa33c 100644
--- a/android/pics-avctp.txt
+++ b/android/pics-avctp.txt
@@ -1,6 +1,6 @@
 AVCTP PICS for the PTS tool.
 
-PTS version: 5.2
+PTS version: 5.3
 
 * - different than PTS defaults
 # - not yet implemented/supported
diff --git a/android/pixit-avctp.txt b/android/pixit-avctp.txt
index 3c6a864..06a0798 100644
--- a/android/pixit-avctp.txt
+++ b/android/pixit-avctp.txt
@@ -1,6 +1,6 @@
 AVCTP PIXIT for the PTS tool.
 
-PTS version: 5.2
+PTS version: 5.3
 
 * - different than PTS defaults
 & - should be set to IUT Bluetooth address
@@ -12,7 +12,7 @@ Parameter Name			Value
 -------------------------------------------------------------------------------
 TSPX_avctp_psm			0017
 TSPX_avctp_profile_id		110E
-TSPX_connect_avdtp		FALSE (*)
+TSPX_connect_avdtp		TRUE
 TSPX_avctp_tester_command_data
 TSPX_avctp_tester_response_data
 TSPX_avctp_iut_command_data
@@ -25,7 +25,7 @@ TSPX_class_of_device		20050C
 TSPX_player_feature_bitmask	0000000000000007FFF00070000000000
 TSPX_avrcp_version
 TSPX_establish_avdtp_stream	TRUE
-TSPX_tester_av_role
+TSPX_tester_av_role		SNK
 TSPX_time_guard			300000
 TSPX_avrcp_only			FALSE
 TSPX_use_implicit_send		TRUE
diff --git a/android/pts-avctp.txt b/android/pts-avctp.txt
index a461ee9..fd22ee1 100644
--- a/android/pts-avctp.txt
+++ b/android/pts-avctp.txt
@@ -1,7 +1,7 @@
 PTS test results for AVCTP
 
-PTS version: 5.2
-Tested: 10-July-2014
+PTS version: 5.3
+Tested: 22-October-2014
 Android version: 4.4.4
 
 Results:
-- 
1.9.1


^ permalink raw reply related

* Re: [PATCHv5 00/14] Included service discovery
From: Marcin Kraglak @ 2014-10-22  6:25 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org development
In-Reply-To: <1413454646-23076-1-git-send-email-marcin.kraglak@tieto.com>

On 16 October 2014 12:17, Marcin Kraglak <marcin.kraglak@tieto.com> wrote:
> v3:
> In this version after primary service discovery,
> secondary services are discovered. Next included
> services are resolved. With this approach we
> don't have recursively search for included service,
> like it was TODO in previous proposal.
> There is also small coding style fix suggested by Arman.
>
> v4:
> If no secondary services found, continue include services search (fixed
> in gatt-client.c).
> Fixed wrong debug logs (primary->secondary).
> Fixed searching descriptors
>
> v5:
> Ignore Unsupported Group Type Error in response to secondary service
> discovery and continue included services discovery.
>
> Marcin Kraglak (14):
>   shared/gatt: Add discover_secondary_services()
>   shared/gatt: Add initial implementation of discover_included_services
>   shared/gatt: Discover included services 128 bit UUIDS
>   shared/gatt: Add extra check in characteristic iterator
>   shared/gatt: Add included service iterator
>   shared/gatt: Remove not needed function parameter
>   shared/gatt: Distinguish Primary from Secondary services
>   tools/btgatt-client: Print type of service
>   shared/gatt: Discover secondary services
>   shared/gatt: Discover included services
>   shared/gatt: Add gatt-client include service iterator
>   tools/btgatt-client: Print found include services
>   shared/gatt: Fix searching descriptors
>   shared/gatt: Add function bt_gatt_result_included_count()
>
>  src/shared/gatt-client.c  | 263 +++++++++++++++++++++++++++--
>  src/shared/gatt-client.h  |  18 ++
>  src/shared/gatt-helpers.c | 418 +++++++++++++++++++++++++++++++++++++++++++---
>  src/shared/gatt-helpers.h |  10 +-
>  tools/btgatt-client.c     |  17 +-
>  5 files changed, 690 insertions(+), 36 deletions(-)
>
> --
> 1.9.3
>

Ping

^ permalink raw reply

* Re: BlueZ 5.24: Using the LE Heart Rate Profile
From: Sujay Sarkhel @ 2014-10-21 22:32 UTC (permalink / raw)
  To: linux-bluetooth

Some more information:

I ran the daemon in foreground with debugging:
  /usr/libexec/bluetooth/bluetoothd -n -d

Subsequently, when I execute ./test-device connect
<bluetooth_address>, I see the following debug information:

bluetoothd[11844]: src/device.c:btd_device_set_temporary() temporary 0
bluetoothd[11844]: src/device.c:device_connect_le() Connection attempt
to: FC:7A:62:1F:F9:F6
bluetoothd[11844]: src/adapter.c:connected_callback() hci0 device
FC:7A:62:1F:F9:F6 connected eir_len 0
bluetoothd[11844]: attrib/gattrib.c:g_attrib_ref() 0x334c88: ref=1
bluetoothd[11844]: Device object not found for attrib server
bluetoothd[11844]: attrib/gattrib.c:g_attrib_unref() 0x334c88: ref=0
bluetoothd[11844]: Attribute server attach failure!
bluetoothd[11844]: src/adapter.c:dev_disconnected() Device
FC:7A:62:1F:F9:F6 disconnected, reason 2
bluetoothd[11844]: src/adapter.c:adapter_remove_connection()
bluetoothd[11844]: plugins/policy.c:disconnect_cb() reason 2
bluetoothd[11844]: src/adapter.c:bonding_attempt_complete() hci0
bdaddr FC:7A:62:1F:F9:F6 type 2 status 0xe
bluetoothd[11844]: src/device.c:device_bonding_complete() bonding
(nil) status 0x0e
bluetoothd[11844]: src/device.c:device_bonding_failed() status 14

I got it to work on an Ubuntu 14.04 VM, running on a x86 system & the
corresponding log looks as follows:

bluetoothd[3519]: src/device.c:btd_device_set_temporary() temporary 0
bluetoothd[3519]: src/device.c:device_connect_le() Connection attempt
to: FC:7A:62:1F:F9:F6
bluetoothd[3519]: src/adapter.c:connected_callback() hci0 device
FC:7A:62:1F:F9:F6 connected eir_len 0
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=1
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=2
bluetoothd[3519]: src/adapter.c:adapter_connect_list_remove() device
/org/bluez/hci0/dev_FC_7A_62_1F_F9_F6 is not on the list, ignoring
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=3
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=3
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=3
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=3
bluetoothd[3519]: src/device.c:primary_cb() status 0
bluetoothd[3519]: src/device.c:find_included_services() service count 5
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=5
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=3
bluetoothd[3519]: src/device.c:find_included_cb() status 0
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=5
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=3
bluetoothd[3519]: src/device.c:find_included_cb() status 0
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=5
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=3
bluetoothd[3519]: src/device.c:find_included_cb() status 0
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=5
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=3
bluetoothd[3519]: src/device.c:find_included_cb() status 0
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=5
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=3
bluetoothd[3519]: src/device.c:find_included_cb() status 0
bluetoothd[3519]: src/device.c:update_gatt_services() UUID Added:
00001800-0000-1000-8000-00805f9b34fb
bluetoothd[3519]: src/device.c:update_gatt_services() UUID Added:
00001801-0000-1000-8000-00805f9b34fb
bluetoothd[3519]: src/device.c:update_gatt_services() UUID Added:
6c721826-5bf1-4f64-9170-381c08ec57ee
bluetoothd[3519]: src/device.c:update_gatt_services() UUID Added:
0000180a-0000-1000-8000-00805f9b34fb
bluetoothd[3519]: src/device.c:update_gatt_services() UUID Added:
0000180d-0000-1000-8000-00805f9b34fb
bluetoothd[3519]: src/device.c:device_probe_profiles() Probing
profiles for device FC:7A:62:1F:F9:F6
bluetoothd[3519]: src/device.c:btd_device_add_attio_callback()
0x82038b8 registered ATT connection callback
bluetoothd[3519]: src/device.c:device_set_auto_connect()
FC:7A:62:1F:F9:F6 auto connect: 1
bluetoothd[3519]: src/device.c:device_set_auto_connect() Already connected
bluetoothd[3519]: src/service.c:change_state() 0x8205cf8: device
FC:7A:62:1F:F9:F6 profile Heart Rate GATT Driver state changed:
unavailable -> disconnected (0)
bluetoothd[3519]:
profiles/proximity/reporter.c:register_reporter_device() register on
device /org/bluez/hci0/dev_FC_7A_62_1F_F9_F6
bluetoothd[3519]: src/service.c:change_state() 0x8207960: device
FC:7A:62:1F:F9:F6 profile Proximity Reporter GATT Driver state
changed: unavailable -> disconnected (0)
bluetoothd[3519]: src/device.c:btd_device_add_attio_callback()
0x82038b8 registered ATT connection callback
bluetoothd[3519]: src/device.c:device_set_auto_connect()
FC:7A:62:1F:F9:F6 auto connect: 1
bluetoothd[3519]: src/service.c:change_state() 0x82079e0: device
FC:7A:62:1F:F9:F6 profile deviceinfo state changed: unavailable ->
disconnected (0)
bluetoothd[3519]: src/device.c:btd_device_add_attio_callback()
0x82038b8 registered ATT connection callback
bluetoothd[3519]: src/device.c:device_set_auto_connect()
FC:7A:62:1F:F9:F6 auto connect: 1
bluetoothd[3519]: src/service.c:change_state() 0x8200348: device
FC:7A:62:1F:F9:F6 profile gap-gatt-profile state changed: unavailable
-> disconnected (0)
bluetoothd[3519]: src/device.c:device_svc_resolved()
/org/bluez/hci0/dev_FC_7A_62_1F_F9_F6 err 0
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=2
bluetoothd[3519]: src/device.c:notify_attios()
bluetoothd[3519]: src/device.c:attio_connected()
bluetoothd[3519]: profiles/heartrate/heartrate.c:attio_connected_cb()
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=3
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=4
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=5
bluetoothd[3519]: src/device.c:attio_connected()
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=6
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=7
bluetoothd[3519]: src/device.c:attio_connected()
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=8
bluetoothd[3519]: profiles/gatt/gas.c:attio_connected_cb() MTU
Exchange: Requesting 672
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=9
bluetoothd[3519]: src/device.c:notify_attios()
bluetoothd[3519]: src/device.c:notify_attios()
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=9
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=9
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=9
bluetoothd[3519]: profiles/gatt/gas.c:exchange_mtu_cb() MTU exchange
succeeded: 23
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=9
bluetoothd[3519]: profiles/gatt/gas.c:gap_appearance_cb() GAP Appearance: 0x0340
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=9
bluetoothd[3519]: Discover Service Changed handle: No attribute found
within the given range
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=7
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=9
bluetoothd[3519]: profiles/heartrate/heartrate.c:discover_char_cb()
Body Sensor Location supported
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=7
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=7
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=8
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=7
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=6
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=7
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=6
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=7
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=6
bluetoothd[3519]: attrib/gattrib.c:g_attrib_ref() 0x8203360: ref=7
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=6
bluetoothd[3519]: attrib/gattrib.c:g_attrib_unref() 0x8203360: ref=5
bluetoothd[3519]: src/device.c:device_set_auto_connect()
FC:7A:62:1F:F9:F6 auto connect: 0
bluetoothd[3519]: src/adapter.c:adapter_connect_list_remove() device
/org/bluez/hci0/dev_FC_7A_62_1F_F9_F6 is not on the list, ignoring
bluetoothd[3519]: src/adapter.c:dev_disconnected() Device
FC:7A:62:1F:F9:F6 disconnected, reason 2
bluetoothd[3519]: src/adapter.c:adapter_remove_connection()
bluetoothd[3519]: plugins/policy.c:disconnect_cb() reason 2
bluetoothd[3519]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr
FC:7A:62:1F:F9:F6 type 2 status 0xe
bluetoothd[3519]: src/device.c:device_bonding_complete() bonding (nil)
status 0x0e
bluetoothd[3519]: src/device.c:device_bonding_failed() status 14

Any idea as to why it's working on an x86 machine and not on the ARM
board? As far as I can tell, I've been following the same installation
procedure on both these systems

^ permalink raw reply

* Re: how to set PSCAN mode in .conf?
From: Jeff Chua @ 2014-10-21 17:02 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <AC7B3B6F-9FCF-472D-9844-B076B4D66C81@holtmann.org>

On Wed, Oct 22, 2014 at 12:44 AM, Marcel Holtmann <marcel@holtmann.org> wrote:

>> Currently, I'm doing this ...
>>    # { sleep 3 && hciconfig hci0 piscan 2>/dev/null; } &
>
> I am confused why you not just use bluetoothctl (or you own tool/script) and set it. bluetoothd will enforce that setting correct for you.

Marcel,

I guess I didn't try hard enough. I just tried bluetoothctl in my
script and it's working. No "sleep" needed.

Thank again,

Jeff.

^ permalink raw reply

* Re: how to set PSCAN mode in .conf?
From: Marcel Holtmann @ 2014-10-21 16:44 UTC (permalink / raw)
  To: Jeff Chua; +Cc: linux-bluetooth
In-Reply-To: <CAAJw_Zvd3rq745QPRinnRivsYkYKH6QAHGSikEaFajY7go3yew@mail.gmail.com>

Hi Jeff,

>> If anyone wants to implement action 0x00 semantics on BR/EDR, then it requires using Periodic Inquiry. It is possible, but it is not a common use case these days.
> 
> Marcel,
> 
> If that's not common, perhaps not necessary.
> 
> But, I still want explore setting the "discoverable" and "connectable"
> in main.conf ... will you consider a patch if I work on that? I'm
> working on the raspberry Pi and every seconds count on the slow CPU
> and if these config can be set without hciconfig, it'll save another
> command.
> 
> Currently, I'm doing this ...
>    # { sleep 3 && hciconfig hci0 piscan 2>/dev/null; } &

I am confused why you not just use bluetoothctl (or you own tool/script) and set it. bluetoothd will enforce that setting correct for you.

Regards

Marcel


^ permalink raw reply

* Re: how to set PSCAN mode in .conf?
From: Jeff Chua @ 2014-10-21 16:19 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <A5A941D6-C4EB-45A1-96A5-8E9E2990EEDB@holtmann.org>

On Tue, Oct 21, 2014 at 7:06 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> If anyone wants to implement action 0x00 semantics on BR/EDR, then it requires using Periodic Inquiry. It is possible, but it is not a common use case these days.

Marcel,

If that's not common, perhaps not necessary.

But, I still want explore setting the "discoverable" and "connectable"
in main.conf ... will you consider a patch if I work on that? I'm
working on the raspberry Pi and every seconds count on the slow CPU
and if these config can be set without hciconfig, it'll save another
command.

Currently, I'm doing this ...
    # { sleep 3 && hciconfig hci0 piscan 2>/dev/null; } &


Thanks,
Jeff.

^ permalink raw reply

* Re: [PATCH v4 00/11] shared/hfp: Add support for HFP HF
From: Lukasz Rymanowski @ 2014-10-21 14:54 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org; +Cc: Lukasz Rymanowski
In-Reply-To: <1412898611-12199-1-git-send-email-lukasz.rymanowski@tieto.com>

Hi,

On 10 October 2014 01:50, Lukasz Rymanowski <lukasz.rymanowski@tieto.com> wrote:
> Following patches extends hfp API with HFP HF functionality.
> HFP HF parser has been added and unit test for it.
>
> To consider: how strict we should be when it comes to parsing
> AT responses. For example, at the moment, command +CCLC:<cr><lf>
> will be recognized as +CCLC: eventhough correct response format
> should be <cr><lf>+CCLC:<cr><lf>
>
> Note: As discussed on IRC I did not try to generalize code.
>
> v2:
> * minor self review fixes
> * response callback on send command, contains now result (OK/ERROR) and
> data from unsolicited response if available.
>
> v3:
> * Fix some memory leaks found on self review
>
> v4:
> * Fallback to approach from v1 in context of response callback for AT command.
> Bassically, if AT+X has +X and OK response, response callback contains only OK or
> ERROR code (including CME which will be added in following patches). To get +X
> response, user need to use hfp_hf_register() API. It is done mostly to keep hfp.c
> simple. With this approach we do not have to cache all +X in hfp.c before calling
> response callback.
>
> Lukasz Rymanowski (11):
>   shared/hfp: Add support for HFP HF
>   shared/hfp: Add set_debug and close_on_unref API for HFP HF
>   shared/hfp: Add set disconnect handler and disconnect API to HFP HF
>   shared/hfp: Add register/unregister event for HFP HF
>   shared/hfp: Add HFP HF parser
>   shared/hfp: Add send AT command API for HFP HF
>   unit/test-hfp: Provide test_handler function via struct data
>   unit/test-hfp: Add init test for HFP HF
>   unit/test-hfp: Add send command tests for HFP HF
>   unit/test-hfp: Add tests for unsolicited results for HFP HF
>   unit/test-hfp: Add some robustness tests for HFP HF
>
>  src/shared/hfp.c | 624 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  src/shared/hfp.h |  30 +++
>  unit/test-hfp.c  | 285 +++++++++++++++++++++++--
>  3 files changed, 920 insertions(+), 19 deletions(-)
>

ping

\Lukasz
> --
> 1.8.4
>

^ permalink raw reply

* RE: [PATCH v2] obexd/mas: Add Support for MSETime filter
From: Bharat Bhusan Panda @ 2014-10-21 14:05 UTC (permalink / raw)
  To: 'Luiz Augusto von Dentz'; +Cc: linux-bluetooth, cpgs
In-Reply-To: <CABBYNZ+ugOkF0OYQ9ovUFhOyFyGgUjh9Eay+o-fW2Qu20S9C8Q@mail.gmail.com>

Hi Luiz

> >  obexd/plugins/mas.c | 36 ++++++++++++++++++++++++++++++++++++
> >  1 file changed, 36 insertions(+)
> >
> > diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c index
> > fb97fe3..5379a01 100644
> > --- a/obexd/plugins/mas.c
> > +++ b/obexd/plugins/mas.c
> > @@ -30,6 +30,7 @@
> >  #include <glib.h>
> >  #include <fcntl.h>
> >  #include <inttypes.h>
> > +#include <sys/time.h>
> >
> >  #include <gobex/gobex.h>
> >  #include <gobex/gobex-apparam.h>
> > @@ -228,6 +229,33 @@ static void
> g_string_append_escaped_printf(GString *string,
> >         va_end(ap);
> >  }
> >
> > +static gchar *get_mse_timestamp(void) {
> > +       struct timeval time_val;
> > +       struct tm ltime;
> > +       gchar *local_ts;
> > +       char sign;
> > +
> > +       gettimeofday(&time_val, NULL);
> > +
> > +       if (!localtime_r(&time_val.tv_sec, &ltime))
> > +               return NULL;
> > +
> > +       if (difftime(mktime(localtime(&time_val.tv_sec)),
> > +                                                       mktime(gmtime(&time_val.tv_sec))) < 0)
> > +               sign = '+';
> > +       else
> > +               sign = '-';
> > +
> > +       local_ts =
> g_strdup_printf("%04d%02d%02dT%02d%02d%02d%c%2ld%2ld",
> > +                                       ltime.tm_year + 1900, ltime.tm_mon + 1,
> > +                                       ltime.tm_mday, ltime.tm_hour,
> > +                                       ltime.tm_min, ltime.tm_sec, sign,
> > +                                       ltime.tm_gmtoff/3600,
> > + (ltime.tm_gmtoff%3600)/60);
> > +
> > +       return local_ts;
> > +}
> > +
> >  static const char *yesorno(gboolean a)  {
> >         if (a)
> > @@ -243,6 +271,7 @@ static void get_messages_listing_cb(void *session,
> > int err, uint16_t size,  {
> >         struct mas_session *mas = user_data;
> >         uint16_t max = 1024;
> > +       gchar *mse_time;
> >
> >         if (err < 0 && err != -EAGAIN) {
> >                 obex_object_set_io_flags(mas, G_IO_ERR, err); @@
> > -358,6 +387,13 @@ proceed:
> >                 mas->outparams = g_obex_apparam_set_uint8(mas->outparams,
> >                                                 MAP_AP_NEWMESSAGE,
> >                                                 newmsg ? 1 : 0);
> > +               /* Response to report the local time of MSE */
> > +               mse_time = get_mse_timestamp();
> > +               if (mse_time) {
> > +                       g_obex_apparam_set_string(mas->outparams,
> > +                                               MAP_AP_MSETIME, mse_time);
> > +                       g_free(mse_time);
> > +               }
> >         }
> >
> >         if (err != -EAGAIN)
> > --
> > 1.9.1
> 
> Please check your coding style.
> 
> WARNING:LONG_LINE: line over 80 characters
> #30: FILE: obexd/plugins/mas.c:245:
> + mktime(gmtime(&time_val.tv_sec))) < 0)
> 
> WARNING:LONG_LINE: line over 80 characters
> #39: FILE: obexd/plugins/mas.c:254:
> + ltime.tm_gmtoff/3600, (ltime.tm_gmtoff%3600)/60);
> 
> total: 0 errors, 2 warnings, 60 lines checked

I have fixed the warnings and submitted v3 patch  for the same.

Best Regards,
Bharat


^ permalink raw reply

* [PATCH v3] obexd/mas: Add Support for MSETime filter
From: Bharat Panda @ 2014-10-21 13:08 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: cpgs, Bharat Panda

Changes made to add support for MSE local time and timezone offset
parameter along with GetMessageListing response.
---
 obexd/plugins/mas.c | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c
index fb97fe3..5b95b3a 100644
--- a/obexd/plugins/mas.c
+++ b/obexd/plugins/mas.c
@@ -30,6 +30,7 @@
 #include <glib.h>
 #include <fcntl.h>
 #include <inttypes.h>
+#include <sys/time.h>
 
 #include <gobex/gobex.h>
 #include <gobex/gobex-apparam.h>
@@ -228,6 +229,34 @@ static void g_string_append_escaped_printf(GString *string,
 	va_end(ap);
 }
 
+static gchar *get_mse_timestamp(void)
+{
+	struct timeval time_val;
+	struct tm ltime;
+	gchar *local_ts;
+	char sign;
+
+	gettimeofday(&time_val, NULL);
+
+	if (!localtime_r(&time_val.tv_sec, &ltime))
+		return NULL;
+
+	if (difftime(mktime(localtime(&time_val.tv_sec)),
+				mktime(gmtime(&time_val.tv_sec))) < 0)
+		sign = '+';
+	else
+		sign = '-';
+
+	local_ts = g_strdup_printf("%04d%02d%02dT%02d%02d%02d%c%2ld%2ld",
+					ltime.tm_year + 1900, ltime.tm_mon + 1,
+					ltime.tm_mday, ltime.tm_hour,
+					ltime.tm_min, ltime.tm_sec, sign,
+					ltime.tm_gmtoff/3600,
+					(ltime.tm_gmtoff%3600)/60);
+
+	return local_ts;
+}
+
 static const char *yesorno(gboolean a)
 {
 	if (a)
@@ -243,6 +272,7 @@ static void get_messages_listing_cb(void *session, int err, uint16_t size,
 {
 	struct mas_session *mas = user_data;
 	uint16_t max = 1024;
+	gchar *mse_time;
 
 	if (err < 0 && err != -EAGAIN) {
 		obex_object_set_io_flags(mas, G_IO_ERR, err);
@@ -358,6 +388,13 @@ proceed:
 		mas->outparams = g_obex_apparam_set_uint8(mas->outparams,
 						MAP_AP_NEWMESSAGE,
 						newmsg ? 1 : 0);
+		/* Response to report the local time of MSE */
+		mse_time = get_mse_timestamp();
+		if (mse_time) {
+			g_obex_apparam_set_string(mas->outparams,
+						MAP_AP_MSETIME, mse_time);
+			g_free(mse_time);
+		}
 	}
 
 	if (err != -EAGAIN)
-- 
1.9.1


^ permalink raw reply related

* Re: [PATCH v2] obexd/mas: Add Support for MSETime filter
From: Luiz Augusto von Dentz @ 2014-10-21 12:46 UTC (permalink / raw)
  To: Bharat Panda; +Cc: linux-bluetooth@vger.kernel.org, cpgs
In-Reply-To: <1413875185-16860-1-git-send-email-bharat.panda@samsung.com>

Hi,

On Tue, Oct 21, 2014 at 10:06 AM, Bharat Panda <bharat.panda@samsung.com> wrote:
> Changes made to add support for MSE local time and timezone offset
> parameter along with GetMessageListing response.
> ---
>  obexd/plugins/mas.c | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>
> diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c
> index fb97fe3..5379a01 100644
> --- a/obexd/plugins/mas.c
> +++ b/obexd/plugins/mas.c
> @@ -30,6 +30,7 @@
>  #include <glib.h>
>  #include <fcntl.h>
>  #include <inttypes.h>
> +#include <sys/time.h>
>
>  #include <gobex/gobex.h>
>  #include <gobex/gobex-apparam.h>
> @@ -228,6 +229,33 @@ static void g_string_append_escaped_printf(GString *string,
>         va_end(ap);
>  }
>
> +static gchar *get_mse_timestamp(void)
> +{
> +       struct timeval time_val;
> +       struct tm ltime;
> +       gchar *local_ts;
> +       char sign;
> +
> +       gettimeofday(&time_val, NULL);
> +
> +       if (!localtime_r(&time_val.tv_sec, &ltime))
> +               return NULL;
> +
> +       if (difftime(mktime(localtime(&time_val.tv_sec)),
> +                                                       mktime(gmtime(&time_val.tv_sec))) < 0)
> +               sign = '+';
> +       else
> +               sign = '-';
> +
> +       local_ts = g_strdup_printf("%04d%02d%02dT%02d%02d%02d%c%2ld%2ld",
> +                                       ltime.tm_year + 1900, ltime.tm_mon + 1,
> +                                       ltime.tm_mday, ltime.tm_hour,
> +                                       ltime.tm_min, ltime.tm_sec, sign,
> +                                       ltime.tm_gmtoff/3600, (ltime.tm_gmtoff%3600)/60);
> +
> +       return local_ts;
> +}
> +
>  static const char *yesorno(gboolean a)
>  {
>         if (a)
> @@ -243,6 +271,7 @@ static void get_messages_listing_cb(void *session, int err, uint16_t size,
>  {
>         struct mas_session *mas = user_data;
>         uint16_t max = 1024;
> +       gchar *mse_time;
>
>         if (err < 0 && err != -EAGAIN) {
>                 obex_object_set_io_flags(mas, G_IO_ERR, err);
> @@ -358,6 +387,13 @@ proceed:
>                 mas->outparams = g_obex_apparam_set_uint8(mas->outparams,
>                                                 MAP_AP_NEWMESSAGE,
>                                                 newmsg ? 1 : 0);
> +               /* Response to report the local time of MSE */
> +               mse_time = get_mse_timestamp();
> +               if (mse_time) {
> +                       g_obex_apparam_set_string(mas->outparams,
> +                                               MAP_AP_MSETIME, mse_time);
> +                       g_free(mse_time);
> +               }
>         }
>
>         if (err != -EAGAIN)
> --
> 1.9.1

Please check your coding style.

WARNING:LONG_LINE: line over 80 characters
#30: FILE: obexd/plugins/mas.c:245:
+ mktime(gmtime(&time_val.tv_sec))) < 0)

WARNING:LONG_LINE: line over 80 characters
#39: FILE: obexd/plugins/mas.c:254:
+ ltime.tm_gmtoff/3600, (ltime.tm_gmtoff%3600)/60);

total: 0 errors, 2 warnings, 60 lines checked


-- 
Luiz Augusto von Dentz

^ permalink raw reply

* Re: [PATCH] core: Add ControllerMode to list of supported options
From: Marcel Holtmann @ 2014-10-21 11:38 UTC (permalink / raw)
  To: Jacob Siverskog; +Cc: linux-bluetooth
In-Reply-To: <1413890907-23341-1-git-send-email-jacob@teenageengineering.com>

Hi Jacob,

> Prevent warning message 'Unknown key ControllerMode in main.conf'.
> ---
> src/main.c | 1 +
> 1 file changed, 1 insertion(+)

patch has been applied.

Regards

Marcel


^ permalink raw reply

* [PATCH] core: Add ControllerMode to list of supported options
From: Jacob Siverskog @ 2014-10-21 11:28 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth, Jacob Siverskog
In-Reply-To: <3055BAC9-79FC-42D1-B8ED-292E8B5D2665@holtmann.org>

Prevent warning message 'Unknown key ControllerMode in main.conf'.
---
 src/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main.c b/src/main.c
index 191dc11..061060d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -79,6 +79,7 @@ static const char * const supported_options[] = {
 	"ReverseServiceDiscovery",
 	"NameResolving",
 	"DebugKeys",
+	"ControllerMode",
 };
 
 GKeyFile *btd_get_main_conf(void)
-- 
1.8.3.2

^ permalink raw reply related

* Re: Confused about gatttool in Makefile.tools
From: Marcel Holtmann @ 2014-10-21 11:12 UTC (permalink / raw)
  To: Qian Lei; +Cc: linux-bluetooth
In-Reply-To: <20141021183846.3ec677db@Fedora>

Hi Quian,

> I don't understand the log message "build: Only compile actually
> selected binaries" in commit ed7989e, which modifies the file
> Makefile.tools. Gatttool and some other programs are only compiled and
> do not been installed into system any more. I'm confused about it, why
> did we do this?

some tools are only useful to developers. They should not be installed. We only install tools that are generally useful (or considered legacy like hciconfig).

The jump to BlueZ 5 came with a massive cleanup of our tools and only a selected few get installed. Main operation should be done with bluetoothctl these days.

Regards

Marcel


^ permalink raw reply

* Re: [PATCH] core: Add ControllerMode to list of supported options
From: Marcel Holtmann @ 2014-10-21 11:08 UTC (permalink / raw)
  To: Jacob Siverskog; +Cc: linux-bluetooth
In-Reply-To: <1413877738-23941-1-git-send-email-jacob@teenageengineering.com>

Hi Jacob,

> Signed-off-by: Jacob Siverskog <jacob@teenageengineering.com>

we do not add signed-off-by for userspace patches. That is only required for kernel patches.

> Prevent warning message 'Unknown key ControllerMode in main.conf'.
> ---
> src/main.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/src/main.c b/src/main.c
> index 191dc11..061060d 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -79,6 +79,7 @@ static const char * const supported_options[] = {
> 	"ReverseServiceDiscovery",
> 	"NameResolving",
> 	"DebugKeys",
> +	"ControllerMode",
> };

Good catch. Please resend the patch without signed-off-by line.

Regards

Marcel


^ permalink raw reply

* Re: how to set PSCAN mode in .conf?
From: Marcel Holtmann @ 2014-10-21 11:06 UTC (permalink / raw)
  To: Jeff Chua; +Cc: linux-bluetooth
In-Reply-To: <CAAJw_ZshxjeK5N3wcFn5cCUZJ0iKVcpFeDUAoijh7JZiweGjqg@mail.gmail.com>

Hi Jeff,

>> See doc/mgmt-api.txt for the details since btmgmt maps the management interface. In short action 1 means to allow incoming connections.
> 
> Got it. I tried "-a 0" and it returned Invalid Parameters. But anyway,
> "1" is the one I needed.

the documentation clearly says that action 0x00 and 0x02 are only valid for LE addresses. Action 0x01 is valid for BR/EDR and LE addresses.

If anyone wants to implement action 0x00 semantics on BR/EDR, then it requires using Periodic Inquiry. It is possible, but it is not a common use case these days.

Regards

Marcel


^ permalink raw reply

* Confused about gatttool in Makefile.tools
From: Qian Lei @ 2014-10-21 10:38 UTC (permalink / raw)
  To: linux-bluetooth

Dear all:

I don't understand the log message "build: Only compile actually
selected binaries" in commit ed7989e, which modifies the file
Makefile.tools. Gatttool and some other programs are only compiled and
do not been installed into system any more. I'm confused about it, why
did we do this?

Thanks.
Qian Lei

^ permalink raw reply

* [PATCH] android/pts: Update PTS files for HOGP
From: Sebastian Chlad @ 2014-10-21  9:55 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sebastian Chlad

PICS and PIXITs updated to PTS 5.3. Regression done for Android
4.4.4.
---
 android/pics-hogp.txt  | 2 +-
 android/pixit-hogp.txt | 2 +-
 android/pts-hogp.txt   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/android/pics-hogp.txt b/android/pics-hogp.txt
index d7192bf..61cf56a 100644
--- a/android/pics-hogp.txt
+++ b/android/pics-hogp.txt
@@ -1,6 +1,6 @@
 HOGP PICS for the PTS tool.
 
-PTS version: 5.2
+PTS version: 5.3
 
 * - different than PTS defaults
 # - not yet implemented/supported
diff --git a/android/pixit-hogp.txt b/android/pixit-hogp.txt
index 067c280..d32fe69 100644
--- a/android/pixit-hogp.txt
+++ b/android/pixit-hogp.txt
@@ -1,6 +1,6 @@
 HOGP PIXIT for the PTS tool.
 
-PTS version: 5.2
+PTS version: 5.3
 
 * - different than PTS defaults
 & - should be set to IUT Bluetooth address
diff --git a/android/pts-hogp.txt b/android/pts-hogp.txt
index 19292d1..d86522d 100644
--- a/android/pts-hogp.txt
+++ b/android/pts-hogp.txt
@@ -1,7 +1,7 @@
 PTS test results for HoG
 
-PTS version: 5.2
-Tested: 22-July-2014
+PTS version: 5.3
+Tested: 21-October-2014
 Android version: 4.4.4
 
 Results:
-- 
1.8.5.3


^ permalink raw reply related

* Re: [PATCH] android/pts: Updated SM PICS and PIXITs for PTS 5.3
From: Szymon Janc @ 2014-10-21  9:11 UTC (permalink / raw)
  To: Ruslan Mstoi; +Cc: linux-bluetooth
In-Reply-To: <1413814868-20811-1-git-send-email-ruslan.mstoi@linux.intel.com>

Hi Ruslan,

On Monday 20 of October 2014 17:21:08 Ruslan Mstoi wrote:
> ---
>  android/pics-sm.txt  |  6 +++---
>  android/pixit-sm.txt |  2 +-
>  android/pts-sm.txt   | 12 +++++-------
>  3 files changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/android/pics-sm.txt b/android/pics-sm.txt
> index dcdfff8..c1bfe0e 100644
> --- a/android/pics-sm.txt
> +++ b/android/pics-sm.txt
> @@ -1,6 +1,6 @@
>  SM PICS for the PTS tool.
>  
> -PTS version: 5.2
> +PTS version: 5.3
>  
>  * - different than PTS defaults
>  
> @@ -25,7 +25,7 @@ Parameter Name	Selected	Description
>  TSPC_SM_2_1	True		Authenticated MITM protection (O)
>  TSPC_SM_2_2	True		Unauthenticated no MITM protection (C.1)
>  TSPC_SM_2_3	True		No security requirements (M)
> -TSPC_SM_2_4	False		OOB supported (O)
> +TSPC_SM_2_4	False (*)	OOB supported (O)
>  -------------------------------------------------------------------------------
>  C.1: If TSPC_SM_2_1 is supported then Mandatory, else Optional
>  -------------------------------------------------------------------------------
> @@ -45,7 +45,7 @@ Parameter Name	Selected	Description
>  -------------------------------------------------------------------------------
>  TSPC_SM_4_1	True		Just Works (O)
>  TSPC_SM_4_2	True		Passkey Entry (C.1)
> -TSPC_SM_4_3	False		Out of Band (C.1)
> +TSPC_SM_4_3	False (*)	Out of Band (C.1)
>  -------------------------------------------------------------------------------
>  C.1: If TSPC_SM_2_1 is supported, at least one of these features shall be
>  	supported.
> diff --git a/android/pixit-sm.txt b/android/pixit-sm.txt
> index 2526e29..2d1442b 100644
> --- a/android/pixit-sm.txt
> +++ b/android/pixit-sm.txt
> @@ -1,6 +1,6 @@
>  SM PIXIT for the PTS tool.
>  
> -PTS version: 5.2
> +PTS version: 5.3
>  
>  * - different than PTS defaults
>  & - should be set to IUT Bluetooth address
> diff --git a/android/pts-sm.txt b/android/pts-sm.txt
> index a5c0aba..8a38d32 100644
> --- a/android/pts-sm.txt
> +++ b/android/pts-sm.txt
> @@ -1,7 +1,7 @@
>  PTS test results for SM
>  
> -PTS version: 5.2
> -Tested: 25-July-2014
> +PTS version: 5.3
> +Tested: 20-October-2014
>  Android version: 4.4.4
>  kernel version: 3.17
>  
> @@ -66,8 +66,7 @@ TC_OOB_BI_01_C		N/A
>  TC_OOB_BI_02_C		N/A
>  TC_EKS_BV_01_C		PASS
>  TC_EKS_BV_02_C		PASS
> -TC_EKS_BI_01_C		INC	PTS issue #12449
> -				btmgmt io-cap 0x03
> +TC_EKS_BI_01_C		PASS	btmgmt io-cap 0x03
>  TC_EKS_BI_02_C		PASS
>  TC_SIGN_BV_01_C		INC	PTS issue #12305
>  TC_SIGN_BV_03_C		PASS	haltest
> @@ -79,7 +78,7 @@ TC_KDU_BV_01_C		PASS	btmgmt pairable on
>  TC_KDU_BV_02_C		PASS	PTS issue #12302
>  				Note: Can pass it with following instructions:
>  				btmgmt privacy on
> -				btmgmt advetising on
> +				btmgmt advertising on
>  				Check our random address (valid for 15 min)
>  				Set PIXIT TSPX_bd_addr_iut to random address
>  				Set PIXIT TSPX_peer_type to 01
> @@ -95,7 +94,6 @@ TC_KDU_BV_05_C		PASS	PTS issue #12302
>  TC_KDU_BV_06_C		PASS	btmgmt pair -c 0x03 -t 0x01 <addr>
>  TC_KDU_BV_07_C		PASS	btmgmt pairable on
>  TC_SIP_BV_01_C		PASS	btmgmt pair -c 0x03 -t 0x01 <addr>
> -TC_SIP_BV_02_C		INC	PTS issue #12460
> -				l2test -n -J4 -V le_public <addr>
> +TC_SIP_BV_02_C		PASS	l2test -n -J4 -V le_public <addr>
>  TC_SIE_BV_01_C		PASS	btmgmt pair -c 0x03 -t 0x01 <addr>
>  -------------------------------------------------------------------------------
> 

Applied, thanks.

-- 
Best regards, 
Szymon Janc

^ permalink raw reply

* Re: [PATCH 1/2] android/bluetooth: Fix Supported feature bitmask for MPMD scenarios
From: Szymon Janc @ 2014-10-21  9:03 UTC (permalink / raw)
  To: Marcin Kraglak; +Cc: linux-bluetooth
In-Reply-To: <1413812032-26631-1-git-send-email-marcin.kraglak@tieto.com>

Hi Marcin,

On Monday 20 of October 2014 15:33:51 Marcin Kraglak wrote:
> Set A2DP-SRC_AVRCP-TG instead of A2DP-SNK_AVRCP-CT_DUN-DT bit.
> It was affecting TC_SDP_CTH_SD_BV_01_I PTS test case.
> ---
>  android/bluetooth.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/android/bluetooth.c b/android/bluetooth.c
> index 827e205..03eb1a1 100644
> --- a/android/bluetooth.c
> +++ b/android/bluetooth.c
> @@ -70,7 +70,7 @@
>   */
>  #define MPS_DEFAULT_MPMD ((1ULL << 1) | (1ULL << 3) | (1ULL << 5) | \
>  				(1ULL << 6) | (1ULL << 8) | (1ULL << 10) | \
> -				(1ULL << 12) | (1ULL << 15) | (1ULL << 18))
> +				(1ULL << 12) | (1ULL << 15) | (1ULL << 17))
>  
>  /*
>   * bits in bitmask as defined in table 6.5 of Multi Profile Specification
> 

Both patches applied. Thanks.

-- 
Best regards, 
Szymon Janc

^ permalink raw reply

* Re: [PATCH v3 0/5] android/map-client: Add MAP client daemon implementation
From: Szymon Janc @ 2014-10-21  8:34 UTC (permalink / raw)
  To: Grzegorz Kolodziejczyk; +Cc: linux-bluetooth
In-Reply-To: <1413383281-17292-1-git-send-email-grzegorz.kolodziejczyk@tieto.com>

Hi Grzegorz,

On Wednesday 15 of October 2014 16:27:56 Grzegorz Kolodziejczyk wrote:
> v1.
> *Add MAP client daemon implementation (skeleton, body)
> *Add haltest MAP client support
> 
> v2.
> *Fix style issue in cmd handler
> *Change if-else to if statements for map client instance create
> *Check if allocation of cb data has failed
> *Set free as destroy callback function for search service
> *Fix status overwrite (add fail label)
> 
> v3.
> *Fix protos handling, rfcomm channel check
> 
> Grzegorz Kolodziejczyk (5):
>   android/map-client: Add initial files
>   android/map-client: Add stubs for MAP client commands handlers
>   android/map-client: Add support for get remote MAS instances
>   android/ipc-tester: Add case for MAP client service opcode boundries
>   android/ipc-tester: Add cases for MAP client msg size
> 
>  android/Android.mk   |   1 +
>  android/Makefile.am  |   1 +
>  android/ipc-tester.c |  18 +++++
>  android/main.c       |  12 +++
>  android/map-client.c | 205 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  android/map-client.h |  26 +++++++
>  6 files changed, 263 insertions(+)
>  create mode 100644 android/map-client.c
>  create mode 100644 android/map-client.h
> 

I've fixed this double free you mentioned and applied all patches, thanks.

-- 
Best regards, 
Szymon Janc

^ permalink raw reply

* [PATCH] core: Add ControllerMode to list of supported options
From: Jacob Siverskog @ 2014-10-21  7:48 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jacob Siverskog

Signed-off-by: Jacob Siverskog <jacob@teenageengineering.com>

Prevent warning message 'Unknown key ControllerMode in main.conf'.
---
 src/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main.c b/src/main.c
index 191dc11..061060d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -79,6 +79,7 @@ static const char * const supported_options[] = {
 	"ReverseServiceDiscovery",
 	"NameResolving",
 	"DebugKeys",
+	"ControllerMode",
 };
 
 GKeyFile *btd_get_main_conf(void)
-- 
1.8.3.2


^ permalink raw reply related

* Re: [PATCH v2 bluetooth-next 1/4] 6lowpan: remove skb_deliver from IPHC
From: Alexander Aring @ 2014-10-21  7:31 UTC (permalink / raw)
  To: Martin Townsend
  Cc: Martin Townsend, linux-bluetooth, linux-wpan, marcel,
	jukka.rissanen
In-Reply-To: <5445801D.30800@xsilon.com>

Hi Martin,

On Mon, Oct 20, 2014 at 10:35:25PM +0100, Martin Townsend wrote:
> Hi Alex,
> 
> On 20/10/14 20:18, Alexander Aring wrote:
> >Hi Martin,
> >
> >On Mon, Oct 20, 2014 at 03:39:48PM +0100, Martin Townsend wrote:
> >>Separating skb delivery from decompression ensures that we can support further
> >>decompression schemes and removes the mixed return value of error codes with
> >>NET_RX_FOO.
> >>
> >>Signed-off-by: Martin Townsend <mtownsend1973@gmail.com>
> >>Signed-off-by: Martin Townsend <martin.townsend@xsilon.com>
> >All your patches have two different "Signed-off-by". Please use only one
> >here.
> I think I know how this occurred, 2 difference computers with 2 different
> git configs :)  I'll fix this in the next series.
> >>---
> >>  include/net/6lowpan.h         |  4 +---
> >>  net/6lowpan/iphc.c            | 32 ++++++--------------------------
> >>  net/bluetooth/6lowpan.c       | 12 +++++++++++-
> >>  net/ieee802154/6lowpan_rtnl.c | 26 ++++++++++++++------------
> >>  4 files changed, 32 insertions(+), 42 deletions(-)
> >>
> >...
> >>diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
> >>index 6c5c2ef..03787e0 100644
> >>--- a/net/bluetooth/6lowpan.c
> >>+++ b/net/bluetooth/6lowpan.c
> >>@@ -290,7 +290,7 @@ static int process_data(struct sk_buff *skb, struct net_device *netdev,
> >>  	return lowpan_process_data(skb, netdev,
> >>  				   saddr, IEEE802154_ADDR_LONG, EUI64_ADDR_LEN,
> >>  				   daddr, IEEE802154_ADDR_LONG, EUI64_ADDR_LEN,
> >>-				   iphc0, iphc1, give_skb_to_upper);
> >>+				   iphc0, iphc1);
> >>  drop:
> >>  	kfree_skb(skb);
> >>@@ -350,6 +350,16 @@ static int recv_pkt(struct sk_buff *skb, struct net_device *dev,
> >>  			if (ret != NET_RX_SUCCESS)
> >>  				goto drop;
> >>+			local_skb->protocol = htons(ETH_P_IPV6);
> >>+			local_skb->pkt_type = PACKET_HOST;
> >>+			local_skb->dev = dev;
> >>+
> >>+			if (give_skb_to_upper(local_skb, dev)
> >>+					!= NET_RX_SUCCESS) {
> >There is still a  NET_RX_FOO and errno conversion in function
> >"give_skb_to_upper". Please check that, maybe introduce a new patch for
> >this one.
> I thought give_skb_to_upper only returned NET_RX_FOO return values? I'll
> double check and fix.
> >

<qoute>
static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev)
{
	struct sk_buff *skb_cp;

	skb_cp = skb_copy(skb, GFP_ATOMIC);
	if (!skb_cp)
		return -ENOMEM;

Returning errno here.


	return netif_rx(skb_cp);

Returning NET_RX_FOO here. Here should be the same behaviour like below.
Only without a loop. Because the skb_share_check and only one lowpan
interface, I think we don't need the skb_copy here. This is out of scope
in this patch.

}
</qoute>

> >>+				kfree_skb(local_skb);
> >>+				goto drop;
> >>+			}
> >>+
> >>  			dev->stats.rx_bytes += skb->len;
> >>  			dev->stats.rx_packets++;
> >>diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
> >>index 0c1a49b..898d317 100644
> >>--- a/net/ieee802154/6lowpan_rtnl.c
> >>+++ b/net/ieee802154/6lowpan_rtnl.c
> >>@@ -146,8 +146,9 @@ static int lowpan_give_skb_to_devices(struct sk_buff *skb,
> >>  		if (lowpan_dev_info(entry->ldev)->real_dev == skb->dev) {
> >>  			skb_cp = skb_copy(skb, GFP_ATOMIC);
> >>  			if (!skb_cp) {
> >>-				stat = -ENOMEM;
> >>-				break;
> >>+				kfree_skb(skb);
> >>+				rcu_read_unlock();
> >>+				return NET_RX_DROP;
> >>  			}
> >>  			skb_cp->dev = entry->ldev;
> >>@@ -155,6 +156,11 @@ static int lowpan_give_skb_to_devices(struct sk_buff *skb,
> >>  		}
> >>  	rcu_read_unlock();
> >>+	if (stat == NET_RX_SUCCESS)
> >>+		consume_skb(skb);
> >>+	else
> >>+		kfree_skb(skb);
> >>+
> >You will not see it because somebody forgot brackets in the above
> >"list_for_each_entry_rcu" loop. But variable "stat" in this case is only
> >for the last entry of netif_rx call.
> This is a bug that's probably outside the scope of this patch.
> >Also if netif_rx returns NET_RX_DROP, which is the else branch in this
> >case. In case of netif_rx the skb will be freed somewhere else.
> >
> >Calltrace:
> >
> >- netif_rx
> >- netif_rx_internal
> >- enqueue_to_backlog
> >   - kfree_skb(skb);
> >   - return NET_RX_DROP;
> The copy will be freed not the skb that is passed to the function.

mhh, okay.

>     skb_cp = skb_copy(skb, GFP_ATOMIC);
>     ....
>     stat = netif_rx(skb_cp);
> 
> What to do with stat that is set multiple times in a loop.  We could call
> skb_consume if stat is always NET_RX_SUCCESS or call skb_consume if stat is
> at least NET_RX_SUCCESS once, or maybe remove the loop further out the call
> chain  ...   if possible??
> 

static int lowpan_give_skb_to_devices(struct sk_buff *skb,
                                      struct net_device *dev)
{
        struct lowpan_dev_record *entry;
        struct sk_buff *skb_cp;
        int stat = NET_RX_SUCCESS;

        rcu_read_lock();
        list_for_each_entry_rcu(entry, &lowpan_devices, list)
                if (lowpan_dev_info(entry->ldev)->real_dev == skb->dev) {
                        skb_cp = skb_copy(skb, GFP_ATOMIC);
                        if (!skb_cp) {
                                kfree_skb(skb);
                                rcu_read_unlock();
                                return NET_RX_DROP;
                        }

                        skb_cp->dev = entry->ldev;
                        stat = netif_rx(skb_cp);
			if (stat == NET_RX_DROP)
				break;
                }
        rcu_read_unlock();

	consume_skb(skb);

        return stat;
}

We don't need no explicit run of kfree_skb or consume_skb here. in
this case "skb" should only a skb where we create copies from. After
that we don't dropping the skb. Okay, we only drop it if allocation
failed. I this okay now or I overlooked something here?

- Alex

^ permalink raw reply

* [PATCH v2] obexd/mas: Add Support for MSETime filter
From: Bharat Panda @ 2014-10-21  7:06 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: cpgs, Bharat Panda

Changes made to add support for MSE local time and timezone offset
parameter along with GetMessageListing response.
---
 obexd/plugins/mas.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c
index fb97fe3..5379a01 100644
--- a/obexd/plugins/mas.c
+++ b/obexd/plugins/mas.c
@@ -30,6 +30,7 @@
 #include <glib.h>
 #include <fcntl.h>
 #include <inttypes.h>
+#include <sys/time.h>
 
 #include <gobex/gobex.h>
 #include <gobex/gobex-apparam.h>
@@ -228,6 +229,33 @@ static void g_string_append_escaped_printf(GString *string,
 	va_end(ap);
 }
 
+static gchar *get_mse_timestamp(void)
+{
+	struct timeval time_val;
+	struct tm ltime;
+	gchar *local_ts;
+	char sign;
+
+	gettimeofday(&time_val, NULL);
+
+	if (!localtime_r(&time_val.tv_sec, &ltime))
+		return NULL;
+
+	if (difftime(mktime(localtime(&time_val.tv_sec)),
+							mktime(gmtime(&time_val.tv_sec))) < 0)
+		sign = '+';
+	else
+		sign = '-';
+
+	local_ts = g_strdup_printf("%04d%02d%02dT%02d%02d%02d%c%2ld%2ld",
+					ltime.tm_year + 1900, ltime.tm_mon + 1,
+					ltime.tm_mday, ltime.tm_hour,
+					ltime.tm_min, ltime.tm_sec, sign,
+					ltime.tm_gmtoff/3600, (ltime.tm_gmtoff%3600)/60);
+
+	return local_ts;
+}
+
 static const char *yesorno(gboolean a)
 {
 	if (a)
@@ -243,6 +271,7 @@ static void get_messages_listing_cb(void *session, int err, uint16_t size,
 {
 	struct mas_session *mas = user_data;
 	uint16_t max = 1024;
+	gchar *mse_time;
 
 	if (err < 0 && err != -EAGAIN) {
 		obex_object_set_io_flags(mas, G_IO_ERR, err);
@@ -358,6 +387,13 @@ proceed:
 		mas->outparams = g_obex_apparam_set_uint8(mas->outparams,
 						MAP_AP_NEWMESSAGE,
 						newmsg ? 1 : 0);
+		/* Response to report the local time of MSE */
+		mse_time = get_mse_timestamp();
+		if (mse_time) {
+			g_obex_apparam_set_string(mas->outparams,
+						MAP_AP_MSETIME, mse_time);
+			g_free(mse_time);
+		}
 	}
 
 	if (err != -EAGAIN)
-- 
1.9.1


^ permalink raw reply related

* Re: how to set PSCAN mode in .conf?
From: Jeff Chua @ 2014-10-21  5:53 UTC (permalink / raw)
  To: Szymon Janc; +Cc: Marcel Holtmann, linux-bluetooth
In-Reply-To: <5460120.arhYbJZIVa@athlon>

On Tue, Oct 21, 2014 at 2:49 AM, Szymon Janc <szymon.janc@gmail.com> wrote:

> Proper syntax for this would be:
> btmgmt -i hci0 connectable on

Szymon,

Thank you. That works!

Jeff

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox