Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@gmail.com>
To: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/5] android/bluetooth: Fix incoming just works bonding
Date: Thu, 28 Aug 2014 21:01:41 +0200	[thread overview]
Message-ID: <3006256.uhzohje5bW@athlon> (raw)
In-Reply-To: <1409085712-12402-1-git-send-email-lukasz.rymanowski@tieto.com>

Hi Łukasz,

On Tuesday 26 August 2014 22:41:48 Lukasz Rymanowski wrote:
> With this patch Android framework will be notified about bonded device
> which initiated bonding and used just works association model.
> ---
>  android/bluetooth.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/android/bluetooth.c b/android/bluetooth.c
> index 984ecba..96f6101 100644
> --- a/android/bluetooth.c
> +++ b/android/bluetooth.c
> @@ -889,8 +889,20 @@ static void update_device_state(struct device *dev,
> uint8_t addr_type,
> 
>  	new_bond = device_bond_state(dev);
> 
> -	if (old_bond != new_bond)
> +	if (old_bond != new_bond) {
> +		/*
> +		 * For incoming just works bonding we will switch here from
> +		 * non bonded to bonded directly. This is something Android
> +		 * will not handle in their bond state machine. To make Android
> +		 * handle it corretly we need to send BONDING state before BOND
> +		 */
> +		if (old_bond == HAL_BOND_STATE_NONE &&
> +					new_bond == HAL_BOND_STATE_BONDED)
> +			send_bond_state_change(dev, status,
> +							HAL_BOND_STATE_BONDING);
> +
>  		send_bond_state_change(dev, status, new_bond);
> +	}
>  }
> 
>  static void send_device_property(struct device *dev, uint8_t type,

All patches applied. Thanks.

-- 
Szymon K. Janc
szymon.janc@gmail.com

      parent reply	other threads:[~2014-08-28 19:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 20:41 [PATCH 1/5] android/bluetooth: Fix incoming just works bonding Lukasz Rymanowski
2014-08-26 20:41 ` [PATCH 2/5] android/tester: Move emu related functions to tester main Lukasz Rymanowski
2014-08-26 20:41 ` [PATCH 3/5] android/tester: Add parameter to remote connect function Lukasz Rymanowski
2014-08-26 20:41 ` [PATCH 4/5] android/tester: Add function to set io cap to bthost Lukasz Rymanowski
2014-08-26 20:41 ` [PATCH 5/5] android/tester: Add test for incoming bonding Lukasz Rymanowski
2014-08-28 19:01 ` Szymon Janc [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3006256.uhzohje5bW@athlon \
    --to=szymon.janc@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lukasz.rymanowski@tieto.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox