linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Cook <pooh@mytenten.com>
To: linux-bluetooth@vger.kernel.org
Subject: Not getting connected events
Date: Tue, 8 Jan 2019 11:28:17 +0900	[thread overview]
Message-ID: <7A8D5C38-F115-4D39-873D-58B596E467EB@mytenten.com> (raw)

I'm having an issue using the Bluez stack on an embedded linux platform related to Connected events.  Our application uses BLE only and have set bredr off. We implemented a handler for properties changed event on the Device interface and specifically look for the Connected property.
 
We can connect external BLE apps and exchange messages fine but we only ever see Connected = False events and never receive any event notification for Connected = True. I’ve even resorted to printing out all events we recieve from the PropertiesChanged dbus handler and no properties changed events ever occur during the time slot in which the client is connecting to us. The connected = false events always occur at the right time (when our app disconnects ).

 In trying to figure this out, I dug through the Blues code stack to figure out where this might get dropped…  Trail (as best I can follow) leads me to src/device.c

void device_add_connection(struct btd_device *dev, uint8_t bdaddr_type)


I don’t see any logs being generated for "Device %s is already connected" so that brings me to this line as the prime suspect:


if (dev->le_state.connected && dev->bredr_state.connected)
   return;


Not very clear on why this is there.  My limited reasoning skills would assume that I shouldn’t be bredr_state.connected
Given that I’ve set  bredr off but I may just not be understanding….

I'd appreciate it if anyone can give me some insight on why we would be seeing this....


Thanks,

Pooh

                 reply	other threads:[~2019-01-08  2:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=7A8D5C38-F115-4D39-873D-58B596E467EB@mytenten.com \
    --to=pooh@mytenten.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).