That is exactly what I am going to do. along with the user being able to adjust the size of the buffer as well.
The IR receivers are capable of receiving IR that is between a specific range. I would have to double check to see what that range is. But they have to have proper filtering in place for the protocol the MCE remote uses those are the requirements set forth by Microsoft. That being stated.. they can go above and beyond and filter more protocols. They can also use better grade components which would produce a cleaner result..
But I have done some work on this today.. and this is what I have discovered thus far. The decoding for SIRC12, SIRC15 and SIRC20 was entirely wrong. and would produce codes that would be all over the board because of small fluctuations. the SIRC protocol specifically states that an on state of .6ms is considered "off" and a burst of 1.2ms is considered on and they have a 0.6 ms wait between each burst. there is a 2.4ms preamble. The codes that Microsoft spits out are like this.
[2450, 550, 600, 600, 650, 550, 650, 550, 650, 550, 650, 550, 650, 550, 600, 600, 1200, 550, 1250, 550, 650, 550, 1250, 550, 1200, 25900]
2450 - 2.4ms preamble. simple math there shows that the received value is off by .05ms but it is within the +-10%.. so we need to put an iron on that bad larry and make it the 2.4 it is supposed to be. then there is a wait. that wait is supposed to be 0.6ms (600) again this is off. but withion tolerances.. this too needs to be set to it's proper value..
so through the use of the protocol specification I am able to determine what is on and what is off. each on or off represents a single bit.. the first 7 bits is the actual button code. for SIRC12 and SIRC20 the next 5 bits is the device type. and for sony15 the next 8 bits are the device type. sony20 has an additional 8 bits that are an extension to the device type..
there should be no reason for getting codes that are all out of sorts... I have fixed those 3 protocols thus far. Sony also has a "standard" button mapping. So I have mapped all of the device types to their respected commands and the names of the commands.
So if you point a sony TV remote and press power the event is now going to be "SIRC12.TV.Power" if the remote is for an AVR and you press the power button the event will be "SIRC12.AVR.Power"
here is a list of the device types along with the code for that type that is gotten from the IR
Code: Select all
'VideoConference': [0x01E],
'DAT': [0x01C],
'Sony Still Video Recorder': [0x016],
'Unknown Audio Aevice': [0x013],
'CD': [0x011, 0x039, 0x051, 26.153, 26.161, 26.169],
'CD-R': [26.202],
'MiniDisc': [0x00F, 26.97],
'Cassette': [0x00E, 0x010],
'BetaVCR': [0x002, 0x0B4, 26.81],
'Camcorder': [0x007, 0x0B9, 0x0BA, 0x0D4, 0x0D9, 0x0DA],
'VHS': [0x00B],
'DVR': [25.37, 25.101, 25.165, 25.69, 25.133, 25.197],
'MemoryStick': [26.129, 26.241],
'Webcam': [26.137],
'Network Video Player': [0x009],
'HD/Laser Disc': [0x008],
'Laser Disc': [0x006],
'TV': [0x001, 0x0A4, 0x003, 0x097, 0x077],
'AVR': [0x030, 0x00D, 0x02D, 0x00C, 0x02C, 0x012, 0x018, 0x090, 0x0B0],
'EQ': [0x032],
'AVRZone2': [0x079],
'AVRZone3': [25.11],
'DVD': [26.73, 0x0F7, 4.12],
'DVDR': [26.250, 26.11],
'PortableDVD': [26.18],
'DVDCamcorder': [26.34, 26.3],
'DVDChanger': [26.98],
'DVD/VCR': [26.83, 26.227, 26.235],
'Blu-ray': [26.226],
'Satellite': [0x0B7, 23.133, 23.69],
'STB': [26.114, 26.187],
'WebTV': [26.121],
'TiVo': [26.154, 26.162, 26.170],
'Projector': [0x054, 26.42],
'VideoCD': [26.49],
'IDTV': [23.13],
'SkyPerfecTV': [26.113],
'AVSystem3': [0x050, 0x0D0, 16.16],
'Preamp': [26.66],
'SurroundProcessor': [26.233],
'HardDiskAudioRecorder': [26.43],
'BookshelfSystem': [26.57],
'CarStereo': [0x084],
'XMReceiver': [26.19],
'ActiveSpeakers': [0x0FF],
'PS2': [26.218],
'VaioPC': [26.178, 26.51, 26.59],
'AVSwitch': [0x0E4],
'DSR': [0x059],
I am going to allow the user the option of removing the device type from the event as well. so the events would be
SIRC12.Play
SIRC20.Pause
and so on and so forth.
Now from my readings the MCE remotes use one of the RC protocols or the NEC protocol I can't remember which one. It is actually a spinoff of that protocol.. This is one of the things I believe that is causing a lot of people some problems.. it isn't set up as a spinoff of it... it was written into it.. so I believe it is causing issues with the decoding of a non MCE remote that uses the same protocol.
Oh I did also want to mention.. the learned codes are going to be nice and clean. right now they are not cleaned up before sent to create the pronto code.. this is the main reason why there is issue with the learned codes. they are sent into the converter exactly how the receiver gave us the data.. as you can see in the example above the data is not "ideal" But it can be made ideal if sent through a decoding process and cleaned up to provide a clean code.
I also have the ability to clean up any codes that are gotten from elsewhere and pasted into EG. Microsoft seems to have increments of 50 for each of the pieces of returned data. It is not that hard to round them out and then send that code through the cleaning process to make sure that it is spot on with the specification.
I think I am going to be able to get everything working really well with a close to 0% error rate on receiving and sending IR.. It is going to take some time tho because I have to learn each and every single one of the IR protocols and make the changes needed..
I can tell you the receiving part of the process is pretty damned fast and the code runs smooth for that portion of it.
I have a remote that is hacked so I am able to test each and every single protocol.