Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3431651ybv; Sat, 15 Feb 2020 20:39:51 -0800 (PST) X-Google-Smtp-Source: APXvYqycyFRyWXGgc+SWqWc4p5w1WWAm18XtNja/L9xh7CUWDnqmxM0OLVdDCaLF/+ENH9zBlAT4 X-Received: by 2002:aca:4e10:: with SMTP id c16mr6243744oib.6.1581827991551; Sat, 15 Feb 2020 20:39:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581827991; cv=none; d=google.com; s=arc-20160816; b=GzYnMblyErHGKTlOh5cYQYyNh1abgAs46Tl0w9TbSg33a3lJL1wPRBuynxnkZt4hgF EP0fJqQsOjoMZClLz7pRsje6DkRezQYT2R0kw2X/MMvUBuhDVS5+oJ/KcV4nmgH6bjIX /ovheK1eaV5qqExHNAXQuQCqVSd8BwyykL8hllrtrUUzDM/+i33sXXcv2KbXNSOpF1fy Ms6fI68206muq0UGvKAdNWoAXJzfThDC8NtkAsZRjgyZmpw+NuPgoPki1U5EjSnCg6sl 0uB9VAgEySx4pmyJq7+JkMRCsJQHvD9McFgtgnx5bh+Vr/jo89Btes3MHVk13zraPelm Fofg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=HMee7gTWmBnn36Gr8xZTBhi4vv0+vEnlevm4EvoM7lQ=; b=xsCDBG98Ps3GteVw13TyEwNXJcVkNY7d0lu6sgokXxQtPk/tOU80vBl0hIHK7fbTfI +Va0qT4BAkpPKJHFYIlMCiBWiIDN2ecWtZw3KV2w7LG5mvkK0f++E4OiDIX3hu3Pc79L VKjQrmgYgEvHnFg6QGax0Gmax3QHJfdl2dlPRVDw5VVQNMIJwBJa8kvsDqqQyo06lLQa tYAQ2C/MBQ7yGMCo24IHMtAm8zvGBtEdxdxnThAIUxLs5ZDLIXNARfj0c/bO+asqRwYF UJ+sO6NT9k9S9O+mQHQTA3ZFGU5GwgYN0JT/jsystaxTHMA2TLUQSmtfsgJxYHD/l/Y+ Iz1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mnmoran.org header.s=dkim header.b=RQLEU+Ms; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si4842413oif.167.2020.02.15.20.39.18; Sat, 15 Feb 2020 20:39:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mnmoran.org header.s=dkim header.b=RQLEU+Ms; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbgBPEjR (ORCPT + 99 others); Sat, 15 Feb 2020 23:39:17 -0500 Received: from hoster906.com ([192.252.156.27]:36364 "EHLO hoster906.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbgBPEjR (ORCPT ); Sat, 15 Feb 2020 23:39:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mnmoran.org; h=subject :to:references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=dkim; bh=CqnKB2/YqKrL vCtk8C2pyfTKfpdLAIfGR66nayRwVp0=; b=RQLEU+Ms15yrIYekGLPQK8nJF/oN +by30R6uYnvBDhqsFpzikkOLiYrfHiwBOUZOzjST2JMoPd6i7+mW2ZRGZxFxhRJA TYPXadYYYkiWcfx41BmCnwXI6zNvHeLcAuI8vksbG6Zlyc3XXcYopSPkrnPRbuj8 kRJACbmBHcuJLto= Received: (qmail 13505 invoked by uid 503); 16 Feb 2020 04:39:16 -0000 Received: from unknown (HELO ?192.168.254.100?) (pop-before-smtp@162.39.210.60) by hoster906.com with ESMTPA; 16 Feb 2020 04:39:16 -0000 Subject: Re: mesh: Send mesh model message to group address To: "Gix, Brian" , "linux-bluetooth@vger.kernel.org" References: <848c1b0b-83c6-41a3-fc66-1359fa9a72bb@mnmoran.org> From: "Michael N. Moran" Message-ID: <410faf08-70e6-ebb2-df7d-79ea1ee0b9f4@mnmoran.org> Date: Sat, 15 Feb 2020 23:39:10 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Brian, Thanks for the quick reply. On 2/15/20 2:50 PM, Gix, Brian wrote: > Hi Michael, > On Sat, 2020-02-15 at 13:20 -0500, Michael N. Moran wrote: >> I've been using meshctl to provision/configure a group of >> mesh nodes. > > First off, don't use meshctl for work going forward, unless for some reason you *require* GATT support. Mesh > is designed to primarily be an Advertising based system, and so all current work is being done on the > bluetooth-meshd daemon, which does not yet have GATT support. I've been working on a mesh stack implementation since June, so I have a pretty good understanding of the protocol. I started the development using a now defunct Linux meshd project that used PB-ADV for provisioning. It never had much mesh support beyond provisioning. Later, I moved to meshctl after I implemented Mesh Provisioning and Mesh Proxy over GATT. More recently I've been using various silicon vendor Android based mesh apps, which all use GATT exclusively. At the moment, I'm working on the LPN and Friend support. > We currently have a pretty robust solution based on: > > 1. Run mesh/bluetooth-meshd as root > 1.1 You may need to first install, *or* copy > mesh/bluetooth-mesh.conf --> /etc/dbus-1/system.d/bluetooth-mesh.conf > > 1.2 Make sure mesh/bluetooth-meshd has a dedicated v4.0 or > better controller. This can be done by stopping bluetoothd, > or by having a 2nd controller in the system and making sure > that in /etc/bluetooth/main.conf, AutoEnable=false > > 1.3 reboot > > 2. Run tools/mesh-cfgclient > OK. I'm currently using bluez-5.50 on some rapberry-pi zero w unis with in a Yocto build. I use one pi to run meshctl. Obviously, bluez has changed since I started. :-) >> There does not seem to be a mechanism in meshctl to send >> model messages to group addresses or virtual addresses. >> >> As an example, consider the simple OnOff model. I can >> configure the subscription for an OnOff model with a group >> address. However, the meshctl onoff command will not work >> with a group address set for the onoff target. >> >> I have modified the cmd_set() function in onoff-model.c by >> removing the node_find_by_addr(target) check and this works >> fine. Obviously, that only works for the OnOff model. I'd >> happily submit a patch for that model, but that doesn't seem >> to be a very good general solution. >> >> So is meshctl the right (only) tool to use on Linux? >> Is there a newer tool that is planned or under development? > > See above, and use the tip of the repository (currently at v5.53) I cloned the tip and have poked around a bit. However, I don't see any OnOff model work other than the tools/mesh-gatt/onoff-model.c, which does not *appear* to be a part of the mesh-cfgclient build. I'm probably missing something. How is this supported in mesh-cfgclient?