Comment 5 for bug 954546

Revision history for this message
Pietro Pilolli (alpha-paranoici) wrote :

Seems that cwiid don't work with these wiimote models:

LMA-RVL-WR/C C4
LMA-RVL-WR/Z-C4
LMB-RVL-WR/Z-C4
LMB-RVL-WR/Z-C6
LMA-RVL-WR/Z-C4

I have been loocking for a solution on the net and I have seen that some programs has resolved this issue.
The good neews is that we can fix it.

We need a not supported wiimote, a C coder, the cwiid code (https://github.com/abstrakraft/cwiid) and some luck.
(I have not a not supported yet wiimote)

I have seen the patch at
http://code.google.com/r/adlr-mplus/source/detail?r=8fac488c591377e1381cec529824f5c53c588bbf&name=macbuild_wiimotefix

After reading the patch I'm sure that there are some problems in cwiid
- libcwiid/bluetooth.c:111

                /* Filter by name */
                if (!(flags & BT_NO_WIIMOTE_FILTER) &&
                  strncmp((*bdinfo)[bdinfo_count].name, WIIMOTE_NAME, BT_NAME_LEN) &&
                  strncmp((*bdinfo)[bdinfo_count].name, WIIBALANCE_NAME, BT_NAME_LEN)) {
                        continue;
                }
  wher WIIMOTE_NAME is defined in libcwiid/cwiid_internal.h as:

                #define WIIMOTE_NAME "Nintendo RVL-CNT-01"

  Here we can see that the devices different by "Nintendo RVL-CNT-01" will be neglected.
  Here we must add as valid name:
                "Nintendo RVL-CNT-01-TR"

- libcwiid/bluetooth.c:104

                  /* timeout (10000) in milliseconds */
                if (hci_read_remote_name(sock, &dev_list[i].bdaddr, BT_NAME_LEN,
                                         (*bdinfo)[bdinfo_count].name, 10000)) {
                        cwiid_err(NULL, "Bluetooth name read error");
                        err = 1;
                        goto CODA;
                 }

  This check could fail

With some luck we could solve the issue.
If anyone want found to fix it please write a comment and post patches.
I'm available to support the development.

Pietro Pilolli