bluetooth-wizard unable to pair to fixed pin devices

Bug #284994 reported by Daniel Newman
260
This bug affects 32 people
Affects Status Importance Assigned to Milestone
bluez-gnome
Fix Released
Medium
bluez-gnome (Fedora)
Fix Released
Medium
bluez-gnome (Ubuntu)
Fix Released
High
Martin Pitt
Nominated for Intrepid by DanielRoesler
Jaunty
Fix Released
High
Martin Pitt

Bug Description

This is a regression between Hardy and Intrepid

== Regression details ==
Discovered in version: Intrepid
Last known good version: Hardy

== Affected use cases/hardware ==
Any bluetooth peripheral that has a fixed pin which is not handled by the hardcoded algorithm upstream uses.

Some examples :

X3 Micro headset http://bugzilla.gnome.org/show_bug.cgi?id=560315
Holux 1000B GPS http://bugzilla.gnome.org/show_bug.cgi?id=560604
Acoustic Research ARWH1 http://bugzilla.gnome.org/show_bug.cgi?id=560605
Holux m-241 GPS http://bugzilla.gnome.org/show_bug.cgi?id=560606
Bluemax Bluetooth GPS Receiver GPS-009 http://bugzilla.gnome.org/show_bug.cgi?id=560609
Navigon Triceiver GPS http://bugzilla.gnome.org/show_bug.cgi?id=560713
HBH-PV700 http://bugzilla.gnome.org/show_bug.cgi?id=560714
Qstarz BT-Q880 GPS http://bugzilla.gnome.org/show_bug.cgi?id=560715
eGPS-397 http://bugzilla.gnome.org/show_bug.cgi?id=560625
Hp Photosmart D5160 http://bugzilla.gnome.org/show_bug.cgi?id=560762
Trust V92 56K Bluetooth Wireless Modem http://bugzilla.gnome.org/show_bug.cgi?id=560763
OBDPros scantool http://bugzilla.gnome.org/show_bug.cgi?id=561325
Tecom BT Headset http://bugzilla.gnome.org/show_bug.cgi?id=561324
G-Rays1 gps http://bugzilla.gnome.org/show_bug.cgi?id=561326
HUDGPS http://bugzilla.gnome.org/show_bug.cgi?id=561327
Philips Bluetooth Stereo Headset SHB7100 http://bugzilla.gnome.org/show_bug.cgi?id=561328
BT-GPS-37A4C2 http://bugzilla.gnome.org/show_bug.cgi?id=563554

== Known workaround ==
none (besides using Ubuntu Hardy)

== Description ==
Binary package hint: bluez-gnome

using bluez-gnome version 1.8-0ubuntu1

ubuntu 8.10 intrepid

Tried to pair with a bluetooth headset. Started bluetooth-wizard, with headset in pairing mode. Headset detected OK and shown on the "Device search" display. Selected it and clicked "Forward". Under "Device setup", got message "setting up new device", then "Connecting to X3 micro now".

Then, "Please enter the following PIN code: 0000" flashed up and vanished, followed by "Pairing with X3 micro failed".

In fact, because it's a headset, there is no way to enter a pin code on it, and I presume this is why the failure occurred. What is needed is for the bluetooth-wizard to prompt for the headset's pin code and send that to the headset, rather than the other way around as is set up at present.

Related branches

Revision history for this message
Daniel Newman (dmnewman) wrote :

I worked around this by editing the source of wizard/main.c, changing the default value of 0000 to the correct one for my headset. See below:

        /* Most headsets are using 0000 as pincode */
        if (target_type == BLUETOOTH_TYPE_HEADSET ||
                                target_type == BLUETOOTH_TYPE_HEADPHONE)
                pincode = "1234";

        text = g_strdup_printf(_("Please enter the following PIN code: %s"),
                                                                pincode);

However, this isn't really a satisfactory solution. The wizard needs to offer the option of changing the pin code to match whatever hardware is to be paired.

Revision history for this message
DanielRoesler (diafygi) wrote :

I can confirm this bug. Where can I find and download the source code to confirm the workaround works?

It is also being discussed on ubuntu forums:
http://ubuntuforums.org/showthread.php?p=6010406

Revision history for this message
Mario Limonciello (superm1) wrote :

I personally think the solution to this bug should be to offer a few options right after you do the device select screen. They should be preselected depending on the device you are using.

(1) Randomly chosen PIN number that you enter on the device (Good for keyboards)
(2) Preselected common PIN number (Typically 0000 or 1234, show in the UI)
(3) Enter a PIN number

Revision history for this message
fogNL (fognl) wrote :

I can confirm this bug while trying to attach my HOLEX bluetooth gps receiver to my HP laptop with integrated bluetooth. Other devices like my phone and nokia internet tablet work fine because i can enter in the required pin, but for other devices like my GPS and headset, I cannot enter a pin on the device. The suggestion by Mario would be optimal in this instance.

Revision history for this message
Markus Lindenberg (markusl) wrote :

This one affects me as well. i think i see a request to enter a random pin that i'm supposed to type into my bluetooth device flashing before i get the "Pairing with ... failed" message. i consider this a serious issue as it's a real showstopper for bluetooth users.

Revision history for this message
pHreaksYcle (dknoll) wrote :

Please fix this! This is going to kill me when the release comes out and I still can't use my headset...

Revision history for this message
phil (phaxtor) wrote :

Yes. this happens with me too in the release of intrepid. my motorolla bluetooth audio gateway has the default pin of 0000. the applet keeps pairing with a random pin and doesnt let me choose 0000.

Revision history for this message
secion8 (pmrussell892) wrote :

i can confirm this bug also. Fails pairing with the oncourse GPS receiver. I see something flash real quick before the failure happens. I need to be able to enter the pincode of this device. Which is 0000. Does not le tme do this.

@Daniel

What is the exact path to the Main.c file you editied. i would like to try your workaroubnd but cannot find the file.

Revision history for this message
Dennis Heitmann (dennisheitmann) wrote :

My bluetooth modem has a fixed PIN, therefore I have to specifiy a PIN on my computer. A random PIN is in no way helpful. Please fix this bug.

Revision history for this message
Daniel Newman (dmnewman) wrote : Re: [Bug 284994] Re: bluetooth-wizard unable to pair headset

on 03/11/08 08:27 secion8 said the following:
> i can confirm this bug also. Fails pairing with the oncourse GPS
> receiver. I see something flash real quick before the failure happens. I
> need to be able to enter the pincode of this device. Which is 0000. Does
> not le tme do this.
>
> @Daniel
>
> What is the exact path to the Main.c file you editied. i would like to
> try your workaroubnd but cannot find the file.
>
bluez-gnome-1.8/wizard/main.c

Revision history for this message
lotus49 (lotus-49) wrote : Re: bluetooth-wizard unable to pair headset

Same for me. I am trying to pair with a BT-Q880 GPS receiver and obviously, there is no way to enter a PIN so bluetooth in Intrepid is now useless for anything except keyboards.

What is surprising about this bug is that keyboards and phones are the only bluetooth devices on which you can normally enter a PIN so if this had been tested on any other device (eg mice, GPS, headsets etc) then the bug would have been immediately apparent.

There have been extensive changes to bluetooth in Intrepid which so far have had two major drawbacks (in addition to this but, blueman no longer works at all and I like it a lot better than the built-in bluetooth utilities) and no advantages. I dare say that there was a good reason for the changes and I appreciate all the hard work that the devs have put into this, but the end result is a big step backward from Hardy.

Revision history for this message
lotus49 (lotus-49) wrote :

Same for me. I am trying to pair with a BT-Q880 GPS receiver and obviously, there is no way to enter a PIN so bluetooth in Intrepid is now useless for anything except keyboards.

What is surprising about this bug is that keyboards and phones are the only bluetooth devices on which you can normally enter a PIN so if this had been tested on any other device (eg mice, GPS, headsets etc) then the bug would have been immediately apparent.

There have been extensive changes to bluetooth in Intrepid which so far have had two major drawbacks (in addition to this bug, blueman no longer works at all and I like it a lot better than the built-in bluetooth utilities) and no advantages. I dare say that there was a good reason for the changes and I appreciate all the hard work that the devs have put into this, but the end result is a big step backward from Hardy.

DanielRoesler (diafygi)
Changed in bluez-gnome:
status: New → Confirmed
Revision history for this message
DanielRoesler (diafygi) wrote :

lotus49 wrote:
> Same for me. I am trying to pair with a BT-Q880 GPS receiver and
> obviously, there is no way to enter a PIN so bluetooth in Intrepid is
> now useless for anything except keyboards.

I believe the latest snapshot of bluez-gnome adds support for some GPS receivers:
http://git.kernel.org/?p=bluetooth/bluez-gnome.git;a=commit;h=3db5bad47fafeebd8213fd85b8f47d2147d9250f

However, continually adding supported pin codes to the source code isn't really a long term solution. It would be better if there was an option to enter your own pin. Anyone know how to do this? I'm not familiar enough with gtk to feel comfortable adding this feature.

A possible catch-all patch (temporarily, at least), would be to change the default code tried from random to "0000," since it's what most devices use.

For example, from http://git.kernel.org/?p=bluetooth/bluez-gnome.git;a=tree
/bluez-gnome/wizard/main.c
----------CHANGE----------
line 548: target_pincode = g_strdup_printf("%d", g_random_int_range(1000, 9999));
-------------TO---------------
line 548: target_pincode = g_strdup_printf("%d", "0000");
-------------------------------
I'm not able to test this currently, can someone give it a try? I think the reason the number is randomly 1000-9999 is because leading zeros are not transferred correctly.

Revision history for this message
Andreas Brandt (andreasbrandt) wrote :

I can also confirm this bug.
Bluetooth Device: Bluemax Bluetooth GPS Receiver GPS-009
Bluetooth Applet 1.8
Linux hostname 2.6.27-7-generic #1 SMP Tue Nov 4 19:33:06 UTC 2008 x86_64 GNU/Linux

I would need to type the PIN 0000, but it automatically generates a random PIN which fails.

Revision history for this message
Vasily (prantzos) wrote :

me too, i can confirm it.
i cannot pair my bluetooth headset.I think a choice for the user either to choose a pin or let ubuntu generate one for him would be best.
Is there not a configuration file to disable automatic pairing and explicitly set a default pincode?

1 comments hidden view all 155 comments
Revision history for this message
Hobgoblin (kevin-snaggy) wrote :

I'm having the same problem.

My bluetooth headset generates a random PIN code each time it is put in pairing mode (has an LCD display for track/volume/etc info).

Ubuntu is trying to pair with 0000 so fails.

Revision history for this message
Vasily (prantzos) wrote :

Hobgoblin, I have the exact opposite. The bluetooth headset has a default of 0000 and has no screen displaying a random pin. Ubuntu generates a random pin and asks me to enter it to the device!!!!If it tried to pair with 0000 then i suppose the pairing would have succeeded!!!

Does anyone know if there is a way to use 0000 as default suggestion?

Revision history for this message
Gabor Halaszvari (g-halaszvari) wrote :

I'm having the same problem.

Revision history for this message
wilbur.harvey (wilbur-harvey) wrote :

I am having the same problem with my Holex M0241.

