Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1191958rwe; Thu, 1 Sep 2022 14:10:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR7li4IW8F8kxYuGVqjdEEq5Sorf04tNyL5Va21BeLGsS4INFVBr8DTNzk9gve+norpmYxSx X-Received: by 2002:a05:6402:51ce:b0:43e:74bc:dce with SMTP id r14-20020a05640251ce00b0043e74bc0dcemr31006160edd.225.1662066614587; Thu, 01 Sep 2022 14:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662066614; cv=none; d=google.com; s=arc-20160816; b=1D3QBuizpMOUvcDzxIJTHe3tYrkfUGIloHgAyw88MyOz2cjJkaTh0nw7/V6SSUdTcR 0kSHUIs7x3Nhehr1SWzPGyL5NPGjPG51KbPIkFGY+1206GMpZl6AhF+oqNG4BWSDyHh2 tJjGk8w0kPX1nOVPbLUoKCSMNRt3S8ERlnuek8R5beLORqPABohFFxRtMQvNw5BaYeWA ZZZMr0Hvu7L5EDUQ3QkjTPRxXNM4tzobcG18hkxr96MtutfpdNvfR+HD8Wqici+FlCRI iVV3f5U6qHv0Y/JkOt1aRCWftUV3Epo5cyxyFnaGuHDAR1ffx0wKl7Ggoiok1RUdG7E7 VaPw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=WKgxNdaPqmiRgZmd46q+cDf9rGnvFo/mMozrsDxgma0=; b=Fw0JAOZflCRI+487+R2tq0EU/wC7knpr52T0nxSvI/PiNjNeAsa85pvryi98+O0+dh 8yWjMzUSg7wy+RJek9A7PyzfXGq9lWa5oMKzYG8fHYlFNVRcOtUsmvyuTbneLcXE31PF /phnMJq35Uu8yFwlYOA8xMWYIH+5oBQN7dWrbA4i0YKhx8uDnZtitttUn7BDVFtu5BUz O2PoOwhTMHV/VpUiHe4XZsdexfzJN0NiegENbkyFR5rtJ+NLH7+QA+aNiHSS2f6F6PQ3 t1iwEoRFw1sYyQItg8wnZ/24CJEAej7OJzIJ8FoBJrBpn4YEj/jpqSflXa3Yg52deBTU 2ejQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RgfmZiaw; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f23-20020a05640214d700b0044674c3c595si135442edx.368.2022.09.01.14.09.49; Thu, 01 Sep 2022 14:10:14 -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=@intel.com header.s=Intel header.b=RgfmZiaw; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234925AbiIAVHa (ORCPT + 99 others); Thu, 1 Sep 2022 17:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231326AbiIAVHa (ORCPT ); Thu, 1 Sep 2022 17:07:30 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 344A97B291 for ; Thu, 1 Sep 2022 14:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662066449; x=1693602449; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cHd5b5ltfjOadtLJIyeuaCdABdvIpSn1/sVZ4x2Cb8g=; b=RgfmZiawl+l03XBkuWTBbMVhKlm7fEXpQyStZywwUHGCHRuCgCiHiyZj mxo7xrAqPrH1uA0RE1E1ID51Ndj0ENtHiz0qiuR9QbQ5pjyBx70IXzt1w OFEnYe0rLUO6axBlLBkQX+1t/O0aoyfqD2wqin8crvnd8WaJjI5/xcqNF 4z5BP4mH7RVooZB+lw7x37ne3aVAIhWZczohRLFz03/Xv3LkfoVgjewF4 Dl5W35OfFKGCJ+MEJD17yzAeu6B9Ma6SdXRIfDasb1rrbkEUgkOo9rkNc LIjHTKEPtg2oAHLociYoGO9ujTwNdgDYdg9tCY4bS5OxKKfISJWPEPbSP Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10457"; a="294568833" X-IronPort-AV: E=Sophos;i="5.93,281,1654585200"; d="scan'208";a="294568833" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2022 14:07:29 -0700 X-IronPort-AV: E=Sophos;i="5.93,281,1654585200"; d="scan'208";a="674047798" Received: from mkounkel-mobl.amr.corp.intel.com (HELO bgi1-mobl2.amr.corp.intel.com) ([10.212.37.120]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2022 14:07:28 -0700 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: marcel@holtmann.org, luiz.dentz@gmail.com, brian.gix@intel.com Subject: [PATCH BlueZ v2] mgmt-tester: Adds turning on Mesh Experimental feature Date: Thu, 1 Sep 2022 14:07:22 -0700 Message-Id: <20220901210722.73044-1-brian.gix@intel.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Turns on experimental Mesh feature, and expects it in report when querying which experimental features are supported and have been enabled. --- tools/mgmt-tester.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 02ddfd844..5747ab84b 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -221,6 +221,32 @@ static void read_info_callback(uint8_t status, uint16_t length, bthost_notify_ready(bthost, tester_pre_setup_complete); } +static const uint8_t set_exp_feat_param_mesh[] = { + 0x76, 0x6e, 0xf3, 0xe8, 0x24, 0x5f, 0x05, 0xbf, /* UUID - Mesh */ + 0x8d, 0x4d, 0x03, 0x7a, 0xd7, 0x63, 0xe4, 0x2c, + 0x01, /* Action - enable */ +}; + +static void mesh_exp_callback(uint8_t status, uint16_t length, + const void *param, void *user_data) +{ + if (status != MGMT_STATUS_SUCCESS) { + tester_print("Mesh feature could not be enabled"); + return; + } + + tester_print("Mesh feature is enabled"); +} + +static void mesh_exp_feature(struct test_data *data, uint16_t index) +{ + tester_print("Enabling Mesh feature"); + + mgmt_send(data->mgmt, MGMT_OP_SET_EXP_FEATURE, index, + sizeof(set_exp_feat_param_mesh), set_exp_feat_param_mesh, + mesh_exp_callback, NULL, NULL); +} + static void index_added_callback(uint16_t index, uint16_t length, const void *param, void *user_data) { @@ -233,6 +259,10 @@ static void index_added_callback(uint16_t index, uint16_t length, mgmt_send(data->mgmt, MGMT_OP_READ_INFO, data->mgmt_index, 0, NULL, read_info_callback, NULL, NULL); + + tester_warn("Enable management Mesh interface"); + mesh_exp_feature(data, data->mgmt_index); + } static void index_removed_callback(uint16_t index, uint16_t length, @@ -388,6 +418,7 @@ static void read_index_list_callback(uint8_t status, uint16_t length, if (test && test->setup_le_states) hciemu_set_central_le_states(data->hciemu, test->le_states); + } static void test_pre_setup(const void *test_data) @@ -7390,7 +7421,8 @@ static void command_generic_callback(uint8_t status, uint16_t length, expect_param = test->expect_func(&expect_len); if (length != expect_len) { - tester_warn("Invalid cmd response parameter size"); + tester_warn("Invalid cmd response parameter size %d %d", + length, expect_len); tester_test_failed(); return; } @@ -9858,7 +9890,7 @@ static const struct generic_data set_dev_flags_fail_3 = { }; static const uint8_t read_exp_feat_param_success[] = { - 0x04, 0x00, /* Feature Count */ + 0x05, 0x00, /* Feature Count */ 0xd6, 0x49, 0xb0, 0xd1, 0x28, 0xeb, /* UUID - Simultaneous */ 0x27, 0x92, 0x96, 0x46, 0xc0, 0x42, /* Central Peripheral */ 0xb5, 0x10, 0x1b, 0x67, @@ -9875,6 +9907,10 @@ static const uint8_t read_exp_feat_param_success[] = { 0x85, 0x98, 0x6a, 0x49, 0xe0, 0x05, 0x88, 0xf1, 0xba, 0x6f, 0x00, 0x00, 0x00, 0x00, /* Flags */ + 0x76, 0x6e, 0xf3, 0xe8, 0x24, 0x5f, /* UUID - Mesh support */ + 0x05, 0xbf, 0x8d, 0x4d, 0x03, 0x7a, + 0xd7, 0x63, 0xe4, 0x2c, + 0x01, 0x00, 0x00, 0x00, /* Flags */ }; static const struct generic_data read_exp_feat_success = { -- 2.37.2