Unlike the other ir modules which only handle power / eject, my module even replaces the dvd remote sensor for use with XBMC ( yet to be implemented on the XBMC side ).
Basically it works like this:
if the xbox is off, the module waits for a power on sequence (user changeable).
If the xbox is on, but the module hasn't been polled in 15 seconds or more, and the power off button is pushed, then it turns the xbox off.
in all other cases it forwards the ir code to the xbox via the i2c bus. (the UXIR is an i2c slave)
using very simple i2c commands any program can poll it for ir codes.
Sample code for reading any available ir codes.
CODE
int c;
i2c_write(UXIR_DEV, UXIR_QUERY); // Any codes queued?
c = i2c_read(UXIR_DEV); // Read response
while(c) {
i2c_write(UXIR_DEV, UXIR_RETR); // Send me the first code
type = i2c_read(UXIR_DEV);
codehi = i2c_read(UXIR_DEV);
codelo = i2c_read(UXIR_DEV);
handleir(type, (codehi << 8) | codelo);
c--;
}
Sample code for setting the power on/off code
CODE
i2c_write(UXIR_DEV, UXIR_SETPWR); // Change the PowerOn code
i2c_write(UXIR_DEV, type);
i2c_write(UXIR_DEV, codehi);
i2c_write(UXIR_DEV, codelo);
So far I've got the PIC recognizing several types of remotes, and outputting the ir codes via RS232 (debugging) and I2C. I plan to finish up the code very soon and release the firmware & schematics.
My other current project is to take a cheap PS/2 keyboard, and turn it into an IR keyboard for use with XBMC and Windows Media Center. Right now it depends on someone dumping the IR codes from MS's $70 keyboard or another ir keyboard for media center.
Anyone have a Media Center keyboard they want to