Monday, May 9, 2011

You don't need pants for the victory dance

A good deal of effort and testing during the week led me to the conclusion that I need to re-implement code to decode the actual protocol of the IR signals, rather than try to do some clever, generic capturing. Some hunting on the web found 2 main protocols, a pulse width scheme and a level-based (bi-phase) scheme. Manual decoding soon showed that, broadly, all of the signals I'd captured could be classed as one of these two.

Some frenzied late evening work resulted in a new analysis program which could decode both of these schemes. Feeding in my test code showed that the results were highly consistent - giving the same values for each command from a single remote - a very promising development.

Some further tweaking before the weekend and then some quick testing revealed partial success. We had visitors at the weekend, so there was limited time to code or test but I quickly realised that the Sony devices sent their signals multiple times. I managed to grab a couple of hours to add repeat code detection and then retransmit them.

A hastily set up test rig resulted in complete success - all my codes worked and successfully controlled the equipment. I can command the TV, amplifier, satellite box and blu-ray player. Finally, the result I'd been looking for.

Having used up as much time away for our visitors as I was allowed, I didn't have any more time to work over the weekend, but I feel very satisfied that the infra-red is now working. I will need to add functionality for things like volume, which are repeating signals, but that can come later.

Next step is to integrate the new IR functionality with the network server program and to write a test client to run on the laptop. This will demonstrate a prototype of the complete Elmo system. Exciting times.

No comments:

Post a Comment