Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp286817ybc; Tue, 12 Nov 2019 01:17:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxlCrLajEXO3cTK5MHIl5D2auCLe8DISMJjrnnV22gxqFtDnUnoBUiKDThe0M0APNe97Yxd X-Received: by 2002:aa7:c987:: with SMTP id c7mr31478856edt.232.1573550230294; Tue, 12 Nov 2019 01:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573550230; cv=none; d=google.com; s=arc-20160816; b=uxhGlLfLMU1oDprflt9C5+b1MV/hvYJFabekCp//oVYDVmIGAelmgK7AF2u5pT3HZ4 4APsiAflsILkg7rQ3xTu2RB9jwmQyvZBnHD0t+GDfFlxrZEEK+aGaLA4epHVDWRNUcIc x+VeJyxu2wJVgczzcjI6K1ppQfcvpZKkiPRs4CISV9M9iI9hBp0ZMXuAJQPv9ZMn2D+/ jNr/bILMoHP4BTjo5iU/J5WsyOkZbYcJ05npR5z5OrLMao8gz4Q4bA5pddhopIEzc24I CNOVbwTniMpz/7TfoecSExURzXksFhht8lY4ACRFFC//jWXcuPHrD5FPoco7KSwdjnwl wdJw== 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:mime-version:dkim-signature; bh=fNPuEg+DkoSNJcKB6RIxqtUfrM/WDkkK1wigAWABpZU=; b=dzZ1ogaid5IcJCayDDAnYkeTHBqopNpRv9/LRInTdcf047eSQ94LkMlm9DOrWFFwP8 J8eTQsQovL+fFRhtddlKK63YjSttQ4et8o/g+gO9Y6ELx8sQnQ+pa5a3e/qqy6/4wLpm bGQIQJcr3x/ookq3aRLSFH+nu2ABlCBTNDZIbF1Sde7Esc5GvD1Qy83Yy4TP4t0ITAFK DknweLCot3VQA5fyS88/kWkQ235i3unmx428Mfu0xgetd1ZrzpDZNzI1QMIgNT9vCTPH IUeN/AUeV0nz4nO6Ofx/mVUu/ZRrnCexMeISXRLFJ2L8YODDBv1kBtIcdN6xW8Nd8ydK wr0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Du5oK6PY; 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 c49si13221738edc.361.2019.11.12.01.16.32; Tue, 12 Nov 2019 01:17:10 -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=Du5oK6PY; 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 S1727272AbfKLJPt (ORCPT + 99 others); Tue, 12 Nov 2019 04:15:49 -0500 Received: from mail-io1-f41.google.com ([209.85.166.41]:43595 "EHLO mail-io1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725835AbfKLJPt (ORCPT ); Tue, 12 Nov 2019 04:15:49 -0500 Received: by mail-io1-f41.google.com with SMTP id c11so17882762iom.10 for ; Tue, 12 Nov 2019 01:15:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=fNPuEg+DkoSNJcKB6RIxqtUfrM/WDkkK1wigAWABpZU=; b=Du5oK6PYxFVLdcseXqGLaS5hfXwIXSMMdNXNJSYkaOa//kWDTj0C1/tpc1bkntdJW1 AfRktmC57XYpfFeawm02BNxuTwS5pstpwRmWtv2nzPoXjxRC1saW8jd2WBLwgl4iPpEu GmhomeOYMcXrWoqY0f7BfhlZrqyvRgPC5A672Ih1C0TM4dN0iUypdsPF5Dhc4wR/J/za +vbEW2/PFY5abmOI1AcrgdmhWojeTbv8kp8RRJYfWk0gb3PmVx54li3EawRVRYfPjB5p Me+g7t/dw97GqC77mGg/EmE+iF5hx+DD6KgLER0ur4py2CnvpsBRAjewspCS7llyKYw4 8m8A== 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 :content-transfer-encoding; bh=fNPuEg+DkoSNJcKB6RIxqtUfrM/WDkkK1wigAWABpZU=; b=fB/a0gWYYVZoeNzPmyocrPgAvjsLK70qhkJPfZCVQ7lCC/gPJjBVdhgQabwjlC2WDh NCMkaRylCTrkvsUBO/1X7UjYjKvXNJ1iWGucgVVP0IlIMqH36qGKwdS7tyvHpDnNChk1 3txgbamWUD4jhdh42Fdnd7/ezUxbNlxIwPOZGZVsjtAlP5cilPxn5m3TzIbJgtyCmKJb uKlyixG/CMfOqXHTE6wzFGf4oTxQ6GCbUg6B111Pz2b4R+fH47HAJJu9u7QpV0I/BX4h //AXpaESzVXzC60A+Cf4VKMU7iqr0FQ4QO1/gnRmj2mnZvEIBaWW+wJ8qj+cLyiUUOND WM3g== X-Gm-Message-State: APjAAAXcOHtgDrOyCabjddLY7pdj8QwfjePz99yuY/wP+YTXT2l4ds8w q9bWgr1AeT/ebEpB+LOHcAe6Vr8U7ZMR2xrwX8h45A== X-Received: by 2002:a6b:d81a:: with SMTP id y26mr19213231iob.23.1573550148151; Tue, 12 Nov 2019 01:15:48 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?B?S3Jpc3TDs2YgSG9ydsOhdGg=?= Date: Tue, 12 Nov 2019 10:15:38 +0100 Message-ID: Subject: Simple SDP and RFCOMM example To: linux-bluetooth@vger.kernel.org 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 Hello, I started a project with Bluetooth, but most of the resources on the internet use older versions of BlueZ (and often mention using compatibility mode to hack the legacy code). I think the reason for the hacking is that there is not any tutorial for BlueZ 5 (or it is in some very hidden place). I browsed the page https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test for examples, and I found some interesting codes, but I could not find what I was searching for. I would like to see a simple Python code that can register a service via SDP and receive the incoming RFCOMM connections. Could you provide an example like that? Thank you for your help. Regards, Krist=C3=B3f Horv=C3=A1th