Scte65scan

From MythTV Official Wiki
Jump to: navigation, search

Overview

Many cable providers are transitioning away from analog to digital service. For those customers not upgrading to digital TV's, they are providing free digital to analog converters (DTA's). Traditionally, their full featured set top boxes (STB's) received all sorts of information such as encryption keys, guide data, etc via an out of band (OOB) POD interface. This is a special receiver that tunes frequencies outside of the normal TV frequencies. One of the pieces of information that's transmitted is a table that maps station callsigns and virtual channels (the integer channels that the STB's present to the user and are used by TV Guide, Schedules Direct, zap2it, etc) to RFchannel.program number that clearQAM TV's use. For example, Schedules Direct and Comcast may say FOODTV is channel 35 but a clearQAM capable TV plugged directly into the line will report it as 78.4. This would also traditionally require one to use the MythTV channel editor and manually input the frequency and program number for each channel and associate the xmltvid. Since Comcast is handing out DTA's for free, they are severely cost reduced and don't have a POD interface. Instead, they are transmitting the virtual channel table in-band (i.e. tuneable with a conventional clearQAM tuner) to allow the DTA's to do the virtual channel mapping.


Important.png Note: By the end of year 2013, Comcast, one of the major cable companies which have used DTAs and offered Clear QAM basic channels for which using SCTE65SCAN has been advantageous will have finished encrypting all their channels, including the basic channels. Clear QAM tuners on Comcast will no longer be able to receive any content.

Myth Setup Ordering

  1. Within mythtv-setup create the tuner cards and grabbers but don't do the "connections" yet
  2. run scte65scan as described below
  3. fill the database with the results
  4. Go back to mythtv-setup and create the connections and set the starting channel to a valid channel

The scte65scan tool

scte65scan is a utility that will read the in-band virtual channel tables and automate the mapping of frequencies and program numbers to virtual channels and xmltvids.

( this link contains important information about compiling libhdhomerun and scte65scan versions prior to 0.3 for support of the latest Silicondust_HDHomeRun libraries )

Compiling scte65scan

Get a copy of the source code from the project's page and get a copy of libhdhomerun library and extract it inside the scte65scan directory.

 $ tar xzf scte65scan-0.3.tgz
 $ cd scte65scan-0.3
 $ tar xzf libhdhomerun_VERSION.tgz

Build the Executable

And finally build it:

 $ make

Or for the HDHomeRun:

 $ make -f Makefile.hdhr

IRC and HRC cable systems

scte65scan bundles the us-Cable-Standard-center-frequencies-QAM256 frequency table. Some cable systems use channel frequencies that are slightly offset from standard, and this requires a different frequency table known as either IRC or HRC.

You can determine which, if any offset, by experimenting with the HDHR GUI. On the Tuner tab in the selection box before channel number try scans with 'us-cable' (standard), 'us-hrc', or 'us-irc'. Whichever option leads to finding channels is the right option for your system.

You can obtain the other frequency tables from the dvb-apps package, which can be installed on an Ubuntu system like:

 $ sudo aptitude install dvb-utils

You then find the other frequency tables at /usr/share/doc/dvb-utils/examples/scan/atsc.

Using scte65scan

A quick overview of the process is as follows:

  • Find the VCT_ID for your lineup. This can be done by obtaining a DTA or STB and reading it from the diagnostic page. Alternatively, it can also sometimes be found by inspection through an examination of the text-mode output of scte65scan. For example, run:
$ ./scte65scan -H FFFFFFFF,0 us-Cable-Standard-center-frequencies-QAM256

and look in the output for the VCT_ID for your channels (-H is used for the HDHomeRun)

  • Generate SQL for importing into MythTV:
$ scte65scan -f3 -V your_VCT_ID itfile > vct.sql
  • If you seem to be missing channels (e.g. your local broadcast HD), try the -p option to scan the full channel table:
$ scte65scan -H FFFFFFFF -p -f3,9 -V 3092 us-Cable-Standard-center-frequencies-QAM256 > vct.sql
  • Import the SQL into MythTV:
$ mysql mythconverg < vct.sql

The next time it is run, mythfilldatabase will detect the virtual channel number in the 'freqid' and/or 'channum' field of the imported SQL and fill in the xmltvid for you if you are using Schedules Direct. Be sure to enable the channels at Schedules Direct prior to running mythfilldatabase. Alternatively, you can use the following SQL, which will also help by setting the callsigns to the same so that they don't double up in the UI:

 SET @scte_source = <<scte source id>>;
 SET @sd_source   = <<SD source id>>;

 UPDATE channel
 SET    callsign=REPLACE(REPLACE(REPLACE(callsign, ' HD', 'DT'), '-HD', 'DT'), '-DT', 'DT')
 WHERE  sourceid=@scte_source;

 UPDATE  channel AS c1,
         channel AS c2
 SET     c1.channum  = c2.channum,
         c1.xmltvid  = c2.xmltvid,
         c1.name     = c2.name,
         c1.icon     = c2.icon
 WHERE   c1.sourceid = @scte_source
     AND c2.sourceid = @sd_source
     AND c1.callsign = c2.callsign;

 UPDATE channel AS c1,
        channel AS c2
 SET    c1.callsign = c2.callsign,
        c1.xmltvid  = c2.xmltvid,
        c1.name     = c2.name,
        c1.icon     = c2.icon
 WHERE  c1.sourceid = @scte_source
    AND c2.sourceid = @sd_source
    AND c1.channum  = c2.channum;

There are several things that are tricky about this.

  • The SQL that scte65scan generates assumes that it can start the mplexids for the transports can start at 1, which only works if this is the only DVB source in the database. The latest 0.3 version deals with this by multiplying the sourceid by 1000 and adding it to the RF channel number to generate mplexid's much like mythtv generates channel ID's by multiplying the sourceid by 1000 and adding it to the cable channel number. Otherwise you'll get conflicts, so you'll have to manually adjust the mplexid values to an unused range.

Here is an example that worked for an hdhomerun tuner in Santa Clara CA:
./scte65scan -H FFFFFFFF -f3 -V 3058 us-Cable-Standard-center-frequencies-QAM256 > vct.sql
mysql -u mythtv -p mythconverg < vct.sql

And one that worked for a pcHD-5500 tuner in Seattle WA:
./scte65scan -p -V 3025 -f3 us-Cable-Standard-center-frequencies-QAM256 > vct.sql
mysql -u mythtv -p mythconverg < vct.sql

For more information, visit the scte65scan project page

Fixing channel usage results

It's a good idea to use the channel editor either in mythtv-setup or in mythweb to edit the various channels to make them work properly. In particular, if your device has found both analog and digital channels Myth will pick the first channel available which is likely to be the SD version. If you delete the SD versions and leave only the HD versions for the appropriate sourceid then you'll ensure you actually get HD recordings.

scte65scan-0.2.1 may not generate a complete frequency table if any of your channels are broadcast on the same frequency as your VCT data. If you use the -p option to scan for ATSC PSIP data and find that certain channels will not tune, check the PSIP section of your vct.sql file for those channels. If the frequency referenced in the WHERE clauses for those channels doesn't exist in the frequency table section (dtv_multiplex table) you will have to add a record manually by duplicating the last INSERT statement in that section, incrementing the mplexid value for this new record and changing the frequency to match the frequency of your missing channel(s). You will need to re-import your vct.sql file after making this change.

How to determine the VCT_ID using scte65scan

This is probably the easiest way to obtain the VCT_ID using the same tool you'll use later for scanning. Simply run it using something like this:

 ./scte65scan -H FFFFFFFF,0 us-Cable-Standard-center-frequencies-QAM256 > tables.txt

And then the VCT_ID will likely be right above the channels in the output.

The output (with the VCT_ID in green) will look something like:

VCT_ID 3042 (0x0be2) at 243012500hz, version 11
  VC CD.PROG M# NAME
====================
   2   28.9   4 HSN
   3   27.1   4 KCRA    (Econo Basic link)
...

Note that there may be multiple tables that are very similar, with the tables for multiple towns. In some cases, the most obvious differences will be in the local town channels. In some cases, using the wrong table will result in receiving the public access channels for the wrong town; apparently Comcast will send the same signal to multiple towns and configure the cable boxes to use a different table depending on where it is installed.

How to determine VCT_ID using a Full Set Top Box

For those without DTAs, it is still possible to determine the VCT_ID using most set top boxes. This method is tested on Motorola DCH-3200s and DCH-6200s, but should work for other Motorola models as well.

  1. Power on your box.
  2. Press "Power" on the remote to turn off the box. IMMEDIATELY press "OK" on the remote. You should see a long list of menus numbered d01-d18.
  3. Select option d6, "Current Channel Status."
  4. You should see VCT ID listed on this page. It may only be one or two digits, which should correspond to the last one or two digits in the VCT_ID. You can run the scte65scan tool with no options to see the available tables. If the VCT_ID on your set top box is "10" and the scte65scan program shows that one of the VCTs is 3010, then this is your VCT_ID. Take note of both the decimal and hex VCT_ID and enter them in the table below.

How to determine VCT_ID using the Pace DC50X

  1. Make sure the unit is on.
  2. Hold down the INFO button until you see the diagnostics screen.
  3. Press +/- until you see the VCT_ID. This should be the 2nd screen

Here are screenshots and unboxing:

http://picasaweb.google.com/virgegx/ComcastDTAUnboxing#5276142959144255586

Here is the mythtv-user post about scte65scan:

http://www.gossamer-threads.com/lists/mythtv/users/382657?search_string=scte65scan;#382657

Update 10/31/09: Pace DC50X box you get from comcast may no longer have the screens listed in the screen shots above. Step 3 above will be different. Use the channel up or down button to go to the Virtual Channel Map and press enter on the remote, it will give you the channel list, complete with frequencies. (along the top of the screen will give the VCT ID)

VCT_ID by Location

Please post your Zip code, city, and VCT_ID in the table below to allow others without DTAs to determine a probable/possible VCT_ID choice.

Important! All locales will see multiple VCT_IDs, only one of them applies to your locale. That is the point of this table. See the instructions above and only post one VCT_ID: the one for your exact location. Please do not post all the VCT_IDs you see! Rarely, the same ZIP code can overlap locales and have different VCT_IDs. This is why it is essential that you provide all information to distinguish one from the next.

Note: Please put each ZIP code in a new entry. Adding extra ZIP codes to an existing entry breaks sorting of the table. Please do not leave any fields blank. Figuring out the decimal and hex values are explained above.

Note: As requested (long ago), the table now includes a provider column since this article originally mentioned only Comcast and it applies to other providers. It's probably safe to assume all entries are for Comcast unless otherwise posted. Please go back and add the provider for your area.

State City Zip Code VCT_ID (decimal) VCT_ID (hex) Provider
Arkansas Cabot 72023 1000 0x03e8 Suddenlink
California Fremont 94536 3078 0x0c06
California Livermore 94551 3038 0x0bde
California Davis 95616 3042 0x0be2
California Dublin 94568 3038 0x0bde
California Danville 94526 3053 0x0bed Comcast
California Foster City 94404 3082 0x0c0a
California Martinez 94553 3055 0x0bef Comcast
California Fairfield 94534 3087 0x0c0f
California Fairfield 94533 3087 0x0c0f
California Suisun 94585 3087 0x0c0f
California Los Gatos 95032 3010 0x0bc2
California Milpitas 95035 3020 0x0bcc
California San Carlos 94070 3086 0x0c0e
California Woodside 94062 3062 0x0bf6
California Mountain View 94040 3059 0x0bf3
California Mountain View 94041 3059 0x0bf3
California Mountain View 94043 3059 0x0bf3
California Pleasant Hill 94523 3054 0xbee Comcast
California Pleasanton 94566 3038 0x0bde
California San Francisco 94110 3013 0x0bc5
California San Jose 95119 3065 0x0bf9
California San Jose 95124 3001 0x0bb9
California San Jose 95132 3065 0x0bf9
California San Jose 95136 3001 0x0bb9
California San Jose 95139 3010 0x0bc2 Comcast
California San Jose 95136 3065 0x0bf9 Comcast
California Santa Clara 95051 3058 0x0bf2
California Santa Clara 95054 3058 0x0bf2
California Santa Rosa 95405 3003 0x0bbb
California Seaside 93955 3092 0x0c14
California Sunnyvale 94087 3018 0x0bca
California Sunnyvale 94085 3018 0x0bca
California Sunnyvale 94086 3018 0x0bca Comcast
California Union City 94587 3090 0x0c12
California Cupertino 95014 3055 0x0bef
California San Mateo 94403 3081/3029 0x0C09/0xBD5
California El Cerrito 94530 3069 0x0BFD
California Oakland 94618 3072 0x0c00
California Alameda 94502 3080 0x0c08
Colorado Boulder 80303 3031 0x0bd7
Colorado Fort Collins 80525 3105 0x0c21 Comcast
Colorado Greenwood Village 80111 3028 0x0bd4
Colorado Centennial 80112 3023 0x0bcf
Colorado Littleton 80123 3027 0x0bd3
Colorado Wheat Ridge 80215 3088 0x0c10 Comcast
Delaware Newark 19711 3060 0x0bf4
Florida Miramar 33027 3026 0x0BD2
Georgia Alpharetta 30009 3006 0x0bbe Comcast
Georgia Buckhead 30342 3019 0x0bcb
Georgia Dunwoody 30338 3022 0x0bce
Georgia Marietta 30066 3021 0x0bcd
Georgia Tucker 30084 3001 0x0bb9
Illinois Champaign 61820 3012 0x0bc4
Illinois Park Ridge 60068 3015 0x0bc7
Illinois Lisle 60532 3052 0x0bec
Illinois Darien 60561 3040 0x0be0
Illinois Crystal Lake 60014 3003 0x0bbb
Indiana Bloomington 47401 3067 0x0bfb
Indiana Fishers 46037 3072 0x0c00
Indiana Valparaiso 46383 3018 0x0bca
Iowa Iowa City 52245 3110 0x0c26
Maryland Baltimore 21209 3011 0x0bc3
Maryland College Park 20740 3036 0x0bdc
Maryland Jefferson (Frederick) 21755 3006 0x0bbe
Maryland Hanover 21076 3003 0x0bbb
Maryland Silver Spring 20904 3012 0x0bc4
Maryland Timonium 21093 3011 0x0bc3
Maryland Waldorf 20602 3028 0x0bd4
Massachusetts Ashland 01721 3022 0x0bce
Massachusetts Bedford 01730 3002 0x0bba
Massachusetts Bolton 01740 3005 0x0bbd
Massachusetts Wayland 01778 3003 0x0bbb
Massachusetts Lowell 01852 3002 0x0bba
Massachusetts Cambridge 02139 3029 0x0bd5
Massachusetts Cambridge 02140 3029 0x0bd5
Massachusetts Florence 01062 3025 0x0bd1
Massachusetts Haverhill 01835 3004 0x0bbc
Massachusetts Ipswich 01938 3014 0x0bc6
Massachusetts Marlborough 01752 3022 0x0bce
Massachusetts North Andover 01845 3006 0x0bbe
Massachusetts North Attleboro 02760 3017 0x0bc9
Massachusetts Northampton 01060 3025 0x0bd1
Massachusetts Norton 02766 3017 0x0bc9
Massachusetts Norwood 02062 3020 0x0bcc
Michigan Ann Arbor 48104 3023 0x0bcf
Michigan Brighton 48114 3016 0x0bc8
Michigan Grand Rapids 49508 3003 0x0bbb
Michigan Lansing 48917 3018 0x0bca
Michigan Plymouth 48170 3001 0x0bb9
Michigan Algonac 48001 3005 0x0bbd
Minnesota St. Paul 55104 3003 0x0bbb
Minnesota Woodbury 55125 3004 0x0bbc
New Hampshire Concord 03301 3028 0x0bd4
New Hampshire Manchester 03102 3011 0x0bc3
New Hampshire Nashua 03060 3003 0x0bbb
New Jersey Skillman 08558 3001 0x0bb9
Oregon Portland 97212 3011 0x0bc3
Oregon Lake Oswego 97035 3003 0x0bbb
Oregon Tualatin Valley 97006 3003 0x0bbb
Oregon Gresham 97080 3034 0x0bda
Oregon Lebanon 97355 3009 0x0bc1
Oregon Corvallis 97333 3029 0x0bd5
Oregon Oregon City 97045 3006 0x0bbe Comcast
Pennsylvania Holland 19053 3009 0x0BC1
Pennsylvania Norristown 19403 3052 0x0BEC
Tennessee Chattanooga 37416 3028 0x0bd4
Utah Provo 84604 3034 0x0BDA
Utah Riverton 84065 3034 0x0BDA
Washington Auburn 98002 3100 0x0c1c
Washington Bothell 98021 3042 0x0be2
Washington Bothell 98011 3113 0x0c29
Washington Everett 98208 3127 0x0c37
Washington Kirkland 98033 3116 0x0c2c
Washington Redmond 98053 3117 0x0c2d
Washington Seattle 98118 3092 0x0c14
Washington Olympia 98502 3020 0x0bcc
Washington Spokane Valley 99037 3021 0x0bcd