Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7805615ybi; Tue, 9 Jul 2019 04:42:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxX8wSJj6lBCLkg9ty1IiLDnCokZM2bW1qdH626iSs/N6A7fbuRZDM5KuLYMy7ujbAWFMlF X-Received: by 2002:a17:90a:c588:: with SMTP id l8mr15506663pjt.16.1562672524728; Tue, 09 Jul 2019 04:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562672524; cv=none; d=google.com; s=arc-20160816; b=cK71cNtdCzTf9aLiLSgkw71xLFmOc5Kp05kZ7sS2SRMHOFpF3BJVcWx6BLOemzzThz jE1x07tLDyblpsPF4lxaCRa5O2KqleQGjNSDbar+WrVW8715HZTKa9BQmwIVglzm1UWZ /sx8HDE/OO+C8V02aRpnA5OdBSwM+Oou7rxp0FTCbVbgzxBT8Tldaoa6aB8SamCPP/Uk M/NQbAILxYebNrtBW5xBRQykNZ0yBhZT7XX1VhKjWbhfyCH3MuoLHQMuC/0l1B4pWlc+ SR49oIzEIC1Hg1rlxXg+eL6rqsvxF0+i0aZPrt0WHLW9VecG3ZJwOYS+16ZlNYzQKHfS ZIJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :mime-version:dkim-signature; bh=xAgm/6tAV6Hs1+Muq358pFsoWmIR8i1rKIUTCo9qBlw=; b=03kA5sFi2vOxabZG2gTKhS6Ytt2HMMngyw67ZRPhLxSfquQmxPSjju58ffRvQGFsp0 6fslf+sHLYi4ExMTExI3i51l+SAxaTrnj3Ude+zQqNBIdRZGAz7EbZy3qJYi6Vla5NBL c/KIwdf2Aax8fVKjD/rTNxoWDpM+XPq4o6oEL+wTxmAIRp6S2KtO2kadxtKu/GJAldkS SayqeP0uAGctiPX0XuQzE/BdUUnOggUS7X0wkTUd1NApxnGDSQlc8tB3xnRaFlHCBMck /ZItWS2rgi3elJzqh0XxfVR5SM4zlHY8SEVVTOoFvCODGFORm2xbgRiALd1xQtODLZGW cZHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eslLs9oW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 130si4451862pfb.117.2019.07.09.04.41.36; Tue, 09 Jul 2019 04:42:04 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=eslLs9oW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726108AbfGILkU (ORCPT + 99 others); Tue, 9 Jul 2019 07:40:20 -0400 Received: from mail-qt1-f171.google.com ([209.85.160.171]:33570 "EHLO mail-qt1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbfGILkT (ORCPT ); Tue, 9 Jul 2019 07:40:19 -0400 Received: by mail-qt1-f171.google.com with SMTP id h24so21313002qto.0 for ; Tue, 09 Jul 2019 04:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=xAgm/6tAV6Hs1+Muq358pFsoWmIR8i1rKIUTCo9qBlw=; b=eslLs9oWq67nB+HbVMNYfRp2HzcxLNL3PdmewrAc8IoLm21ENuj+mQUoGK6+55ysj2 c8zAPPpivWqYEt+eak3oTG6jUJvc51bFSKDYl7WSO0RsxC0rX9Bs+wA9n3tOUKRho3/7 lEMHjBKPuUBNfoZVgExVrt9OqPlF9eBfL1O+AA5UGW2sSTepiW/6KgE+lSHXJeIorrTi H7MseZhhMDat2dauSFoRyEjDqedfbBqwQRlCIoCpKPhB/1coBTSXMWTWbyqJLMTZMeVp huRTJME+wXZEMaFJofuhcnuvK6HYd4HTywK0r6VxevAvmvGpbD+uC4Ang12LD6AAoTv5 4cnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xAgm/6tAV6Hs1+Muq358pFsoWmIR8i1rKIUTCo9qBlw=; b=kDojqutxOjEHTEF5uhWi2k0lxP9uTtyAmB16u40z9CtFVdkHoAYlKYQ+ku3MY9Vx7k 63TU6N2cwKSWK8IwqOWvI4c5Bnxj65enO81Bq21OHLDRzqUyh+1bFUP/up9rAFpGtXPy IMSetpEW02/mM0DmpUd3BZJjx1RzqLcNaQRfCpwYUmwBr5YGBTZqWFb7zrheNb/cyJU4 H64fLJKMIzteyoNIR3uxYmXqTOSeTOE15ee03TSJN7hNEYlwxDyROnFvNNhvBu3QDF11 LFqhlcPptb9XG1avujp/bYiFoqVthHTRhVWDPTjafhwULlAkkrvSMYu3WTqwMOdUy+CZ XtOw== X-Gm-Message-State: APjAAAUHwNLaTQXjLuAe2V4mV0ucYxnig715nnHfiv5h2yM6xpuY+24f ez0eZ3rCdW/fj8IMwMhm0SWTT7KjiUorIAYaOLT9ZiXRbOM= X-Received: by 2002:ac8:180e:: with SMTP id q14mr15963593qtj.327.1562672418626; Tue, 09 Jul 2019 04:40:18 -0700 (PDT) MIME-Version: 1.0 From: Axelle Date: Tue, 9 Jul 2019 13:40:51 +0200 Message-ID: Subject: Connecting with security mode 1 level 3 To: linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi list, How do I connect to a BLE device using security mode 1 level 3 please? With bluetoothctl, I do not see any way to do this. Instead, I connected and then paired. It said success in both cases, but then one of my write requests is failing with "Error: Insufficient authentication (5)" which I assume means that I did not get to level 3. I tried also with btgatt-client provided in bluez/tools. I specified "high" (-s high) level but I get the same issue: error 5. I had a look at the security mode with "get-security" and it told me I was using level 1 :( I set it back to level 3, but actually that does not seem to do anything, it remains at level 1 ! sudo ./btgatt-client --t random -s high -v -d MAC-ADDRESS [GATT client]# write-value 0x0014 0xFF 0xFF... [GATT client]# att: ATT op 0x12 [GATT client]# att: < 12 14 00 ff ff ff ff ff ff ff ff [GATT client]# att: > 01 12 14 00 05 [GATT client]# att: ATT response received: 0x01 [GATT client]# att: Retrying operation 0xb0d160 ... [GATT client]# get-security Security level: 1 [GATT client]# set-security 3 Setting security level 3 success [GATT client]# get-security Security level: 1 I am using Bluez 5.50 on a Linux Mint host. Thanks, Axelle