Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp40796pxa; Fri, 21 Aug 2020 00:06:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBDI8Wt6iCfR8ABpT0olqdBnsdD/wuSxeCn4SRQAe7LrXniPBq0clBruT/QkSh+IAlnQDu X-Received: by 2002:a17:906:68da:: with SMTP id y26mr1541106ejr.250.1597993561432; Fri, 21 Aug 2020 00:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597993561; cv=none; d=google.com; s=arc-20160816; b=EyIsN5Hfw8LtMWWQQIySvcfvFdN0tFBi/9EFIIfc+gTc5V+n+wIdcHXTYLWKGG9poz zIzBW53HgYFOvwrcuZrUAPk1sHmontBCooq/TbyHDiGvXgToZS8y/uJbbRiW/pkoMtds txG5SZ8X+2wyi/9h7eXHeUEy8rtb+eY6URxmQTEIudLSU5gABiii2DhaX0/vclOUfRMY rHePh3bA8dfDSZG+mRyqWGhIMojJRb5a9r8T0PolKIggxLahXv2YvybupgtkaJtN0Xue /e0WUiSHKzIgTs/jxCi+quNUo5zHcCMK8YlFFhxSuxFG22c0MQcG9PJ+J4VvChOMaB9R aJag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1bpqRclnj9iSVxDziurF6sjEMgtIADpu9kvp6djvcNs=; b=LcQ9Gj4BPj+BC7b7Xd8Rlo3JoH08U00JSMv/0JXMZqdIr91Laa7jnJfM63iebTCGJI 7qX1CSxkQaFxt2N0NyzgESJfljHl9jdgRK/GWXUCvjr9Qa9pSSEXQJHJUnmZPF+3d0T6 Q3aRnj6QnkLiwOTHmnvUEMysxa51HZDR3TWwraPD/2R8ZsZf5POhbPGJOUWVqHEASG6V mNyT88LgHJoskD8LAttLc+wDDms2HwXiflxWRNTBRJVWG/Trr2CR0F4FjkWWZFCUbqg7 Zx1E82WKO/gjszzQ4cx/S084k+72c2ReWMc2naRL2qHcX1n3l6nJRv4TQIOA+e2Ltsfx 3poA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=g9SPW7Ia; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si547613eds.317.2020.08.21.00.05.25; Fri, 21 Aug 2020 00:06:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=g9SPW7Ia; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727091AbgHUHEd (ORCPT + 99 others); Fri, 21 Aug 2020 03:04:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbgHUHEc (ORCPT ); Fri, 21 Aug 2020 03:04:32 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BABB9C061385 for ; Fri, 21 Aug 2020 00:04:32 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id t11so477543plr.5 for ; Fri, 21 Aug 2020 00:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1bpqRclnj9iSVxDziurF6sjEMgtIADpu9kvp6djvcNs=; b=g9SPW7IajK/DVedYtIzXGVTuSCGYJVS5BkgGSK6UXWTT7MBuZLH+fetsFvfIGk9ik4 KJKms+NaXPxtf9J7Y/DSMggTp4Zr8mw8lHKFVPAfLxArcF4D9+mxMtAOpN5iY1ft8k+6 Ao9Lvo7fL958xjftiVTvpvj1G50Ej48ynPnvQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1bpqRclnj9iSVxDziurF6sjEMgtIADpu9kvp6djvcNs=; b=XZhH0Hsa+l5SQ+BURh3We5BRzci3xdyYwgapzis8C5HLd5zGWGdRht32fyd4YUliMZ EVsBQI25HvPSjG5p8f0IiflpE2kNzdDgfPYfHOc+HLfl5nF86PtHyEqWjjVcXawirT85 CtGAJ5dzdY0IpmK0h3r36HqxM8WuUXYV+hEuYwe5LxYuT05VvGqOAsr2auQfEzqjX7nG xBWuUnnKWRNbU2+rseXIWI8DIUl6/589Sw6XG4RWrXnrgnr4l5rpJG7Vb68yiyVfKn0S 0Ei56FwXJeBP1PgbyXNuw67NTZa69dDgEpVLgOapabXPHGLZkLGK704pHzYxiG+FJ49H Rasw== X-Gm-Message-State: AOAM531UFlqRxFM6rJp7Fzs4AO1WGlBuCWJC2eF+f8IhgCHTOL5jrtEA fp63EGlPA5Pe5EtPiQijVJC0QvTPTeKluQ== X-Received: by 2002:a17:902:30d:: with SMTP id 13mr1297142pld.300.1597993471653; Fri, 21 Aug 2020 00:04:31 -0700 (PDT) Received: from sonnysasaka-chrome.mtv.corp.google.com ([2620:15c:202:201:4a0f:cfff:fe66:e60c]) by smtp.gmail.com with ESMTPSA id s23sm989753pjr.7.2020.08.21.00.04.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Aug 2020 00:04:30 -0700 (PDT) From: Sonny Sasaka To: linux-bluetooth@vger.kernel.org Cc: Joseph Hwang , Sonny Sasaka Subject: [PATCH BlueZ] gap: Enable the external flag Date: Fri, 21 Aug 2020 00:04:09 -0700 Message-Id: <20200821070409.18037-1-sonnysasaka@chromium.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Joseph Hwang 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 --- 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