From: Till Kamppeter <till.kamppeter@gmail.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: linux-bluetooth@vger.kernel.org, Tim Waugh <twaugh@redhat.com>
Subject: Re: PATCHES: Device discovery of the "bluetooth" CUPS backend does not work
Date: Tue, 11 Aug 2009 13:19:53 +0200 [thread overview]
Message-ID: <4A8153D9.4020008@gmail.com> (raw)
In-Reply-To: <1249986829.2022.17.camel@localhost.localdomain>
Bastien Nocera wrote:
>> Therefore I have modified /etc/dbus-1/system.d/bluetooth.conf
>> to grant this permission.
>>
>> I have added the following lines into the <busconfig> section:
>>
>>
>> <!-- allow users of lp group (printing subsystem) to communicate with
>> hcid -->
>> <policy group="lp">
>> <allow send_destination="org.bluez"/>
>> </policy>
>
> Looks good. What about patching the upstream config file instead?
>
This is my intention, is it another file than
/etc/dbus-1/system.d/bluetooth.conf? I simply want nothing more than
that the access permission for "lp" is there out-of-the-box.
>> Second, the output of the CUPS Bluetooth backend was not very good for
>> the printer setup tools doing the right thing. I have patched the
>> backend to let the device class of the Bluetooth printers to be "direct"
>> and not "network", as users expect a Bluetooth printer rather under the
>> local printers than under the network printers.
>
> That seems like a good idea, but I don't know enough about the internals
> of CUPS to know whether it changes anything but the classification of
> the printer.
>
> If it doesn't change the behaviour wrt. errors and retries, then I'm
> fine with it.
>
The device class only appears in the output of the backends in discovery
mode. It does not enter anywhere into the configuration of the print
queue. So it seems only to server for separating local and network
printers in the listing of detected printers in a printer setup tool.
A Bluetooth printer has to get paired with a computer before the
Bluetooth CUPS backend can find it. This makes it getting assigned to
one single computer, whereas a network printer (Ethernet or WLAN) gets
discovered by all computers in the network and all computers can have a
working queue accessing to the same network printer. Therefore a
Bluetooth printer has more the characteristics of a local printer.
>> I have also filled the
>> make-and-model field instead of putting a hard-coded "Unknown" there.
>> The change is here:
>
> This part is broken. The backend man page says those are possible types
> of output:
> device-class scheme "Unknown" "device-info"
> device-class device-uri "device-make-and-model" "device-info"
> device-class device-uri "device-make-and-model" "device-info" "device-id"
> device-class device-uri "device-make-and-model" "device-info" "device-id" "device-location"
>
> So if you have the device-id, you must have a device-info. Your patch
> removes the device-info even if we have a device-id.
>
Really? What I did is replacing the "Unknown" by "%s" and adding a
second "expanded" for the additional "%s". I have tested it and it works
as expected.
This is the output with my patch:
direct bluetooth://001A0E1769AA "Officejet H470" "Officejet H470
(Bluetooth)" "MFG:HP;MDL:Officejet
H470_BT;CMD:PCL,DW-PCL,DESKJET,DYN;CLS:PRINTER;DES:CB028A;"
It has exactly the 5 items as the second last line of the output schemes
which you show above shows.
>
> In the future, please attach the patches to your mail, and make sure
> they apply to the upstream sources.
Sorry, was my first patch submission to this project.
Do you have a bug/feature request tracking system?
Till
next prev parent reply other threads:[~2009-08-11 11:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 20:19 PATCHES: Device discovery of the "bluetooth" CUPS backend does not work Till Kamppeter
2009-08-11 10:33 ` Bastien Nocera
2009-08-11 11:19 ` Till Kamppeter [this message]
2009-08-11 11:33 ` Bastien Nocera
2009-08-11 12:24 ` Till Kamppeter
2009-08-11 13:12 ` Bastien Nocera
2009-08-11 22:09 ` Marcel Holtmann
2009-08-11 22:14 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2009-08-26 17:59 Till Kamppeter
2009-08-26 18:14 ` Marcel Holtmann
2009-08-26 19:12 ` Till Kamppeter
2009-08-27 2:35 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A8153D9.4020008@gmail.com \
--to=till.kamppeter@gmail.com \
--cc=hadess@hadess.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=twaugh@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox