What happened to my CableCard?

For questions regarding Co-ax wiring, and to complain about your cable co.
Post Reply
User avatar
makryger

Posts: 2132
Joined: Sun Jun 05, 2011 2:01 pm
Location: Illinois

HTPC Specs: Show details

What happened to my CableCard?

#1

Post by makryger » Sun Aug 18, 2013 3:41 pm

Randomly this morning, I tried tuning to some 'regular' encrypted channels (CNN, Food, HLN, Fox News), and I started getting a Subscription Required message. Sure enough, the Ceton Diagnostics identified the cablecard as not being authorized. I phoned comcast, ask them to send the cablecard a refresh signal, and everything went back to normal.

This is the first time this has happened to me... why did my cablecard lose its authorization?
My Channel Logos XL: Get your Guide looking good! ~~~~ TunerSalad: Increase the 4-tuner limit in 7MC

LuckyDay

Posts: 586
Joined: Mon Jul 11, 2011 10:42 pm
Location:

HTPC Specs: Show details

#2

Post by LuckyDay » Sun Aug 18, 2013 5:55 pm

Mine did the same thing yesterday and I'm not even on Comcast (with WOW!), was strange.

richard1980

Posts: 2623
Joined: Wed Jun 08, 2011 3:15 am
Location:

HTPC Specs: Show details

#3

Post by richard1980 » Sun Aug 18, 2013 6:31 pm

The CableCARD keeps track of your cable subscription expiration date/time. The cable company pushes updates periodically to update the expiration date/time, and if your CableCARD doesn't receive the update before the subscription expires, it will stop decoding encrypted channels until the subscription expiration date/time is updated. I used to have this problem all the time. At first I thought the cable company wasn't sending the update, but they said they were. I finally determined that my CableCARD wasn't receiving the update because the PC was asleep at the times when the update was being sent. So I wrote a small VBS that runs each day (via Task Scheduler) and checks the CableCARD's conditional access details for the subscription expiration and changes the system sleep timeout if the subscription is due to expire within the next two days.

Don't laugh at my code...I'm not a pro, and I'm sure there was probably an easier way to accomplish this, but this is what I came up with.

Code: Select all

Option Explicit

''''''''''''''''''''''''''''''''''''''''''USER-CONFIGURABLE CONSTANTS''''''''''''''''''''''''''''''''''''''''''

' How long to wait for the infiniTV to fully wake before script execution actually starts (milliseconds).
Const INFINITV_WAKEUP_TIME                 = 300000

' The URL to the CableCARD CA screen.
Const CONDITIONAL_ACCESS_URL               = "http://192.168.200.1/get_cc_url?CableCARD///apps/CaAppP2.html"

' A unique string that precedes the expiration date/time. 
Const START_LABEL                          = "SubExpireTime:</B><BR>"

' The number of characters between the beginning of START_LABEL and the beginning of the expiration date/time.
Const START_LABEL_OFFSET                   = 27

' A unique string that follows the expiration date/time.
Const END_LABEL                            = "EUTUpdateTime"

' The number of characters between the end of the expiration date/time and the beginning of END_LABEL.
Const END_LABEL_OFFSET                     = 8

' Normal sleep timeout in minutes.
Const NORMAL_SLEEP_TIMEOUT                 = 15

' How many days before the subscription expires to stop sleeping.
Const STOP_SLEEPING_DAYS_BEFORE_EXPIRATION = 2

''''''''''''''''''''''''''''''''''''''''END USER-CONFIGURABLE CONSTANTS''''''''''''''''''''''''''''''''''''''''

Dim XMLHTTP
Dim StartPosition
Dim EndPosition
Dim SubscriptionExpiresDateTime
Dim SubscriptionExpiresDate
Dim StopSleepDate
Dim SleepTimeout
Dim WScriptShell

WScript.Sleep(INFINITV_WAKEUP_TIME)
Set XMLHTTP = CreateObject("msxml2.xmlhttp.3.0")
XMLHTTP.Open "GET", CONDITIONAL_ACCESS_URL, False
XMLHTTP.Send

StartPosition               = InStr(XMLHTTP.ResponseText, START_LABEL) + START_LABEL_OFFSET
EndPosition                 = InStr(XMLHTTP.ResponseText, END_LABEL) - END_LABEL_OFFSET
' Parse datetime from HTML
SubscriptionExpiresDateTime = Mid(XMLHTTP.ResponseText, StartPosition, EndPosition - StartPosition)
' Parse date from datetime
SubscriptionExpiresDate     = Mid(SubscriptionExpiresDateTime, 1, InStr(SubscriptionExpiresDateTime, ",") - 1)
StopSleepDate               = DateAdd("d", (STOP_SLEEPING_DAYS_BEFORE_EXPIRATION * -1), SubscriptionExpiresDate)

If StopSleepDate <= Date Then
    SleepTimeout = 0
Else
    SleepTimeout = NORMAL_SLEEP_TIMEOUT
End If

Set WScriptShell = WScript.CreateObject("WScript.Shell")
WScriptShell.Run ("%windir%\System32\powercfg.exe -change -standby-timeout-ac " & SleepTimeout), 0, False
WScriptShell.LogEvent 4, "Cable subscription expires " & SubscriptionExpiresDate & ".  Sleep timeout set to " & SleepTimeout & " minutes."
It would be nice if Ceton would write a WMC add-in to notify users that the subscription has expired (or will expire very soon) so people would immediately know why things aren't working.

Post Reply