PDA

View Full Version : Beta: sendkeyplus for software 6.1 and higher


tivo4mevo
09-16-2007, 06:32 PM
The attached zip file contains source and a prebuilt executable for software v6.1 and higher. Sendkeyplus requires and relies upon the routerplus kernel module, which replaces the stock tivo router.o. You can find routerplus here (http://www.pvrhax0r.com/forum/showthread.php?threadid=51).

Usage: sendkeyplus [options] <keyname> [<keyname>...]
Send one or more keypress events to TiVo software v6.1 and higher.
sendkeyplus requires alldeadhomiez' routerplus kernel module,
see http://www.pvrhax0r.com/forum/showthread.php?threadid=51

Options:
-l List all possible keypress events
-w Wait for acknowledgment after sending each event
-t <msec> Timeout after waiting <msec> milliseconds for ack
-p <msec> Pause <msec> milliseconds between events
-r Treat arguments as raw event numbers instead of names
-v Verbose mode

Note: The keypress event names are case-insensitive
NUM0 through NUM9 can be written as 0 through 9
The default pause (unless specified) is 1000
Options -w and -t have aliases -wait and -waitTimeOut

sendkeyplus v1.0

Notes:

Sendkeyplus has been tested on versions 6.2 through 9.1 and automatically prevents timeouts on 6.x/7.x when sending remote events.
The options build upon those of MuscleNerd's 4.x sendkey (http://dealdatabase.com/forum/showthread.php?t=36758), thus you can specify multiple key names (separated by spaces) anywhere on the command line, for example, "sendkeyplus -v directv channelup select num2", which should navigate to the nowshowing screen and then toggle groups.
The -w (wait) option reduces the possibility of going too fast for the tivo UI, but in some places, the -w option is *blocking*, which can cause sendkeyplus to hang. Use the -t option to prevent this.
The "-t <msecs>" (timeout) option allows a user to specify a timeout value to prevent sendkeyplus from hanging indefinitely while waiting for acknowledgement.
The "-p <msecs>" (pause) option provides a user with explicit control of the time to wait (in milliseconds) between sending of remote events. If not specified with this flag, sendkeyplus will pause 1000 msec between events.
Sendkeyplus also accepts the older variants of event key names (surfup, surfdown, catchup, etc.) and is compatible with tvlib/tcl/tv/sendkey.tcl in the supported software versions.
Credit goes to alldeadhomiez for routerplus, rpsniff, chanflip and for his help and to jkozee for his code and remote event acknowledgment details.

drez
09-16-2007, 06:43 PM
Wow, can't wait to try it when you post it.

I really appreciate all your contributions.

jt1134
09-17-2007, 05:52 PM
Nice. :cool: I gave this hell on my dsr708 (6.2a) and HR10 (6.3e) last night with no problems. No lock ups or anything (I did piss my g/f off quite a bit with it though). The timeout issue is kinda annoying, but it's easy enough to work around. Thanks!

SpoonsJTD
09-18-2007, 12:44 PM
I expected greater fanfare when someone finally figured out how to do with this with routerplus, so let me provide some of it: Excellent job, tivo4mevo! This might be enough to dust off the iPaq and look at tivowebplus again for controlling the DTV for my kids.

Any chance of you providing the source? I tried tackling this a while back, but my C was too rusty and my *nix skills in the programming area are basically nil, so I could never get the thing to respond. I am interested in some other things that routerplus opens up, and the sendkey sample might be just what what the doctor ordered to get over the hump.

jsmmd
09-19-2007, 12:27 AM
I'm very eager to try this. I've attempted to install routerplus per alldeadhomiez's README. sadly, I mucked my tivo up and I'm in a infinite reboot loop. OH crap!


Regardless, I have some good news for tivo4mevo. I was groveling to alldeadhomiez for a working sendkey for my DTiVo S2. So if this works for me I will have to give you my bounty. One good deed deserves another.


Anyone care to tell me how to correctly install routerplus. I think I missed an important step :)

Jamie
09-19-2007, 01:29 AM
Works great on a TiVoHD running 8.1.7c2. I'll try an S3 too.

Thanks!

Narf54321
09-19-2007, 10:05 AM
I'm very eager to try this. I've attempted to install routerplus per alldeadhomiez's README. sadly, I mucked my tivo up and I'm in a infinite reboot loop. OH crap!


Regardless, I have some good news for tivo4mevo. I was groveling to alldeadhomiez for a working sendkey for my DTiVo S2. So if this works for me I will have to give you my bounty. One good deed deserves another.


