ATI Remote Wonder Plus

From MythTV Official Wiki
Revision as of 12:32, 5 April 2010 by Mabrowning (talk | contribs) (Kernel and LIRC Support)

Jump to: navigation, search
Atiremotewonder.jpg

The ATI Remote Wonder Plus RF remote is a revised release of the original included with the ATI's flaship All In Wonder video card. The new remote features some of the following changes:

  • A sleeker, more light-weight design
  • Six programmable buttons
  • Increased range to 60 Feet
  • Only two AAA batteries

Since the remote is RF, it works in all rooms of the house, without the need to point.

Kernel and LIRC Support

As of Oct 2007 there is still no official kernel and LIRC support for this device. However, there have been independent efforts to enable the device on Linux. As of today the remote is supported, with some manual steps. The two following approaches are mutually exclusive. If you compile the kernel module, the device will work, even without lirc.

2.6.24 Kernel Patch

I've fixed the patch that was not working earlier. It is working for me now. Please follow the instructions below to apply it.

  • cd /usr/src/`uname -r`/drivers/input/misc/
  • cp ati_remote.c ati_remote_plus.c
  • Copy the following patch to ati_remote_plus.patch
162,163c162,170
< static char init1[] = { 0x01, 0x00, 0x20, 0x14 };
< static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };
---
> /* 
>  * gregf - commented out - usb key init code for original remote
>  * static char init1[] = { 0x01, 0x00, 0x20, 0x14 };
>    static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };
> */
> 
>    static char init1[] = {0x80, 0x05, 0x1b, 0x15, 0x14, 0x20, 0x24, 0x15};
>    static char init2[] = {0x83, 0x03};
>    static char init3[] = {0x84, 0xd7, 0x020};
250c257,258
< 
---
> 	{KIND_FILTERED, 0xf1, 0x2c, EV_KEY, KEY_I, 1},
>    
251a260
> 
413c422,424
< 		if ((((ati_remote_tbl[i].data1 & 0x0f) == (d1 & 0x0f))) &&
---
> 		
> 		/* gregf - commented out to allow for added keys.
> 		 if ((((ati_remote_tbl[i].data1 & 0x0f) == (d1 & 0x0f))) &&
417a429,452
>  		*/
> 
> 		if (((((ati_remote_tbl[i].data1 & 0x0f) == (d1 & 0x0f) && 
> 		   (((ati_remote_tbl[i].data1 >> 4) - (d1 >> 4) + rem) & 0x0f) == 0x0f) || 
> 		   ((ati_remote_tbl[i].data1 & 0x0f) == ((d1 | 0x80) & 0x0f) && (((ati_remote_tbl[i].data1 >> 4) - ((d1 | 0x80) >> 4) + rem) & 0x0f) == 0x0f)) &&
> 			     ati_remote_tbl[i].data2 == d2
> 		    ) ||
> 		   ((ati_remote_tbl[i].data1 & 0x0f) == ((d1 | 0x80) & 0x0f) &&
> 		     (((ati_remote_tbl[i].data1 >> 4) - ((d1 | 0x80) >> 4) + rem) & 0x0f) == 0x0f &&
> 		     (ati_remote_tbl[i].data2 == (d2 ^ 0x80))
> 		    ) ||
> 		    ((ati_remote_tbl[i].data1 & 0x0f) == ((d1 ^ 0x80) & 0x0f) &&
> 		     (((ati_remote_tbl[i].data1 >> 4) - ((d1 ^ 0x80) >> 4) + rem) & 0x0f) == 0x0f &&
> 		     (ati_remote_tbl[i].data2 == (d2 ^ 0x80))
> 		    ))
> 			return i;
> 
472c500,503
< 	if ( (urb->actual_length != 4) || (data[0] != 0x14) ||
---
> 	
> 	/* if ( (urb->actual_length != 4) || (data[0] != 0x14) || */
> 	if ( (urb->actual_length != 4) || (data[0] != 0x14 && data[0] != 0x15) ||
500a531,557
> 		if (data[0] == 0x15) {
> 			if ((ati_remote->old_data[0] == data[1]) &&
> 			    (ati_remote->old_data[1] == data[2]) &&
> 			    time_before(jiffies, ati_remote->old_jiffies + msecs_to_jiffies(repeat_filter))) {
> 				ati_remote->repeat_count++;
> 			} else {
> 				ati_remote->repeat_count = 0;
> 			}
> 	
> 			ati_remote->old_data[0] = data[1];
> 			ati_remote->old_data[1] = data[2];
> 			ati_remote->old_jiffies = jiffies;
> 			
> 			if ((ati_remote->repeat_count > 0)
> 			&& (ati_remote->repeat_count < 3))
> 				return;
> 			
> 			if (ati_remote->repeat_count >= 3) {
> 				input_event(dev, ati_remote_tbl[index].type,
> 				ati_remote_tbl[index].code, 0);
> 				input_sync(dev);
> 				ati_remote->repeat_count = 0;
> 				return;
> 			}
> 		}
> 		
715,716c771,775
< 	if ((ati_remote_sendpacket(ati_remote, 0x8004, init1)) ||
< 	    (ati_remote_sendpacket(ati_remote, 0x8007, init2))) {
---
> 	if ((ati_remote_sendpacket(ati_remote, 0x8007, init1)) ||
> 	    (ati_remote_sendpacket(ati_remote, 0x8002, init2)) ||
> 	    (ati_remote_sendpacket(ati_remote, 0x8003, init3))) {
> 	/*if ((ati_remote_sendpacket(ati_remote, 0x8004, init1)) ||
> 	    (ati_remote_sendpacket(ati_remote, 0x8007, init2))) { */
  • Apply the patch in the following manner:
patch ati_remote_plus.c ati_remote_plus.patch
  • Next be sure to patch the Kconfig file located in the same directory. You can

insert the following entry:

config INPUT_ATI_REMOTE_PLUS
	tristate "ATI / X10 USB RF remote control (Remote Wonder Plus)"
	depends on USB_ARCH_HAS_HCD
	select USB
	help
	  Say Y here if you want to use an ATI or X10 "Lola" USB remote control.
	  These are RF remotes with USB receivers.
	  The ATI remote comes with many of ATI's All-In-Wonder video cards.
	  The X10 "Lola" remote is available at:
	     <http://www.x10.com/products/lola_sg1.htm>
	  This driver provides mouse pointer, left and right mouse buttons,
	  and maps all the other remote buttons to keypress events.

	  To compile this driver as a module, choose M here: the module will be
	  called ati_remote_plus.
  • Last, include the following line in the Makefile for that dirctory:
obj-$(CONFIG_INPUT_ATI_REMOTE_PLUS)        += ati_remote_plus.o

Now compile your kernel (if making a module, "make modules" should suffice), plug in your remote, and modprobe/restart. Your remote should be fully operational.


Or visit http://mythtv.wbond.net/remote_wonder_plus_linux/ for some ready-made patchaes for kernels 2.6.16-20.


LIRC Support

For LIRC you will need to modify the source as stated on this site http://raw-io.com/rwp/ (mirrored at http://mythtv.wbond.net/remote_wonder_plus_linux/lirc_mirror.htm).

Below is a mostly complete lirc config for Mythtv:

begin
prog = mythtv
button = A
config = E
repeat = 5
end

begin
prog = mythtv
button = B
config = O
repeat = 5
end

begin
prog = mythtv
button = Stop
config = Esc
repeat = 5
end

begin
prog = mythtv
button = Next
config = U
repeat = 5
end

begin
prog = mythtv
button = Maximize
config = V
repeat = 5
end

begin
prog = mythtv
button = Pause
config = P
repeat = 5
end

begin
prog = mythtv
button = Play
config = P
repeat = 5
end

begin
prog = mythtv
button = Mute
config = |
repeat = 5
end

begin
prog = mythtv
button = Vol-
config = [
repeat = 5
end

begin
prog = mythtv
button = Vol+
config = ]
repeat = 5
end

begin
prog = mythtv
button = f
config = PgDown
repeat = 5
end

begin
prog = mythtv
button = d
config = PgUp
repeat = 5
end

begin
prog = mythtv
button = c
config = F4
repeat = 5
end

begin
prog = mythtv
button = e
config = Esc
repeat = 5
end

begin
prog = mythtv
button = Arrow_Right
config = Right
repeat = 5
end

begin
prog = mythtv
button = Arrow_Left
config = Left
repeat = 5
end

begin
prog = mythtv
button = Arrow_Up
config = Up
repeat = 5
end

begin
prog = mythtv
button = Arrow_Down
config = Down
repeat = 5
end

begin
prog = mythtv
button = Ch+
config = Up
repeat = 5
end

begin
prog = mythtv
button = Ch-
config = Down
repeat = 5
end

begin
prog = mythtv
button = OK
config = Return
repeat = 5
end

begin
prog = mythtv
button = 1
config = 1
repeat = 5
end

begin
prog = mythtv
button = 2
config = 2
repeat = 5
end

begin
prog = mythtv
button = 3
config = 3
repeat = 5
end

begin
prog = mythtv
button = 4
config = 4
repeat = 5
end

begin
prog = mythtv
button = 5
config = 5
repeat = 5
end

begin
prog = mythtv
button = 6
config = 6
repeat = 5
end

begin
prog = mythtv
button = 7
config = 7
repeat = 5
end

begin
prog = mythtv
button = 8
config = 8
repeat = 5
end

begin
prog = mythtv
button = 9
config = 9
repeat = 5
end

begin
prog = mythtv
button = 0
config = 0
repeat = 5
end

begin
prog = mythtv
button = Information
config = i
repeat = 5
end

begin
prog = mythtv
button = Checkmark
config = Enter
repeat = 5
end

begin
prog = mythtv
button = Dropdown
config = M
repeat = 5
end

begin
prog = mythtv
button = TV
config = F9
repeat = 5
end

begin
prog = mythtv
button = GUIDE
config = M
repeat = 5
end

begin
prog = mythtv
button = Clock
config = I
repeat = 5
end


Future Support

An official kernel patch is being submitted and should be included in upcoming versions of kernels in 2008. Meanwhile, continue applying the patches above.