Linux-Bluetooth Archive on lore.kernel.org
 help / Atom feed
* Not getting connected events
@ 2019-01-08  2:28 Chris Cook
  0 siblings, 0 replies; 1+ messages 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] 1+ messages in thread

only message in thread, back to index

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

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox