All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yunhan Wang <yunhanw@nestlabs.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Subject: Re: notification has not yet been cleaned in server side when ble is disconnected.
Date: Tue, 10 Oct 2017 01:02:01 -0700	[thread overview]
Message-ID: <CALvjcs-RSrdJVpqNhU8tcGxO0CPL4OG83L=Mkjb_nFv2EgvBZQ@mail.gmail.com> (raw)
In-Reply-To: <CALvjcs8EHZWsNd+wwcQ_XgdstpgLCpVa-Je-Xuo0PYq=anrtuw@mail.gmail.com>

Hi, Luiz

Please ignore the previous email.

I am seeing a bluez gatt notification problem in gatt-database.c

Here is scenario:

1. Assume server has one characteristic A that is subscribed by client
and sending notification,
2. Then ble connection is disconnected by client directly or
connection disappear without unsubscribing A.
3. Client tries to connect to ble successfully
4. Client fails to subscribe that characteristic A although ble
connection is ok.
5. Another retry to make Ble connection and subscribe to A can work.

It seems ble disconnect at step 2 only disconnect ble connection and
does not cleanup notify_io and stop
notification in step 3 at code,
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/gatt-database.c

It seems retry in step 4 would trigger ccc_write_cb and release
notify_io and stop notification so that step 5 would succeed.
partial log from step 4:
ccc_write_cb() External CCC write received with value: 0x0000
pipe_hup() 0x921290 closed

Any idea?

Thanks
Best wishes
Yunhan

  reply	other threads:[~2017-10-10  8:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10  7:57 notification has not yet been cleaned in server side when ble is disconnected Yunhan Wang
2017-10-10  8:02 ` Yunhan Wang [this message]
2017-10-10  8:19   ` Luiz Augusto von Dentz
2017-10-10  8:48     ` Yunhan Wang
2017-10-10 10:07       ` Luiz Augusto von Dentz
2017-10-10 15:56         ` Yunhan Wang
     [not found]         ` <CALvjcs-gHUG2byLTCXma9qiRiDAfXpSPcmSePifCUZeDpeLdzA@mail.gmail.com>
     [not found]           ` <CABBYNZJySnOPJETdST18KqW1QLAMeHuhyynuoqGjhpoS_fCHYA@mail.gmail.com>
2017-10-21  0:28             ` Yunhan Wang

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='CALvjcs-RSrdJVpqNhU8tcGxO0CPL4OG83L=Mkjb_nFv2EgvBZQ@mail.gmail.com' \
    --to=yunhanw@nestlabs.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.