Results 1 to 6 of 6

Thread: TVHeadend 4.2 with NA-EIT

  1. #1
    Join Date
    Feb 2015
    Posts
    15
    Satfix Buxs
    42,038
    Thanks
    0
    Thanked 18x in 9 Posts

    Default TVHeadend 4.2 with NA-EIT

    This thread is for the purpose of testing your DVB adapters. I take no responsibility for any damage you do to your computer or any additional hardware you may be using. I also assume that you have some basic Ubuntu / Debian knowledge, and that you hardware is functioning correctly. For simplicity, I will assume that you are using a CLEAN Ubuntu 16.04 x64 or greater install. Currently, I have not created any 32 bit / ARM packages.

    On a side-note: I have tested and run this DEB from an LXC container for over a year now. You just need to enable passthrough unix-char devices, and point to each device in /dev/dvb/adapter0/xxx0. If you don't know what LXC/LXD/containers are, then ignore this paragraph.

    UPDATES
    1. I added support for the SW42, but it still requires testing from the community


    KNOWN ISSUES
    1. Only the Legacy SW21 is supported. If anyone owns a SW42/SW44 and wants to test, please PM me.
    2. Only 91 EPG works. The current workaround is to map similar tv channels from 91 to 82 to have guide on HD channels.
    3. Some EPG information such as the original episode air date, and episode title show up in the description, rather than the corresponding field.


    INSTALLATION
    Code:
    # Refresh the package repos
    sudo apt update
    # There are several dependencies required.  Install these from official repos.
    # This packaged version requires libdvbcsa because it has it's own CSA client.
    sudo apt install libavahi-client3 liburiparser1 dvb-apps libdvbcsa1
    # Install the file attached to this message.
    unzip tvheadend_4.2.6-5_amd64.zip
    sudo dpkg -i tvheadend_4.2.6-5_amd64.deb

    INITIAL CONFIGURATION
    1. Log in to your server via http://x.x.x.x:9981/ If you don't know your IP, type ifconfig from the command line to figure it out.
    2. Click the Configuration tab, then DVB Inputs, then Networks. Click the Add button to create your network (ie: 91/82). I change the Character set so to ISO-8859-1 so the EPG shows french characters correctly. Make sure "User service IDs as channel numbers" is checked. (If you don't see it, you may have to change the View level to Expert at the bottom of the window). Repeat this step for each other satellite you plan on adding.
    3. Click the TV Addapters tab. Highlight your device on the left, so you see Basic Settings on the right. Make sure to change your Satellite config to Advanced (non-universal LNBs, rotors, etc.)
    4. Click Advanced (non-universal LNBs, rotors, etc.) on the left side. On the right, update Orbital Positions to match the number of LNBs and networks you are using. Click the Save button at the bottom. You should now have new entries on the left for Position #1, Position #2, etc..
    5. Click Position #1 on the left. On the right, click Enabled, and choose the correct network you created in step 2. Update your LNB and switch type as necessary.
    6. If you are using a switch, select them under each Position on the left side, and update them on the right. For legacy switches, each port starts at zero, and you need to change the Uncommitted value. So if 91 is in port 1, choose Uncommitted = 0. Repeat for each other position you configured in step 5.
    7. Click the Muxes tab, and click the Add button. Choose your network that you configured in step 1. If necessary, use Lyngsat to find the details. (Don't add them all.... just start with the first transponder, ie: (12224000 Khz, 20000000 Sym/s, Right Polarization, QPSK modulation, FEC 7/8). Some cards require that you specify these details, ie: auto modulation and auto FEC might not work with Genpix skywalker-1. Repeat this step for any additional networks you want to add.
    8. Click the Networks tab, and highlight each item and click Force Scan.
    9. Click the Muxes tab. Once everything is done scanning you should have 32 transponders for each network source.
    10. At this point, you can click the Service tab, and click the Map Services button, and choose map all services from the dropdown that appeared. The only items I check off are "Map encrypted services", and "Create type-based tags". Click the Map services button.


    ADVANCED CONFIGURATION
    1. Under the Configuration tab, find CAs. Click the Add button. From the dropdown box, choose "Code Word Client (newcamd)". Click Enabled. Sorry, at this point I will not specify any additional details here, or endorse any particular vendors. This part you have to figure out on your own.
    2. By disabling EPG scanning on transponders that don't support it, you can improve scan times and data. 91/82 only use transponder #1 for both networks. Under the Muxes tab, change each transponder's EPG scan column so it says "Disabled", and choose Only Bell, or Only Dish for transponder #1.
    3. Click the Channels / EPG tab, then click the EPG Grabber Modules tab. If you don't see it, you may have to change your View Mode to Expert on the Configuration->General tab.
    4. I disable every module except for the Over-the-air: NA Bell, or NA Dish.
    5. If you use RPi's to watch TV, you can keep the CPU and network load down by using channel tags. Instead of loading every channel, and the EPG behind them, I keep groups for Favorites. Click the Channel / EPG tab, then the Channel Tags tab. Add whatever group you would like to see. Once done, click the Channels tab, and find any channels you want to add. You click the Tags column and type your new name, then click the checkbox. This takes a while and it's tedious, but it pays off when you don't have to page through 1500+ channels to find the 50-60 channels you regularly watch.


    WORKAROUNDS
    1. next step is associating 91EPG channels to their counterparts on 82. This is a known issue, but we can get around it for the time being. (TVHeadend wrote part of the EPG scan to prevent networks from overwriting other networks EPGs. Unfortunately, this is exactly what NA dishes do between 91/82). I hope to have this resolved soon, but in the meantime, here's the fix.
    2. Click Configuration->Channel / EPG->Channels tabs. Find the HD channels that match up with an SD channel from 91 in the "Reuse EPG from" column. ie: MUCHH is the same as MUCH. CW11H is the same as WPIX. A&EHD = A&E, and so on...
    3. Again, this is unfortunate, but it is better than not having a 9 day guide.
    Attached Files Attached Files
    Last edited by giggle_goose; 03-28-2019 at 06:11 PM. Reason: Updated instructions

  2. The Following 3 Users Say Thank You to giggle_goose For This Useful Post:


  3. #2
    Join Date
    Dec 2018
    Posts
    28
    Satfix Buxs
    50
    Thanks
    3
    Thanked 3x in 3 Posts

    Default

    no dice, got your build up but nothing scanning

  4. #3
    Join Date
    Feb 2015
    Posts
    15
    Satfix Buxs
    42,038
    Thanks
    0
    Thanked 18x in 9 Posts

    Default

    Try using the Legacy SW42 option, and see if that helps.
    If it doesn't, please let me know if you can scan vertical/rights transponders, or horizontal/left transponders.

    I don't have access to the same type of LNBs you are using and I can't test it from here, but I found a post saying that those types of LNBs have a built in SW42.

    If BandStacked LNB type does not work, try using the plain old DBS LNB type.
    Last edited by giggle_goose; 03-25-2019 at 05:23 PM. Reason: I added SW42 support.

  5. #4
    Join Date
    Dec 2018
    Posts
    28
    Satfix Buxs
    50
    Thanks
    3
    Thanked 3x in 3 Posts

    Default

    Tried this word for word.. still nothing.. sent you some logs. Hopefully the logs worked

  6. #5
    Join Date
    Feb 2015
    Posts
    15
    Satfix Buxs
    42,038
    Thanks
    0
    Thanked 18x in 9 Posts

    Default

    It might be a little late to reply, but another user on this forum tested the DPP LNBs and said:

    Originally Posted by th3magpi3
    Again, sorry to spam, but I got everything figured out with the DPP hardware using it's built in switch. No need for legacy equipment or switches. Fully tested using the bell version of the Dish 500+ using a DPP Twin LNB setup.

    I can let you know how it's done if you're interested?

    Now let's work on upgrading your build to parse the proper EPG data and we're golden Got that github link? I want to see what you did in terms of epg fetching. Wondering if the newest build has that old issue of the EPG overwrite patched and if we can add your NA-EPG grab to the new version if it's patched.

    Amazing what 6 hours of pulling your hair learning a new system can do

  7. #6
    Join Date
    Feb 2015
    Posts
    15
    Satfix Buxs
    42,038
    Thanks
    0
    Thanked 18x in 9 Posts

    Default

    I am going to post a few of my diff files, so anyone call pull tvheadend 4.2.x from github and apply some patches.

    src/epggrab/module/eit.c is the file that needs a few tweaks to improve the EPG data. Currently, all the details are in a single string. It only needs a delimiter to separate the episode, air date, and series name. Genre is already figured out, so it can simply be removed from the description.
    The same file needs a little work around line 650 to include multiple dishes.

    If anyone is willing to contribute, go ahead and reply to this thread so we can improve the existing packages.


    src/config.c
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/config.c
    +++ b/src/config.c
    @@ -611,6 +611,8 @@
           htsmsg_add_u32(m, "opentv-skyuk", 1);
           htsmsg_add_u32(m, "opentv-skyit", 1);
           htsmsg_add_u32(m, "opentv-ausat", 1);
    +      htsmsg_add_u32(m, "na_dish", 1);
    +      htsmsg_add_u32(m, "na_bell", 1);
         }
     
         hts_settings_save(c, "epggrab/config");
    src/epggrab/module/eit.c
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/epggrab/module/eit.c
    +++ b/src/epggrab/module/eit.c
    @@ -313,6 +313,37 @@
     static int _eit_desc_content
       ( epggrab_module_t *mod, const uint8_t *ptr, int len, eit_event_t *ev )
     {
    +  // Disnetwork / Bell Expressvu
    +  const unsigned char *data = ptr;
    +  if ( !ev->genre && data[0] >= 0xF0 && data[0] <= 0xF8 )
    +  {
    +     ev->genre = calloc(1, sizeof(epg_genre_list_t));
    +     if ( data[0] == 0xF0 ) epg_genre_list_add_by_eit(ev->genre, 0xA0);  // Paid programming
    +     if ( data[0] == 0xF1 ) epg_genre_list_add_by_eit(ev->genre, 0x10);  // Movies
    +     if ( data[0] == 0xF2 ) epg_genre_list_add_by_eit(ev->genre, 0x40);  // Sports
    +     if ( data[0] == 0xF3 ) epg_genre_list_add_by_eit(ev->genre, 0x20);  // News
    +     if ( data[0] == 0xF4 ) epg_genre_list_add_by_eit(ev->genre, 0x50);  // Children
    +     if ( data[0] == 0xF5 ) epg_genre_list_add_by_eit(ev->genre, 0x90);  // Education
    +     if ( data[0] == 0xF6 ) epg_genre_list_add_by_eit(ev->genre, 0x30);  // Series
    +     if ( data[0] == 0xF7 ) epg_genre_list_add_by_eit(ev->genre, 0x60);  // Music
    +     if ( data[0] == 0xF8 ) epg_genre_list_add_by_eit(ev->genre, 0x70);  // Religous
    +
    +     // This allows us to split a string by a delimter
    +     // https://stackoverflow.com/questions/14265581/parse-split-a-string-in-c-using-string-delimiter-standard-c
    +     //
    +     // Dishnetwork descriptors
    +     // https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/eitfixup.cpp
    +     //
    +     // Dishdescriptors.h
    +     // https://code.mythtv.org/doxygen/eitfixup_8cpp_source.html#l00431
    +     // https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/mpeg/dishdescriptors.cpp
    +     // https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/mpeg/dishdescriptors.h
    +     
    +     
    +     
    +     return 0;
    +  }
    +      
       while (len > 1) {
         if (*ptr == 0xb1)
           ev->bw = 1;
    @@ -490,11 +521,15 @@
             r = _eit_desc_component(mod, ptr, dlen, &ev);
             break;
           case DVB_DESC_PARENTAL_RAT:
    +      case DVB_DESC_DISHNET_MPAA:
             r = _eit_desc_parental(mod, ptr, dlen, &ev);
             break;
           case DVB_DESC_CRID:
             r = _eit_desc_crid(mod, ptr, dlen, &ev, svc);
             break;
    +      //case DVB_DESC_DISHNET_PROGID:
    +      //  r = _eit_dishnet_desc_crid(mod, ptr, dlen, &ev, svc);
    +      //  break;
           default:
             r = 0;
             _eit_dtag_dump(mod, dtag, dlen, ptr);
    @@ -649,7 +684,7 @@
       }
     
       /* Validate */
    -  if(tableid < 0x4e || tableid > 0x6f || len < 11) {
    +  if((tableid < 0x4e || tableid > 0x6f || len < 11) && (tableid < 0x81 || tableid > 0xa4 || len < 11)) {
         if (ths)
           atomic_add(&ths->ths_total_err, 1);
         return -1;
    @@ -887,6 +922,8 @@
       EIT_OPS(ops_nz_freeview, 0, EIT_CONV_HUFFMAN, EIT_SPEC_NZ_FREEVIEW);
       EIT_OPS(ops_baltic, 0x39, 0, 0);
       EIT_OPS(ops_bulsat, 0x12b, 0, 0);
    +  EIT_OPS(ops_na_dish, 0x300, EIT_CONV_HUFFMAN, 0);
    +  EIT_OPS(ops_na_bell, 0x441, EIT_CONV_HUFFMAN, 0);
     
       EIT_CREATE("eit", "EIT: DVB Grabber", 1, &ops);
       EIT_CREATE("uk_freesat", "UK: Freesat", 5, &ops_uk_freesat);
    @@ -894,6 +931,8 @@
       EIT_CREATE("nz_freeview", "New Zealand: Freeview", 5, &ops_nz_freeview);
       EIT_CREATE("viasat_baltic", "VIASAT: Baltic", 5, &ops_baltic);
       EIT_CREATE("Bulsatcom_39E", "Bulsatcom: Bula 39E", 5, &ops_bulsat);
    +  EIT_CREATE("na_dish", "NA Dish", 5, &ops_na_dish);
    +  EIT_CREATE("na_bell", "NA Bell", 5, &ops_na_bell);
     }
     
     void eit_done ( void )
    src/epggrab/otamux.c
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/epggrab/otamux.c
    +++ b/src/epggrab/otamux.c
    @@ -496,6 +496,8 @@
         [MM_EPG_ONLY_OPENTV_SKY_UK]      = "opentv-skyuk",
         [MM_EPG_ONLY_OPENTV_SKY_ITALIA]  = "opentv-skyit",
         [MM_EPG_ONLY_OPENTV_SKY_AUSAT]   = "opentv-ausat",
    +    [MM_EPG_ONLY_DISHNET_DISH]       = "na_dish",
    +    [MM_EPG_ONLY_DISHNET_BELL]       = "na_bell",
       };
     
       lock_assert(&global_lock);
    src/epggrab/support/freesat_huffman.c
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/epggrab/support/freesat_huffman.c
    +++ b/src/epggrab/support/freesat_huffman.c
    @@ -5777,7 +5777,7 @@
     	unsigned short kk;
     	unsigned int b;
     
    -  if (src[0] != 0x1f) return -1;
    +  if (src[0] != 0x1f && src[0] != 0xff) return -1;
     
     	p = 0;
     	if (src[1] == 1 || src[1] == 2) {
    src/input/mpegts.h
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/input/mpegts.h
    +++ b/src/input/mpegts.h
    @@ -400,6 +400,8 @@
       MM_EPG_ONLY_OPENTV_SKY_AUSAT,
       MM_EPG_ONLY_BULSATCOM_39E,
       MM_EPG_ONLY_PSIP,
    +  MM_EPG_ONLY_DISHNET_DISH,
    +  MM_EPG_ONLY_DISHNET_BELL,
     };
     #define MM_EPG_LAST MM_EPG_ONLY_PSIP
    src/input/mpegts/dvb.h
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/input/mpegts/dvb.h
    +++ b/src/input/mpegts/dvb.h
    @@ -188,6 +188,9 @@
     #define ATSC_DESC_GENRE               0xAB
     #define ATSC_DESC_PRIVATE_INFO        0xAD
     
    +#define DVB_DESC_DISHNET_MPAA         0x89      // Stars and MPAA ratings
    +#define DVB_DESC_DISHNET_PROGID       0x96      // Series ID, Program ID, and Original air date
    +
     /* Service type lookup */
     
     int dvb_servicetype_lookup ( int t );
    src/input/mpegts/dvb_support.c
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/input/mpegts/dvb_support.c
    +++ b/src/input/mpegts/dvb_support.c
    @@ -266,7 +266,7 @@
     
       /* Check custom conversion */
       while (conv && conv->func) {
    -    if (conv->type == src[0])
    +    if ((conv->type == src[0]) || (conv->type == 0xff ))
           return conv->func(dst, &dstlen, src, srclen);
         conv++;
       }
    @@ -382,7 +382,7 @@
     {
       int l = buf[0];
     
    -  if(l + 1 > buflen)
    +  if(l + 1 > buflen && conv->type != 0xff)
         return -1;
     
       if(dvb_get_string(dst, dstlen, buf + 1, l, dvb_charset, conv))
    src/input/mpegts/linuxdvb/linuxdvb_switch.c
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/input/mpegts/linuxdvb/linuxdvb_switch.c
    +++ b/src/input/mpegts/linuxdvb/linuxdvb_switch.c
    @@ -174,9 +174,47 @@
         linuxdvb_satconf_ele_t *sc, int vol, int pol, int band, int freq )
     {
       int i, com, r1 = 0, r2 = 0, slp;
    +  unsigned char cmd = 0;
       int fd = linuxdvb_satconf_fe_fd(lsp);
       linuxdvb_switch_t *ls = (linuxdvb_switch_t*)ld;
     
    +  if (!strcmp(ld->ld_type ?: "", "Legacy SW21")) {
    +      if ( ls->ls_uncommitted % 2 == 0 )
    +          cmd = 0x34;
    +      else
    +          cmd = 0x65;
    +      
    +      if ( pol == 1 )
    +          cmd |= 0x80;
    +      
    +      if (ioctl(fd, FE_DISHNETWORK_SEND_LEGACY_CMD, cmd)){
    +          tvherror(LS_DISEQC, "failed to issue legacy switch command (e=%s)", strerror(errno));
    +          return -1;
    +      }
    +      
    +      /* sleep for 240 milliseconds */
    +      usleep(240 * 1000);
    +      
    +      return 0;
    +  }
    +  
    +  if (!strcmp(ld->ld_type ?: "", "Legacy SW42")) {
    +      if ( ls->ls_uncommitted % 2 == 0 )
    +          cmd = 0x46;
    +      else
    +          cmd = 0x17;
    +      
    +      if (ioctl(fd, FE_DISHNETWORK_SEND_LEGACY_CMD, cmd)){
    +          tvherror(LS_DISEQC, "failed to issue legacy switch command (e=%s)", strerror(errno));
    +          return -1;
    +      }
    +      
    +      /* sleep for 240 milliseconds */
    +      usleep(240 * 1000);
    +      
    +      return 0;
    +  }
    +  
       if (lsp->ls_diseqc_full || lsp->ls_last_switch != sc ||
           (ls->ls_committed >= 0 &&
             (pol + 1 != lsp->ls_last_switch_pol ||
    @@ -261,6 +299,8 @@
       htsmsg_t *m = htsmsg_create_list();
       htsmsg_add_msg(m, NULL, htsmsg_create_key_val("", tvh_gettext_lang(lang, N_("None"))));
       htsmsg_add_msg(m, NULL, htsmsg_create_key_val("Generic", tvh_gettext_lang(lang, N_("Generic"))));
    +  htsmsg_add_msg(m, NULL, htsmsg_create_key_val("Legacy SW21", tvh_gettext_lang(lang, N_("Legacy SW21"))));
    +  htsmsg_add_msg(m, NULL, htsmsg_create_key_val("Legacy SW42", tvh_gettext_lang(lang, N_("Legacy SW42"))));
       return m;
     }
     
    @@ -269,8 +309,8 @@
       ( const char *name, htsmsg_t *conf, linuxdvb_satconf_ele_t *ls, int c, int u )
     {
       linuxdvb_switch_t *ld = NULL;
    -  if (!strcmp(name ?: "", "Generic")) {
    -    ld = (linuxdvb_switch_t*)linuxdvb_diseqc_create(linuxdvb_switch, NULL, conf, "Generic", ls);
    +  if (!strcmp(name ?: "", "Generic") || !strcmp(name ?: "", "Legacy SW21") || !strcmp(name ?: "", "Legacy SW42")) {
    +    ld = (linuxdvb_switch_t*)linuxdvb_diseqc_create(linuxdvb_switch, NULL, conf, name, ls);
         if (ld) {
           ld->ld_tune = linuxdvb_switch_tune;
           if (!conf) {
    src/input/mpegts/mpegts_mux.c
    Code:
    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- a/src/input/mpegts/mpegts_mux.c
    +++ b/src/input/mpegts/mpegts_mux.c
    @@ -490,6 +490,8 @@
         { N_("Only OpenTV Sky UK"),       MM_EPG_ONLY_OPENTV_SKY_UK },
         { N_("Only OpenTV Sky Italia"),   MM_EPG_ONLY_OPENTV_SKY_ITALIA },
         { N_("Only OpenTV Sky Ausat"),    MM_EPG_ONLY_OPENTV_SKY_AUSAT },
    +    { N_("Only Dish Network"),        MM_EPG_ONLY_DISHNET_DISH },
    +    { N_("Only Bell Expressvu"),      MM_EPG_ONLY_DISHNET_BELL },
       };
       return strtab2htsmsg(tab, 1, lang);
     }

Posting Permissions

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