Anyone care to tell me how to correctly install routerplus. I think I missed an important step :)

If you're going to 'beta test' these kinds of software hacks, you should look at putting in a stoploop (a.k.a. "hackemr") setup with a new panic code (http://www.dealdatabase.com/forum/showthread.php?t=37326). With the new kickstart (panic) code from your remote control, it bypasses the full system startup and provides you with basic network access and bash shell to edit and fix things. Obviously you would need to put in the newer drivers and any other updates/changes for the newer system software, but it is far better than having to pull apart the Tivo unit to remove the hard drive each time.

jsmmd
09-19-2007, 03:44 PM
Noted. Thank you. I'll just retreat to the corner for now.

If you're going to 'beta test' these kinds of software hacks, ...

RandC
09-19-2007, 10:29 PM
If you're going to 'beta test' these kinds of software hacks, you should look at putting in a stoploop (a.k.a. "hackemr") setup with a new panic code (http://www.dealdatabase.com/forum/showthread.php?t=37326). With the new kickstart (panic) code from your remote control, it bypasses the full system startup and provides you with basic network access and bash shell to edit and fix things. Obviously you would need to put in the newer drivers and any other updates/changes for the newer system software, but it is far better than having to pull apart the Tivo unit to remove the hard drive each time.I'm totally off subject here but thanks Narf for the link to heckemr setup, I may need use that someday.

mrpenguin
09-20-2007, 09:24 AM
so smooth, worked perfect first try. Great job!

mrpenguin
09-20-2007, 11:55 PM
I edited the sendkey.itcl file to use sendkeyplus if ver > 4 and activated the webremote - Works great. too bad kids already in bed, can't wait to mess with them.

AlphaWolf
09-21-2007, 06:25 PM
If you're going to 'beta test' these kinds of software hacks, you should look at putting in a stoploop (a.k.a. "hackemr") setup with a new panic code (http://www.dealdatabase.com/forum/showthread.php?t=37326). With the new kickstart (panic) code from your remote control, it bypasses the full system startup and provides you with basic network access and bash shell to edit and fix things. Obviously you would need to put in the newer drivers and any other updates/changes for the newer system software, but it is far better than having to pull apart the Tivo unit to remove the hard drive each time.

This is the reason why I bring up telnetd and bash over serial early in the boot stage. FWIW, if you look at the latest init framework I posted, it addresses every single one of the previously known problems inherent with doing that, and thus there are no more known drawbacks with doing it.

steve90071
09-21-2007, 08:52 PM
mrpenquin, for the less gifted such as myself, can you give a little more detail about which files you edited and the edits you made? I edited sendkey.itcl to read "if {$::version>6} continue". I renamed "sendkeyplus" to "sendkey" and moved it into /hack/TivoWebPlus.

When I started tivoweb v2.0.0-070921, the log reported:

Loading libs...
util
sendkey
NONE can't read "TmkEvent::EVT_MW_STATUS": no such variable
while executing
"event register $TmkEvent::EVT_MW_STATUS EventMwStatus"
invoked from within
"if {[info exists sendkey_mwstatus] == 0} {
event register $TmkEvent::EVT_MW_STATUS EventMwStatus
set sendkey_mwstatus 1
}"
("uplevel" body line 24)
invoked from within
"uplevel 1 "$s" "
html
index

Any assistance will be appreciated.

RYSmith315
09-22-2007, 02:52 AM
The attached zip file contains an executable for Series2 machines running v6.1 and higher. .....


How about posting the source code?

mrpenguin
09-22-2007, 01:35 PM
mrpenquin, for the less gifted such as myself, can you give a little more detail about which files you edited and the edits you made?

