PDA

View Full Version : sending signals out the ir control cable via bash commands ?


wejones
12-02-2002, 11:23 AM
I tried asking this in another forum and got no response, so I'm trying here.
I would like to experiment with trying to send out control signals out the ir control cable from the bash prompt. Ie I'd like to type a command at the bash prompt which would send a signal out the ir control cable, so that I could potentially control other equipment, like VCRs or satellite receivers via scripts using the network bash connection.
I know it might be difficult to figure out the proper data to send, but I was just curious whether there was a program on the TIVO that actually sent the data over the IR that I could experiment with? I did a quick scan through the files on the TIVO, and see something in SBIN named "irprog", that I thought might possibly be such a program, and also I see a couple of files such as "irmicro.hex" that I thought might possibly be data for codes that the TIVO knows? I also saw a device in /dev called "kfir" . Does anyone know what these files are for, and how they are used? I was hoping to just be able to use a command with a data variable, or send data to a device.
Anyway, it seems like someone would have tried something like this before, but a quick search didn't yield anything, so I'm curious whether anyone knows how to control the IR blaster thing? Or is it more complicated than I'm hoping?
thanks in advance

TheDoctor
12-02-2002, 12:26 PM
'cat (commandstring) >/dev/ttyS0' might do the trick. If you kill off myworld, or what ever your current version of tivo software is calling it, you can read the incoming IR signal with 'cat < /dev/ttyS0'. This will be a binary string, with no termination, dumpted to the screen. It will read some non-tivo remotes. You could try piping the strings to a file for each button on the foreign remote. Later you could pipe the (commdstring) file to ttyS0 to send it out. I have not tried the last part, I am just guessing that it reads the string in the same format that it send them out in. You should not have to kill any processes to send the string, just wait till tivo is not sending any IR commands.

wejones
12-02-2002, 12:37 PM
Thanks.

So if I understand, killing the myworld is only necessary when trying to read ir input.

Sounds like it's worth a try. Thanks.

TheDoctor
12-02-2002, 02:21 PM
That should be the only time you have to kill it. If both you and it are trying to read the port at the same time, you will both get garbage.

Mjolinor
12-02-2002, 02:43 PM
I asked the same question (more or less) on

http://alt.org/forum/index.php?t=thread&frm_id=2&rid=84&S=363e016ab5bb2e07b22bf81ff23182f4

to which there has been a similar response.

wejones
12-02-2002, 03:25 PM
No success, but interesting.
I've never shut down myworld before, so this was new to me. Not sure I did it right.
I did a ps x and saw two processes listed for myworld, #s 117 and 118 I think. I killed both of these, and as expected, I no longer could control the TIVO with the remote. What I didn't expect, was that the TIVO was still functioning as far as displaying video.
When I tried to cat the ttys0 to the screen, however, at that point, the TIVO stopped functioning, and locked up, video wise.
when I first ran the cat command, it initially spit out about 8 bytes of data, however it didn't respond when I tried my VCR remote. It did respond with a single byte ( 7A ) each time I pressed the TIVO remote ( I was expecting a longer string, and I'd be interested in hearing what strings you or other people may have gotten for certain remote keys just to see what I should have been seeing). Perhaps I wasn't getting non-ascii characters displayed.
In any event, it didn't seem to respond to my VCR remote, so unless I did something wrong, perhaps in the way I killed myworld, my main goal may not be quite so easy as hoped (I was hoping to be able to choose between two video inputs using my VCR's channel up/down button.)
I'll think about this a while, and try experimenting a bit later, if I get any new ideas.
Thanks for the suggestions.

Mjolinor
12-02-2002, 04:18 PM
I can't help thinking you may do better going from the top down and using the inbilt IR capabilities

There are actually very few IR protocols and your VCR will hopefully/probably use the same protocol as the TVs and set top boxes of the same make.

if the tcl routinmes that control external devices are known then these, I thibnk, would be a good straarting point

Mjolinor
12-02-2002, 05:00 PM
I can't help thinking you may do better going from the top down and using the inbilt IR capabilities

There are actually very few IR protocols and your VCR will hopefully/probably use the same protocol as the TVs and set top boxes of the same make.

if the tcl routinmes that control external devices are known then these, I thibnk, would be a good straarting point

TheDoctor
12-02-2002, 05:40 PM
The tivo remote codes are at least 5 characters for the philips or sony remotes. The receiver does not process all remote codes, but will understand a number of brands. You can get an idea by playing with a universal remote.

If you were successful in killing myworld, the video should have frozen in less than a second. If not, then you might have been getting only part of the remote sequence. If you suceed in kill myworld, then all of the child processes will end as well and the ps command will only show 6 or so applications running.

Basically if the tivo is operating normally and can recieve the remote signals used, then the front light will flash, even if it does not understand the codes mean. No flash=no fire.

Mjolinor
12-02-2002, 05:56 PM
From what I remember (though I hacen't done it for a while) the Tivo doesn't respond to incoming remote signals if they are not Tivo codes.

I can

cat "filename" >/dev/ttyS0

and make the record LED flash though I don't think the IR LED is transmitting at least my remote sender is not flashing, I haven't had a scope on it yet, too busy watching it :) (the TV that is)