[PATCH BlueZ] gap: Enable the external flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Joseph Hwang <josephsih@xxxxxxxxxxxx>

This patch enables the external flag for gap so that the gap service can
be exported over D-Bus.

Tested on Chrome OS that this fixes https://crbug.com/722987 so that GAP
API can be propagated to Android apps.

Test Method 1:
  - Connect to a peripheral.
  - Use dbus methods to query the org.bluez.GattService1
    interface in managed objects.
  - Confirm that the gap 0x1800 profile was exported like:
    GattService1 path: /org/bluez/hci0/dev_xx/service0001
    service_props: dbus.String(u'UUID'):
        dbus.String(u'00001800-0000-1000-8000-00805f9b34fb'

Test Method 2:
  - Install BleManager APK attached in C#0 of https://crbug.com/722987
    to ARC++ in a chromebook.
  - Launch the application.
  - Connect to a Dash robot. Confirm that there are 3 services
    instead of 2.

Reviewed-by: Sonny Sasaka <sonnysasaka@xxxxxxxxxxxx>

---
 profiles/gap/gas.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/profiles/gap/gas.c b/profiles/gap/gas.c
index dffa31314..abe5341c0 100644
--- a/profiles/gap/gas.c
+++ b/profiles/gap/gas.c
@@ -310,6 +310,7 @@ static int gap_disconnect(struct btd_service *service)
 static struct btd_profile gap_profile = {
 	.name		= "gap-profile",
 	.remote_uuid	= GAP_UUID,
+	.external	= true,
 	.device_probe	= gap_probe,
 	.device_remove	= gap_remove,
 	.accept		= gap_accept,
-- 
2.26.2




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux