Skip to contentSkip to conversation

Add support for 3rd party Memorex Wiimote

PATCH New David Herrmann 1 participant 1 message Dec 21, 2011 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add support for 3rd party Memorex Wiimote

The 3rd party Memorex Wiimote is compatible with the normal wiimote but uses different VID/PID values.
If we add more combinations we probably need some lookup-table, but for now this seems ok.

---
 plugins/wiimote.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
plugins/wiimote.c +5 -1
index fead72a..45e5729 100644
@@ -53,6 +53,10 @@
  * to the input service, then auto-reconnect is not enabled.
  * If enabled, the wiimote connects to the host automatically when any button
  * is pressed.
+ *
+ * Knwon VID/PID combinations:
+ *  - 057e:0306 Official Nintendo Wii Remotes
+ *  - 054c:0306 Memorex Wii Remotes (3rd party)
  */
 
 static ssize_t wii_pincb(struct btd_adapter *adapter, struct btd_device *device,
@@ -67,7 +71,7 @@ static ssize_t wii_pincb(struct btd_adapter *adapter, struct btd_device *device,
 	ba2str(&dba, addr);
 
 	vendor = btd_device_get_vendor(device);
-	if (vendor != 0x057e)
+	if (vendor != 0x057e && vendor != 0x054c)
 		return 0;
 
 	product = btd_device_get_product(device);
Signature · 1 line
1.7.8