Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2407083ybt; Tue, 16 Jun 2020 05:28:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRghYoPgto1WZ4EWHZ2aZ6DVmXZaUCnGx8qUpTu8LPu/i+v9Pv85YkZlcibFru8kERodHn X-Received: by 2002:a05:6402:13ca:: with SMTP id a10mr2369472edx.224.1592310494187; Tue, 16 Jun 2020 05:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592310494; cv=none; d=google.com; s=arc-20160816; b=m6iZV5Vrhb9zLoASvBYnqI5mPax7K+qTsCV3Y3Al4ZTDVUTpRH8QmOmm3czDoRB15z 9E6tiFpTVHy1I3zODIJQM7hrJWmnxLAvz0oUxJC2upv4HivwsoQREeK3nMAo04Zimwrv hcRiV+1GRdzDG13tm284qojHpqt3HnF+ERBWewXjTzKs0n8FcQOOWc6P408sglnAMlZp 7McCo5Ihv865GGTQcSzGhesoX8oPUslAjznzbAUZtdS4blJwoFIgp/oPndKLvWNWuOLR ohP3qHizKy6JlC2FCRSZ/cjSw49QVPmCqoadoScXFHLopBopC74Pf2D7in6V+1UFjEY7 SqHw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=F+3LHA6an8AXwiLSucktPnHRQI4LAHpvQehaSspu4EQ=; b=dcpn0jbydBywP2/RFJ5B7OfPfmd1bMy5JH8rv61SAUB34Ej2+BHIvWULo0GZfctplK CdgspCg2sYFBZg/RkB7ttt29j50LTxAsZ2IP9/6PSV0Vxubsjt3wk9672KI2AQ5NN895 FQeFb4iT2EgtXVKxJM3gVpm9CAIyIzFiesEQCr+DmK69zQuDpc1lFwhiLRHapiDUKxPZ 43GYsHQeAnZJov1KYqWe6NKlDbsSSz1aIWP3PIWJPq2uTMGBTPJNCnSa23KPm/8p+0DA XhbHKQZxdqzKafxrRlkn/NGeyQ0/ZrnxSlDEVP6+frod7H+zC6ZfKHq5sE3P9gSG9pNK v8LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=s+wArg+T; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si9805729edr.520.2020.06.16.05.27.32; Tue, 16 Jun 2020 05:28:14 -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=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=s+wArg+T; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727804AbgFPM1a (ORCPT + 99 others); Tue, 16 Jun 2020 08:27:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbgFPM12 (ORCPT ); Tue, 16 Jun 2020 08:27:28 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D156C08C5C3 for ; Tue, 16 Jun 2020 05:27:28 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id x25so7155166edr.8 for ; Tue, 16 Jun 2020 05:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F+3LHA6an8AXwiLSucktPnHRQI4LAHpvQehaSspu4EQ=; b=s+wArg+TR/aHnuI8z9smg55lNRPWVDBlR5D5XaiALBcuHD/VA3oXDuUac17WNKwH4P 7kt9lqjqvsyBShTzBqWEvuAWjSnfK8aiXhh4bdo1uJJnIarVXCSA3cy8FzaqkOhtzb6A M8e1T3CBOd1453bGep89AocEhOEBlTS7JXAB+EbmG/9gDyDDh9gyw5c9hxnuuVBDq3Jr SuRQkZM26digq7NIm7aZBXxvMebP9SQeFfTnRFpa/Nwiv7IIC3p78ltvy89CPia9M6OX FxZQ9j8BFWnndhLXVlz8VyHB0qAsyVlWFzuW9OdqeT2cGpf2D8t+S1tUy7k7OsXZCOY2 9NrA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=F+3LHA6an8AXwiLSucktPnHRQI4LAHpvQehaSspu4EQ=; b=UTUL7iAqeFnWUMhAw+HfgD6APU1NHUe5fzj206AJSdhUuf1GTtHYw9CxR5E6PBE2PV k9L9efZTcxO6DPKsYb0wP380ZAikVED55UH89COD7F2xun5k6P5BYEh2tTIiob1Y4jiv i1UZeCZUdwYkG0ZMiIZdzQQLp9c9k26CoxvSN+6PxHBOFAZLwG1s6sp+4tp+hfWVj6Sx I+hOJw/m5W/H5aD7DKgFMzHb8uJY3zmFc1s5DZf2S11d4vpArNWqYDmUXoepBllGRRta R+OD/S1EPkISJ50j4lRyjC7KIPCIpC/0gpcewoeXlooXhosUt86B8DOSOxVlk99iRtCC EmVA== X-Gm-Message-State: AOAM532idhqcyLD1SYsIB0Hcy1yFVmcb2UguaqmIFMallLW5aJamhwuz vTCHQaB8KsCrjB+pM2NSIMwjViPhi0c3hQ== X-Received: by 2002:a05:6402:1486:: with SMTP id e6mr2200980edv.99.1592310446536; Tue, 16 Jun 2020 05:27:26 -0700 (PDT) Received: from mlowasrzechonek2133.silvair.lan ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id bt11sm3246334edb.48.2020.06.16.05.27.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 05:27:26 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Cc: =?UTF-8?q?Przemys=C5=82aw=20Fierek?= Subject: [RFC BlueZ 1/2] mesh: Add documentation for AttachFD Date: Tue, 16 Jun 2020 14:27:44 +0200 Message-Id: <20200616122745.25056-2-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200616122745.25056-1-michal.lowas-rzechonek@silvair.com> References: <20200616122745.25056-1-michal.lowas-rzechonek@silvair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Przemysław Fierek --- doc/mesh-api.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt index 6d905cf48..cd2ffd2a8 100644 --- a/doc/mesh-api.txt +++ b/doc/mesh-api.txt @@ -118,6 +118,46 @@ Methods: org.bluez.mesh.Error.AlreadyExists, org.bluez.mesh.Error.Failed + object node, array{byte, array{(uint16, dict)}} configuration, fd + AttachFD(object app_root, uint64 token) + + This is an alternative version of the Attach() method. This method + acquires file descriptor for message reception. + + Method behaviour and usage is similiar to the Attach() method. + The difference between those two method is that after call AttachFD() + all received messages will be passed via file descriptor, + instead of daemon calling MessageReceived() and + DevKeyMessageReceived() methods. + + + The data format used for the exchange: + + Message types: + 0 - Device Key Message + 1 - Application Key Message + + struct { + uint8_t element; + uint8_t src; + + uint8_t type; + union { + struct { + uint8_t net_idx; + bool remote; + } dev; // only meaningful when type is 0 + + struct { + uint8_t app_idx; + uint16_t dst; + uint8_t label[16]; // only meaningful when dst is virtual + } app; // only meaningful when type is 1 + } + + uint8_t data[]; + }; + void Leave(uint64 token) This removes the configuration information about the mesh node -- 2.20.1