RVL-CNT-01-TR brand wiimote not working

Bug #954546 reported by J. Félix Ontañón
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
WiiCan
Triaged
Medium
J. Félix Ontañón

Bug Description

Redirected from lp:944679

RVL-CNT-01-TR is a brand for non-nintendo wiimotes not working with wiican but working with a Wii.

Tags: wiimote
tags: added: wiimote
Changed in wiican:
status: New → Triaged
importance: Undecided → Low
importance: Low → Medium
assignee: nobody → J. Félix Ontañón (fontanon)
Revision history for this message
J. Félix Ontañón (fontanon) wrote :

The problem is related with the way Wiican detects a bluetooth device is a wiimote or not.
This is based on the udev device label and the only device label recognized as a wiimote is "Nintendo Wiimote":
http://git.gnome.org/browse/wiican/tree/wiican/service/wiifinder.py

Please find attached a simple modification on wiifinder.py script you can run to reveal the udev device label for your non-nintengo wiimote brand.

Would you be so nice to run the script on a shell, and then launch wminput or wiican? Post here the output please.

Revision history for this message
bzdet99 (bzdet99) wrote :

So, I've run your program and still the new wiimote is not visible by the wminput
(No wiimotes found)
there is a large output and you can download it from
http://www.mediafire.com/?nqw8szipabyqiqg

I was trying the same with the old one, and there is no problem with it.

Revision history for this message
Dave Ahlswede (mightyquinn) wrote :

I have the same trouble on a Nintendo branded RVL-CNT-01-TR Wiimote.

The author of GlovePie (One of the most popular tools for using the wiimote on Windows), writes about it here: http://glovepie.org/blog/2012/01/03/wii-remote-plus/

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

Revision history for this message
J. Félix Ontañón (fontanon) wrote :

Hi Pietro! Thanks for the triaging,

Actually it seems to be the same problem reported as issue at cwiid@github:
https://github.com/abstrakraft/cwiid/issues/17

Pietro, I believe the better way would be to involve cwiid team for fixing this issue.
I can try to fix the bug. However, the effort is not worth if it cwiid team won't accept the changes, don't you think?

Would you be so nice to add your triaging as a coment on the related cwiid issue?
Let's see how the cwiid people get interested.

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

The problem seems that the cwiid group is inactive by a lot of time. I'm agree that the right way is involve the cwiid to solve the problem. Fiirst of all one guy that have a not working wiimote and some coding skills might check the issue, make a patch and send it to cwiid.

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

With some collegues we have ported the program python-wiiteboard in order to be used with the wiimote plus.
Sincerly we have removed the cwiid dependencies and we have used a little python library and fixed it https://github.com/pnegre/python-whiteboard/blob/master/stuff/linuxWiimoteLib.py.

In order to help the other project that are trying to support the wiimote I add some additional info in order to fix the code
working with the olde wiimotes only:

1) Found code part with product number and/or product name and add the new wiimote plus support
     Similar to the suggestion for cwiid that I have posted on 2012-08-31
     You can see these informations on http://wiibrew.org/wiki/Wiimote section SDP information
     Try to grep in the code the old values and add the new ones.

2) Patch the old code in order in order to avoid to SET REPORT (0x52) over the control pipe.
    use 0xa2 on data pipe. Prepend all output reports with 0xa2 and send it over the data pipe.
    References http://wiibrew.org/wiki/Wiimote , HID Interface section
    REMARKS that the control pipe is essentially unused but MUST be connected before the data pipe in order to associate
    the device

After this patches you will able to use your wiimote plus but you MUST sync with the sync button that is hidden under the battery cover. It is possible that authentication is now mandatory for the 1 + 2 temporary sync.
A pseudo code in order to have the pin is written on http://wiibrew.org/wiki/Wiimote Bluetooth Pairing section but I have not found implementation and it is not sure that pairing the wiimote plus specifyng pin will work.

I hope that these suggestions can help you and other hackers to support the new wiimotes. You can choose to try to fix cwiid or start from the https://github.com/pnegre/python-whiteboard/blob/master/stuff/linuxWiimoteLib.py that has been inherited by gtk whiteboard and update for wiimote plus devices also.

Pietro Pilolli

Revision history for this message
J. Félix Ontañón (fontanon) wrote :

Amazing, Pietro! Actually I've been figuring out how to remove cwiid dependency, and this seems to be a right way.

I really believe wiican could serve as a generic wiimote manager who could run several wiimote-drivers.
Look, time ago I started another wiimote project named wiimidi: a wiimote-mapping system for associate wiimote events with midi messages in order to use the wiimote as a musical instrument or midi controller: https://github.com/fontanon/wiimidi Discontinued today :(

This mapping works: https://github.com/fontanon/wiimidi/blob/master/sample.wid
And my final goal was: https://github.com/fontanon/wiimidi/blob/master/future.wid

So with wiican, in further stages, you could be able to configure a keyb/mouse mapping, a musical mapping, etc ...

However, by using linuxWiimoteLib.py, the hardest work to do is to create a mapping languaje, isn't? Does python-wiiteboard provides some mapping configuration features?

Cheers

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

See wiimap tool.

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

An other suggestion could be use the wiiuse branch that supports the wiimote plus.
http://sourceforge.net/p/supertuxkart/code/HEAD/tree/main/trunk/lib/wiiuse/

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

It seems that also the newest xwii have some support
to mapping.

http://www.photofiltre-lx.org/projects/xwii/

Could be usefull?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.