More PIN quirks
PATCH 1/1 More PIN quirks
This builds on top of the move to a PIN database.
This fixes all but one bug filed against the wizard in the GNOME bugzilla.
I hope it shows that the PIN database is workable.
Cheers
Quoted 1 line
From
e3419bae8524e86902b69c7d9bfdd580ea394786Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sat, 29 Nov 2008 16:18:46 +0000
Subject: [PATCH] Add other audio devices
And special-case them in the wizard.
--- common/bluetooth-client.c | 4 ++++ common/bluetooth-client.h | 13 +++++++------ wizard/main.c | 1 + wizard/pin-code-database.txt | 1 + 4 files changed, 13 insertions(+), 6 deletions(-)
common/bluetooth-client.c +4 -0
@@ -92,6 +92,8 @@ const gchar *bluetooth_type_to_string(guint type)return N_ ("Headset" );case BLUETOOTH_TYPE_HEADPHONE :return N_ ("Headphone" ); +case BLUETOOTH_TYPE_OTHER_AUDIO : +return N_ ("Audio device" );case BLUETOOTH_TYPE_KEYBOARD :return N_ ("Keyboard" );case BLUETOOTH_TYPE_MOUSE :
@@ -134,6 +136,8 @@ static guint class_to_type(guint32 class)return BLUETOOTH_TYPE_HEADSET ;case 0x06 :return BLUETOOTH_TYPE_HEADPHONE ; +default : +return BLUETOOTH_TYPE_OTHER_AUDIO ; }break ;case 0x05 :
common/bluetooth-client.h +7 -6
@@ -112,12 +112,13 @@ enum {BLUETOOTH_TYPE_NETWORK =1 <<4 ,BLUETOOTH_TYPE_HEADSET =1 <<5 ,BLUETOOTH_TYPE_HEADPHONE =1 <<6 , -BLUETOOTH_TYPE_KEYBOARD =1 <<7 , -BLUETOOTH_TYPE_MOUSE =1 <<8 , -BLUETOOTH_TYPE_CAMERA =1 <<9 , -BLUETOOTH_TYPE_PRINTER =1 <<10 , -BLUETOOTH_TYPE_JOYPAD =1 <<11 , - BLUETOOTH_TYPE_TABLET = 1 << 12, +BLUETOOTH_TYPE_OTHER_AUDIO =1 <<7 , +BLUETOOTH_TYPE_KEYBOARD =1 <<8 , +BLUETOOTH_TYPE_MOUSE =1 <<9 , +BLUETOOTH_TYPE_CAMERA =1 <<10 , +BLUETOOTH_TYPE_PRINTER =1 <<11 , +BLUETOOTH_TYPE_JOYPAD =1 <<12 , + BLUETOOTH_TYPE_TABLET = 1 << 13, };#define _BLUETOOTH_TYPE_NUM_TYPES 12
wizard/main.c +1 -0
@@ -68,6 +68,7 @@ static guint string_to_type(const char *type)TYPE_IS ("keyboard" ,BLUETOOTH_TYPE_KEYBOARD );TYPE_IS ("headset" ,BLUETOOTH_TYPE_HEADSET );TYPE_IS ("headphone" ,BLUETOOTH_TYPE_HEADPHONE ); +TYPE_IS ("audio" ,BLUETOOTH_TYPE_OTHER_AUDIO );g_warning ("unhandled type '%s'" , type);return BLUETOOTH_TYPE_ANY ;
wizard/pin-code-database.txt +1 -0
@@ -22,3 +22,4 @@ any 00:0D:B5: GPS-GW-005 0000 # Headphones and headsets headphone 0000 headset 0000 +audio 0000
Signature · 1 line
1.6.0.4
Quoted 1 line
From
9890adcebaf94a8051d948e215d752e3b22a2f3bMon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sat, 29 Nov 2008 16:20:33 +0000
Subject: [PATCH] Handle printers in the wizard
.
--- wizard/main.c | 1 + wizard/pin-code-database.txt | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)
wizard/main.c +1 -0
@@ -69,6 +69,7 @@ static guint string_to_type(const char *type)TYPE_IS ("headset" ,BLUETOOTH_TYPE_HEADSET );TYPE_IS ("headphone" ,BLUETOOTH_TYPE_HEADPHONE );TYPE_IS ("audio" ,BLUETOOTH_TYPE_OTHER_AUDIO ); +TYPE_IS ("printer" ,BLUETOOTH_TYPE_PRINTER );g_warning ("unhandled type '%s'" , type);return BLUETOOTH_TYPE_ANY ;
wizard/pin-code-database.txt +3 -0
@@ -19,6 +19,9 @@ any 00:0D:B5: GPS-GW-005 0000 ######## Generic type ######## +# Printers +printer 0000 + # Headphones and headsets headphone 0000 headset 0000
Signature · 1 line
1.6.0.4
Quoted 1 line
From
90d37d576e95685f0d46be13008cea2f5a0b85b6Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sat, 29 Nov 2008 16:28:25 +0000
Subject: [PATCH] Add quirks for loads of GPS devices
All from the GNOME bugzilla.
--- wizard/pin-code-database.txt | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
wizard/pin-code-database.txt +16 -0
@@ -16,6 +16,22 @@ mouse 00:14:51: 0000 # GPS devices any 00:0D:B5: TomTom Wireless GPS MkII 0000 any 00:0D:B5: GPS-GW-005 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=560870 +any 00:0A:3A: BT GPS 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=560606 +any 00:1B:C1: HOLUX_M-241 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=560713 +any 00:0B:24: Triceiver 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=560715 +any 00:00:00: BT-Q880 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=560625 +any 00:11:67: eGPS-397 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=560604 +any 00:1B:C1: HOLUX_M-1000 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=561326 +any 00:0B:0D: G-Rays1 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=561327 +any 00:0A:3A: HUDGPS 0000 ######## Generic type ########
Signature · 1 line
1.6.0.4
Quoted 1 line
From
7e0ec64061abb7b17a6d7dbe9cbbd2a6036e857aMon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sat, 29 Nov 2008 16:34:41 +0000
Subject: [PATCH] Add more PIN quirks
Quoted 1 line
From GNOME bugzilla again.
--- wizard/main.c | 1 + wizard/pin-code-database.txt | 12 ++++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-)
wizard/main.c +1 -0
@@ -70,6 +70,7 @@ static guint string_to_type(const char *type)TYPE_IS ("headphone" ,BLUETOOTH_TYPE_HEADPHONE );TYPE_IS ("audio" ,BLUETOOTH_TYPE_OTHER_AUDIO );TYPE_IS ("printer" ,BLUETOOTH_TYPE_PRINTER ); +TYPE_IS ("network" ,BLUETOOTH_TYPE_NETWORK );g_warning ("unhandled type '%s'" , type);return BLUETOOTH_TYPE_ANY ;
wizard/pin-code-database.txt +12 -0
@@ -32,6 +32,18 @@ any 00:1B:C1: HOLUX_M-1000 0000 any 00:0B:0D: G-Rays1 0000 # http://bugzilla.gnome.org/show_bug.cgi?id=561327 any 00:0A:3A: HUDGPS 0000 +# http://bugzilla.gnome.org/show_bug.cgi?id=562479 +any 00:0B:0D: iBT-GPS 0000 + +# Audio devices +# http://bugzilla.gnome.org/show_bug.cgi?id=560315 +headset X3 micro 1234 +# http://bugzilla.gnome.org/show_bug.cgi?id=561324 +headset 00:03:C9: BT Headset 1111 + +# Network devices +# http://bugzilla.gnome.org/show_bug.cgi?id=561325 +network 00:06:66: OBDPros scantool 1234 ######## Generic type ########
Signature · 1 line
1.6.0.4
Quoted 1 line
From
9c85f509761b3f5484f988c485bc42b555c03871Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sat, 29 Nov 2008 16:17:53 +0000
Subject: [PATCH] Add icon for other audio device
.
--- src/dbus-hci.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
src/dbus-hci.c +2 -0
@@ -85,6 +85,8 @@ const char *class_to_icon(uint32_t class)return "audio-card" ;/* Headset */ case 0x06 :return "audio-card" ;/* Headphone */ +default : +return "audio-card" ;/* Other audio device */ }break ;case 0x05 :
Signature · 1 line
1.6.0.4
Quoted 9 lines · Bastien Nocera
This builds on top of the move to a PIN database.
This fixes all but one bug filed against the wizard in the GNOME bugzilla.
I hope it shows that the PIN database is workable.
Cheers
Thank you Bastien for your hard work!
I have a few questions about these kind of patches, would it not be easer to maintainable and more usefull to add this kind of information separate from gnome related packages, and move them to a desktop independent configuration?
Of course there is nothing wrong with using gnome bugreports or using gnome applications with the data. However I have seen a lot of patches that apply to the gnome wizard application and the commandline tools or kde tools do not use this information, but it would really like the same functionality in the command line tools so it does work platform independent.
I know there is not much priority on fixing a commandline tool but, it can be smart to move device specific info into a general system that all user frontend systems can use. This will make it a lot easer of other developers to create new frontends that do not need to reverse engineer the gnome apps and create duplicated hard to maintain code....
Does this make any sense? Or is there just no time or do we not care about other users then gnome?
Best regards,
Jelle