[PATCH v2 2/2] autopair: Add pin codes to try for gaming input devices

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

 



As well as remote controls.
---
 plugins/autopair.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/plugins/autopair.c b/plugins/autopair.c
index 70e19930e..043bd9b9d 100644
--- a/plugins/autopair.c
+++ b/plugins/autopair.c
@@ -111,6 +111,18 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
 
 	case 0x05:		/* Peripheral */
 		switch ((class & 0xc0) >> 6) {
+		case 0x00:
+			switch ((class & 0x1e) >> 2) {
+			case 0x01:	/* Joystick */
+			case 0x02:	/* Gamepad */
+			case 0x03:	/* Remote Control */
+				if (attempt > 1)
+					return 0;
+				memcpy(pinbuf, "0000", 4);
+				return 4;
+			}
+
+			break;
 		case 0x01:		/* Keyboard */
 		case 0x03:		/* Combo keyboard/pointing device */
 			/* For keyboards rejecting the first random code
-- 
2.14.3

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