Skip to contentSkip to conversation

Add Broadcaster property in DeviceFound signal

PATCH In review Sheldon Demario 2 participants 2 messages Dec 23, 2010 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add Broadcaster property in DeviceFound signal

Broadcaster property is required to distinguish the device role. If the remote is sending an advertising event, two possible roles are possible: Peripheral or Broadcaster.

This change is required to pass on qualification tests which require filtering Broadcasting devices during General Discovery Procedure.

---
 doc/adapter-api.txt |    3 ++-
 src/adapter.c       |    8 ++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)
doc/adapter-api.txt +2 -1
index f287f29..5272d74 100644
@@ -185,7 +185,8 @@ Signals		PropertyChanged(string name, variant value)
 			The dictionary can contain basically the same values
 			that are returned by the GetProperties method
 			from the org.bluez.Device interface. In addition there
-			can be values for the RSSI and the TX power level.
+			can be values for the RSSI, the TX power level and
+			Broadcaster role.
 
 		DeviceDisappeared(string address)
 
src/adapter.c +8 -0
index bf92211..fddf0ad 100644
@@ -2829,12 +2829,20 @@ void adapter_emit_device_found(struct btd_adapter *adapter,
 	}
 
 	if (dev->le) {
+		gboolean broadcaster;
+
+		if (dev->flags & (EIR_LIM_DISC | EIR_GEN_DISC))
+			broadcaster = FALSE;
+		else
+			broadcaster = TRUE;
+
 		emit_device_found(adapter->path, paddr,
 				"Address", DBUS_TYPE_STRING, &paddr,
 				"RSSI", DBUS_TYPE_INT16, &rssi,
 				"Name", DBUS_TYPE_STRING, &dev->name,
 				"Paired", DBUS_TYPE_BOOLEAN, &paired,
 				"UUIDs", DBUS_TYPE_ARRAY, &dev->uuids,
+				"Broadcaster", DBUS_TYPE_BOOLEAN, &broadcaster,
 				dev->uuid_count, NULL);
 		return;
 	}
Signature · 1 line
1.7.3.2
#1 lore raw

Hi Sheldon,

Quoted 10 lines · Sheldon Demario

Broadcaster property is required to distinguish the device role. If the remote is sending an advertising event, two possible roles are possible: Peripheral or Broadcaster.

This change is required to pass on qualification tests which require filtering Broadcasting devices during General Discovery Procedure.

---
 doc/adapter-api.txt |    3 ++-
 src/adapter.c       |    8 ++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)

Pushed upstream after I reformated your commit message to properly fit a 80 column wide terminal. Please pay attention to that in the future.

Johan