Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: TivoWeb on SA unit

  1. #1
    Join Date
    Aug 2003
    Posts
    1,285

    TivoWeb on SA unit

    I'm having problems getting tivoweb to run on a monte'd SA unit. I addressed the netfilters issue. I can telnet a ftp to the box.

    tivoweb justs exits without an error. I tried changing the server port to no avail.

    Sleeper

  2. #2
    Join Date
    Jun 2001
    Posts
    3,108
    try tivoweb console from the bash prompt, that way you can see any errors
    Step one: search button!
    Silly Wabbit, guides are for kids

  3. #3
    Join Date
    Aug 2003
    Posts
    1,285
    Thanks,

    That revealed the TimeZoneOld problem so I edited the .tcl file and change it to TImeZoneOffset.

    Then, I got an error agout /devbin/sendkey.

    I have been searching around and have found plenty of people with this problem but can't find a fix.

    Apparently sendkey works differently on a 4.0 TivoApp.

    Anyone have a fix or a link to a thread with a fix?

    Thanks,

    Sleeper

  4. #4
    Join Date
    Aug 2003
    Posts
    2,149
    Sleeper,

    As far as I know, there's no 'sendkey' fix or binary. I'm still trying to understand if there HAS to be a mips binary or if the sendkey.tcl file is what's supposed to be running everything.

    If it's a binary problem I'm sure we could beg the folks more successful than me at setting up a mips cross compiler.

    I've tried Cygwin and now Redhat 9.0 and so far no luck at a straight 'script' install. If I get more time (doubtful) I'll try it again, then sendkey is my top priority

    NutKase
    "God, and DealDataBase, help those that help themselves." --Shamelessly stolen from psxboy
    ------------------------------------------------
    2 each, SA S2 287hr 7.2.1a's with Lifetime.
    Hacks: 1 Manually Monte'd -140, Bash,Telnet,FTP,TivoWebPlus,
    Superpatch-67all Unscrambled/HMO,MFS_FTP Ver. N,TyTools, tivoserver
    Fully hacked SA S1

  5. #5
    Join Date
    Aug 2003
    Posts
    1,285
    Originally posted by NutKase
    If it's a binary problem I'm sure we could beg the folks more successful than me at setting up a mips cross compiler.
    If sendkey is an executable it's not going to be that simple.

    Assume for a moment that we had the source code to sendkey executable. The 4.x tivoapp may not communicate with the old sendkey. Tivoapp itself may have been changed. Figuring out how to communicate with the new tivoapp is the trick.

    Also, the sendkey from the 3.x boxes should work if tivoapp was not changed unless it was compiled with some modules that are specific to the 2.4.4 kernel. Although this is possibly a problem it's not likely.

    A starting point might be to run strace on sendkey and see what type of calls it makes.

    I also wonder if there is a seperate app that handles the I/O from the IR port that communicates with tivoapp or if that is part of tivoapp. If it is a seperate app, then we could take a look at the disassembley and figure out how it works.

    By the way, who is the author of tivoweb?

  6. #6
    Join Date
    Nov 2003
    Posts
    3

    These are the names

    in the copyright file...

    Original httpd.tcl Copyright (C) 2000 Stephen Rothwell (sfr@canb.auug.au)
    SendKeys Tivo Remote Mod Copyright (C) 2000 Jon Squire (jsquire@justice.loyola.edu)
    TiVo User Interface Copyright (C) 2001 Josha Foust (tivoweb@lightn.org)
    CSS Stylesheets Copyright (C) 2001 Mike Baker (mbm@linux.com)

    and in the readme file...

    Stephen Rothwell (sfr@canb.auug.au)
    Original httpd.tcl
    Jon Squire (jsquire@justice.loyola.edu)
    SendKeys Tivo Remote Mod
    Namespace separation
    Info screen
    Josha Foust (tivoweb@lightn.org)
    Primary author
    TiVo User Interface
    Recording/SeasonPass scheduling and deletion
    Index, image, form, last-modified, and post data support
    Integration of resource editing and program editing
    Mike Baker (mbm@linux.com)
    CSS Stylesheets and theme functionality
    Graphical sendkeys remote
    HTML, HTTP, image, and post data enhancements
    Testing and debugging
    Mike Byrne (Turbo)
    Resource Editor module
    John Paglierani (John@Paglierani.net)
    Program title/description editing routine
    Jeff Keegan (jkeegan@keegan.org)
    Mail module



  7. #7
    Join Date
    Dec 2003
    Posts
    10

    Any progress? Can I help?

    Has there been any progress on this issue?

    <post edited because I'm a newbie> ;-) (4th day on the job and no Linux experience)

    I guess I don't understand all of the issues here.

    BTW, S2 SA 4.01

    I get an error about trying to execute /devbin/sendkey but there is not file called /devbin/sendkey.

    I do however have a /bin/sendkey which is what's calling /devbin/sendkey because I find that out when I execute something like

    /bin/sendkey surfup


    Who wrote this /bin/SendKey script? Is there a new program that needs to be called for S2 SA?


    Help me understand the problem so that I can help.

    -----

    PS:

    Code from my /bin/SendKey: (4/22/2002 @ 12:00AM)

    #!/tvbin/tivosh

    source $tcl_library/tv/log.tcl
    source $tcl_library/tv/sendkey.tcl

    set id ""

    proc EventMwStatus { type EventType } {
    global EventData
    global id env

    switch $EventType \
    $TmkEventMwStatus::CONTEXT_PING_ACK {
    binary scan $EventData II iContext serialNumber
    if { $serialNumber == $id } {
    set id ""
    }
    } \
    default {
    }
    }

    event register $TmkEvent::EVT_MW_STATUS EventMwStatus

    ########
    #
    # SendKeyAndWait
    #
    # Send a key & wait until the context manager has handled it.
    #
    ########

    proc SendKeyAndWait { key } {
    global id

    SendKey $key
    set id [SendKey ping]
    set count 0
    while { $id != "" } {
    incr count
    if { $count > 200 } {
    error "Event timed out."
    }
    after 250
    update
    }
    }

    foreach key $argv {
    SendKeyAndWait $key
    }
    Last edited by alexander00; 12-03-2003 at 12:38 PM.

  8. #8
    Join Date
    Dec 2003
    Posts
    10

    /tvlib/tcl/tv/sendkey.tcl

    AND....

    There's also a file called 'sendkey.tcl' in '/tvlib/tcl/tv' which is written by Tivo.

    You view the source of this file and it looks like the thing you guys (NutKase, etc.) are all looking for. right? Is our path in the wrong order?

    Please help me understand what the problem is?

  9. #9
    Join Date
    Dec 2003
    Posts
    7

    /tvlib/tcl/tv/sendkey.tcl

    This tcl file has the line:

    exec $env(TIVO_ROOT)/devbin/sendkey $evrc($key)

    So it tries to execute /devbin/sendkey, but that file doesn't exist on the Series2. All the hack programs that send keystrokes rely on this, so none work on the Series2. Anyone with a Series1 want to take a look at it?

  10. #10
    Join Date
    May 2003
    Posts
    245

    sendkey /tvlib/tcl/tcl

    Looking at the 3.1 version and the 4.0 version of sendkey.tcl that tivo supplies there are two differences. 1) Tivo changed the variable names. 3.x used integers for the buttons (0-51) and 4.x uses label names.
    Code:
    For 3.x
    set evrc(tivo)	        5
    set evrc(t)	        5
    set evrc(livetv)	6
    set evrc(l)     	6
    Code:
    For 4.X
    set evrc(tivo)	        TIVO
    set evrc(t)	        TIVO
    set evrc(livetv)	LIVETV
    set evrc(l)     	LIVETV
    2) The second change is that
    Code:
    For 4.x
    if { [info exists evrc($key)] } {
    exec $env(TIVO_ROOT)/devbin/sendkey $evrc($key)
    What 3.x had instead was:
    Code:
    For 3.x
    if { [info exists evrc($key)] } {
    set keycode $evrc($key)
            set id 0
            set keysource 1 ; # TVKEY_SOURCE_REMOTE
            set timelow 0
            set timehigh 0
            
            if { [FLittleEndian] } {
                set format iiiii
            } else {
                set format IIIII
            }
    
            set remevent [binary format $format \
                    $keycode $id $keysource $timelow $timehigh]
            event send $TmkEvent::EVT_REMOTEEVENT $remevent
    If you replace that bad command line in 4.x that tivo put in with what was in the 3.x software the tivo does not seem to mind and the error that /devbin/sendkey does not exist goes away. But then the other problem comes up. Tivoweb server errors out with expected integer but received "TIVO", when you select the tivo button on the web remote. I'm not sure where tivoweb defines these variables. I've looked at /modules/webremote.itcl and ui.itcl but didn't see anything obvious. Any ideas?

  11. #11
    Join Date
    Aug 2003
    Posts
    2,149

    Re: sendkey /tvlib/tcl/tcl

    Originally posted by rpl
    If you replace that bad command line in 4.x that tivo put in with what was in the 3.x software the tivo does not seem to mind and the error that /devbin/sendkey does not exist goes away. But then the other problem comes up. Tivoweb server errors out with expected integer but received "TIVO", when you select the tivo button on the web remote. I'm not sure where tivoweb defines these variables. I've looked at /modules/webremote.itcl and ui.itcl but didn't see anything obvious. Any ideas?
    Confirmed. I replaced the alphanumeric commands in sendkey.tcl with the numeric entries and didn't get a '/devbin/sendkey' error or 'expected interger' error.

    BUT, the remote still doesn't work yet. I'll work on it some more later. ...very busy at work this week.

    NutKase
    "God, and DealDataBase, help those that help themselves." --Shamelessly stolen from psxboy
    ------------------------------------------------
    2 each, SA S2 287hr 7.2.1a's with Lifetime.
    Hacks: 1 Manually Monte'd -140, Bash,Telnet,FTP,TivoWebPlus,
    Superpatch-67all Unscrambled/HMO,MFS_FTP Ver. N,TyTools, tivoserver
    Fully hacked SA S1

  12. #12
    Join Date
    Dec 2003
    Posts
    7

    Question

    Interesting. It looks like 3.x used the event posting system, but 4.0 does not. I tried fiddling with the event send under 4.0, but couldn't get any reaction. Substituting values,
    set remevent [binary format IIIII 5 0 1 0 0]
    event send $remevent

    should send a TiVo key under 3.x, but does nothing in 4.0. So it looks like they have a new program that triggers a keystroke, but didn't give us a copy. The fact that they switched implies that they keystrokes are no longer processed in the same way.

  13. #13
    Join Date
    Aug 2003
    Posts
    1,285
    Originally posted by alanhtivo
    So it looks like they have a new program that triggers a keystroke, but didn't give us a copy. The fact that they switched implies that they keystrokes are no longer processed in the same way.
    I'm wondering which process handles receiving signals from the remote control & front panel. I wonder if it would be possible to attach strace to it and see what calls it is doing. This would be difficult if it was tivoapp because so much is constantly going on. If it is some type of event listener/handler it might be possible.

  14. #14
    Join Date
    Dec 2003
    Posts
    10

    35

    Some random comments and things I noticed that hopefully makes more sense to others....

    #1. Path - in /etc/rc.d/rc.sysinit the path order is set as /bin;/sbin;/tvbin;/devbin but rc.sysinit.author sets it as /sbin;/bin;/tivobin;/busybox;/tvbin

    (may be interesting and may not)


    #2. What are genkey and keydump in /tvbin?

    from genkey... Usage: genkey KEYBITS [WEAKOK(=0)] [LINES(=1)]
    KEYBITS must be between [8, 2048], div by 8


    #3. sleeper's idea about attaching a trace:

    Here's code to catch all events:
    ------------start-----------
    #!/tvbin/tivosh

    proc event_callback { type subtype } {
    global EventData
    binary scan $EventData I* idata
    puts "[format "%02d" $type] [format "%02d" $subtype] : $idata"
    }

    for {set x 0} {$x <= 74} {incr x} {
    event register $x event_callback
    }

    set StillWaiting 1
    vwait StillWaiting
    ------------end------------

    found at: http://hacks.oreilly.com/pub/h/585#code

    I created a file: '/usr/events.tcl' and executed with 'tivosh events.tcl'


    Interesting output but I don't yet know what it all means... Maybe someone else does? I tried to hit keys and then wait but it seems like the results are delayed.

    I hit tivo,guide,list

    42 07 : 67252616 2136550736 2136409540 5 1835155918 268823360
    42 18 : 67276248 1 0 1 0 268823360
    42 08 : 67252204 13 0 1 2136409540 268823360
    42 08 : 67252204 14 4 1598613665 2136409540 268823360
    42 08 : 67252204 15 4 15986136
    42 08 : 67252204 16 4 1598613665 2136409540 268823360
    42 19 : 67696932 2 2097150252 268823360 289627 2136550736
    42 19 : 67828004 2 2097150252 268823360 294610 2136550736
    42 11 : 50469520 16980464 16980624 16980464 16980624 268823360
    42 19 : 50522944 1 10826120 268823360 18266048 1
    42 08 : 50474988 13 0 2 2136563760 268823360
    42 08 : 50474988 14 24 1519845413 2136563760 268823360
    42 08 : 50474988 15 10 24195540 2136563760 268823360
    42 19 : 50462720 2 1338 2136563760 2147445032 141239
    42 11 : 67771024 16980464 16980624 16980464 16980624 268823360
    42 19 : 67814447 1 2097150392 268823360 2097150424 0
    42 08 : 67776492 13 0 1 0 268823360
    42 08 : 67776492 14 0 105742762 0 268823360
    42 08 : 67776492 15 0 105742762 0 268823360
    42 08 : 67776492 16 0 105742762 0 268823360
    42 11 : 67639952 16980464 16980624 16980464 16980624 268823360
    42 19 : 67661704 1 0 2136550736 2136410172 6
    42 08 : 67645420 13 0 1 67661704 268823360
    42 08 : 67645420 14 0 2798718 67661704 268823360
    42 08 : 67645420 15 0 2798718 676
    42 08 : 67645420 16 0 2798718 67661704 268823360
    42 11 : 50469520 16980464 16980624 16980464 16980624 268823360


    So what does all this mean?.... I will continue to look at it but please chime in....

  15. #15
    Join Date
    Dec 2003
    Posts
    5
    Has anybody figured out how to make sendkey work (S2 4.01)?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •