Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4311064pxu; Wed, 9 Dec 2020 13:50:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLFEP5fc4L8tzCPoIL+ecyjmMDWpB2HgsTCCUUxaSeJjfqkmaGp2XQdjqlXoepxYZYvwnF X-Received: by 2002:aa7:c355:: with SMTP id j21mr3805924edr.338.1607550610062; Wed, 09 Dec 2020 13:50:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607550610; cv=none; d=google.com; s=arc-20160816; b=bcJQkajIbt+hL0QX1oY50TRTUDIixz5rUhURxIGxkNzV1UPtYOIYiPmjS9YeMHQCNR 3i/HZiCZrk0uNdmpLLhK4vFe6meKxeZQ3OMTSPuyZQnX2QG4qhRBFKE4rCjS8lq3r3VE kgj3gDmbcXXdp0SO7nSL+EMP7vNQdAamezz2SuozelccpQjbNQ2AcXUcw0xU21lDCm35 Py4TRjCwuurh88p76MPSXgnzN8poB4ZLstID39wpTF6+2lY6Mfz2OXHHv3yW5Be7gZac xXaDDXZj3ivAXhfUx+G9fQXdF84mCsSCV32Fx8Km9+BkOPKYG2aYraqdldqrWpovjlSl Tz5w== 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 :references:to:from; bh=5ENjCJrg4Lp+Vpz0anW+r3fS4WWBfBMsMs7lqyAVDlo=; b=daz3tDCQ8IDu9Qho2fZ5J2KtYCB0u+1tdr/pitd9c8Q/0QlyfzE/PgCJuovuhAjAzR lZnHlZOVEd8eLNDaVK806mzJ5ckzLfsQGeI/vel5h9kG4+bk2oRk42M4fgcXlMFLhrPE SvrBXn40h+x0vIkb//c10/riqj4+mXwjmXfoBGHF1JTKlvz/5CnIaCTMpLH3kvN14wX1 gdxhJh7Sm8LXotihJtwTS2JxdcWQa4bgeTicYv4Vw9O7YhAjNLLVrtrjTvl8vER8ef6d nCovvt3CAbQBtvB9//OhJybzuhxewwk6Zztov5SaU8CO0ksXvLuJ5X5PhqE/KaXqRJ/u gbcg== 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 m10si1482234eja.453.2020.12.09.13.49.34; Wed, 09 Dec 2020 13:50:10 -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 S2388310AbgLIVsb (ORCPT + 99 others); Wed, 9 Dec 2020 16:48:31 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:34285 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388305AbgLIVsb (ORCPT ); Wed, 9 Dec 2020 16:48:31 -0500 Received: from [192.168.100.1] ([82.252.152.214]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.119]) with ESMTPSA (Nemesis) id 1M4s8v-1koUKH0dh1-001z21; Wed, 09 Dec 2020 22:45:58 +0100 From: Laurent Vivier To: Bastien Nocera , linux-bluetooth@vger.kernel.org References: <3a6fa942-bec5-5e5f-391d-197d1c1eafa6@vivier.eu> <73236e71-781f-1dea-13d5-61fdc45d5e13@vivier.eu> <0eeb1a4a1254d00b2d1a8f77133af4d16857b266.camel@hadess.net> <50264b155ddf8b677125b87a703a628f76518457.camel@hadess.net> Subject: Re: Bluetooth printer connection error Message-ID: <8066fc64-5528-0952-e23a-49026bea39fc@vivier.eu> Date: Wed, 9 Dec 2020 22:45:57 +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: <50264b155ddf8b677125b87a703a628f76518457.camel@hadess.net> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:/8PWwqtabsVgbgfwNGRDACVjYhZpdXk2pwKYsTOx4dvQiJfONQs YTq3pGGVE8sqDsDm9cK1c5AuGR2FdaAsmBNxZEPlBcSe/fszXH2ISKCqOqiFKdjnLNgfzCO zeIHveuUAwOVWAqD6Op3u/YR+9EITUABHMTti0qT47LotNTvKTE4dQjstZVuYRI1pss8iyM BiQAY2ecFcu8R3MG0xWig== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:pdhLs3Dhs8U=:FAL3hWG39sp+WDN3XMVZvf QqXDfqCUA3Lq4fgu0k1JV9Wy+Zohkz/9b3kmaG8oAN3OPpUA8KI40MW1RvsRz02a2g6M0exPy v8TYqisCJEppBYHeEwFKMZrRKu7pBRko0UaffbmkmHHedz9H/We/N6ZmpHkhobdF6dvCjzjPp 1I+Q9y2Ija18rRbqeQdWQXwRuZPl8L6x6ic18WeXQE+fARYtiKRF3RuFKI94S6KmqHsRCRKHS jDvQzPHuxBj/YHpmouFUBBcmRA7rhLFFwHiAWZlmV5Au1qh7zzIrm9DdMXNqRW9XhwHsGcOjK RYX2g3eoutJ7Q+tS0KJ1F1GOIktUCLzQC92MqAW1VwGT7XL+FQ4MfUKTis5uXGwVqMejb33Lo W7ezmPzUBOBXLux1m3hE75HY9CWFTQIqAZ1pHuJS1D4f9KN+F9cLEkbk8OKRBBoN56327Hwa/ aFFRBl7++w== Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Le 09/12/2020 à 21:27, Bastien Nocera a écrit : > On Wed, 2020-12-09 at 20:04 +0100, Laurent Vivier wrote: >> Le 09/12/2020 à 12:34, Bastien Nocera a écrit : >>> On Wed, 2020-12-09 at 12:14 +0100, Laurent Vivier wrote: >> ... >>>>> 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. >>> >>> I don't remember how this used to work, but you'll probably only >>> see >>> something if the printer is visible. >>> >>> You might be able to get the printer to work by adding: >>> bluetooth://DC0D309023C7 >>> as a printer in the printer settings of your favourite desktop >>> environment, if it actually uses SPP. >>> >>> running the cups backend with: >>> /usr/lib/cups/backend/bluetooth --get-deviceid >>> bluetooth://DC0D309023C7 >>> >>> should show you whether it can get autoconfigured for CUPS use. >>> >> >> Thank you Bastien, it's exactly what I needed to know. >> >> Correct me if I'm wrong but it seems there is a bug in the >> cups/bluetooth >> command: > > Sigh. No, it's not a bug, it's just that the cups tool was never ported > from the bluez 4.x to the current bluez 5.x API... > > Until that's ported (if ever, given the low number of Bluetooth > printers around...), you could try to extract the IEEE1284 ID using: > sdptool records DC:0D:30:90:23:C7 $ sdptool records DC:0D:30:90:23:C7 Service Name: SPP Dev Service RecHandle: 0x10001 Service Class ID List: "Serial Port" (0x1101) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 1 Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100 It doesn't seem to provide an IEEE1284 ID. > > But I'm not certain that this working is necessary to actually try a > print. Have you tested that? > Not sure what to do... If I try to add the printer using the GUI, it doesn't appear in the list and I cannot add it manually (Fedora 33/GNOME 3.38.2) in GUI. If I add it with the following command line: lpadmin -p M02 -E -v bluetooth://DC0D309023C7 -P /usr/share/cups/model/Phomemo/Phomemo-M02.ppd.gz It doesn't print anything. But I had some selinux related error: setroubleshoot[13488]: SELinux interdit à bluetooth d'utiliser l'accès connect sur le bluetooth_socket Inconnu.Pour des messages SELinux exhaustifs, lancez sealert -l 965e2270-948f-4791-93f0-3b856c162cea setroubleshoot[13488]: SELinux interdit à bluetooth d'utiliser l'accès connect sur le bluetooth_socket Inconnu. ... So I ran: ausearch -c "bluetooth" --raw | audit2allow -M my-bluetooth semodule -X 300 -i my-bluetooth.pp And now what I have in the syslogs is: cupsd[1185]: REQUEST localhost - - "POST /printers/M02 HTTP/1.1" 200 499560 Print-Job successful-ok DC0D309023C7[14310]: sdp_send_req_w4_rsp: Error sending data:Permission denied DC0D309023C7[14310]: sdp_service_search_attr_req: Unexpected end of packet DC0D309023C7[14310]: sdp_send_req_w4_rsp: Error sending data:Permission denied DC0D309023C7[14310]: sdp_service_search_attr_req: Unexpected end of packet cupsd[1185]: Can\'t get service information DC0D309023C7[14310]: sdp_send_req_w4_rsp: Error sending data:Permission denied DC0D309023C7[14310]: sdp_service_search_attr_req: Unexpected end of packet Thanks, Laurent