Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2262721pxb; Sun, 24 Jan 2021 00:45:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiENcT6TyCzYLns2wSWuxPR+eMSlr2uLFBNFhGEZoEiBuLTUCDYveY/invN+j7/C3ckpMl X-Received: by 2002:a17:907:94c8:: with SMTP id dn8mr101864ejc.512.1611477937069; Sun, 24 Jan 2021 00:45:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611477937; cv=none; d=google.com; s=arc-20160816; b=gAxJhbtPNAhZIe+p1LOD/J1eFuM6WbtSe5i/ebSf5eesCWP550Gd9Oj2AcjUXuuGWV lFd5nPm3X5JUsxAv/9FD4/ROYV3DuRjj7BxOury9vhrTFTBRyt/iq4biiKDr78Bkc+6e ufmW4vnyzAxUnhlkVTjipzU8TgOIsmOMS6ibzxpvhSkMiQX6APXolPrVlMCsuzk9Mwf6 q73TtzLg5Fku2ZaLO0K9ZT/q7yE+kCd6npqKTpqNGJURkG9RutlBxGK7uX/PWRFieEr1 rwzUp9Yk6cWDFil/jKnXKlVfI28MfCxfYBQwRFprmVCTOROPW5E1pA5xXW8QX58PpVPx ziUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:mime-version :dkim-signature; bh=taEWJJyWJyZx8rbXKxxdh3Oq3vnA5E7IUJ4lTnx3UDs=; b=VAKAI4X5rSdTV9ZBMWGUhJUGAP9pL3UqT0CrvMIaJfJQ/U/MqcOJZQy8UDFKULOeMR iYTsJtMXahWEQxk9X99elTFZpSYFpzQZmJfNrZ+cyfeVBacrWTI0TMQ6AJnAUKyrMRpd vBwu/z4pgl5Gv0aEAOci45OjrVH/YdXbrhfDRWdXdrWYubukS3TgFoZPABlWRAFMTsFo D/BgiZnEZUCQlZb6xV8V9b+OqNjH1Z1t6k0s88r5mmqqtqfC/KQOh5pDhOrW5YdXuDNR n2KUQVK6C3gAG7E3c5ma6iclDr/Qh/+7a/oI1V/b3eOXNLxgslL3eV0Zidv1rk7Z82e9 vOnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qk0yjKS3; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si4767009edw.174.2021.01.24.00.44.59; Sun, 24 Jan 2021 00:45:37 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=qk0yjKS3; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726546AbhAXIn2 (ORCPT + 99 others); Sun, 24 Jan 2021 03:43:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726531AbhAXInW (ORCPT ); Sun, 24 Jan 2021 03:43:22 -0500 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A37DC061573 for ; Sun, 24 Jan 2021 00:42:42 -0800 (PST) Received: by mail-qk1-x733.google.com with SMTP id x81so6841444qkb.0 for ; Sun, 24 Jan 2021 00:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=taEWJJyWJyZx8rbXKxxdh3Oq3vnA5E7IUJ4lTnx3UDs=; b=qk0yjKS3fvv/kR2XTbRP+/mkEeNb36F0k8+r+mRb7crjw+AaiIkvDl3RpL+VHcNSMZ rcJRt5eheOqbIcfXyly+elhpuFCYssAZ6lI75SJm0SigXREM9dODnRjoYvnTStv8pOIY rdoBQ1ssRwycVYlnrU5JxRF0fvO+XuXw6MFY0I+PRQnIUcT7bBjtABRte58hiMUvWSFD U+2jIANoDiYZJC6P6JkmMm3fsQDMITnlOIQq/970EskqE5qS4/nosIJB/dAzc1kmY+HU 7orqtk2lHDlkGziy8ldpOwFV2hcCZQs88GE850i6ptabx/IQ0iaVlrEsOuWPweZVbDmH v9qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=taEWJJyWJyZx8rbXKxxdh3Oq3vnA5E7IUJ4lTnx3UDs=; b=MlQePPO5t16VEbvPpvYZZvGsk/G5mJ9rNifrMKcB862AfUWlkl1qYg5SQEOXqyoupl aI/x4yuErK521bCsIgQpHf3G/+DKNtvJxPrFlYDUya2ICbGF6Np+Mbv3ALxRr02GxbX8 QOHpHlk+bZEgjG9AWXJnHyt6pr2RDIOLwfRJRTczZBasS4Z69Y9JLCAiNwvoQPf5p43v c/JEXy4YHUPvbuMNH6vNomNdwVKDVEJF3I/ZJRJ7Rw6cWgQyL9Gb/MS9AOH3GcsnKcuG FcdWz/UP0umWep8wBpChduEEBgW/0cM51vkf+KSAe1+Nw7WJcLUhKiDUYtFqpxTYgjCd kQtg== X-Gm-Message-State: AOAM53322J1M+yJzwBkfUumHO5qz7e3NWvIfIA0FIbXOAWW1lyBmKj6y BkKYNXrBMEdLfSZW+R0mxtXgNeupt3wMuTwBQcdvuP7ouSp2 X-Received: by 2002:a37:8204:: with SMTP id e4mr108966qkd.351.1611477761481; Sun, 24 Jan 2021 00:42:41 -0800 (PST) MIME-Version: 1.0 From: Kenny Bian Date: Sun, 24 Jan 2021 00:42:30 -0800 Message-ID: Subject: How to add "Service Changed Indication" To: linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hello, We implemented a GATT server on Linux in Python. The code is based on the code sample(https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-gatt-server). The BlueZ version is 5.48. But we found a problem. The cached data in /var/lib/bluetooth caused the mobile app to crash if some characteristics are changed. After some research, we found "Under BLE standard 'Generic Attribute'(0x1801), there is a Characteristic 'Service Changed' (0x2A05) with 'indicate' property", see https://github.com/espressif/esp-idf/issues/1777. The questions we have: How to enable the "Service Changed Indication"(0x2A05) in the bluetooth? Is there any code example in Python? Thanks in advance!