1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TiVo UI Control via Telnet - No Hacking Required!

Discussion in 'TiVo Underground' started by Omikron, Apr 30, 2008.

  1. May 2, 2008 #61 of 695
    bicker

    bicker bUU

    10,400
    44
    Nov 9, 2003
    Georgia
    It probably times out waiting for your next command.
     
  2. May 2, 2008 #62 of 695
    MarkStega

    MarkStega New Member

    4
    0
    Mar 13, 2008
    So is everyone seeing this? If so, it seems like the 'proper' use pattern would be to connect, send the command, disconnect.
     
  3. May 2, 2008 #63 of 695
    pzand

    pzand New Member

    53
    0
    Jul 27, 2003
    MarkStega,

    This seems to be a "line-end" issue. Windows clients send <lf><cr> (0x0D,0x0A) at the end of each line. Tivo only sends/reacts to <lf> (0x0D). So when you paste your command, you actually send "SETCH 0840<lf><cr>". Tivo sees the <lf> and executes the SETCH 0840 command. It then sees the <cr> and thinks it's part of a next command. Since there is never a <lf> following it, it eventually times out.

    The fact that is shows as overwriting in the telnet client (telnet/putty/etc) is a display thing. The client is actually seeing the <lf> at the end of the Tivo reply and using it as a <cr>. Yeah, it's messy :)

    Peter
     
  4. May 2, 2008 #64 of 695
    wmcbrine

    wmcbrine Ziphead

    10,398
    36
    Aug 2, 2003
    I don't seem to get COMMAND_TIMEOUT with my remote.py. (I realize the version I posted doesn't display any status codes... this was with a test version.) I found that the TiVo wants a CR (chr(13)) after each command... perhaps telnet is sending a CRLF, and the TiVo interprets the LF as the beginning of a command?

    Edit: I was typing at the same time as Peter. However, he has CR and LF reversed -- CR = 13 (0x0D), LF = 10 (0x0A).
     
  5. May 2, 2008 #65 of 695
    pzand

    pzand New Member

    53
    0
    Jul 27, 2003
    What he said. I have my <cr>'s and <lf>'s mixed up.
     
  6. May 2, 2008 #66 of 695
    MarkStega

    MarkStega New Member

    4
    0
    Mar 13, 2008
    Thanks to both of you -- I even suspected that was the case ands tried to set the CR only option in the Vista TelNet client with the "unset crlf" command, but that didn't help.

    I am writing a device driver for CQC and I can absolutely control each character sent, so I won't have an issue with that.
     
  7. May 2, 2008 #67 of 695
    windracer

    windracer joined the 10k club

    11,598
    4
    Jan 3, 2003
    St. Pete, FL
    Is there a proper exit/quit commands? Using regular Microsoft Telnet, I can't seem to exit out via CTL-C or anything and have to just close the window.
     
  8. May 2, 2008 #68 of 695
    yincrash

    yincrash New Member

    3
    0
    May 1, 2008
    Since I believe it's just a raw TCP connection, the proper way to quit is to disconnect. Either by closing your telnet app or if your app has a disconnect button. I doubt that something like this would need any separate disconnect message to be sent for cleanup purposes or whatever.
     
  9. May 2, 2008 #69 of 695
    BiloxiGeek

    BiloxiGeek Reality Challenged

    503
    0
    Nov 18, 2001
    Gulfport,...
    I'm pretty sure the Windows telnet client will take a Ctrl-] (close square bracket) to disconnect but leave the telnet client running. Then you can use "quit" to get back to the CLI.
     
  10. May 2, 2008 #70 of 695
    morac

    morac Cat God

    9,163
    70
    Mar 14, 2003
    NJ
    This is very cool, but it's also a little unnerving. Especially if you start allowing communication to the TiVo from outside your network. You could end up with drive by forced channel changes if you aren't careful.
     
  11. May 2, 2008 #71 of 695
    bgiannes

    bgiannes New Member

    30
    0
    Oct 26, 2006
    Orange, CA
    so someone could write a program that could, control everything tivo does/records. You could have a program running external to tivo getting lineups info from web, and controling tivo in everyway? season passes, etc etc... Tivo would become a shell?
     
  12. May 2, 2008 #72 of 695
    PaulS

    PaulS Member

    684
    2
    Sep 16, 2002
    Southern NH
    Yup. Essentially, that's what Ashu is asking for above. Let the external computer be the smarts, and make the S3/THD a dumb CableCARD-enabled recorder.

    I would imagine BeyondTV, with the ability to record 6 to 10 different tuners could handle this fairly simply, were they to write up a bit of glue code to do this.
     
  13. May 2, 2008 #73 of 695
    tivoupgrade

    tivoupgrade Sponsor

    2,494
    0
    Sep 27, 2000
    Chicago, IL...
    Actually, that was me. The reason I suggested it be done in JAVA was so that it could work 'cross-platform' without much trouble. I'm sure there would be other ways to do it so it could run inside a browser, but since my coding skills pretty much end in with FORTRAN and shell scripting, I've not kept up on the cross-platform stuff so well.
     
  14. May 2, 2008 #74 of 695
    bicker

    bicker bUU

    10,400
    44
    Nov 9, 2003
    Georgia
    Still, none of this gives us what I would consider the holy grail: The Now Playing List (and the ability to select from it by handle on a specific title), and/or the To Do List (etc.) :(
     
  15. May 2, 2008 #75 of 695
    PaulS

    PaulS Member

    684
    2
    Sep 16, 2002
    Southern NH
    python would work just as well, and keep it platform agnostic.

    Ashu's point was that you could enable co-operative scheduling between TiVo units using this. Have the computer do all of the scheduling and conflict resolution, and just have the TiVo's serve as tuners with storage. BeyondTV came to mind since they nearly already do all of this, except with internal tuners. It wouldn't be much of a stretch to issue a series of telnet commands to start a recording rather than a few driver calls to fiddle with a tuner.
     
  16. May 2, 2008 #76 of 695
    tivoupgrade

    tivoupgrade Sponsor

    2,494
    0
    Sep 27, 2000
    Chicago, IL...
    I like the idea of python; it is definitely enjoying a resurgence.

    I smell a 'bounty' on the horizon; the one we did for the Neuros really didn't turn into anything, but I think that is because it was too complicated. Will give it some thought over the weekend and chime in again here if it makes sense...
     
  17. May 2, 2008 #77 of 695
    pzand

    pzand New Member

    53
    0
    Jul 27, 2003
    Exactly.
     
  18. May 2, 2008 #78 of 695
    reneg

    reneg Member

    711
    3
    Jun 19, 2002
    Though I haven't played with ircode record yet, it seems problematic to me. I don't see an ircode to stop. If record is dependant upon the guide data in the Tivo, then there will be problems. What happens when you pass the Tivo a record ircode? Does it record the channel you are on for the duration of the program according to the guide data within the Tivo? If so, then trying to coordinate recording from a PC with odd start times for shows and padding just doesn't seem feasible from the outside from what I've seen so far. It would seem that the Tivo and PC guide data would have to be in sync.
     
  19. May 2, 2008 #79 of 695
    PaulS

    PaulS Member

    684
    2
    Sep 16, 2002
    Southern NH
    Sounds very likely. You'd have to start playing games with recording back-to-back shows to effect padding, and using "FORCECH" to effect a stop function. Messy stuff.

    Additionally, you'd have to worry about clock skew between the PC and the TiVo. If the IRCODE RECORD only records the current show on the current channel, what happens if the PC issues the command a minute too early ? You end up recording the wrong program.
     
  20. May 2, 2008 #80 of 695
    bgiannes

    bgiannes New Member

    30
    0
    Oct 26, 2006
    Orange, CA
    could a prgram like vlcplayer be used to steam the on-screen display, to a remote location that has this remote control program? this would make tivo into a sling-box?
     

Share This Page