See and continue this subtopic here (http://www.dealdatabase.com/forum/showthread.php?p=287958) to keep this thread neet.

jsmmd
09-26-2007, 09:42 AM
I get the following....

great-bash# sendkeyplus INFO
CMD_ISERVREG: Invalid argument


or


great-bash# sendkeyplus -v -r 38
Using cached session info
CMD_ISERVREG: Invalid argument

mrpenguin
09-26-2007, 10:40 AM
I think routerplus may not be installed properly. Did you reboot after copying router.o?

jsmmd
09-26-2007, 10:54 AM
I have a DirecTV TiVo S2. I'm running 6.2-01-2-321. kernel 2.4.20

well, a third reboot was a charm. it's working great

jsmmd
09-27-2007, 12:58 AM
tivo4mevo,

I have TiVo Control Yahoo! Widget working. i very much thank you!

never mind, i'm going to bed, I'm telling you know issues...

jt1134
09-27-2007, 01:03 AM
tivo4mevo,

I have been testing this. I did notice something strange.

The TIVO button will take you to TiVo Central than bounce back to live TV.

Did you even read the first post in this thread where he addressed this issue?

tivo4mevo
09-27-2007, 10:13 AM
A new version that fixes the "LiveTV timeout bounce" on 6.x & 7.x units is under testing now. It should be released before too long.

tivo4mevo
09-29-2007, 05:10 PM
Updated first post with v0.9 beta executable. The new version prevents timeouts on 6.2/6.3 when sending remote events.

jsmmd
10-02-2007, 11:00 PM
Updated first post with v0.9 beta executable. The new version prevents timeouts on 6.2/6.3 when sending remote events.

agreed it's working great via bash.

I am seeing unexpected behavior between the first release and the most recent with the TivoWebPlus WebRemote module. I'll detail it in the correct thread (http://www.dealdatabase.com/forum/showpost.php?p=288464&postcount=17)

drez
10-03-2007, 12:53 AM
agreed it's working great via bash.

I am seeing unexpected behavior between the first release and the most recent with the TivoWebPlus WebRemote module. I'll detail it in the correct thread (http://www.dealdatabase.com/forum/showpost.php?p=288464&postcount=17)

I have the same problem.

RYSmith315
10-04-2007, 02:19 AM
Updated first post with v0.9 beta executable. The new version prevents timeouts on 6.2/6.3 when sending remote events.

Others would love to help in this endeavor if the source were available. I had been working on a remote client that used SiHost on a socket port, routerplus not needed. I could get a few messages to be accepted but after about the third remote message SiHost would start to reject the messages. I thought your work might help in constructing the messages correctly. (credit and licenses are always respected)

I've been using TivoServer as an example of how to register a remote client with the SiHost, a util to de-compile the idl files to mock up messages, and rpsniff to get clues as to what the messages should look like. From what I've seen so far SiHost does not differentiate between local inter-process communication and non-local messages from your pc.

Imagine the possibilities! Let's keep the TiVo hacker community alive by building off each others work. There are a lot of very smart people who read this forum.....put them to work!

SpoonsJTD
10-04-2007, 02:00 PM
Others would love to help in this endeavor if the source were available. I had been working on a remote client that used SiHost on a socket port, routerplus not needed. I could get a few messages to be accepted but after about the third remote message SiHost would start to reject the messages.

Nice! This is exactly the kind of stuff I was trying to do, locally first, then hopefully remotely. You got much farther than I did, I never could get any messages accepted. I started a set of tools in .NET for parsing the tvbin files and creating messages using the dynamic types created by the IDL.

The IDL is so self-describing that it seems like you could accomplish a ton of things by working with the system the same way the UI and services do without having to resort to tivosh et al to do it.

tivo4mevo
10-20-2007, 06:22 PM
Let's keep the TiVo hacker community alive by building off each others work. There are a lot of very smart people who read this forum.....put them to work!Updated the original post with a release version that includes several improvements. Source code is included.

Omikron
03-22-2008, 10:37 PM
I've searched all over the place but what the heck does the sendkeyplus.o module do?

Jamie
03-23-2008, 01:10 AM
sendkey/sendkeyplus allows you to send "key events" to the TiVo UI via software. This allows you to control the TiVo UI from TiVoWebPlus, for example, using the webremote (http://dealdatabase.com/forum/showthread.php?t=57166) feature.

Omikron
03-23-2008, 02:49 AM
sendkey/sendkeyplus allows you to send "key events" to the TiVo UI via software. This allows you to control the TiVo UI from TiVoWebPlus, for example, using the webremote (http://dealdatabase.com/forum/showthread.php?t=57166) feature.

Oh yeah, I totally got that.

However, there are two files within the archive. "sendkeyplus", and "sendkeyplus.o". My understanding is that the ".o" extension designates it as a kernel module and thus it should be placed in /lib/modules. However, none of the instructions reference that.

To clarify, do I need both files, or just one of them?

Jamie
03-23-2008, 10:07 AM
The .o file is simply an intermediate result of building the binary (.c => .o => executable). It appears to me that the author simply packaged the entire build directory without purging intermediate results. So just ignore the .o file.

Omikron
03-23-2008, 04:07 PM
The .o file is simply an intermediate result of building the binary (.c => .o => executable). It appears to me that the author simply packaged the entire build directory without purging intermediate results. So just ignore the .o file.

Ah, thanks.