Edited by Crypter at Wed Feb 25, 2015 11:34 |
After two days of battling with precise timings, modulation, frequencies and so on... I can finally tell you that I have a working replacement for LIRC... almost.
I couldn't make use of the inbuilt IR receiver module but if you connect a IR receiving module to some of the GPIOs - the magic works.
This software package consists of three parts (for now):
-You use this to record the signals sent from your TV remote.
-Usage: ./cryptocap -of [output_file_name] -p [number]
no spaces are allowed in the [output_file_name], I was too busy with making it work to deal with this, -of CableBox_VolUp is a legit name.
the "-p" stands for Input Pin. It takes any valid number from the 'gpio readall' in the "WiringPi" column.
if you don't use any of these arguments the values this software records will be printed on standard output (aka screen) as a Pulse Width Modulated wave. The default Input Pin is #0 in the WiringPi/WiringBP table, or #11 on the GPIO header.
-Sends the signals captured by cryptocap using an IR LED.
-Usage: ./cryptosend -if [input_file_name] -p [number]
if you don't specify Output Pin number the default one is #7 in the WiringBP table, or #7 on the GPIO header.
-You don't really need this piece of software but you'll need it in the future releases of it. At this point you can't really make use of it.
-So far I managed to implement the NEC protocol... well, most of it. 80% of the remotes use it, the rest are using RC-5. I'm working on fully implementing both of them.
-It converts the RAW files made by cryptocap to a LIRC config compatible file.
-IR LED and IR receiver module (a 38KHz one)
To be done:
cryptoencode -Will convert LIRC config files to RAW format that we can use. This is not very hard to do, I just didn't have the time to do it.
Schematic / board that you can connect directly to the GPIO headers. Currently the LED doesn't get enough power from the Output pin itself and needs a little circuit to enhance its power. If you connect the LED directly to the GPIO header you'll get a range of just 2m. I'm not happy with that.
WEB server that you can use to send commands more easily unlike typing like a maniac in SSH terminal.
Pancakes. This is to be done too, although totally unrelated to our topic
cryptocap will rape your CPU and hold it to 100% usage while it's recording. Thankfully that would be 2 seconds at most, most of the time.
cryptosend will also rape your CPU and hold it to 100% usage while it's sending, but that would be for less than half a second.
This is because I want to get timings as precise as possible. So far I can record timings as precise as 1 micro second (10^-6 seconds) and modulate a carrier frequency of 38KHz.
I'll release the source code in some of the next revisions. I need to refactor it and comment it. Only I and and the BananaPi can understand it in this condition.
Current version is: 0.1[alpha]
http://www.mediafire.com/downloa ... 81/cryptocap_-_v0.1
P.S: I was selfish enough to call the program after my online nickname, deal with it
P.P.S: This piece of software is written from scratch, not a single line of code was borrowed from the LIRC source code since I have other way of solving problems. They do amazing things too, no offense to them! Greetings guys!
Give it a Like if you support it! I'm waiting for your comments and ideas!