Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp18230ybt; Tue, 30 Jun 2020 13:55:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykLmQDQqPUib4J+UMUJ0ZJ0Q4FE3ZBLUq6ojufH0BOs14v0o981dUYTeQWst9X4vSJAVZQ X-Received: by 2002:a50:ba8b:: with SMTP id x11mr25857007ede.201.1593550092691; Tue, 30 Jun 2020 13:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593550092; cv=none; d=google.com; s=arc-20160816; b=CeAtnsP2bPim96WotYwCQum0xyKU+V3zo3X1QIM/wEuhFo5Tvv5CCuY5VAz4E0FcHs nzR/OW4IWEIA0lNfPF3e7BES0ejvbumcVd/roM3Qb4Rx4sQ509OcUqa3F9p47Ev4YTgK 4LRvflnu6eTZK36CNhltyKLYpP+agpWRtLxiNWxu2wK0qXnEXZakTqSFo08RnobJOqJ+ Zd7ozINgItitQaIpJpQds/TVC5oFotU5sb/BxEvOLkxTPwocnN/pfwHwcTlO4DONyMwc aV04YO0/E1x6l0fXfn1ZFop9OiZSmKyvunzBfbEwYLE67GlOmHf7I98AlUlLOWnbQgT4 ljCw== 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:ironport-sdr:ironport-sdr; bh=W4LdHE0mPbV6lFAvjBdZf3jwlqkaSrWKZSgLrA4XrQI=; b=SSZKgRgtUOqAcxJpuylL8u85eSEbXYLYsNEp0r6qN5J+Uu6P6Kq8axdO3IWf0vz4b+ nrikPmoYlNBokjuKbjcw3d/vkkXvsNEQJ5o8ppFJOrGKSEmGH7Mp4SI/OfXHE821otCl c0yqq9JeaZBldwN03oHhxgEYGuFDonSUWuB7aCi4qpiIMRjs0Ld9E4qH0E8plWA2QuMM /4am1r+o7V6ySMa8GVO4XqheVwFWRIDJcHOVL772qu/uEiOPAH6/baWHkB3vuGUKQj0j at4700GhL13y/8YPOMUrnkJqUygNRWJsbt6Pt7Y8FI6CYD/Mf8l3WYKVTD4X5IA0gM8q 6z5Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i6si2433147edv.52.2020.06.30.13.47.48; Tue, 30 Jun 2020 13:48:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726225AbgF3S4U (ORCPT + 99 others); Tue, 30 Jun 2020 14:56:20 -0400 Received: from mga05.intel.com ([192.55.52.43]:57132 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgF3S4T (ORCPT ); Tue, 30 Jun 2020 14:56:19 -0400 IronPort-SDR: kBZjAsK7k+1S+EQEPzg2mXLjMwHjoERIqdZuuzFBHklp/sXHJlpQdyoHGVyjp7TBqcAfjtFUvI 3XKSGwsVDY/A== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="231222951" X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="231222951" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 11:56:19 -0700 IronPort-SDR: t4lCX5bdzNGY2n6qKsUURRHzll4gyZzCU21OcFqodRPO2y3VNtsbYMBlBSQVbYV3u/jWUfMiAE qSYlksyx7+4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="355864248" Received: from mlindstr-mobl1.amr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.254.108.27]) by orsmga001.jf.intel.com with ESMTP; 30 Jun 2020 11:56:18 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, michal.lowas-rzechonek@silvair.com, Inga Stotland Subject: [PATCH BlueZ v2 0/4] Add options to Models and VendorModels Date: Tue, 30 Jun 2020 11:56:13 -0700 Message-Id: <20200630185617.14755-1-inga.stotland@intel.com> 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 v2: Changes constaned to patch 0002: - Fixed returned status in config pub/sub model calls - Consistent use of pub_enabled & sub_enabled in the code ************ If a model does not support either subscription mechanism, Config Server is supposed to return "Not a Subscribe Model" if a Config Client sends a subscription add/overwrite message. Similarly, if a model does not support publication, "Invalid Publish Parameters" should be returned in response to Publication Set message. Since config server is running even when an app is not attached, the only way to collect these model capabilities is on Attach, Join, Create, Import methods when the object manager collects app info. To address this issue, signatures for properties "Models" and "VendorModels" on Element interface change to include "options" dictionary: Models: signature change "aq" -> "a(qa{sv})" VendorModels: signature change "a(qq)" -> "a(qqa{sv})" The defined keywords for the options dictionary are: "Publish" - indicates whether the model supports publication mechanism. If not present, publication is enabled. "Subscribe" - indicates whether the model supports subscription mechanism. If not present, subscriptions are enabled. Inga Stotland (4): doc/mesh-api: Add dictionary to model properties mesh: Check app model settings of pub/sub support tools/mesh-cfgclient: Add options to "Models" property test/test-mesh: Add options to "Models" property doc/mesh-api.txt | 40 ++++++++-- mesh/mesh-config-json.c | 76 +++++++++++++++++- mesh/mesh-config.h | 8 ++ mesh/model.c | 98 +++++++++++++++++++---- mesh/model.h | 6 ++ mesh/node.c | 168 ++++++++++++++++++++++++++++++++-------- test/test-mesh | 21 ++--- tools/mesh-cfgclient.c | 25 ++++-- 8 files changed, 374 insertions(+), 68 deletions(-) -- 2.26.2