Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2174625ybc; Wed, 13 Nov 2019 10:06:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwzIZbLLTeeLqE8Qjr4zNLNiLywROjoui+/tz8e1AmxWjL9sdnNSz0wXhP/odV7GLv7n76b X-Received: by 2002:a05:6402:883:: with SMTP id e3mr5146152edy.32.1573668363524; Wed, 13 Nov 2019 10:06:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573668363; cv=none; d=google.com; s=arc-20160816; b=Jym5jJ/BPQ1RtpQeGYewWNRqRyk/rKjDjQphwMi6RfWbfCmHP3HKKQksb2piuZTc5y H+VrjA+zW/So1+gLYy2bfOVaIiXoUUjAUY3CX8ytPUOGtANQIKNDKWK5/etZA6YEXqDT iDyPRpx5EemF2pXWu/JJFosj2qTE2KSKqlGVCPD9ebOfco30HTVllmJCHvyi8MrQDibs Q57lbwyahCO6RGT4wKZ+3vr0aaKEGlysJHMEqFlq1EH+ZH/IwsJSp38o0Foe6kgJjyO2 twKKcxFAV7GJmjD/7f8UGT3pJdYgzdQGat6urON5777veGqEXlv/NvFenGIRzxtfq+VV BK3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ml1hiojI1gf6hYFusJhz7vgIPv+M2G0Hb9P85pw1kMU=; b=vTOiki0FzlOi+A5KGI6Uycucld+iNKNx4+1KJ/HxTKsN0ovilSAT2GK6GzxEwklxdG d3vTfmU4LmbVyj0GgRZZnD3j+VQntwjOQwyZ3qMogh6701yJgFGwrFhmwWEjJV6qq1PZ +nv2Zw7TVbWCytlM78H8R1vGR/uyvdZBZA3ceUrvoR9VyZqGY0jUChPORAegD/JR5aTE Pq/iwj4Y+FSc3bC4HApY3euajO9B5evPbmvwGsYnNgsefbg5+gLONJ94BD85R2WX0/DG 4lotI9X7ZPpMcVJ+jyVjjGIqjUSzkIs/QG/hQq9Po8Ykk+0XQK6fKy2vADfNNfN5ed02 +1PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KAhvaa5r; 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 b7si1902098edb.439.2019.11.13.10.05.32; Wed, 13 Nov 2019 10:06:03 -0800 (PST) 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=KAhvaa5r; 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 S1727528AbfKMSDf (ORCPT + 99 others); Wed, 13 Nov 2019 13:03:35 -0500 Received: from mail-yb1-f182.google.com ([209.85.219.182]:36615 "EHLO mail-yb1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbfKMSDf (ORCPT ); Wed, 13 Nov 2019 13:03:35 -0500 Received: by mail-yb1-f182.google.com with SMTP id v2so1169907ybo.3 for ; Wed, 13 Nov 2019 10:03:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=ml1hiojI1gf6hYFusJhz7vgIPv+M2G0Hb9P85pw1kMU=; b=KAhvaa5rDCdgeLSbrGLJ98ncbNg50j0jMJ6Sb1NsI1Ol4nT3xd+uBeinW21Z3aJUK6 fp4mKXIwIijyYPlD+KHGMjdt+DvGVSkOMovmGb8v6hJlZfzUOC/epZUlqfhxFh4+imvE GRF71fzc1VdJKw1thjG7K/G9FUebCa4upOSMnlrs+lEuUFcPw4eIuz90ue6I4biHNrDx LKpCam4FeUUV3j5Zo8Qpj9JXzkp1LgPwn/prG+OBSD6dZ8k6kaMdRoiuUcwD06CBSy9p nA02pUzzeK4K2c0uj3BwEgWdSohxx6NrPanT4AocJXT4hcHy70bxR0VVJ2gRSg85Uvu2 PEhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=ml1hiojI1gf6hYFusJhz7vgIPv+M2G0Hb9P85pw1kMU=; b=eqCukPAjeXppltMcFUpQ66pSYF/6hzJ+ql/1fHgc/uWBd9sN8nJDffINmB3XMu6UFw UcIVQqkmIx/SQ33jbLOxllrgi6N9ILnSde6J0OpuBgVWcJc0FDo6i4vlghwHtc/yioD5 JttKi8pKVDcHgRSKdg8dAzSuHx+XQRY6lF7jBqd0O4c2mdECRFOfV6MWrfu0gyo7VTFh QabewEy2jrys8ukbuLYWrE19+Tlt9BN7VGxbzVdC/x6bDdpnyd8590FbZfy9cKeycYzH iADk2Srx/nNh6bBg5RbKOsNEGdeXd6ruphKgRKqliE7ayilLoajh7j4WPJE6GUHAhdhl JziA== X-Gm-Message-State: APjAAAV4ediRZZZ2jgAy586hcnxp2LDsVW312QCMohL4FhYOV8NO+BjD 2pQ+4MI6v/rDkatCySbAmcuVjuqtzlBgMmM7fEKmaA2A X-Received: by 2002:a25:8482:: with SMTP id v2mr2520669ybk.374.1573668212922; Wed, 13 Nov 2019 10:03:32 -0800 (PST) MIME-Version: 1.0 References: <5852113.xjoqjODIPz@ix> In-Reply-To: From: Barry Byford <31baz66@gmail.com> Date: Wed, 13 Nov 2019 18:03:21 +0000 Message-ID: Subject: Re: Simple SDP and RFCOMM example To: Bluez mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Wed, 13 Nov 2019 at 17:29, Krist=C3=B3f Horv=C3=A1th wrote: > > Hi, > > > There is test/test-profile and test/test-hfp in BlueZ source code. > With the test-profile code, I could register a service, and I could > discover it from another device. However, a connection couldn't build > up. The function NewConnection didn't call at all. (By the way, I > didn't find any line of code to receive the data, how is it possible?) Here is an example of receiving data with a Serial Port Profile: https://gist.github.com/ukBaz/217875c83c2535d22a16ba38fc8f2a91 Going back to your original question, you might find it easier to use a Python library like Blue Dot on your project as it presents a higher level interface: https://bluedot.readthedocs.io/en/latest/btcommapi.html Regards, Barry