When I try to pair under MacOS, a window comes up asking me to enter the PIN, I enter 0000 and it pairs without any problem.

Under Intrepid, a screen flashes up so quickly I can't see what it is saying, and then it says that pairing failed.

We need some way to enter the PIN under Intrepid.

Revision history for this message
Dennis Heitmann (dennisheitmann) wrote :

I found a way to bypass this problem:

With "hcitool scan" I search for the MAC address of my device which should be paired. Then I browse its properties with "sdptool search SP 00:00:00:00:00:00" (replace 00:00:00:00:00:00 with the MAC address of the device which should be paired). While doing this the bluetooth-applet requests a user defined PIN for the device.

Revision history for this message
trylik (marek-nasionka) wrote :

i confirm this problem with my:
1) bluetooth stereo headset Siemens HHB-750
2) Hp 995c bluetooth printer

@Dennis Heitmann

tried this way,but with no result

marek@ubuntu:~$ sdptool search SP 00:08:C6:66:2F:B8
Inquiring ...
Searching for SP on 00:08:C6:66:2F:B8 ...
Searching for SP on 00:1D:25:29:2F:F3 ...
Service Name: Serial Server
Service RecHandle: 0x10004
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 4

Searching for SP on 00:05:16:42:88:62 ...
Service Name: Serial Port
Service RecHandle: 0x10000
Service Class ID List:
  "Serial Port" (0x00001101)
Protocol Descriptor List:
  "L2CAP" (0x00000100)
  "RFCOMM" (0x00000003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x656e
  encoding: 0x6a
  base_offset: 0x100

Searching for SP on 00:13:D3:5D:4A:0C ...

and thats all from konsole

same for my HP 995c - blueototh printer

Revision history for this message
Dennis Heitmann (dennisheitmann) wrote :

@trylink

Sorry. My idea seems not to be a general solution, but for my Bluetooth 56K V90 Modem (Trust) it is working like I said.

Revision history for this message
Jens Janssen (jayjay) wrote :

Perhaps "SP" is the wrong service. Try "sdptool search A2SNK xx:xx:xx:xx:xx:xx" for your bluetooth headset. Please read the manpage of sdptool or the manual of your device to figure out the proper service type/bluetooth profile. I'm at work so i cannot test Dennis Heitmanns solution for the problem.

Revision history for this message
wilbur.harvey (wilbur-harvey) wrote : Re: [Bug 284994] Re: bluetooth-wizard unable to pair headset

I tried with my Holux M-241 and it gives this output:

wharvey@whnmacpro:~/Desktop$ sdptool search SP 00:1B:C1:04:F2:BB
Inquiring ...
Searching for SP on 00:1B:C1:04:F2:BB ...
Service Name: SPP Slave
Service RecHandle: 0x10000
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

But no PIN request (same when running as sudo)

On Sat, Nov 8, 2008 at 6:27 AM, Jens Janssen <email address hidden> wrote:
> Perhaps "SP" is the wrong service. Try "sdptool search A2SNK
> xx:xx:xx:xx:xx:xx" for your bluetooth headset. Please read the manpage
> of sdptool or the manual of your device to figure out the proper service
> type/bluetooth profile. I'm at work so i cannot test Dennis Heitmanns
> solution for the problem.
>
> --
> bluetooth-wizard unable to pair headset
> https://bugs.launchpad.net/bugs/284994
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Jens Janssen (jayjay) wrote : Re: bluetooth-wizard unable to pair headset

SOLVED!

At least for my A2DP audio sink (Nokia AD-42W).

1. Set up device in pairing-mode

2. "sudo sdptool browse" and then enter the bluetooth PIN code into the popup window.

OR

"sudo hcitool scan" to get the device id xx:xx:xx:xx:xx:xx
"sudo sdptool search --bdaddr xx:xx:xx:xx:xx:xx y" where y is your service type (in my case y=A2SNK).
Then enter the bluetooth PIN code into the popup window.

Finished.

For A2DP devices (Bluetooth Audio Devices):
Create ~/.asoundrc:
pcm.bluetooth {
 type bluetooth
        device xx:xx:xx:xx:xx:xx
        profile auto
}

If you are getting distorted sound output (e.g. when using a bluetooth mouse) then uncomment last three lines in /etc/bluetooth/audio.conf:
[A2DP]
SBCSources=1
MPEG12Sources=0

Revision history for this message
Keith Beef (keith-rhodes) wrote :

Same problem here with Intrepid 8.10 on a Sony Vaio VGN-TX770P trying to pair with a Telenav BT-339 GPS receiver.

The GPS receiver paired with my Psion Tungsten, so I know it works, using PIN 0000.

Gnome Bluetooth applet does not let me enter a PIN for a device whose PIN is preset and cannot be changed.

I tried the workarounds suggested here, and get no joy...
Please fix the Bluetooth applet to allow user to enter a PIN.

K.

Revision history for this message
DanielRoesler (diafygi) wrote :

Okay, I have a partial patch for this problem. You need to download the source code and change a line of code. I say a partial patch because you need to recompile and install any time you want to change the default PIN code.

In the source code, change the line near the bottom in /wizard/main.c
-----------FROM-----------
target_pincode = g_strdup_printf("%d", g_random_int_range(1000, 9999));
-------------TO-------------
target_pincode = g_strdup_printf("0000");
-----------------------------

You can change the "0000" part to whatever your PIN number is. I am not a programmer, but I tried this and was able to connect to my device.

Revision history for this message
Jonathan Ernst (jonathan.ernst) wrote :

>I personally think the solution to this bug should be to offer a few options right after you do the device select screen. They
>should be preselected depending on the device you are using.

>(1) Randomly chosen PIN number that you enter on the device (Good for keyboards)
>(2) Preselected common PIN number (Typically 0000 or 1234, show in the UI)
>(3) Enter a PIN number

Why make it so complicated ? Just let the user enter whatever pin he wants (3) like it was perfectly working before (you could prefill the field with some random PIN however, so that users who don't know what a pin is and are not using devices who need specific pins could just hit next)...

description: updated
Revision history for this message
tz (thomas-mich) wrote :

I have the same problem, but sometimes devices can ignore pairing.

I have two serial devices (GPS and OBD), one uses 0000, the other 1234.

I can't use the wizard. Perhaps someone can patch it to read a file from /etc/bluetooth/pin or something.

They need to have a way to enter your own PIN instead of selecting one randomly, or at least have it read from a configuration file or something.

Revision history for this message
spaetz (spaetz) wrote :

This seems to be an upstream issue, so I filed this in gnome bugzilla. Let's see what people say there: http://bugzilla.gnome.org/show_bug.cgi?id=560316

Revision history for this message
tz (thomas-mich) wrote :

The package with the wayward wizard is bluez-gnome, but apparently there is a "agent" so the pincode selection should be pluggable (i.e. some config file should be able to point to something which will ask). I patched it to read from /tmp/wizardpincode if that file exists and was able to get it to pair.

I can't get sound out of my headset yet, but it does see it.

Revision history for this message
spaetz (spaetz) wrote :

I must say I find the upstream reaction rather less helpful and optimal. (http://bugzilla.gnome.org/show_bug.cgi?id=560315#c5)

bluez-gnome seems to intent to special case each non-keyboard device in their source code rather than just allowing people to enter a fixed PIN in the wizard. Hardcoding the stuff is bound to lag behind existing devices and seems a rather bloaty solution to me. Most of the time people would know best whether to use 1234 or 0000 or somesuch. Whatever.

As a consequence, I stop caring about upstream and work around this with a custom shell script.

Revision history for this message
tz (thomas-mich) wrote : Re: [Bug 284994] Re: bluetooth-wizard unable to pair to fixed pin devices

I wrote a followup - a web page for every owner of a bluetooth device
that needs a special PIN that would submit it as a new bug report is
possible...

Perhaps Ubuntu can write its own patch - it looks simple enough but I
would need time to add the panel (I've only done Gtk in Python).

The short answer is it cannot be hardcoded which is why every other
implementation (e.g. my Nokia tablet, or even my phone) doesn't do so.
 They typicall present something random but editable.

On Tue, Nov 11, 2008 at 8:23 AM, spaetz <email address hidden> wrote:
> I must say I find the upstream reaction rather less helpful and optimal.
> (http://bugzilla.gnome.org/show_bug.cgi?id=560315#c5)
>
> bluez-gnome seems to intent to special case each non-keyboard device in
> their source code rather than just allowing people to enter a fixed PIN
> in the wizard. Hardcoding the stuff is bound to lag behind existing
> devices and seems a rather bloaty solution to me. Most of the time
> people would know best whether to use 1234 or 0000 or somesuch.
> Whatever.
>
> As a consequence, I stop caring about upstream and work around this with
> a custom shell script.
>
> --
> bluetooth-wizard unable to pair to fixed pin devices
> https://bugs.launchpad.net/bugs/284994
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
tz (thomas-mich) wrote :
Download full text (3.6 KiB)

CC-ed from the relevant bug discussion. This is my first GTK program
(at least the original modal dialog), so it is probably horrid, but
solves the problem. I don't know how to integrate it with the wizard
gtk objects (it would require either a new PIN selection page, or
something in the existing page adding a text entry to the label and
something to pause it until something was clicked). It also needs
checking and verification/validation added. If it was in PyGtk I'd do
better.

diff -Bbur bluez-gnome-1.8/wizard/main.c bluez-gnome-1.8-tz/wizard/main.c
--- bluez-gnome-1.8/wizard/main.c 2008-10-04 14:32:56.000000000 -0500
+++ bluez-gnome-1.8-tz/wizard/main.c 2008-11-11 10:54:13.000000000 -0600
@@ -56,6 +56,34 @@

 static GtkTreeSelection *search_selection = NULL;

+static GtkWidget *pinentry, *pindialog;
+static char usepincode[32];
+void clicked()
+{
+ char *text;
+
+ text = gtk_entry_get_text( GTK_ENTRY(pinentry));
+ strcpy( usepincode, text );
+ gtk_widget_destroy( pindialog );
+}
+
+static void run_pin_dialog()
+{
+ GtkWidget *label, *button;
+
+ pindialog = gtk_dialog_new();
+ label = gtk_label_new ("Passkey for Pairing");
+ pinentry = gtk_entry_new ();
+ gtk_entry_set_text( GTK_ENTRY(pinentry),target_pincode );
+ button = gtk_button_new_with_label("Pair");
+ gtk_signal_connect_object(GTK_OBJECT (button), "clicked", clicked , NULL);
+ gtk_container_add (GTK_CONTAINER
(GTK_DIALOG(pindialog)->action_area), button);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG(pindialog)->vbox), label);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG(pindialog)->vbox), pinentry);
+ gtk_widget_show_all (pindialog);
+ gtk_dialog_run( GTK_DIALOG(pindialog) );
+}
+
 static gboolean pincode_callback(DBusGMethodInvocation *context,
      DBusGProxy *device, gpointer user_data)
 {
@@ -72,12 +100,19 @@
     target_type == BLUETOOTH_TYPE_HEADPHONE)
   pincode = "0000";

+
+ target_pincode = pincode;
+
+ strcpy( usepincode, pincode );
+
+ run_pin_dialog();
+
  text = g_strdup_printf(_("Please enter the following PIN code: %s"),
- pincode);
+ usepincode);
  gtk_label_set_markup(GTK_LABEL(label_passkey), text);
  g_free(text);

- dbus_g_method_return(context, pincode);
+ dbus_g_method_return(context, usepincode);

  return TRUE;
 }

On Tue, Nov 11, 2008 at 9:11 AM, tz <email address hidden> wrote:
> I wrote a followup - a web page for every owner of a bluetooth device
> that needs a special PIN that would submit it as a new bug report is
> possible...
>
> Perhaps Ubuntu can write its own patch - it looks simple enough but I
> would need time to add the panel (I've only done Gtk in Python).
>
> The short answer is it cannot be hardcoded which is why every other
> implementation (e.g. my Nokia tablet, or even my phone) doesn't do so.
> They typicall present something random but editable.
>
> On Tue, Nov 11, 2008 at 8:23 AM, spaetz <email address hidden> wrote:
>> I must say I find the upstream reaction rather less helpful and optimal.
>> (http://bugzilla.gnome.org/show_bug.cgi?id=560315#c5)
>>
>> bluez-gnome seems to intent to special case each non-keyboard device in
>> their source code rather than just allowing people to enter a fixed PIN...

Read more...

Revision history for this message
Mitnickk (felix-maurer) wrote :

I can confirm this.
It's very anoying, i got my BT keyboard today
Also i like to use my BT Headset (I hoped for pulseaudio 9.13) but this is less important
I already had paired my mobile phone successfully, but after deleting it from my known devices the wizard doesn't ask or doesn't tell me a PIN anymore
I hope this will be changed soon, else i will reinstall hardy

Revision history for this message
tz (thomas-mich) wrote :

I've attached the above as a patch to this message

Tecom headsets use 1111, not 0000 or 1234.
http://www.tecom.com.sg/bt3061ausermanual.html

I was able to used the patched version to pair everything I've thrown at it so far.

Perhaps someone who is adept at Gtk+ could rewrite it properly

For better security the default random passcode should be 8 bytes (the spec allows up to 16).

The entry text area should be limited to numbers and perhaps a larger font, and localization might be a good idea, and the labels and button might have better descriptive text. Also check I didn't leave in a memory leak since I'm not sure what gets deallocated automatically.

Revision history for this message
tz (thomas-mich) wrote :

For known device problems:

If you delete the device from the list, it should ask for a pin the next time, but you might need to exit the wizard and/or preferences and restart the process. This has worked for me.

Also some devices don't require passcodes so will pair without them, or worse, the bluetooth subsystem "remembers" the WRONG details (I had a similar problem on my Nokia tablet - a headset wouldn't connect though was paired and deleted and re-paired several times)

You would need to find and manually delete any entries from /var/lib/bluetooth/(adapteraddress)/* referring to the device, or stop bluetooth, wipe all the entries in the directory and re-pair (pun intended) everything, and restart the bluetooth system.

I can't easily duplicate the problem but if it happens, I'll try to find the entry that needs to be deleted. Somewhere in the bluez stack, if a device is deleted, it needs to be purged (all references removed) or at least a purge option should be given. Or perhaps purge all unpaired devices or something similar, but there may be a simpler fix.

Revision history for this message
tz (thomas-mich) wrote :

Also, could we bump the importance of this bug to major or higher?

It is currently impossible (not using complex hackage in the terminal or a patch like I wrote) to pair any device with a fixed bluetooth address. Well, maybe not impossible, but 1 in 10k are not good odds.

This defeats the purpose of the intrepid upgrade to the bluetooth, since you could pair devices under hardy, and a very large number of things which you would want to use bluetooth on are peripherals with fixed passcodes.

Revision history for this message
Ravi (ra-ravi-rav-gmail) wrote :

Its a problem with Linux kernel that comes with intrepid. I installed the kernel from hardy's alternate disk and everything worked as before.

description: updated
description: updated
108 comments hidden view all 155 comments
Revision history for this message
In , Jóhann (jhann-redhat-bugs) wrote :

Description of problem:

Have been trying to connect a RIKALINE GPS Bluetooth dongle
and to do so I need to be able to enter the devices pin code
but when using the Bluetooth device wizard it detects the device
fine then it tries to pair with the devices with some random pin number it ask me to enter a pin on the device ( for a split second ) the fails to connect

Now the problem here is on this particular device I cannot enter
a pin code I need to set the pin code manually on the client that is trying to connect to the device to be able to pair with it.

I believe this causing a trouble for a lot of people since theres a lot of
devices out there that have a default pin of 1234 or 0000 etc...

[root@localhost bluetooth]# hcitool scan && hcitool inq
Scanning ...
 00:00:00:00:54:4D Rikaline
Inquiring ...
 00:00:00:00:54:4D clock offset: 0x75a1 class: 0x000000

The default pin is 0000

Version-Release number of selected component (if applicable):

gnome-bluetooth-0.11.0-5.fc10.x86_64
gnome-bluetooth-libs-0.11.0-5.fc10.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Click the bluetooth icon
2. Setup new device
3.

Actual results:

The wizard fails to pair with device.

Expected results:

The wizard to be able to pair with the device
if it fails with a random pin then try common ones ( 1234 or 0000 etc ) if that fails prompt the user to enter the pin then try to pair with it again.

Additional info:

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

description: updated
Changed in bluez-gnome:
status: Unknown → Confirmed
Revision history for this message
In , Andrey (andrey-redhat-bugs) wrote :

This seems to be upstream issue. Ubuntu 8.10 has the same issue:

https://bugs.launchpad.net/fedora/+source/bluez-gnome/+bug/284994

Upstream Gnome bug (with a bit hot discussion) posted here:

http://bugzilla.gnome.org/show_bug.cgi?id=560316

Follow-up in Gnome mailing list here:

http://thread.gmane.org/gmane.linux.bluez.kernel/717/focus=721

Does anybody (from Fedora developers) know if there are any [positive] change ?

Revision history for this message
In , Andrey (andrey-redhat-bugs) wrote :

Some updates:

1. Upstream bugzilla has more than 20 bugs opened with requests to support specific devices (including one from me personally):

http://bugzilla.gnome.org/buglist.cgi?product=bluez-gnome&bug_status=NEW&bug_status=REOPENED&bug_status=ASSIGNED&bug_status=UNCONFIRMED&component=wizard

2. Vincent Untz has proposed a patch to solve the issue here:

http://bugzilla.gnome.org/show_bug.cgi?id=570457

He also posted this patch in the mailing list:

http://article.gmane.org/gmane.linux.bluez.kernel/1399

I have not found any feedback so far (2 weeks away now) neither in Bugzilla, nor in mailing list, nor in the code tree.

Jiri, can you please be so kind to discuss the issue with responsible Gnome developer (Bastien Nocera) ? He seems to be a bit hard talking to regular users, may be developer-to-developer discussion will be more efficient ? Of course, if this is acceptable for you.

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

Hi, I take a look at this asap (tommorow probably) and try to come up with some solution.

Jirka

Revision history for this message
In , Andrey (andrey-redhat-bugs) wrote :

Jiri, it seems that Bastien has made pretty substantial changes in the upstream. I wonder what should be further steps with this bug - should we wait until the next release of gnome-bluetooth ?

Revision history for this message
In , Bastien (bastien-redhat-bugs) wrote :

gnome-bluetooth != bluez-gnome.

I never saw this bug because you posted it against a package which contains a bunch of outdated libs only used by gnome-phone-manager.

FWIW, fixed in bluez-gnome in a nasty way, a proper fix will be in the gnome-bluetooth fork of bluez-gnome when it lands in rawhide.

"yum --enablerepo=rawhide update bluez-gnome" should do the trick for you. I also added your device to the PIN database in gnome-bluetooth SVN trunk.

Jordan (jordanu)
Changed in bluez-gnome:
status: Confirmed → Unknown
Martin Pitt (pitti)
Changed in bluez-gnome:
assignee: nobody → pitti
importance: Undecided → High
status: Confirmed → In Progress
Changed in bluez-gnome:
status: Unknown → Fix Released
38 comments hidden view all 155 comments
Revision history for this message
Balázs Grill (balazsgrill) wrote :

Same problem with Navilock BT-359 GPS receiver:

[root@gbalage balage]# hcitool scan
Scanning ...
 00:0D:B5:38:37:26 BT-GPS-383726
[root@gbalage balage]# hcitool inq 00:0d:b5:38:37:26
Inquiring ...
 00:0D:B5:38:37:26 clock offset: 0x051f class: 0x001f00

The correct pin code is 0000

Thx, B;

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

Hello,

Can people test my bluez-gnome (1.8-0ubuntu3) package from my ppa (https://edge.launchpad.net/~bmillemathias/+archive/ppa), it has a fix for fixed PIN code device.

Tell me if it fixe your problem or not.

Regards.

Revision history for this message
Daniel Lupulescu (lupulescud) wrote :

No. Still the same. Nothing found in Intrepid repo, used Jaunty one. after install i restart bluetooth, no reboot b/c it's live system. Pairing failed. BT dev: Photosmart D5160 printer.

Revision history for this message
Olaf (ol-fgruenig) wrote :

I am also affected, GPS mouse doent work since 8.10. This is apparently fixed upstream for Gnome 2.27.
Does that mean there is no bluetooth GPS device support until Ubuntu 9.10, because Jaunty 9.04 will use Gnome 2.26?!

Revision history for this message
SteveClement (steve-ion) wrote :

@Baptiste Mille-Mathias, it worked Perfectly for my GPSlim 236 BUT I had to bump from intrepid to jaunty (you depend on libgtk >=2.15.0 and libdbus-glib >= 0.78)

To keep Google happy, Tags:

Cannot Pair GPS with Ubuntu
ubuntu 8.10 bluetooth gps problems
Holux GPSlim 236 Ubuntu Pairing Key (0000)

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

@SteveClement, yeah my package was built for jaunty.
@Olaf, no we won't upgrade to the version 2.27 which is an work-in-progres and unstable version.

Revision history for this message
Jordan (jordanu) wrote :

>Does that mean there is no bluetooth GPS device support until Ubuntu 9.10, because Jaunty 9.04 will use Gnome 2.26?!

Sort of, no devices that wont allow you to enter a pin and that haven't had their pin hard coded will work without using the terminal. If you post the information for your device* then your device might work by default by Jaunty, but yes, there probably wont be a general solution by Jaunty and it's not a great situation without one.

*
1) hcitool scan
2) hcitool inq [bluetooth address]
3) The model of your device
4) The pin code for your device

Revision history for this message
Martin Pitt (pitti) wrote :

UI freeze approved, since this is a high importance bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bluez-gnome - 1.8-0ubuntu3

---------------
bluez-gnome (1.8-0ubuntu3) jaunty; urgency=low

  * Add 10_wizard-custom-pin.patch: Allow the user to enter a custom PIN for
    pairing; A lot of devices use a hardcoded PIN and do not have a keyboard
    for entering a random one. Patch by Vincent Untz, merci! (LP: #284994)

 -- Martin Pitt <email address hidden> Mon, 16 Mar 2009 13:26:00 +0100

Changed in bluez-gnome:
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : bluez-gnome: Bluetooth setup UI changed

Hello documentation team,

I just applied Vincent Untz's patch to allow custom PIN numbers in the
bluetooth pairing dialog, please see https://launchpad.net/bugs/284994

I am sorry if that disturbs any screenshots or documentation. Is there
any existing one that needs changing now?

I provided an updated screenshot of the affected dialog:
http://people.ubuntu.com/~pitti/tmp/bluetooth-pin-dialog.png

Thanks,

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
tz (thomas-mich) wrote : Re: [Bug 284994] bluez-gnome: Bluetooth setup UI changed

I couldn't find a link to the specific patch.

Just one check - some pins are 8 characters, I think the specification
maximum is 16 but the dialog box looks like it will only take 4
characters.

(also note 0000 is not the same as 00000000 for BT pins so text size matters).

So the text box should return a variable length string up to 16
characters. I don't have a problem if it scrolls horizontally.

On Mon, Mar 16, 2009 at 8:43 AM, Martin Pitt <email address hidden> wrote:
> Hello documentation team,
>
> I just applied Vincent Untz's patch to allow custom PIN numbers in the
> bluetooth pairing dialog, please see https://launchpad.net/bugs/284994
>
> I am sorry if that disturbs any screenshots or documentation. Is there
> any existing one that needs changing now?
>
> I provided an updated screenshot of the affected dialog:
> http://people.ubuntu.com/~pitti/tmp/bluetooth-pin-dialog.png
>
> Thanks,
>
> Martin
> --
> Martin Pitt                        | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
>
> --
> bluetooth-wizard unable to pair to fixed pin devices
> https://bugs.launchpad.net/bugs/284994
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Martin Pitt (pitti) wrote :

tz: The patch is attached to the upstream bug linked here: http://bugzilla.gnome.org/attachment.cgi?id=127898&action=view

If you think that the pin length is a real issue, please open a separate bug. The fixed length 4 is used in several places in the code, and it's not an obvious and trivial change, so it should be tracked appropriately. Thanks!

Revision history for this message
Olaf (ol-fgruenig) wrote :

thanks a lot for fixing this, I'll be a happy bluetooth GPS mouse user.
Are there any chances to get this fix into an Intrepid update as well? That's still the current version...

Revision history for this message
tz (thomas-mich) wrote : Re: [Bug 284994] Re: bluetooth-wizard unable to pair to fixed pin devices

I think the only change would be to the maximum length (change 4 to 16
with the ////... line):

+ hbox_custom = gtk_hbox_new(FALSE, 6);
+ radio_custom =
gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_0000),
_("Custom PIN code:"));
+ entry_custom = gtk_entry_new_with_max_length(4);
///////////////////////////////////////////////////////////////////////
+ gtk_entry_set_width_chars(GTK_ENTRY(entry_custom), 4);
+ g_signal_connect (entry_custom, "key-press-event",
+ G_CALLBACK (entry_custom_event), NULL);
+ g_signal_connect (entry_custom, "changed",
+ G_CALLBACK (entry_custom_changed), NULL);
+ gtk_box_pack_start(GTK_BOX(hbox_custom), radio_custom,
+ FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox_custom), entry_custom,
+ FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox_fixed), hbox_custom);

I'll file a separate bug, but this goes to one of the original
problems that short pincodes are insecure and they didn't allow
options for longer ones.

On Mon, Mar 16, 2009 at 12:02 PM, Martin Pitt <email address hidden> wrote:
> tz: The patch is attached to the upstream bug linked here:
> http://bugzilla.gnome.org/attachment.cgi?id=127898&action=view
>
> If you think that the pin length is a real issue, please open a separate
> bug. The fixed length 4 is used in several places in the code, and it's
> not an obvious and trivial change, so it should be tracked
> appropriately. Thanks!
>
> --
> bluetooth-wizard unable to pair to fixed pin devices
> https://bugs.launchpad.net/bugs/284994
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Changed in bluez-gnome:
status: New → Confirmed
Revision history for this message
savantelite (savantelite) wrote :

My fixed pin device now works in newest Jaunty release. Holux m1200 :)

On Fri, Mar 20, 2009 at 10:39 AM, GBalage <email address hidden> wrote:

> ** Changed in: bluez-gnome (Fedora)
> Status: New => Confirmed
>
> --
> bluetooth-wizard unable to pair to fixed pin devices
> https://bugs.launchpad.net/bugs/284994
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

who the hell decided to set a dependency on bluez-gnome on Fedora !!!

Changed in bluez-gnome (Fedora):
importance: Undecided → Unknown
status: Confirmed → Unknown
Changed in bluez-gnome:
status: Unknown → Fix Released
Revision history for this message
Jackflap (deriziotis) wrote :

Just a big thank you for applying this fix.

Orange Bluetooth Speaker (Acoustic Energy) owner here.

Revision history for this message
teodor_kasap (erol-erten) wrote :

Small glitch, I need guidance here (ubuntu 8.10 32-bit user)

I have read all the posts here and tried to install the package according to the instruction in the installation doc.

when i run the command "./configure" , at the end I get an error message:

"configure: error: D-Bus library is required"

I tried to find the dbus library files from the synaptic, but at the end did not know, which file to install. Can you please tell me the library file name or the command to type to get these installed?

Thank you all

1 comments hidden view all 155 comments
Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 284994] Re: bluetooth-wizard unable to pair to fixed pin devices

teodor_kasap [2009-04-23 2:26 -0000]:
> "configure: error: D-Bus library is required"

Try installing libdbus-1-dev.

Revision history for this message
teodor_kasap (erol-erten) wrote :

Thank you Martin

I tried it but now get:
"configure: error: GLib library version 2.14 or later is required"

again there are man y glib library packages, which one should i install?

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote : Re: [Bug 284994] Re: bluetooth-wizard unable to pair to fixed pin devices

Le jeudi 23 avril 2009 à 02:26 +0000, teodor_kasap a écrit :
> Small glitch, I need guidance here (ubuntu 8.10 32-bit user)
>
> I have read all the posts here and tried to install the package
> according to the instruction in the installation doc.
>
> when i run the command "./configure" , at the end I get an error
> message:
>
> "configure: error: D-Bus library is required"
>
> I tried to find the dbus library files from the synaptic, but at the end
> did not know, which file to install. Can you please tell me the library
> file name or the command to type to get these installed?
>
> Thank you all
>

Teodor,

I don't know what you're trying to achieve, because the fix is already
published in jaunty, but to have all dependency you can type "apt-get
build-dep bluez-gnome, but
1) this bug report is not a support forum, so your question should be
asked elsewhere.
2) Debian/ubuntu have their won building system which is far way better
than manual building.

Regards

Revision history for this message
teodor_kasap (erol-erten) wrote :

Hi Mathias

Thanks for the suggestion.

I am only trying to connect my headset to my computer. I was looking for a fix and found this forum, I'm not exactly an expert on this...

Regards

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

Le jeudi 23 avril 2009 à 08:51 +0000, teodor_kasap a écrit :
> Hi Mathias
>
> Thanks for the suggestion.
>
> I am only trying to connect my headset to my computer. I was looking for
> a fix and found this forum, I'm not exactly an expert on this...

And as I said, this is not a forum, this is a bug tracker, the forums
are located at http://ubuntuforums.org/
>
> Regards
>

Revision history for this message
Daevid Vincent (dae51d) wrote :

I just got a generic bluetooth mouse off ebay and it works great in XP but I can't connect in Gnome because the bluetooth tool REQUIRES a PIN?! The mouse doesn't have a PIN at all... not 0000, not 1234, not anything. why do you force a pin anyways?! i tried "use fixed pin code" > "custom pin code" but it won't let me leave it blank! ugh.

$ sudo hcitool info 00:11:67:FF:2E:43
Requesting information ...
 BD Address: 00:11:67:FF:2E:43
 Device Name: Bluetooth Mouse
 LMP Version: 2.1 (0x4) LMP Subversion: 0x318
 Manufacturer: Integrated System Solution Corp. (57)
 Features page 0: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  <3-slot packets>
 Features page 1: 0xff 0xfe 0xff 0x7e 0x98 0x1f 0x19 0x82

Revision history for this message
Daevid Vincent (dae51d) wrote :

I just got a generic bluetooth mouse off ebay and it works great in XP but I can't connect in Gnome because the bluetooth tool REQUIRES a PIN?! The mouse doesn't have a PIN at all... not 0000, not 1234, not anything. why do you force a pin anyways?! i tried "use fixed pin code" > "custom pin code" but it won't let me leave it blank! ugh.

$ sudo hcitool info 00:11:67:FF:2E:43
Requesting information ...
 BD Address: 00:11:67:FF:2E:43
 Device Name: Bluetooth Mouse
 LMP Version: 2.1 (0x4) LMP Subversion: 0x318
 Manufacturer: Integrated System Solution Corp. (57)
 Features page 0: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  <3-slot packets>
 Features page 1: 0xff 0xfe 0xff 0x7e 0x98 0x1f 0x19 0x82

I'm using Ubuntu 9.04 on a Dell Mini9

Revision history for this message
Robie Basak (racb) wrote :

@Daevid Vincent

See: http://lists.usefulinc.com/pipermail/gnome-bluetooth/2003-December/000219.html

Looks like this is a different bug to me.

Revision history for this message
Daevid Vincent (dae51d) wrote :

I disagree Robie. The problem relates to the fact that the bluetooth GUI tool requires a PIN. Earlier in this thread, it was about that people couldn't choose a PIN, or use the standard 0000, 1234, 1111, etc. Then that was solved, but now there are devices such as my mouse that require NO PIN at all. The GUI doesn't allow for this case. It FORCES you to choose a PIN. As a user, I should NEVER have to drop to a command line and execute some cryptic commands or muck with "auth encrypt" or whatever that is. The GUI tool just needs to be smarter (or in this case, dumber) and let me enter NO PIN. In fact, it could even be another radio button like so:

( ) 0000
( ) 1111
( ) 1234
( ) custom PIN [_____]
( ) no pin required

Changed in bluez-gnome:
importance: Unknown → Medium
Revision history for this message
nh2 (nh2) wrote :

Is issue #284994 related?

Revision history for this message
Todd (t-greenwoodgeer) wrote :

I'm using a device that has an alphanumeric pin, eg: 9E49. Unfortunately, only numeric input is allowed.

Revision history for this message
Todd (t-greenwoodgeer) wrote :

Workaround for needing to add text pin is to install blueman, and pair with that utility:

sudo apt-get install blueman
blueman-manager -> search -> -> right click device -> setup...

Revision history for this message
Walter Ribeiro (wribeirojr) wrote :

In Ubuntu 13.04 and 13.10, trying do pair a GPS data logger device, after select "0000" code, wizard asks me to enter a random code, what is impossible, because it don't have keyboard.
Can somebody help me?

Revision history for this message
SUPER_ET_DUPER (machst) wrote :

Blueman worked for me. The default gnome GUI still has the bug in Ubuntu 16.10

Changed in bluez-gnome (Fedora):
importance: Unknown → Medium
Displaying first 40 and last 40 comments. View all 155 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.