Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5380603rwl; Tue, 21 Mar 2023 18:17:19 -0700 (PDT) X-Google-Smtp-Source: AK7set90KjK4vG7o18HzlR1LhJvfgIstJCJ5pR2ZNnC5bY4C7zABFCRSHRlEmNSCFiLAG423LwHo X-Received: by 2002:a17:906:344f:b0:8b1:75a0:e5c6 with SMTP id d15-20020a170906344f00b008b175a0e5c6mr5081591ejb.18.1679447839050; Tue, 21 Mar 2023 18:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679447839; cv=none; d=google.com; s=arc-20160816; b=W9924ZV0lpcWAKbfqn2Y11BOOKIkGUEjztsvQJsTc0InF7YA1LIblZDnfXLkj/cvhr HtSFnPpSCvO24zPxLDSJBQmF+Vk5i6QtBHmdSX4FrIVsKvCjJ9P0e1qBZVVZARonbGNH JmOXQvoOxlWuoieRjjPPiUp7uFGL+Vv+sTVtNI8jZfGZHHu3JJVNS2CaK7I2eylkLUiE X1BHoKSQFz3QZ1uJlZIwBFMrTacKkkaARkuIMuCPIkSU6nAqRq1yauZvpLMRrMckrBos K/mN96AU8s/y4a7l6k0eN9rO6IeAhJg0h+I1uSDTHyGiIGkMGv2MO+uz+CT8l/FlqkVI V5xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jNdqRCa6/jCjaDPT5Tf6jDPAj3GPTeL80rj7C2FFGmo=; b=w/YA69mtlOdLtT46fspXjgklnRZCxYSjbPY3xw+ZWS5D/1+UEDIv/sAhJ/jRiPuOmG 9sgzUozpHJRS4UFKwii+KxFdC0GH8pYECwmsQ8QD4XEo6+D6ExMVgq64TB4oa662iOAs F+zW4U1Z9bGvCFOeEh0ha0H1dFux+dW27tG/lE/DmTYfpnNAYQQuNH0DQr6RgR6YcgGK LPTMtZ+bycGzkFMSlYFnm0sTRGcjVGcN0trhWWRC7ly5qcZx3qlW42HdTQ39ZDbMaXHk c3r4yuoxiX148KRiAU6Lg4m8ORreWWY8hFSFig5Cd4uV6C0RwwyJxc6EhrnzX16zFywu LhLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M0dhcWKY; 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 i10-20020a170906090a00b0092fa6d3b5edsi14738118ejd.950.2023.03.21.18.16.55; Tue, 21 Mar 2023 18:17:19 -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=M0dhcWKY; 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 S229522AbjCVBN4 (ORCPT + 99 others); Tue, 21 Mar 2023 21:13:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbjCVBNz (ORCPT ); Tue, 21 Mar 2023 21:13:55 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3E9250718 for ; Tue, 21 Mar 2023 18:13:53 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id o6-20020a17090a9f8600b0023f32869993so18228169pjp.1 for ; Tue, 21 Mar 2023 18:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679447633; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jNdqRCa6/jCjaDPT5Tf6jDPAj3GPTeL80rj7C2FFGmo=; b=M0dhcWKYdUDQjBK5nmGmRPVgcmcNQ5GgVDC9RMtfBchn1W2ky0BMldYvsWSqmbul07 7JuzMp+QJdDgd78gZvhkfwHy5oRTHcJjy7dy/qO5FgQmeiRJ6Cvo+LOUkznNsuLvgo0Q qzVcIkEGXFVGdwnrQi3ilQeMBp2JYdtCWIEkxh9lPO3WLY8/gssKd6lJIuKFUopfqvtx 7dozIkSRcy1KDh93dsd9Y30zyMd/rzGotnayelmZ2LdcQDMB6EdX/NnSe68MwIAjBUc9 QZldfCwAs2QpKEb1GOcU3VfbZS80ABx8aEKk6BO2NW04Ty2oUMJ+p+TbQ3yF3iL340/c h4Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679447633; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jNdqRCa6/jCjaDPT5Tf6jDPAj3GPTeL80rj7C2FFGmo=; b=OMNCp16I6Dg6W1RzH4bsMGhlWRVsuC0Z26pWvgvD51bPolXlXDPkGNzdRv1UAOY6Wh GcBh+nn7QrHEiEqRdizekJl3rWe6Ozrazr4LtNkeQK60nBv+LyP1PH180ANZpERE9qrL Nuv/eN07DTuMzqxtqGDDnCzWzNUsefg52ksEOK3j8pAhj9ENNtZ4C3EEnw+o2F72/57i 4a8zCaUh5G4zOP9PND5106R+lSK+jfccs+NK+3GfbUR+y5dnMsJu46hqbpEjLK2kKV4n CkVZ/ycoN8oJEkY43378VKiCap/2BD97YXTNwWSnXzpzXBUOMJWWBPC5csz4ZzdTFIhm 8qog== X-Gm-Message-State: AO0yUKUTXQjqywaktOjFEJHPHb5AhbGVpOLD+xtWYpDl/ipp/auwLhgq flYP5W4oRnJ8RSNR9ySkLPxOthrBVWU= X-Received: by 2002:a17:903:24f:b0:1a1:cd69:d2f4 with SMTP id j15-20020a170903024f00b001a1cd69d2f4mr861298plh.67.1679447632890; Tue, 21 Mar 2023 18:13:52 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-59-129-171.hsd1.or.comcast.net. [71.59.129.171]) by smtp.gmail.com with ESMTPSA id 17-20020a170902c11100b0019ee045a2b3sm9315720pli.308.2023.03.21.18.13.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 18:13:52 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 2/2] client: Add samples init scripts Date: Tue, 21 Mar 2023 18:13:49 -0700 Message-Id: <20230322011349.2763404-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322011349.2763404-1-luiz.dentz@gmail.com> References: <20230322011349.2763404-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 From: Luiz Augusto von Dentz This adds sample init scripts that can be passed to bluetoothctl for testing. --- client/scripts/advertise-broadcast.bt | 2 ++ client/scripts/advertise-on.bt | 2 ++ client/scripts/advertise-peripheral.bt | 2 ++ client/scripts/gatt-batt.bt | 5 +++++ client/scripts/power-on-off.bt | 3 +++ client/scripts/power-on.bt | 3 +++ client/scripts/preset-custom.bt | 26 ++++++++++++++++++++++++++ client/scripts/scan-bredr.bt | 2 ++ client/scripts/scan-le.bt | 2 ++ client/scripts/scan-on-off.bt | 4 ++++ client/scripts/scan-on.bt | 2 ++ 11 files changed, 53 insertions(+) create mode 100644 client/scripts/advertise-broadcast.bt create mode 100644 client/scripts/advertise-on.bt create mode 100644 client/scripts/advertise-peripheral.bt create mode 100644 client/scripts/gatt-batt.bt create mode 100644 client/scripts/power-on-off.bt create mode 100644 client/scripts/power-on.bt create mode 100644 client/scripts/preset-custom.bt create mode 100644 client/scripts/scan-bredr.bt create mode 100644 client/scripts/scan-le.bt create mode 100644 client/scripts/scan-on-off.bt create mode 100644 client/scripts/scan-on.bt diff --git a/client/scripts/advertise-broadcast.bt b/client/scripts/advertise-broadcast.bt new file mode 100644 index 000000000000..476559d219c2 --- /dev/null +++ b/client/scripts/advertise-broadcast.bt @@ -0,0 +1,2 @@ +power on +advertise broadcast diff --git a/client/scripts/advertise-on.bt b/client/scripts/advertise-on.bt new file mode 100644 index 000000000000..4a227e03986d --- /dev/null +++ b/client/scripts/advertise-on.bt @@ -0,0 +1,2 @@ +power on +advertise on diff --git a/client/scripts/advertise-peripheral.bt b/client/scripts/advertise-peripheral.bt new file mode 100644 index 000000000000..5e81c135faad --- /dev/null +++ b/client/scripts/advertise-peripheral.bt @@ -0,0 +1,2 @@ +power on +advertise peripheral diff --git a/client/scripts/gatt-batt.bt b/client/scripts/gatt-batt.bt new file mode 100644 index 000000000000..902fe48a23cf --- /dev/null +++ b/client/scripts/gatt-batt.bt @@ -0,0 +1,5 @@ +gatt.register-service 0x180f +yes +gatt.register-characteristic 0x2a19 read,notify +64 +gatt.register-application diff --git a/client/scripts/power-on-off.bt b/client/scripts/power-on-off.bt new file mode 100644 index 000000000000..c7e150448a35 --- /dev/null +++ b/client/scripts/power-on-off.bt @@ -0,0 +1,3 @@ +power on +power off +quit diff --git a/client/scripts/power-on.bt b/client/scripts/power-on.bt new file mode 100644 index 000000000000..0ba686f4fdda --- /dev/null +++ b/client/scripts/power-on.bt @@ -0,0 +1,3 @@ +power on +show +quit diff --git a/client/scripts/preset-custom.bt b/client/scripts/preset-custom.bt new file mode 100644 index 000000000000..08bfb57b634c --- /dev/null +++ b/client/scripts/preset-custom.bt @@ -0,0 +1,26 @@ +endpoint.presets 00002bc9-0000-1000-8000-00805f9b34fb custom +48 +10 +3 +100 +Low +10000 +Unframed +2M +200 +3 +10 +20000 +endpoint.presets 00002bcb-0000-1000-8000-00805f9b34fb custom +48 +10 +3 +100 +Low +10000 +Unframed +2M +200 +3 +10 +20000 diff --git a/client/scripts/scan-bredr.bt b/client/scripts/scan-bredr.bt new file mode 100644 index 000000000000..291a3eedbf6c --- /dev/null +++ b/client/scripts/scan-bredr.bt @@ -0,0 +1,2 @@ +power on +scan bredr diff --git a/client/scripts/scan-le.bt b/client/scripts/scan-le.bt new file mode 100644 index 000000000000..4a529b964723 --- /dev/null +++ b/client/scripts/scan-le.bt @@ -0,0 +1,2 @@ +power on +scan le diff --git a/client/scripts/scan-on-off.bt b/client/scripts/scan-on-off.bt new file mode 100644 index 000000000000..ffa6c8181533 --- /dev/null +++ b/client/scripts/scan-on-off.bt @@ -0,0 +1,4 @@ +scan on +show +scan off +quit diff --git a/client/scripts/scan-on.bt b/client/scripts/scan-on.bt new file mode 100644 index 000000000000..767cefc16382 --- /dev/null +++ b/client/scripts/scan-on.bt @@ -0,0 +1,2 @@ +power on +scan on -- 2.39.2