Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3890797pxu; Wed, 9 Dec 2020 03:19:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEkAtURDqJREPFUVPKUgH0GviS2sVO0h2DCw3gCa9GXqlcsJ7zRkTTAw9BKiBH+JfR9YEg X-Received: by 2002:a17:906:4e50:: with SMTP id g16mr1713464ejw.191.1607512768010; Wed, 09 Dec 2020 03:19:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607512768; cv=none; d=google.com; s=arc-20160816; b=qdm39BWsZ1KN9xq04QS99xZ6x39qwGcGrWvG21T1PxOaYt8i3Fd3ErGaEDaWy6j+eU Abfn5NR8zqdtLZx3QkJw87m1aC1T61IPPIdzEvpJycSiJRvdXzSkNdVzcQcLcwiUX3k4 2fVzKORr09qZHXveuylVLlDwFN8naoNrXicy2Hj0vI/89lurSc1Y20ZmD6vNvPU2oDux DxLUyUbBiGd2pCM1DdWhFy0wXVVGER+wayOeHTczHg0fY+Edi9K8sD6sPtHQTOQUO75S bP5hAKLIXTcvImqKjegjneCfYv9ILV8mpECaRBJA0ybpx/r4V+R8XsIQF6zpn8eCxo0w qNPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:to; bh=1gV6uZmw9y2Rs7apHRAuk8zrjIzuy9L7pQJBkAJ7iwo=; b=i2RBZS/9N0SVEOXP06sLBcQhlj3GDoGB9d/2hTK01/AmzVDr2EeZLboE00s+gKnfJG a/hLYRyFldxBgk4K896CbM+ZlYBMnqv9DTFGng0WegwAYSz4xETJmyRYqXTwqqZVJezU a/CwayQugtVoOFKsFFlcI5ckULw3xgT6pzuAwX+emwQYeZ+jI6IiJ4D01ZYVVFoK4rxi moCn8hZ42b0aGjJglpdpPx8rxSmUk8o8NirSBAu79+kheCO/PAxfa2hh/7nYYOhWJ6AW d7/e5DSeYPdrcs6X1Fl0c/RWalkXyH/9ljACq6+AlgpMjd0zJ5MBhejLNtevxVo965LF tgWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn22si563222ejc.749.2020.12.09.03.18.55; Wed, 09 Dec 2020 03:19:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730485AbgLILRM (ORCPT + 99 others); Wed, 9 Dec 2020 06:17:12 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:41047 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726954AbgLILRH (ORCPT ); Wed, 9 Dec 2020 06:17:07 -0500 Received: from [192.168.100.1] ([82.252.152.214]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.119]) with ESMTPSA (Nemesis) id 1MTiHb-1khmNz10pR-00U2eJ; Wed, 09 Dec 2020 12:14:34 +0100 To: Bastien Nocera , linux-bluetooth@vger.kernel.org References: <3a6fa942-bec5-5e5f-391d-197d1c1eafa6@vivier.eu> From: Laurent Vivier Subject: Re: Bluetooth printer connection error Message-ID: <73236e71-781f-1dea-13d5-61fdc45d5e13@vivier.eu> Date: Wed, 9 Dec 2020 12:14:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:SnQMCylCz5RWRrbCDoUhtxpmODyqF+8xS2aOv5nj1Ak7MtTrkZg hY5CL3JYTU+UXKQr4JUwYwXc6uUGwL63dQNbPfCu9HYZpkFEb871OZ+U3Vn3pqB9aRiGyM6 mEqFOLcQ7/2ctnEaNrLzU2xXijQClr+iKLcXS8mXKYoA6hzJW+YzCldYPR9EZUg1cHGiTeZ RihKhd/C+KBtSHjuhV1ew== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:pAeZHpbG/WA=:CvtOAZgoqcclHOCUIIJ0aX 5RntHoB3V0JXVCoolO5XgqQaDdjzGiX2BpV5B+sPEKAAvDgtRdxF2krnvfIDmhywFETIdEnDK 3cE8ln/NhMy0aywM7I78i2G2Z1Tnvx+RobzulO7x2bSGPParGZB7KT1syxvBkMdqcR86RDqi2 Rw7nVHxWxlDcUeSDEAz1o2L+nlPd0AzgFVfnPzkqH1hcmQyqROmgoH+1CbK6/6rn4i3HeiP3t k733PXztGhhse1C1JqgueoMe4Q45bSxQuXEkGbHlB++Jaj2qiIwyXUzNPqlj8SXveW82OoGlF 0l0rBFF+u9RCla8Wdrq/O15oNDdB28V++IH0IRBdTaBnnzGG7Y7V/E/waUy14ToJDDR28saQo kxYe9ex/AZPBsbI8EqaA85hfjQOEpGH8Q5+5/kwn9I2Ivj3xV+rsvhNKjpvpMqz338jH0dEzE pWL6MhXvqw== Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Le 09/12/2020 à 12:00, Bastien Nocera a écrit : > On Tue, 2020-12-08 at 22:25 +0100, Laurent Vivier wrote: >> Hi, >> >> TL;DR: >> >> I can pair my bluetooth printer but it fails to connect: >> >>   $ bluetoothctl connect DC:0D:30:90:23:C7 >> >>   Attempting to connect to DC:0D:30:90:23:C7 >>   [CHG] Device DC:0D:30:90:23:C7 Connected: yes >>   [CHG] Device DC:0D:30:90:23:C7 ServicesResolved: yes >>   Failed to connect: org.bluez.Error.NotAvailable >> >> What do I need to add to my system to have this working? > > As I mentioned in the original bug: > https://bugzilla.redhat.com/show_bug.cgi?id=1904686 > > I don't expect the "connect" command to do anything. There's nothing to > "connect" to, as bluez doesn't create rfcomm device nodes automatically > when "connecting" to devices with serial profiles (otherwise one > couldn't connect to them with other applications without going through > the device node...). Yes, I didn't understand what you meant... My question is: what piece of code I need to write or modify to have the "connect" operation working? > If the printer has uses the SPP or HCRP printing profiles, you should > see it when using: > /usr/lib/cups/backend/bluetooth > without any arguments. As I don't see it once it is paired, I guess it is not using one of these profiles. > Otherwise any apps or driver that supports the printer should be able > to create a serial link directly to the device without creating a > device node in /dev. > > FWIW, looks like the printer uses a proprietary protocol between their > own app and the printer, and that they don't provide Linux support. > Short of reverse engineering that protocol, the printer is unlikely to > work with Linux. I've written the CUPS driver that works fine with the rfcomm device. In fact, it's not proprietary, it's ESC/POS protocol. https://github.com/vivier/phomemo-tools I'm working on my code to use python-escpos rather than my hack and I'd like to integrate smoothly the printer in the bluetooth stack. It works also with USB, but it's a shame not to use bluetooth with a printer that has an internal battery. Thanks, Laurent