Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-03-2009, 04:58 AM   #1
Registered: Jun 2008
Posts: 360

Rep: Reputation: 35
Bluez 4.x and HP Deskjet 460 printer

Has anybody here managed to get the above printer (or any other bluetooth printer) connected with the new generation of Bluez (4.x)?

I had it working on Slackware 12.1 with Bluez 3.x - but after moving to Slackware 12.2 I had to upgrade
Bluez to 4.x (4.37 currently) to get it to work with a handsfree adapter. Now I just can't get the printer connected again. Here is the situation and what I've done so far:

1. I have two different bluetooth dongles - and both of them work fine on Linux for other things (including the Jabra 2010 handsfree headset).
2. The printer shows up when I do 'hcitool scan'. I have managed to pair the computer with the printer and send the 0000 default pin using the 'simple-agent' tool that comes with Bluez.
3. I have compiled and installed Bluez with the 'cups' option enabled - and I can see it has placed a 'bluetooth' file in /usr/lib/cups/backend.
4. I have the printer also installed via usb - and it is working fine that way (but the usb cable is not plugged in when I try to connect it via bluetooth - just in case you wonder).

The problem is that the bluetooth backend simply doesn't show up in the cups web-based configuration pages - so I can't install the printer.

Should I manually load some extra kernel modules? Is bluetooth printing working at all with the 4.x series of Bluez, or is it not functional yet? Should I perform any manual changes to the Bluez configuration files, or to cups configuration files so that the backend gets recognised?

Cups: 1.3.9
Bluez: 4.37

Thanks in advance for any suggestions - but please bear in mind that the 4.x series of Bluez is a re-design of the previous series - and the configuration files seem to be different - so information pertaining to 3.x series most likely won't work. I would be interested to hear from anybody who has managed to get their bluetooth printer working with Bluez 4.x or is familar with this series.
Old 10-20-2011, 06:59 AM   #2
Registered: Jun 2008
Posts: 360

Original Poster
Rep: Reputation: 35
Replying to my own post in case anybody finds it useful - as these matters are actually still current.

Fast forward few versions of Slackware into the future (13.37), and I've managed to setup the HP Deskjet 460 printer with bluez 4.x series. The trick is to use the "simple-agent" Python script included in the bluez sources (you have to download them separately from the bluez website) in order to initially pair the computer and the printer up. After starting bluetoothd (using /etc/rc.d/rc.bluetoothd on Slackware).

We obtain first the bluetooth address of the printer:
bash-4.1# hciconfig scan
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:11:22:33:44:55  ACL MTU: 678:8  SCO MTU: 48:10
        RX bytes:706 acl:0 sco:0 events:31 errors:0
        TX bytes:380 acl:0 sco:0 commands:26 errors:0
Then we use the simple-agent script and the bluetooth address we got in previous step to pair up with the printer:
bash-4.1# cd /some/place/bluez-sources/test/
bash-4.1# ./simple-agent hci0 00:11:22:33:44:55
RequestPinCode (/org/bluez/hci0/dev_00_18_00_00_78_86)
Enter PIN Code: 0000
New device (/org/bluez/hci0/dev_00_11_22_33_44_55)
This assumes you have Python installed. Also, "0000" is the default factory pin for the HP Deskjet 460 - but your pin might be different if you have a different printer model, or if you have previously changed the default pin.

The above instructions work with bluez-4.91 and HP Deskjet 460btw (the bluetooth version, not wifi). They will probably work with other versions of bluez in the 4.x line, and other bluetooth printers.

Theoretically you can also use gnome-bluetooth applet or blueman instead of the simple-agent script to do the pairing. I've tried blueman and, although it could see the printer, it just couldn't pair up and it kept on returning error.

After pairing up the printer, you can add the printer in CUPS - it will be detected on the first step of adding a new printer as a bluetooth printer. I've added my printer twice, once connected via USB and once via Bluetooth - so that I have both options just in case.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bluez 4.x and HP Deskjet 460 printer xj25vm Linux - Hardware 3 10-20-2011 07:01 AM
deskjet printer 840c trscookie Linux - Hardware 1 04-20-2006 09:15 AM
Help With Printer (HP Deskjet 3420) standard.killer Linux - Hardware 0 10-18-2005 02:40 PM
printer HP DeskJet 820Cse Henry Linux - General 12 02-07-2003 09:43 PM
hp deskjet 845c printer sakeeb Linux - Hardware 15 05-03-2002 01:52 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration