bluetooth-wizard unable to pair to fixed pin devices

Bug #284994 reported by Daniel Newman on 2008-10-17
258
This bug affects 31 people
Affects Status Importance Assigned to Milestone
bluez-gnome
Fix Released
Medium
bluez-gnome (Fedora)
Fix Released
Unknown
bluez-gnome (Ubuntu)
High
Martin Pitt
Nominated for Intrepid by DanielRoesler
Jaunty
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

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.

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

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

Corey Quilliam (cquilliam) 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.

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.

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...

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.

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.

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.

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

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.

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) on 2008-11-05
Changed in bluez-gnome:
status: New → Confirmed
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.

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.

ouzas (ouzas) 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 147 comments
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.

ouzas (ouzas) 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?

I'm having the same problem.

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.

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.

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

@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.

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.

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.
>

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

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.

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.

>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
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.

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

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.

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.

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.
>

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...

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

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.

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.

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.

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
description: updated
Changed in bluez-gnome:
status: Unknown → Confirmed
67 comments hidden view all 147 comments
Andrey (aakolov) wrote :

Hey, look at Gnome bugzilla. Bastien started to fix the things, code is already in the tree:

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

Fix was proposed by Vincent Untz (thank you, thank you, thank you !):

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

Bastien also has added several new bugs there:

http://bugzilla.gnome.org/browse.cgi?product=gnome-bluetooth

# hcitool scan
Scanning ...
        00:0D:47:01:D5:6D BTH-05
# hcitool inq
Inquiring ...
        00:0D:47:01:D5:6D clock offset: 0x4857 class: 0x200404

device: X-Sport BTH-05 Bluetooth Headset
pin: 1234

Jordan (jordanu) wrote :

Bug 560315 was about a specific device and it was made clear that discussion about a general solution for fixed pin devices should be moved elsewhere.

Changed in bluez-gnome:
status: Confirmed → Unknown
ericandor (a-wojtek) wrote :

$hcitool scan
Scanning ...
 00:1C:88:11:XX:XX PENTA-GPS
$ hcitool inq 00:1C:88:11:XX:XX
Inquiring ...
 00:1C:88:11:XX:XX clock offset: 0x0425 class: 0x001f00

device: Pentagram Pathfinder P3106 GPS BT Receiver
pin: 0000

Jordan (jordanu) wrote :

I am not sure why the status on launchpad is still "unknown" but this bug has been fixed upstream:

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

Martin Pitt (pitti) wrote :

This affects a lot of bluetooth devices, and fix was committed upstream. We ought to fix this in Jaunty.

Changed in bluez-gnome:
assignee: nobody → pitti
importance: Undecided → High
status: Confirmed → In Progress

Upstream bug, (which is linked in the ubuntu bug) has a patch, but was
not commited.
Bastien commited another patch on gnome-bluetooth (which is a fork of
bluez-gnome), but I'm not sure this is can be integrated as it is in
bluez-gnome.

Hi,

This bug also affects my Sagem BT SH1 headset.

hcitool scan :
00:0D:3C:xx:xx:xx Sagem BT SH1

hcitool inq :
00:0D:3C:xx:xx:xx clock offset: 0x36d2 class: 0x240404

The correct pin code is 8888.
Thanks.

Changed in bluez-gnome:
status: Unknown → Fix Released
GBalage (balage-g) 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;

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.

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.

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?!

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)

@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.

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

Martin Pitt (pitti) wrote :

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

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

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)

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.
>

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!

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...

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.
>

GBalage (balage-g) on 2009-03-20
Changed in bluez-gnome:
status: New → Confirmed
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.
>

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
Jackflap (deriziotis) wrote :

Just a big thank you for applying this fix.

Orange Bluetooth Speaker (Acoustic Energy) owner here.

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 147 comments

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

Try installing libdbus-1-dev.

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?

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

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

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
>

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

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

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.

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
nh2 (nh2) wrote :

Is issue #284994 related?

Todd (t-greenwoodgeer) wrote :

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

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...

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?

Displaying first 40 and last 40 comments. View all 147 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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