Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp994810rwe; Thu, 25 Aug 2022 13:10:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR5/cSiF+U288aODnl0eMSq08homZxRu4bWjOZbWlLpoffYSUB/erx8GJTHG4G60tmpKhVz4 X-Received: by 2002:a05:6402:28cb:b0:43b:c6d7:ef92 with SMTP id ef11-20020a05640228cb00b0043bc6d7ef92mr4447717edb.333.1661458244062; Thu, 25 Aug 2022 13:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661458244; cv=none; d=google.com; s=arc-20160816; b=v08dAa96edYEWPzuES3dXDYZzW5qmmBqqxsc35XffrKkjveU/tgQRoNJXWzjkbzCma rHY1r+wpC9HogOS5GugbslE53/K/24astZvRAv90Kkgg9h219HFlARiHMmihYIUWrlqD 7yUKY852cFYZqEjUsZd9JC7cz1rBlgT/sXoSIvkAS32jbx66Zp379gC4PV3NGjjj3B8n R/aHhAsiKsjQ4tful3JMPCI5sQIwoAKuOwtTRwDHRgd9IiEc2dl5P+PoINgBz+Yoc0It wLXiQdhQEluXbYqYCggTcXamkmQhGSOvzTNyvfWWdeKLxj2drbhHUHpfEVH2BOx76+F6 AUlA== 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:to:from:dkim-signature; bh=FjTGAAUprYz5An1oPjFJTl3OQSaKp8GhLv9KVGzta5Y=; b=FMKQvoLxJUIdwlwiB+eiamwfsOHdPNvTOSxUaDUv4o9z6SDvsb8rNvmmPQLY7ZtAuw Y8PrP27b7NIKLLbtMXm2YvoPivVj3PTO61urcRD5DrtV7HFD2hlO5D2YDN3jRFEyEq3v Qk15G0LjmTbDAkN+eMVX03MBSuGTVXiHqn5zh/viH2LGd3thBudq8MK10TCSgVuuV9r6 lO8ASlCMJKRSU/qo2X0T9wY+bCEAevumHQGpBWyn4jjEWznWzzG2oK0/jNlJWj1tsoeA zxzU1P0tFAyRVMbE5uc+t+l/SftMVJkcSgsn/84vJLdfVBzeQ70VPedcwhvPf0UGZbdi rHvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="DsBGUPS/"; 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 ti5-20020a170907c20500b00730951bff16si30771ejc.661.2022.08.25.13.09.45; Thu, 25 Aug 2022 13:10:44 -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="DsBGUPS/"; 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 S243481AbiHYUIF (ORCPT + 99 others); Thu, 25 Aug 2022 16:08:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243479AbiHYUIE (ORCPT ); Thu, 25 Aug 2022 16:08:04 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C797BFC43 for ; Thu, 25 Aug 2022 13:08:02 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id x15so19948793pfp.4 for ; Thu, 25 Aug 2022 13:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc; bh=FjTGAAUprYz5An1oPjFJTl3OQSaKp8GhLv9KVGzta5Y=; b=DsBGUPS/sxK1qzzsfLKfTxS9/bqdbNtW406fQzicHsWGTHH8iXWfLmHmWzHxfDkzGz SRhw06TdcUBYKysViMxosNUZiA07qiPhQHoJyyTtV17ZqCqyRFBVFXSftFdm8E7gUuEr OoTfvSLpqd7xg0ewzKpcaySiqKGt0DTjRpvijD8wDcla13scg5e7AgKY4Xk4oBo01HGc JOG9bkjyTPVYOy3yS1XAhPbzmQuZxL6vcXxT/ZeEasD+oulxqs0RTAII+InzcunCGNL2 89g0/a2YPntarQgWHIj9XQX/HTnle0zssHs8jaXZ7tKith+zS+cT7FUqdV/oBJ2++x5l B9sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc; bh=FjTGAAUprYz5An1oPjFJTl3OQSaKp8GhLv9KVGzta5Y=; b=yq78ViQybhotJzdvOwQjfDCU9z7u46Txv0WaSNingOiqulM1EYnucYcf2fV7X6dJB/ Hzs6z5Wz42iDaSHrJDVUejehU8LNPdKm991I44id601Ai6ZP0r5DOta/3ga15SXOVRYd pv7cEw0lXW3KhuNV2JqRVo6JRxo4MIsp25x6vWa4LAt/QiBZKPlediPTCgd0qVCbo8g2 dWJLqFBCwanhha3sw/PHpxgQD4US7R8oKI3DOXii1NLDxt1/qyRfbqLIBUyAV7ul6m4z 0iBzCsiL5YlflrI1HssU6QDtTx6ueLjQM1zXU4zCnCfXFPgT/JsNT8qyO9meX+3lOA3F 40Dg== X-Gm-Message-State: ACgBeo352wmcd2EG85LMplp49dh6jnGuUzH7n1hboCKfAbz8ez6Lw382 PKv90dybPhC5AkXN0xC8GP8JcEu9qUA= X-Received: by 2002:a62:b614:0:b0:537:6d2:85e0 with SMTP id j20-20020a62b614000000b0053706d285e0mr618817pff.40.1661458080501; Thu, 25 Aug 2022 13:08:00 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id g11-20020a170902e38b00b001726ea1b716sm1779043ple.237.2022.08.25.13.07.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 13:07:59 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 1/2] gatt-api: Add error code ReadValue/WriteValue Date: Thu, 25 Aug 2022 13:07:57 -0700 Message-Id: <20220825200758.1645136-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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,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 From: Luiz Augusto von Dentz This allows application to return error codes in the range allowed by the spec: 'GATT - Section 4.9.5: Application Error 0x80 – 0x9F Application error code defined by a higher layer specification.' --- doc/gatt-api.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt index af0aa761d0a2..5042c54704e4 100644 --- a/doc/gatt-api.txt +++ b/doc/gatt-api.txt @@ -79,13 +79,15 @@ Methods array{byte} ReadValue(dict options) "mtu": Exchanged MTU (Server only) "device": Object Device (Server only) - Possible Errors: org.bluez.Error.Failed + Possible Errors: org.bluez.Error.Failed(string ecode) org.bluez.Error.InProgress org.bluez.Error.NotPermitted org.bluez.Error.NotAuthorized org.bluez.Error.InvalidOffset org.bluez.Error.NotSupported + Possible Error Code: string 0x80 - 0x9f + void WriteValue(array{byte} value, dict options) Issues a request to write the value of the @@ -105,13 +107,15 @@ Methods array{byte} ReadValue(dict options) authorization request - Possible Errors: org.bluez.Error.Failed + Possible Errors: org.bluez.Error.Failed(string ecode) org.bluez.Error.InProgress org.bluez.Error.NotPermitted org.bluez.Error.InvalidValueLength org.bluez.Error.NotAuthorized org.bluez.Error.NotSupported + Possible Error Code: string 0x80 - 0x9f + fd, uint16 AcquireWrite(dict options) [optional] Acquire file descriptor and MTU for writing. Only -- 2.37.2