[patch] Fix pairing of PS3 BD Remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
    The following patch to bluez-gnome allows the PS3 BD remote to be
paired using the wizard. Once paired the remote can then be used as a
normal input device.

Essentially this device wasn't identified correctly as a remote. Once
identified it should be treated in the same was as a Mouse. I modified
the code to treat a mouse, keyboard or remote in the same way.

Regads, Michael

--- bluez-gnome-1.8.orig/wizard/main.c
+++ bluez-gnome-1.8/wizard/main.c
@@ -149,8 +149,7 @@
                if (page > 0)
                        gtk_assistant_set_current_page(assistant, page + 1);

-               if (target_type == BLUETOOTH_TYPE_KEYBOARD ||
-                                       target_type == BLUETOOTH_TYPE_MOUSE) {
+               if ((target_type & BLUETOOTH_TYPE_INPUT) > 0){
                        bluetooth_client_set_trusted(client, path, TRUE);
                        bluetooth_client_connect_input(client, path,
                                                connect_callback, assistant);
@@ -205,7 +204,7 @@

                g_object_ref(agent);

-               if (target_type == BLUETOOTH_TYPE_MOUSE)
+               if ((target_type & BLUETOOTH_TYPE_INPUT) > 0)
                        path = NULL;

                bluetooth_client_create_device(client, target_address,

--- bluez-gnome-1.8.orig/common/bluetooth-client.c
+++ bluez-gnome-1.8/common/bluetooth-client.c
@@ -104,6 +104,8 @@
                return N_("Joypad");
        case BLUETOOTH_TYPE_TABLET:
                return N_("Tablet");
+       case BLUETOOTH_TYPE_REMOTE:
+               return N_("Remote");
        default:
                return N_("Unknown");
        }
@@ -143,6 +145,8 @@
                        case 0x01:
                        case 0x02:
                                return BLUETOOTH_TYPE_JOYPAD;
+                       case 0x03:
+                               return BLUETOOTH_TYPE_REMOTE;
                        }
                        break;
                case 0x01:
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux