Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp526257imn; Fri, 29 Jul 2022 14:39:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tqLdFbtLw4GeNswWFy/XswtQpDDrzSkwEWrybQuzQeDmD4xwM8pqLPlhbE5xhBBr5Kgl/S X-Received: by 2002:a17:907:2ce9:b0:72b:30e5:f1bc with SMTP id hz9-20020a1709072ce900b0072b30e5f1bcmr4220699ejc.127.1659130785106; Fri, 29 Jul 2022 14:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659130785; cv=none; d=google.com; s=arc-20160816; b=0yvR+CCjd4Jryp68tdKeqE1MsgMpn1kNK4lM5ytXjy8HQciJDwC4P33TodHHiz3sOs thf447ncbQuPAspB0HfdqKvdrXo6rXVtm3Xpr9nKj/ughnGgiKVN2yBiOIr9RA3CG0a5 rC62lj5QrptL4dTXm2uz9ClAKzxUP1EsHXrSUK1Bgu0bDuM/FCbyS2Aiw8RiRh3ytZYJ hVv3yNR8+yfCh6dM//gGIqxhxGAIh8Rt0MqvAEMBqcBmpovgPWLF47m9XDV1RpYj5sTy +d3HwITCnwDbPZcF2Vw0asIvZcRBUh+PVMoqXCruvwyEDbGQL2z3PHnD1dlWPnT4L2fj /kFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Prm2w9wicmT8MLF5Kddt6IXpuSCdCKlmftWqTaL5fuU=; b=okaKwh5iCDkFavV9rHfcVVWfJU7AUOVCdZ6LjiT+No/BaszVkDjIJFjhxMq4gjwt/o +sXD7iPq+mgI+S7eXmtjC0uTzqjMGg0BDhH8zAeJjvg4TdpL85TdwtYuJXqrX3iA1ksm c4znhtgkRD9MBa01H4gPoHlnb7DUfUIdBAhMEvYOMSSaZRtODmYmhNChY21gtjICdv/Z 241AOBbnBYIBsfLdJ9mFpwOTaJSrkHOb5xvaPnVkKsf8I5B2P7vkJNX9giDWrUip5IDc nwknElcY0R7mG9aEFRzBNz1eqmj29iSjEZzktm+dNxd323pvsZzPVrlJ4aBf5yZKau3t KAdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E6PRYIfA; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id st2-20020a170907c08200b0072b3caae89asi3594681ejc.341.2022.07.29.14.39.04; Fri, 29 Jul 2022 14:39:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E6PRYIfA; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S238988AbiG2VgT (ORCPT + 99 others); Fri, 29 Jul 2022 17:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239326AbiG2VgS (ORCPT ); Fri, 29 Jul 2022 17:36:18 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D75D863F0 for ; Fri, 29 Jul 2022 14:36:17 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id m20so705415ejx.1 for ; Fri, 29 Jul 2022 14:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Prm2w9wicmT8MLF5Kddt6IXpuSCdCKlmftWqTaL5fuU=; b=E6PRYIfANjdzA+reC9iOxn0qrf3U9WLuqEuyB36RfUcTAayTobecO+cuZDq55e49Y9 zlERAlpgKL73FxX6TYUh6Ow6epyUSUVJ4D/Fl4G30IigmifAKPLJziIJtukJmd9pWpdc qXXfiGZ/qJJB+M86lIV2QPeFxoJT97zvYImYxSRC/uTPY2dXlrtv6mg2qXoK2wMNHd+D XTWjPgDh50Zapjc7LywdrkvjzY9+YGuSc/C4HKiFCjqwP3rsjCDwZXlqzWJqmQ5he5lQ Io2wQ6ZQoetHSpFQN3rKi7F4b/azl7TmXTwCzVSo43pcYaHl4bbeLZMwq2ziTLnZsXax lT8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Prm2w9wicmT8MLF5Kddt6IXpuSCdCKlmftWqTaL5fuU=; b=H0k+qzv/Xwgl60hjIQPUaaH/oN09zvyMn67C5OYWd40cJ5oJsE28fpCbCyhgKKZHfy x0X50Ou4PG7v+wsuLIDK8KKqSOaXzyhj8Eo8Ao/oCBPqw0j/YOlgCch4lTyeBfIDFJEE Z41XMQNxfgekdpnN3TIfm1jrmf5A4Ts49pQkJzHYbUlyIqfHm5jyhvyoULcw8/bTkSLT RwvWdddk+moJfMXmI4RlLDZn1zKl/MoP9EekhipdIq7+o/EiMDeTw4ddSktNfEwYdk9Y Y6HWS05jMYOx13H05PLKBeZS5GEQqjkL6I9QRbWjKXuJa7qXApLHFO7avQ52tDVgcIAX ra6g== X-Gm-Message-State: AJIora9oSOrl74l3AFz0n3Vo/cooUzbUayBLw1z0f2przBsbOULkCJ0t OlMEec818EGT6qAa2ebf2c8UyDNM/quxWBF6TNA= X-Received: by 2002:a17:907:7255:b0:72b:50b8:82d6 with SMTP id ds21-20020a170907725500b0072b50b882d6mr4406850ejc.677.1659130575751; Fri, 29 Jul 2022 14:36:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Fri, 29 Jul 2022 14:36:04 -0700 Message-ID: Subject: Re: GattCharacteristic1 WriteValue fails parameter validation in a GATT Client To: John Klug Cc: Linux-Bluetooth MailingList Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi John, On Fri, Jul 29, 2022 at 1:48 PM John Klug wrote: > > I see this is in the example-gatt-server, but not in a client. Does anyone have this in an example? Ideally written in C or C++ with libgio. > > My issue is that the parameter list is rejected when I use libgio: > > Error message: Method "WriteValue" with signature "aya{sv}" on interface "org.bluez.GattCharacteristic1" doesn't exist This is for a GATT Server, application implements WriteValue, or for GATT client, bluetoothd implementation of WriteValue? In case of the later you need to check if you are generating the message with the right signature, for instance this is how we construct the WriteValue parameters on bluetoothctl: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/client/gatt.c#n714 > Turning on bluetoothd -d, I am not seeing this error. I see my service appear. gdbus introspection shows the interface and the WriteValue method, but the call to WriteValue does not seem to generate any debug output in bluetoothd. > > I wrote this up in https://discourse.gnome.org/t/how-does-one-find-the-valid-signatures-in-d-bus-for-an-interface-method/10579/6 > > I have tried both Ubuntu 20.04 on a PC, and on an ARM 32bit processor I have tried Linux 5.4.199 with BlueZ 5.64. > > How does one write to a gatt characteristic in a client if one is not to use WriteValue? You can use AcquireWrite and then write directly to the fd received. -- Luiz Augusto von Dentz