Results 1 to 2 of 2

Thread: Bluez 4.101 cannot use Wiimote Inside Plus since Ubuntu 13.04 and others

  1. #1
    Join Date
    Mar 2014
    Beans
    1

    Exclamation Bluez 4.101 cannot use Wiimote Inside Plus since Ubuntu 13.04 and others

    Hi everybody,

    I tested in Lubuntu 14.04 Build "09 March 2014" (that have a kernel 3.13.0-16-generic) the use of a Nintendo RVL-CNT-01-TR Black Version (that I buy five days ago.
    I have seen that bluez doesn't use correctly the 2nd generation of the Wiimote (asked always for PIN, bad detection with hid-wiimote because of bluez issues, etc)
    I precise that the patch for use this new device exists since October 2012 thanks to David Herrmann works (http://permalink.gmane.org/gmane.lin...z.kernel/31250) and you haven't yet applied it.

    I applied so the patch for bluez version 4.101 (version used in Lubuntu 14.04) and setup/compiled new source code.
    I add in /etc/modules the line "hid-wiimote" in order to load automatically the kernel module for me every startup of my PC.

    I setup after the program XWiimote in "/usr" and add the xorg file of the project in "/usr/share/X11/xorg.conf.d" and the udev rule of the project in "/etc/udev/rules.d"

    I can now use without issue the Wii Remote with his extensions (connect with blueman (push the red sync button) / disconnect with power button of Wiimote or with blueman).

    Screenshots of the new version of bluez and xwiimote working perfectly on Lubuntu 14.04 :
    xwiimote-new-bluez-capture-2.jpg - xwiimote-new-bluez-capture.jpg

    The patch for Bluez version 4.101 :
    Code:
    --- /home/jg/Téléchargements/bluez-4.101-old/plugins/wiimote.c
    +++ /home/jg/Téléchargements/bluez-4.101/plugins/wiimote.c
    @@ -56,12 +56,24 @@
      * is pressed.
      */
     
    +static uint16_t wii_ids[][2] = {
    +    { 0x057e, 0x0306 },
    +    { 0x057e, 0x0330 },
    +};
    +
    +static const char *wii_names[] = {
    +    "Nintendo RVL-CNT-01",
    +    "Nintendo RVL-CNT-01-TR",
    +    "Nintendo RVL-WBC-01",
    +};
    +
     static ssize_t wii_pincb(struct btd_adapter *adapter, struct btd_device *device,
                             char *pinbuf, gboolean *display)
     {
         uint16_t vendor, product;
         bdaddr_t sba, dba;
         char addr[18], name[25];
    +    unsigned int i, len;
     
         adapter_get_address(adapter, &sba);
         device_get_address(device, &dba, NULL);
    @@ -73,11 +85,24 @@
         device_get_name(device, name, sizeof(name));
         name[sizeof(name) - 1] = 0;
     
    -    if (g_str_equal(name, "Nintendo RVL-CNT-01") ||
    -                (vendor == 0x057e && product == 0x0306)) {
    -        DBG("Forcing fixed pin on detected wiimote %s", addr);
    -        memcpy(pinbuf, &sba, 6);
    -        return 6;
    +    len = sizeof(wii_ids) / sizeof(wii_ids[0]);
    +    for (i = 0; i < len; ++i) {
    +        if (vendor == wii_ids[i][0] && product == wii_ids[i][1])
    +            {
    +            printf("Forcing fixed pin on detected wiimote %s\n", addr);
    +            memcpy(pinbuf, &sba, 6);
    +            return 6;
    +            }
    +    }
    +
    +    len = sizeof(wii_names) / sizeof(wii_names[0]);
    +    for (i = 0; i < len; ++i) {
    +        if (g_str_equal(name, wii_names[i]))
    +            {
    +            printf("Forcing fixed pin on detected wiimote %s\n", addr);
    +            memcpy(pinbuf, &sba, 6);
    +            return 6;
    +            }
         }
     
         return 0;
    Can you confirm us if bluez modification will be applied for 14.04 release ?

    In a friendly manner,
    J.G
    Website : http://jg.imbert.free.fr
    GitHub : https://github.com/Jacques-Olivier
    Last edited by J.G; March 12th, 2014 at 12:07 AM.

  2. #2
    Join Date
    Nov 2012
    Beans
    6

    Re: Bluez 4.101 cannot use Wiimote Inside Plus since Ubuntu 13.04 and others

    Can you make a more detailed tutorial or something to show how to install this?

    This isn't necroing, I need this to work but don't really know how he did.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •