Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp663150imi; Thu, 21 Jul 2022 08:33:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sfconP2wl/Qs+6tSIl0wiEtHWAyZ9wxWE7Z7Hx2og07CrAzJGoo3+MYm2mkF0sd2kZv5Kp X-Received: by 2002:a05:6402:26d5:b0:43a:bf2a:c27b with SMTP id x21-20020a05640226d500b0043abf2ac27bmr58312464edd.61.1658417581385; Thu, 21 Jul 2022 08:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658417581; cv=none; d=google.com; s=arc-20160816; b=TOMPaTt9v8f0nLRZis8uppMPWVDcuQG+vSavcFa/Jil9K3EHOiohEsDO+SBsoeIT6s oCKoV5nEQxVpHEiCsNsugRdWI8aOueUo6GZYK0HJIR9V3AZ6nM0fQkjOTBIhNZSLcB5M OD1ZRXJh0J0w7nlzcQ08poIyATRLCIpZAkf3INZSJoCOA3Qw91AdDcE0UDiIuwlazG0l SNIeuwoOTtUG0WKTfp2XTTg0JhmIFtcvZfTB1+y5th2hjG1qSF771lJER4Nzx6ZR+Wtq LRS/DM5KhIWuiJjt+4j9jnLD69ft1LU5ItBp8Um7VBFcvGVc7aVLTnzPfKQ+Wx10ETyG O+mQ== 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=Jw8IAE7nCZttBT4SGG/rDAgE/7RI+HSSW6knUqS2lfc=; b=Snv9hB63gYW5yP6CRT4rDJjB/NA1P9UUuswLYpN64rCP1bt9vx7b52QEi9Jps+IW+b RhWW3xrDillqiLOxFG+xYCImxTXIPgsQfN4xcoc+TsVIf11Cski+cYnyS8LgxjJv3MdA JuT+LkEG/ngsO59udW4p+ZhNT0U7ihZLr7obeUAicVhmKFxc04V4mpAdY4g6NmU2M3OE TL1CeZRnDprAL8NtYWw1tj24qay+ltbjLI11FHf6bkqVdlLk6klfqpfIAmQOjuib9YGD +8NnegvsYOeSI9tZzN/uv8KVQ3lO4aBx5xBPG8E0lKP4RkEiNcm0cfTpT9LjtiUGOBGs XZLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XfI4x3gn; 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 b20-20020a170906151400b0072f4421550asi2534998ejd.297.2022.07.21.08.32.14; Thu, 21 Jul 2022 08:33:01 -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=XfI4x3gn; 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 S229462AbiGUP14 (ORCPT + 99 others); Thu, 21 Jul 2022 11:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbiGUP1z (ORCPT ); Thu, 21 Jul 2022 11:27:55 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 831587F51B for ; Thu, 21 Jul 2022 08:27:54 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id z13so1843453ljj.6 for ; Thu, 21 Jul 2022 08:27:54 -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=Jw8IAE7nCZttBT4SGG/rDAgE/7RI+HSSW6knUqS2lfc=; b=XfI4x3gnssJYbuq7HEOxXEChRl3QoYPH6utQAHmu64hPl9cxdvLQ4KS7z8unfmF1D0 37KwQjPtW1twSrMmWOuCErNbmtlvB1O2qzqErLkgCXEt5MwpR0m98rIxLtoPO21TlJqk 2rWu+vLZCfjsu36JU8f/IliJKiVacAkrcl5R4JTY+MfqMDKUVZ8+KWHqXE1Z6mVex0Ed 8wIknuYNbJwDBuE1+bp/pG3p5WH9YQuzhZi5g2bFWf45G7OjeFN7lQJYoYGm76LmSzZd 9UDqQ/6mvrkCkt9t94ytfb/lImX5FD/fcuTzQVm4ogG/4uSmXVUxN0ClBePr3RPe2hl7 MejA== 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=Jw8IAE7nCZttBT4SGG/rDAgE/7RI+HSSW6knUqS2lfc=; b=6VAU8CKfsnlX+FLNf/TQpSpF/Wor0J7Fck4dS2PJVdgUy/Pt5yi/beQEa6lS3BHVS1 DG+xJpcNKtGVHHH7hj2LKNYdzPuvWufrHKntsXC2feFEfK9RpeG776Y7JYBjdihTZewF STB3KwK8MuhkKSOGkE1UvVr7U91hklJcphZ+8EY5UhItWX5RMqSLDTjaG/jl3gGD92a7 hJ34F43qg1UpEpvpW5WZByJoH1UAcQU529pN2HQwT3WYdkVC+DuQxTeokSfeL6AvopAN oDNF8K8yqbraKR9O7hrwrQgkB+XcqbKciuYjYKMYri2Zl3AwA1Q+TDnugVkzkRr9DhWl AA6Q== X-Gm-Message-State: AJIora/5n7EcWqfFdjpaHilFTDG4oyBfN2ZJhJZ3mbBBBzs+spip+Qzh sxSs/fJfgdC+926q0TzlLxTPruJcIRxILEibYl/1HY6QTR0= X-Received: by 2002:a2e:a884:0:b0:25d:d8a2:d18c with SMTP id m4-20020a2ea884000000b0025dd8a2d18cmr2789820ljq.305.1658417272470; Thu, 21 Jul 2022 08:27:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Thu, 21 Jul 2022 08:27:40 -0700 Message-ID: Subject: Re: How does bluetoothctl work from the command line with gatt? 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 Thu, Jul 21, 2022 at 8:00 AM John Klug wrote: > > Luiz Augusto von Dentz > >I think the problem is that you are issuing the select-attribute and > >then exiting, instead you will need to enter all the commands at the > >same time otherwise the next time you call bluetoothctl it doesn't > >have any attribute selected > > With gatttool you could issue all the commands non-interactively from the command line. > > What you are saying is bluetoothctl has limited command line capability, and cannot replace gatttool as currently written. Not quite what I said, the difference is that bluetoothctl does require another command to access so when you are scripting things you would have to pass the input as a multi line instead of invoking the binary multiple times with a single line, we could perhaps add support for a input file where one could enter multiple commands. > > > John Klug > -- Luiz Augusto von Dentz