linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Not getting connected events
@ 2019-01-08  2:28 Chris Cook
  0 siblings, 0 replies; only message in thread
From: Chris Cook @ 2019-01-08  2:28 UTC (permalink / raw)
  To: linux-bluetooth

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-08  2:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-08  2:28 Not getting connected events Chris Cook

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).