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