Compare commits

...

42 Commits

Author SHA1 Message Date
none 6c9903354f new version number 2021-01-18 16:24:58 +01:00
none 8fbd89134e use debugging instead of printf 2021-01-18 16:24:39 +01:00
none 956de108f0 do not dump igmp message 2021-01-18 16:23:44 +01:00
none 7af94f8977 more fe type info 2021-01-18 16:23:22 +01:00
none 0deac27bb5 separate Ci debugging 2021-01-18 16:22:49 +01:00
none 327813aacc add original fe type 2021-01-18 16:22:33 +01:00
none 97c1190b54 remember original fe_type 2021-01-18 16:22:10 +01:00
none d84a8b3b37 do not inc mod type 2021-01-18 16:21:27 +01:00
none 98123f5614 split include directories 2021-01-18 16:20:12 +01:00
rjkm 6572dd4449 add CI debugging 2021-01-18 16:18:35 +01:00
rjkm 105792f885 add set_entry function 2021-01-18 16:18:06 +01:00
rjkm 35aedfcc4c add ddupdate 2021-01-18 16:11:18 +01:00
rjkm b4c1b2f81b 0x7a is corrct 2021-01-18 16:07:39 +01:00
none 1640f9d761 flash new recovery image 2020-04-27 21:36:10 +02:00
none df66554616 show idle tuner as "IDLE" instead of nothing 2020-04-27 21:35:13 +02:00
mvoelkel 80e076c89a deselect unsupported delivery systems (aka no checkbox) 2019-11-08 20:27:52 +01:00
mvoelkel 0cf34dc35b fixed selection issues with ISDB-C/J83.B 2019-11-08 19:09:02 +01:00
mvoelkel 9bc21fbfa1 Added delivery system selection to system settings 2019-11-08 15:28:02 +01:00
mvoelkel bb663f14c9 added DVB-T/T2 scan, (NIT scan not supported) 2019-08-11 00:53:25 +02:00
mvoelkel 4cbf48e276 added DVB-T/T2 scan, (NIT scan not supported) 2019-08-11 00:44:37 +02:00
mvoelkel 4f252ccb48 character code tables 0..11 added, (ISO/IEC 8859-5..15) 2019-08-10 23:46:02 +02:00
Ralph Metzler 5e9b9f9689 updated transponder and SCIF lists
new version number
2019-07-29 21:59:47 +02:00
mvoelkel 82c51267bd SCIF settings page extended for 12 Tuner 2019-07-29 17:19:08 +02:00
Ralph Metzler f1e6470651 add 64/128/256apsk 2018-10-18 18:05:16 +02:00
Ralph Metzler fff388c93c calculate correct offset for other bands 2018-10-16 21:17:41 +02:00
Ralph Metzler 044d4edd35 increase version number 2018-10-08 11:09:48 +02:00
Ralph Metzler 28c38fbbda add support for more delivery systems 2018-09-28 00:29:55 +02:00
Ralph Metzler e510064ea6 change KD to Vodafone 2018-09-28 00:29:19 +02:00
Ralph Metzler 88eeba0e5a new banner and release version 2018-09-26 13:21:50 +02:00
Ralph Metzler 24bd27a087 simplify parameter handling (like nodvbt) and add support for changing the announcement order of supported delivery systems 2018-09-26 13:20:49 +02:00
Ralph Metzler 27f864b577 set modulation type if parameter given by client 2018-09-26 13:17:04 +02:00
Ralph Metzler ca2e8601c9 add fancontrol for MaxSX8 and other temp devices 2018-09-26 13:05:45 +02:00
Ralph Metzler dbb3354015 add MaxSX8 2018-09-26 13:03:15 +02:00
Ralph Metzler f354108564 update licenses message 2018-03-14 10:09:30 +01:00
Ralph Metzler e85ca1478b do not allow any .. in requested file name 2018-03-14 10:08:37 +01:00
Ralph Metzler 7b9c4f9ee8 add missing close of file handle 2018-03-14 10:08:00 +01:00
Ralph Metzler d6013245e4 add x_ssi which acts the same as x_pls 2018-03-05 16:57:37 +01:00
Ralph Metzler 05908c38aa change DTV_PLS to official DTV_SCRAMBLING_SEQUENCE_INDEX 2018-03-05 16:57:14 +01:00
Ralph Metzler 3d23ae1f73 allow to explicitely set FEC 2017-12-07 23:24:51 +01:00
Ralph Metzler b843029972 increase lock time for low symbolrate transponders 2017-12-07 23:23:51 +01:00
Ralph Metzler a298ecfb0b fix linux config 2017-12-07 23:23:11 +01:00
Ralph Metzler 008a209990 adapt build to new dddvb versions 2017-12-07 23:21:14 +01:00
25 changed files with 41407 additions and 7864 deletions

View File

@ -6,7 +6,7 @@ On Debian/Ubuntu (as root or using sudo):
``` ```
>apt-get install build-essential bison flex gettext libncurses5-dev texinfo autoconf automake libtool >apt-get install build-essential bison flex gettext libncurses5-dev texinfo autoconf automake libtool
>apt-get install libpng12-dev libglib2.0-dev libgtk2.0-dev gperf libxt-dev libxp-dev >apt-get install libpng12-dev libglib2.0-dev libgtk2.0-dev gperf
>apt-get install rsync git subversion mercurial >apt-get install rsync git subversion mercurial
``` ```

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
case "$1" in case "$1" in
start) start)
/etc/recflash
/usr/bin/ddflash /usr/bin/ddflash
;; ;;
esac esac

View File

@ -13,6 +13,7 @@ define OCTONET_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/octokey $(TARGET_DIR)/usr/bin/octokey $(INSTALL) -m 0755 -D $(@D)/octokey $(TARGET_DIR)/usr/bin/octokey
$(INSTALL) -m 0755 -D $(@D)/octonet $(TARGET_DIR)/usr/bin/octonet $(INSTALL) -m 0755 -D $(@D)/octonet $(TARGET_DIR)/usr/bin/octonet
$(INSTALL) -m 0755 -D $(@D)/ddtest $(TARGET_DIR)/usr/bin/ddtest $(INSTALL) -m 0755 -D $(@D)/ddtest $(TARGET_DIR)/usr/bin/ddtest
$(INSTALL) -m 0755 -D $(@D)/ddupdate $(TARGET_DIR)/usr/bin/ddupdate
endef endef
$(eval $(generic-package)) $(eval $(generic-package))

10
mk
View File

@ -13,9 +13,17 @@ LINUX=../linux.octonet
#fi #fi
cp $DDDVB/ddbridge/*.[ch] $LINUX/drivers/media/pci/ddbridge/ cp $DDDVB/ddbridge/*.[ch] $LINUX/drivers/media/pci/ddbridge/
cp $DDDVB/dvb-core/*.[ch] $LINUX/drivers/media/dvb-core/ cp $DDDVB/ddbridge/Kconfig $LINUX/drivers/media/pci/ddbridge/
cp $DDDVB/ddbridge/Makefile.kernel $LINUX/drivers/media/pci/ddbridge/Makefile
cp $DDDVB/dvb-core/*.c $LINUX/drivers/media/dvb-core/
cp $DDDVB/dvb-core/Kconfig $LINUX/drivers/media/dvb-core/
mkdir $LINUX/drivers/media/dvb-core/media/
cp $DDDVB/include/linux/media/*.h $LINUX/drivers/media/dvb-core/media/
cp $DDDVB/dvb-core/Makefile.kernel $LINUX/drivers/media/dvb-core/Makefile
cp $DDDVB/include/linux/dvb/*.h $LINUX/include/uapi/linux/dvb/ cp $DDDVB/include/linux/dvb/*.h $LINUX/include/uapi/linux/dvb/
cp $DDDVB/frontends/Kconfig $LINUX/drivers/media/dvb-frontends/
cp $DDDVB/frontends/Makefile.kernel $LINUX/drivers/media/dvb-frontends/Makefile
cp $DDDVB/frontends/drxk*.[ch] $LINUX/drivers/media/dvb-frontends/ cp $DDDVB/frontends/drxk*.[ch] $LINUX/drivers/media/dvb-frontends/
cp $DDDVB/frontends/lnb*.[ch] $LINUX/drivers/media/dvb-frontends/ cp $DDDVB/frontends/lnb*.[ch] $LINUX/drivers/media/dvb-frontends/
cp $DDDVB/frontends/stv0367dd*.[ch] $LINUX/drivers/media/dvb-frontends/ cp $DDDVB/frontends/stv0367dd*.[ch] $LINUX/drivers/media/dvb-frontends/

View File

@ -73,10 +73,10 @@ static int eit_shortsize = 0;
static int eit_extsize = 0; static int eit_extsize = 0;
static int eit_events_deleted = 0; static int eit_events_deleted = 0;
char *pol2str[] = {"v", "h", "r", "l"}; char *pol2str[] = {"v", "h", "r", "l", NULL};
char *msys2str [] = {"undef", "dvbc", "dvbcb", "dvbt", "dss", "dvbs", "dvbs2", "dvbh", char *msys2str [] = {"undef", "dvbc", "dvbcb", "dvbt", "dss", "dvbs", "dvbs2", "dvbh",
"isdbt", "isdbs", "isdbc", "atsc", "atscmh", "dtmb", "cmmb", "dab", "isdbt", "isdbs", "isdbc", "atsc", "atscmh", "dtmb", "cmmb", "dab",
"dvbt2", "turbo", "dvbcc", "dvbc2"}; "dvbt2", "turbo", "dvbcc", "dvbc2", NULL};
char *mtype2str [] = {"qpsk", "16qam", "32qam", char *mtype2str [] = {"qpsk", "16qam", "32qam",
"64qam", "128qam", "256qam", "64qam", "128qam", "256qam",
"autoqam", "8vsb", "16vsb", "8psk", "autoqam", "8vsb", "16vsb", "8psk",
@ -985,7 +985,8 @@ static int pmt_cb(struct sfilter *sf)
s->ttx = epid; s->ttx = epid;
else if (hasdesc(0x59, buf + c + 5, eslen)) else if (hasdesc(0x59, buf + c + 5, eslen))
s->sub = epid; s->sub = epid;
else if (hasdesc(0x6a, buf + c + 5, eslen)) { else if (hasdesc(0x6a, buf + c + 5, eslen) ||
hasdesc(0x7a, buf + c + 5, eslen)) {
if (s->anum < MAX_ANUM) if (s->anum < MAX_ANUM)
s->apid[s->anum++] = epid; s->apid[s->anum++] = epid;
} }
@ -1124,74 +1125,237 @@ static int pat_cb(struct sfilter *sf)
return 0; return 0;
} }
#define UTF8_CC_START 0xc2 #define CHARACTER_RESERVED_80 0x80
#define SB_CC_RESERVED_80 0x80 #define CHARACTER_RESERVED_81 0x81
#define SB_CC_RESERVED_81 0x81 #define CHARACTER_RESERVED_82 0x82
#define SB_CC_RESERVED_82 0x82 #define CHARACTER_RESERVED_83 0x83
#define SB_CC_RESERVED_83 0x83 #define CHARACTER_RESERVED_84 0x84
#define SB_CC_RESERVED_84 0x84 #define CHARACTER_RESERVED_85 0x85
#define SB_CC_RESERVED_85 0x85
#define CHARACTER_EMPHASIS_ON 0x86 #define CHARACTER_EMPHASIS_ON 0x86
#define CHARACTER_EMPHASIS_OFF 0x87 #define CHARACTER_EMPHASIS_OFF 0x87
#define SB_CC_RESERVED_88 0x88 #define CHARACTER_RESERVED_88 0x88
#define SB_CC_RESERVED_89 0x89 #define CHARACTER_RESERVED_89 0x89
#define CHARACTER_CR_LF 0x8a #define CHARACTER_CR_LF 0x8A
#define SB_CC_USER_8B 0x8b #define CHARACTER_USER_8B 0x8B
#define SB_CC_USER_9F 0x9f #define CHARACTER_USER_9F 0x9F
void en300468_parse_string_to_utf8(char *dest, uint8_t *src, uint16_t codetable_00[96] = {
const unsigned int len) 0x00A0,0x00A1,0x00A2,0x00A3, 0x20AC,0x00A5,0x0000,0x00A7, 0x00A4,0x2018,0x201C,0x00AB, 0x2190,0x2191,0x2192,0x2193,
0x00B0,0x00B1,0x00B2,0x00B3, 0x00B4,0x00B5,0x00B6,0x00B7, 0x00F7,0x2019,0x201D,0x00BB, 0x00BC,0x00BD,0x00BE,0x00BF,
0x0000,0x0300,0x0301,0x0302, 0x0303,0x0304,0x0306,0x0307, 0x0308,0x0000,0x030A,0x0327, 0x0000,0x030B,0x0328,0x030C,
0x2015,0x00B9,0x00AE,0x00A9, 0x2122,0x266A,0x00AC,0x00A6, 0x0000,0x0000,0x0000,0x0000, 0x215B,0x215C,0x215D,0x215E,
0x2126,0x00C6,0x0110,0x00AA, 0x0126,0x0000,0x0132,0x013F, 0x0141,0x00D8,0x0152,0x00BA, 0x00DE,0x0166,0x014A,0x0149,
0x0138,0x00E6,0x0111,0x00F0, 0x0127,0x0131,0x0133,0x0140, 0x0142,0x00F8,0x0153,0x00DF, 0x00FE,0x0167,0x014B,0x00AD,
};
uint16_t codetable_01[96] = {
0x00A0,0x0401,0x0402,0x0403, 0x0404,0x0405,0x0406,0x0407, 0x0408,0x0409,0x040A,0x040B, 0x040C,0x00AD,0x040E,0x040F,
0x0410,0x0411,0x0412,0x0413, 0x0414,0x0415,0x0416,0x0417, 0x0418,0x0419,0x041A,0x041B, 0x041C,0x041D,0x041E,0x041F,
0x0420,0x0421,0x0422,0x0423, 0x0424,0x0425,0x0426,0x0427, 0x0428,0x0429,0x042A,0x042B, 0x042C,0x042D,0x042E,0x042F,
0x0430,0x0431,0x0432,0x0433, 0x0434,0x0435,0x0436,0x0437, 0x0438,0x0439,0x043A,0x043B, 0x043C,0x043D,0x043E,0x043F,
0x0440,0x0441,0x0442,0x0443, 0x0444,0x0445,0x0446,0x0447, 0x0448,0x0449,0x044A,0x044B, 0x044C,0x044D,0x044E,0x044F,
0x2116,0x0451,0x0452,0x0453, 0x0454,0x0455,0x0456,0x0457, 0x0458,0x0459,0x045A,0x045B, 0x045C,0x00A7,0x045E,0x045F,
};
uint16_t codetable_02[96] = {
0x00A0,0x0000,0x0000,0x0000, 0x00A4,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x060C,0x00AD,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x061B, 0x0000,0x0000,0x0000,0x061F,
0x0000,0x0621,0x0622,0x0623, 0x0624,0x0625,0x0626,0x0627, 0x0628,0x0629,0x062A,0x062B, 0x062C,0x062D,0x062E,0x062F,
0x0630,0x0631,0x0632,0x0633, 0x0634,0x0635,0x0636,0x0637, 0x0638,0x0639,0x063A,0x0000, 0x0000,0x0000,0x0000,0x0000,
0x0640,0x0641,0x0642,0x0643, 0x0644,0x0645,0x0646,0x0647, 0x0648,0x0649,0x064A,0x064B, 0x064C,0x064D,0x064E, 0x064F,
0x0650,0x0651,0x0652,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
};
uint16_t codetable_03[96] = {
0x00A0,0x2018,0x2019,0x00A3, 0x20AC,0x20AF,0x00A6,0x00A7, 0x00A8,0x00A9,0x037A,0x00AB, 0x00AC,0x00AD,0x0000,0x2015,
0x00B0,0x00B1,0x00B2,0x00B3, 0x0384,0x0385,0x0386,0x00B7, 0x0388,0x0389,0x038A,0x00BB, 0x038C,0x00BD,0x038E,0x038F,
0x0390,0x0391,0x0392,0x0393, 0x0394,0x0395,0x0396,0x0397, 0x0398,0x0399,0x039A,0x039B, 0x039C,0x039D,0x039E,0x039F,
0x03A0,0x03A1,0x0000,0x03A3, 0x03A4,0x03A5,0x03A6,0x03A7, 0x03A8,0x03A9,0x03AA,0x03AB, 0x03AC,0x03AD,0x03AE,0x03AF,
0x03B0,0x03B1,0x03B2,0x03B3, 0x03B4,0x03B5,0x03B6,0x03B7, 0x03B8,0x03B9,0x03BA,0x03BB, 0x03BC,0x03BD,0x03BE,0x03BF,
0x03C0,0x03C1,0x03C2,0x03C3, 0x03C4,0x03C5,0x03C6,0x03C7, 0x03C8,0x03C9,0x03CA,0x03CB, 0x03CC,0x03CD,0x03CE,0x0000,
};
uint16_t codetable_04[96] = {
0x00A0,0x0000,0x00A2,0x00A3, 0x00A4,0x00A5,0x00A6,0x00A7, 0x00A8,0x00A9,0x00D7,0x00AB, 0x00AC,0x00AD,0x00AE,0x00AF,
0x00B0,0x00B1,0x00B2,0x00B3, 0x00B4,0x00B5,0x00B6,0x00B7, 0x00B8,0x00B9,0x00F7,0x00BB, 0x00BC,0x00BD,0x00BE,0x0000,
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x2017,
0x05D0,0x05D1,0x05D2,0x05D3, 0x05D4,0x05D5,0x05D6,0x05D7, 0x05D8,0x05D9,0x05DA,0x05DB, 0x05DC,0x05DD,0x05DE,0x05DF,
0x05E0,0x05E1,0x05E2,0x05E3, 0x05E4,0x05E5,0x05E6,0x05E7, 0x05E8,0x05E9,0x05EA,0x0000, 0x0000,0x200E,0x200F,0x0000,
};
uint16_t codetable_05[96] = {
0x00A0,0x00A1,0x00A2,0x00A3, 0x00A4,0x00A5,0x00A6,0x00A7, 0x00A8,0x00A9,0x00AA,0x00AB, 0x00AC,0x00AD,0x00AE,0x00AF,
0x00B0,0x00B1,0x00B2,0x00B3, 0x00B4,0x00B5,0x00B6,0x00B7, 0x00B8,0x00B9,0x00BA,0x00BB, 0x00BC,0x00BD,0x00BE,0x00BF,
0x00C0,0x00C1,0x00C2,0x00C3, 0x00C4,0x00C5,0x00C6,0x00C7, 0x00C8,0x00C9,0x00CA,0x00CB, 0x00CC,0x00CD,0x00CE,0x00CF,
0x011E,0x00D1,0x00D2,0x00D3, 0x00D4,0x00D5,0x00D6,0x00D7, 0x00D8,0x00D9,0x00DA,0x00DB, 0x00DC,0x0130,0x015E,0x00DF,
0x00E0,0x00E1,0x00E2,0x00E3, 0x00E4,0x00E5,0x00E6,0x00E7, 0x00E8,0x00E9,0x00EA,0x00EB, 0x00EC,0x00ED,0x00EE,0x00EF,
0x011F,0x00F1,0x00F2,0x00F3, 0x00F4,0x00F5,0x00F6,0x00F7, 0x00F8,0x00F9,0x00FA,0x00FB, 0x00FC,0x0131,0x015F,0x00FF,
};
uint16_t codetable_06[96] = {
0x00A0,0x0104,0x0112,0x0122, 0x012A,0x0128,0x0136,0x00A7, 0x013B,0x0110,0x0160,0x0166, 0x017D,0x00AD,0x016A,0x014A,
0x00B0,0x0105,0x0113,0x0123, 0x012B,0x0129,0x0137,0x00B7, 0x013C,0x0111,0x0161,0x0167, 0x017E,0x2015,0x016B,0x014B,
0x0100,0x00C1,0x00C2,0x00C3, 0x00C4,0x00C5,0x00C6,0x012E, 0x010C,0x00C9,0x0118,0x00CB, 0x0116,0x00CD,0x00CE,0x00CF,
0x00D0,0x0145,0x014C,0x00D3, 0x00D4,0x00D5,0x00D6,0x0168, 0x00D8,0x0172,0x00DA,0x00DB, 0x00DC,0x00DD,0x00DE,0x00DF,
0x0101,0x00E1,0x00E2,0x00E3, 0x00E4,0x00E5,0x00E6,0x012F, 0x010D,0x00E9,0x0119,0x00EB, 0x0117,0x00ED,0x00EE,0x00EF,
0x00F0,0x0146,0x014D,0x00F3, 0x00F4,0x00F5,0x00F6,0x0169, 0x00F8,0x0173,0x00FA,0x00FB, 0x00FC,0x00FD,0x00FE,0x0138,
};
uint16_t codetable_07[96] = {
0x00A0,0x0E01,0x0E02,0x0E03, 0x0E04,0x0E05,0x0E06,0x0E07, 0x0E08,0x0E09,0x0E0A,0x0E0B, 0x0E0C,0x0E0D,0x0E0E,0x0E0F,
0x0E10,0x0E11,0x0E12,0x0E13, 0x0E14,0x0E15,0x0E16,0x0E17, 0x0E18,0x0E19,0x0E1A,0x0E1B, 0x0E1C,0x0E1D,0x0E1E,0x0E1F,
0x0E20,0x0E21,0x0E22,0x0E23, 0x0E24,0x0E25,0x0E26,0x0E27, 0x0E28,0x0E29,0x0E2A,0x0E2B, 0x0E2C,0x0E2D,0x0E2E,0x0E2F,
0x0E30,0x0E31,0x0E32,0x0E33, 0x0E34,0x0E35,0x0E36,0x0E37, 0x0E38,0x0E39,0x0E3A,0x0000, 0x0000,0x0000,0x0000,0x0E3F,
0x0E40,0x0E41,0x0E42,0x0E43, 0x0E44,0x0E45,0x0E46,0x0E47, 0x0E48,0x0E49,0x0E4A,0x0E4B, 0x0E4C,0x0E4D,0x0E4E,0x0E4F,
0x0E50,0x0E51,0x0E52,0x0E53, 0x0E54,0x0E55,0x0E56,0x0E57, 0x0E58,0x0E59,0x0E5A,0x0E5B, 0x0000,0x0000,0x0000,0x0000,
};
uint16_t codetable_09[96] = {
0x00A0,0x201D,0x00A2,0x00A3, 0x00A4,0x201E,0x00A6,0x00A7, 0x00D8,0x00A9,0x0156,0x00AB, 0x00AC,0x00AD,0x00AE,0x00C6,
0x00B0,0x00B1,0x00B2,0x00B3, 0x201C,0x00B5,0x00B6,0x00B7, 0x00F8,0x00B9,0x0157,0x00BB, 0x00BC,0x00BD,0x00BE,0x00E6,
0x0104,0x012E,0x0100,0x0106, 0x00C4,0x00C5,0x0118,0x0112, 0x010C,0x00C9,0x0179,0x0116, 0x0122,0x0136,0x012A,0x013B,
0x0160,0x0143,0x0145,0x00D3, 0x014C,0x00D5,0x00D6,0x00D7, 0x0172,0x0141,0x015A,0x016A, 0x00DC,0x017B,0x017D,0x00DF,
0x0105,0x012F,0x0101,0x0107, 0x00E4,0x00E5,0x0119,0x0113, 0x010D,0x00E9,0x017A,0x0117, 0x0123,0x0137,0x012B,0x013C,
0x0161,0x0144,0x0146,0x00F3, 0x014D,0x00F5,0x00F6,0x00F7, 0x0173,0x0142,0x015B,0x016B, 0x00FC,0x017C,0x017E,0x2019,
};
uint16_t codetable_0A[96] = {
0x00A0,0x1E02,0x1E03,0x00A3, 0x010A,0x010B,0x1E0A,0x00A7, 0x1E80,0x00A9,0x1E82,0x1E0B, 0x1EF2,0x00AD,0x00AE,0x0178,
0x1E1E,0x1E1F,0x0120,0x0121, 0x1E40,0x1E41,0x00B6,0x1E56, 0x1E81,0x1E57,0x1E83,0x1E60, 0x1EF3,0x1E84,0x1E85,0x1E61,
0x00C0,0x00C1,0x00C2,0x00C3, 0x00C4,0x00C5,0x00C6,0x00C7, 0x00C8,0x00C9,0x00CA,0x00CB, 0x00CC,0x00CD,0x00CE,0x00CF,
0x0174,0x00D1,0x00D2,0x00D3, 0x00D4,0x00D5,0x00D6,0x1E6A, 0x00D8,0x00D9,0x00DA,0x00DB, 0x00DC,0x00DD,0x0176,0x00DF,
0x00E0,0x00E1,0x00E2,0x00E3, 0x00E4,0x00E5,0x00E6,0x00E7, 0x00E8,0x00E9,0x00EA,0x00EB, 0x00EC,0x00ED,0x00EE,0x00EF,
0x0175,0x00F1,0x00F2,0x00F3, 0x00F4,0x00F5,0x00F6,0x1E6B, 0x00F8,0x00F9,0x00FA,0x00FB, 0x00FC,0x00FD,0x0177,0x00FF,
};
uint16_t codetable_0B[96] = {
0x00A0,0x00A1,0x00A2,0x00A3, 0x20AC,0x00A5,0x0160,0x00A7, 0x0161,0x00A9,0x00AA,0x00AB, 0x00AC,0x00AD,0x00AE,0x00AF,
0x00B0,0x00B1,0x00B2,0x00B3, 0x017D,0x00B5,0x00B6,0x00B7, 0x017E,0x00B9,0x00BA,0x00BB, 0x0152,0x0153,0x0178,0x00BF,
0x00C0,0x00C1,0x00C2,0x00C3, 0x00C4,0x00C5,0x00C6,0x00C7, 0x00C8,0x00C9,0x00CA,0x00CB, 0x00CC,0x00CD,0x00CE,0x00CF,
0x00D0,0x00D1,0x00D2,0x00D3, 0x00D4,0x00D5,0x00D6,0x00D7, 0x00D8,0x00D9,0x00DA,0x00DB, 0x00DC,0x00DD,0x00DE,0x00DF,
0x00E0,0x00E1,0x00E2,0x00E3, 0x00E4,0x00E5,0x00E6,0x00E7, 0x00E8,0x00E9,0x00EA,0x00EB, 0x00EC,0x00ED,0x00EE,0x00EF,
0x00F0,0x00F1,0x00F2,0x00F3, 0x00F4,0x00F5,0x00F6,0x00F7, 0x00F8,0x00F9,0x00FA,0x00FB, 0x00FC,0x00FD,0x00FE,0x00FF,
};
uint16_t *codetable_LUT[12] = {
codetable_00,
codetable_01,
codetable_02,
codetable_03,
codetable_04,
codetable_05,
codetable_06,
codetable_07,
codetable_00,
codetable_09,
codetable_0A,
codetable_0B,
};
void en300468_parse_string_to_utf8(char *dest, const unsigned int destlen,
uint8_t *src, const unsigned int len)
{ {
int utf8 = (src[0] == 0x15) ? 1 : 0; uint16_t *codetable = codetable_00;
int skip = (src[0] < 0x20) ? 1 : 0; int encoding = 0;
if( src[0] == 0x10 ) skip += 2; int skip = 0; // (src[0] < 0x20) ? 1 : 0;
uint16_t utf8_cc; if( src[0] < 0x20 ) {
encoding = src[0];
if( encoding < 12 )
codetable = codetable_LUT[encoding];
skip = 1;
}
if( encoding == 0x1F ) {
skip = 2;
}
if( encoding == 0x10 ) {
if( src[1] == 0 ) {
codetable = codetable_0B;
if( src[1] == 0 && src[2] >= 5 && src[2] <= 15 ) {
codetable = codetable_LUT[src[2] - 4];
}
}
skip = 3;
}
uint32_t utf8_cc;
int dest_pos = 0; int dest_pos = 0;
int emphasis = 0; int emphasis = 0;
int i; int i;
for (i = skip; i < len; i++) { for (i = skip; i < len && dest_pos < destlen - 1; i++) {
switch(*(src + i)) { utf8_cc = *(src + i);
case SB_CC_RESERVED_80 ... SB_CC_RESERVED_85: if (utf8_cc >= 128 && encoding == 0x15 ) {
case SB_CC_RESERVED_88 ... SB_CC_RESERVED_89: if( (utf8_cc & 0xC0) == 0xC0 )
case SB_CC_USER_8B ... SB_CC_USER_9F: {
i++;
utf8_cc &= 0x3F;
if( utf8_cc & 0x20 ) utf8_cc &= 0x1F;
if( utf8_cc & 0x10 ) utf8_cc &= 0x0F;
if( utf8_cc & 0x08 ) utf8_cc &= 0x07;
while( i < len && (*(src + i) & 0xC0) == 0x80 ) {
utf8_cc = (utf8_cc << 6) | (*(src + i) & 0x3F);
i++;
}
if( utf8_cc > 0x10FFFF )
break; // UTF-8 error
}
else
break; // UTF-8 error
} else {
if( encoding <= 0x10 && utf8_cc >= 0x80 && utf8_cc < 0xA0 )
utf8_cc |= 0x0100;
else if( utf8_cc >= 0xA0 ) {
utf8_cc = codetable[utf8_cc-0xA0];
}
}
if( utf8_cc < 0xA0 ) {
switch(utf8_cc) {
case 0x00:
break;
case 0x01 ... 0x7F:
dest[dest_pos++] = utf8_cc;
break;
case CHARACTER_CR_LF: case CHARACTER_CR_LF:
dest[dest_pos++] = '\n'; dest[dest_pos++] = '\n';
continue; break;
case CHARACTER_EMPHASIS_ON: case CHARACTER_EMPHASIS_ON:
emphasis = 1; emphasis = 1;
continue; break;
case CHARACTER_EMPHASIS_OFF: case CHARACTER_EMPHASIS_OFF:
emphasis = 0; emphasis = 0;
continue;
case UTF8_CC_START:
if (utf8 == 1) {
utf8_cc = *(src + i) << 8;
utf8_cc += *(src + i + 1);
switch(utf8_cc) {
case ((UTF8_CC_START << 8) | CHARACTER_EMPHASIS_ON):
emphasis = 1;
i++;
continue;
case ((UTF8_CC_START << 8) | CHARACTER_EMPHASIS_OFF):
emphasis = 0;
i++;
continue;
default:
break; break;
}
}
default: { default: {
if (*(src + i) < 128) if( dest_pos < destlen - 2 ) {
dest[dest_pos++] = *(src + i); dest[dest_pos++] = 0xC2;
else { dest[dest_pos++] = (utf8_cc & 0x3F) | 0x80;
dest[dest_pos++] = 0xc2 + (*(src + i) > 0xbf);
dest[dest_pos++] = (*(src + i) & 0x3f) | 0x80;
} }
break; break;
} }
} }
} else {
if( utf8_cc < 0x800 ) {
if( dest_pos >= destlen - 2 )
break;
dest[dest_pos++] = 0xC0 | ((utf8_cc >> 6) & 0x1F);
dest[dest_pos++] = (utf8_cc & 0x3F) | 0x80;
} else if( utf8_cc < 0x10000 ) {
if( dest_pos >= destlen - 3 )
break;
dest[dest_pos++] = 0xE0 | ((utf8_cc >> 12) & 0x0F);
dest[dest_pos++] = ((utf8_cc >> 6) & 0x3F) | 0x80;
dest[dest_pos++] = (utf8_cc & 0x3F) | 0x80;
} else if( utf8_cc < 0x110000 ) {
if( dest_pos >= destlen - 4 )
break;
dest[dest_pos++] = 0xF0 | ((utf8_cc >> 18) & 0x07);
dest[dest_pos++] = ((utf8_cc >> 12) & 0x3F) | 0x80;
dest[dest_pos++] = ((utf8_cc >> 6) & 0x3F) | 0x80;
dest[dest_pos++] = (utf8_cc & 0x3F) | 0x80;
}
}
} }
dest[dest_pos] = '\0'; dest[dest_pos] = '\0';
} }
@ -1252,17 +1416,16 @@ static int sdt_cb(struct sfilter *sf)
snl = buf[doff + 4 + spnl]; snl = buf[doff + 4 + spnl];
s->pname[79] = 0x00; s->pname[79] = 0x00;
s->name[79] = 0x00; s->name[79] = 0x00;
en300468_parse_string_to_utf8(s->pname, buf + doff + 4, spnl); en300468_parse_string_to_utf8(s->pname, sizeof(s->pname), buf + doff + 4, spnl);
if( s->pname[79] != 0 ) if( s->pname[79] != 0 )
fprintf(stderr, "********************************************* PNAME OVERFLOW %d spnl = %d",spnl); fprintf(stderr, "********************************************* PNAME OVERFLOW %d spnl = %d",spnl);
en300468_parse_string_to_utf8(s->name, buf + doff + 5 + spnl, snl); en300468_parse_string_to_utf8(s->name, sizeof(s->name), buf + doff + 5 + spnl, snl);
if( s->name[79] != 0 ) if( s->name[79] != 0 )
fprintf(stderr, "********************************************* SNAME OVERFLOW %d snl = %d",snl); fprintf(stderr, "********************************************* SNAME OVERFLOW %d snl = %d",snl);
s->got_sdt = 1; s->got_sdt = 1;
} }
} }
} }
return 0; return 0;
} }
@ -1734,7 +1897,7 @@ static void print_events(struct tp_info *tpi)
{ {
struct service *s; struct service *s;
struct event *e; struct event *e;
char t[512]; char t[768];
int i; int i;
uint16_t y; uint16_t y;
uint8_t m,d; uint8_t m,d;
@ -1753,11 +1916,11 @@ static void print_events(struct tp_info *tpi)
} }
printf(" LANG:%c%c%c\n", e->s_lang[0], e->s_lang[1], e->s_lang[2]); printf(" LANG:%c%c%c\n", e->s_lang[0], e->s_lang[1], e->s_lang[2]);
if( e->s_name ) { if( e->s_name ) {
en300468_parse_string_to_utf8(t,&e->s_name[1],e->s_name[0]); en300468_parse_string_to_utf8(t,sizeof(t),&e->s_name[1],e->s_name[0]);
printf(" NAME:%s\n",t); printf(" NAME:%s\n",t);
} }
if( e->s_text ) { if( e->s_text ) {
en300468_parse_string_to_utf8(t,&e->s_text[1],e->s_text[0]); en300468_parse_string_to_utf8(t,sizeof(t),&e->s_text[1],e->s_text[0]);
printf(" TEXT:%s\n",t); printf(" TEXT:%s\n",t);
} }
printf("END\n"); printf("END\n");
@ -1923,6 +2086,16 @@ void tpstring(struct tp_info *tpi, char *s, int slen)
"freq=%u&msys=dvbc&sr=%u&mtype=%s", "freq=%u&msys=dvbc&sr=%u&mtype=%s",
tpi->freq, tpi->sr, mtype2str[tpi->mod]); tpi->freq, tpi->sr, mtype2str[tpi->mod]);
break; break;
case 2:
if( tpi->freq_frac )
len = snprintf(s, slen,
"freq=%u.%04u&msys=dvbt&bw=%s",
tpi->freq, tpi->freq_frac, bw2str[tpi->bw]);
else
len = snprintf(s, slen,
"freq=%u&msys=dvbt&bw=%s",
tpi->freq, bw2str[tpi->bw]);
break;
case 5: case 5:
case 6: case 6:
len = snprintf(s, slen, len = snprintf(s, slen,
@ -1930,6 +2103,16 @@ void tpstring(struct tp_info *tpi, char *s, int slen)
tpi->src,tpi->freq, pol2str[tpi->pol&3], tpi->src,tpi->freq, pol2str[tpi->pol&3],
msys2str[tpi->msys], tpi->sr); msys2str[tpi->msys], tpi->sr);
break; break;
case 16:
if( tpi->freq_frac )
len = snprintf(s, slen,
"freq=%u.%04u&msys=dvbt2&bw=%s&plp=%u",
tpi->freq, tpi->freq_frac, bw2str[tpi->bw], tpi->isi);
else
len = snprintf(s, slen,
"freq=%u&msys=dvbt2&bw=%s&plp=%u",
tpi->freq, bw2str[tpi->bw], tpi->isi);
break;
} }
} }
@ -2026,11 +2209,13 @@ void usage() {
printf(" symbolrate in kSymbols (required for DVB-S/S2 and DVB-C)\n"); printf(" symbolrate in kSymbols (required for DVB-S/S2 and DVB-C)\n");
printf(" DVB-S/S2 example: --sr=27500\n"); printf(" DVB-S/S2 example: --sr=27500\n");
printf(" DVB-C example: --sr=6900\n"); printf(" DVB-C example: --sr=6900\n");
printf(" --bw=<bandwidth>, -b <bandwidth>\n");
printf(" bandwidth 1.712,5,6,7,8,10 (required for DVB-T/T2)\n");
printf(" --pol=<polarisation>, -p <polarisation>\n"); printf(" --pol=<polarisation>, -p <polarisation>\n");
printf(" polarisation = v,h,r,l (required for DVB-S/S2)\n"); printf(" polarisation = v,h,r,l (required for DVB-S/S2)\n");
printf(" example: --pol=v\n"); printf(" example: --pol=v\n");
printf(" --msys=<modulation system>, -m <modulation system>\n"); printf(" --msys=<modulation system>, -m <modulation system>\n");
printf(" system = dvbs,dvbs2,dvbc (required)\n"); printf(" system = dvbs,dvbs2,dvbc,dvbt,dvbt2 (required)\n");
printf(" example: --msys=dvbs\n"); printf(" example: --msys=dvbs\n");
printf(" --mtype=<modulation type>, -t <modulation type>\n"); printf(" --mtype=<modulation type>, -t <modulation type>\n");
printf(" modulation type = 16qam,32qam,64qam,128qam,256qam (required for DVB-C)\n"); printf(" modulation type = 16qam,32qam,64qam,128qam,256qam (required for DVB-C)\n");
@ -2105,6 +2290,8 @@ int main(int argc, char **argv)
{"sr", required_argument, 0, 's'}, {"sr", required_argument, 0, 's'},
{"src", required_argument, 0, 'S'}, {"src", required_argument, 0, 'S'},
{"pol", required_argument, 0, 'p'}, {"pol", required_argument, 0, 'p'},
{"bw", required_argument, 0, 'b'},
{"plp", required_argument, 0, 'P'},
{"msys", required_argument, 0, 'm'}, {"msys", required_argument, 0, 'm'},
{"mtype", required_argument, 0, 't'}, {"mtype", required_argument, 0, 't'},
{"eit", no_argument, 0, 'e'}, {"eit", no_argument, 0, 'e'},
@ -2113,7 +2300,7 @@ int main(int argc, char **argv)
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
c = getopt_long(argc, argv, c = getopt_long(argc, argv,
"nf:s:S:p:m:t:e:x:?", "nf:s:S:p:b:P:m:t:e:x:?",
long_options, &option_index); long_options, &option_index);
if (c==-1) if (c==-1)
break; break;
@ -2170,7 +2357,7 @@ int main(int argc, char **argv)
case 'p': case 'p':
i = 0; i = 0;
while( i < 4 ) { while( pol2str[i] ) {
if( strcmp(optarg,pol2str[i]) == 0 ) { if( strcmp(optarg,pol2str[i]) == 0 ) {
tpi.pol = i; tpi.pol = i;
break; break;
@ -2179,6 +2366,23 @@ int main(int argc, char **argv)
} }
break; break;
case 'b':
i = 0;
while( bw2str[i] ) {
if( strcmp(optarg,bw2str[i]) == 0 ) {
tpi.bw = i;
break;
}
i += 1;
}
break;
case 'P':
tpi.isi = strtoul(optarg, NULL, 10);
if( tpi.isi > 255 )
tpi.isi = 0;
break;
case 'm': case 'm':
i = 0; i = 0;
while( msys2str[i] ) { while( msys2str[i] ) {

View File

@ -194,6 +194,8 @@ static int set_fe_input(struct dvbfe *fe, uint32_t fr,
int fd = fe->fd; int fd = fe->fd;
dbgprintf(DEBUG_DVB, "ds = %u, input = %u\n", ds, input); dbgprintf(DEBUG_DVB, "ds = %u, input = %u\n", ds, input);
if (fe->set & (1UL << PARAM_FEC))
p[5].u.data = fe->param[PARAM_FEC] - 1;
c.num = ARRAY_SIZE(p); c.num = ARRAY_SIZE(p);
c.props = p; c.props = p;
@ -207,7 +209,10 @@ static int set_fe_input(struct dvbfe *fe, uint32_t fr,
if (fe->set & (1UL << PARAM_ISI)) if (fe->set & (1UL << PARAM_ISI))
set_property(fd, DTV_STREAM_ID, fe->param[PARAM_ISI]); set_property(fd, DTV_STREAM_ID, fe->param[PARAM_ISI]);
if (fe->set & (1UL << PARAM_PLS)) if (fe->set & (1UL << PARAM_PLS))
set_property(fd, DTV_PLS, fe->param[PARAM_PLS]); set_property(fd, DTV_SCRAMBLING_SEQUENCE_INDEX,
fe->param[PARAM_PLS]);
if (fe->set & (1UL << PARAM_MTYPE))
set_property(fd, DTV_MODULATION, fe->param[PARAM_MTYPE] - 1);
set_property(fd, DTV_TUNE, 0); set_property(fd, DTV_TUNE, 0);
return 0; return 0;
} }
@ -324,12 +329,12 @@ static int set_en50607(struct dvbfe *fe, uint32_t freq, uint32_t sr,
cmd.msg[0], cmd.msg[1], cmd.msg[2], cmd.msg[3]); cmd.msg[0], cmd.msg[1], cmd.msg[2], cmd.msg[3]);
} }
static int tune_sat(struct dvbfe *fe) static int tune_dvbs2(struct dvbfe *fe)
{ {
uint32_t freq, hi = 0, src, lnb = 0, lnbc = 0, lofs; uint32_t freq, hi = 0, src, lnb = 0, lnbc = 0, lofs;
fe_delivery_system_t ds = fe->param[PARAM_MSYS] - 1; fe_delivery_system_t ds = fe->param[PARAM_MSYS] - 1;
dbgprintf(DEBUG_DVB, "tune_sat\n"); dbgprintf(DEBUG_DVB, "tune_dvbs2\n");
freq = fe->param[PARAM_FREQ]; freq = fe->param[PARAM_FREQ];
if (fe->param[PARAM_SRC]) if (fe->param[PARAM_SRC])
@ -355,10 +360,17 @@ static int tune_sat(struct dvbfe *fe)
{ {
if (lofs) if (lofs)
hi = (freq > lofs) ? 1 : 0; hi = (freq > lofs) ? 1 : 0;
if (lofs > 10000000) {
if (hi) if (hi)
freq -= fe->lof2[lnbc]; freq -= fe->lof2[lnbc];
else else
freq -= fe->lof1[lnbc]; freq -= fe->lof1[lnbc];
} else {
if (hi)
freq = fe->lof2[lnbc] - freq;
else
freq = fe->lof1[lnbc] - freq;
}
} }
if (fe->first) { if (fe->first) {
fe->first = 0; fe->first = 0;
@ -387,7 +399,7 @@ static int tune_sat(struct dvbfe *fe)
} }
} }
static int tune_c(struct dvbfe *fe) static int tune_dvbc(struct dvbfe *fe)
{ {
struct dtv_property p[] = { struct dtv_property p[] = {
{ .cmd = DTV_CLEAR }, { .cmd = DTV_CLEAR },
@ -415,24 +427,7 @@ static int tune_c(struct dvbfe *fe)
return 0; return 0;
} }
static int tune_cable(struct dvbfe *fe) static int tune_dvbt(struct dvbfe *fe)
{
uint32_t freq;
struct dvb_frontend_parameters p = {
.frequency = fe->param[PARAM_FREQ] * 1000,
.u.qam.symbol_rate = fe->param[PARAM_SR] * 1000,
.u.qam.fec_inner = fe->param[PARAM_FEC] ? (fe->param[PARAM_FEC] - 1) : FEC_AUTO,
.u.qam.modulation = fe->param[PARAM_MTYPE] - 1,
};
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_A);
if (ioctl(fe->fd, FE_SET_FRONTEND, &p) == -1) {
perror("FE_SET_FRONTEND error");
return -1;
}
return 0;
}
static int tune_terr(struct dvbfe *fe)
{ {
struct dtv_property p[] = { struct dtv_property p[] = {
{ .cmd = DTV_CLEAR }, { .cmd = DTV_CLEAR },
@ -454,33 +449,8 @@ static int tune_terr(struct dvbfe *fe)
} }
return 0; return 0;
} }
#if 0
static int tune_terr(struct dvbfe *fe)
{
uint32_t freq;
enum fe_bandwidth bw;
struct dvb_frontend_parameters p = {
.frequency = fe->param[PARAM_FREQ] * 1000,
.inversion = INVERSION_AUTO,
.u.ofdm.code_rate_HP = FEC_AUTO,
.u.ofdm.code_rate_LP = FEC_AUTO,
.u.ofdm.constellation = fe->param[PARAM_MTYPE] - 1,
.u.ofdm.transmission_mode = TRANSMISSION_MODE_AUTO,
.u.ofdm.guard_interval = GUARD_INTERVAL_AUTO,
.u.ofdm.hierarchy_information = HIERARCHY_AUTO,
.u.ofdm.bandwidth = fe->param[PARAM_BW] ?
(fe->param[PARAM_BW] - 1) : BANDWIDTH_AUTO,
};
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBT);
if (ioctl(fe->fd, FE_SET_FRONTEND, &p) == -1) {
perror("FE_SET_FRONTEND error");
return -1;
}
return 0;
}
#endif
static int tune_c2(struct dvbfe *fe) static int tune_dvbc2(struct dvbfe *fe)
{ {
struct dtv_property p[] = { struct dtv_property p[] = {
{ .cmd = DTV_CLEAR }, { .cmd = DTV_CLEAR },
@ -504,7 +474,7 @@ static int tune_c2(struct dvbfe *fe)
return 0; return 0;
} }
static int tune_terr2(struct dvbfe *fe) static int tune_dvbt2(struct dvbfe *fe)
{ {
struct dtv_property p[] = { struct dtv_property p[] = {
{ .cmd = DTV_CLEAR }, { .cmd = DTV_CLEAR },
@ -551,6 +521,76 @@ static int tune_isdbt(struct dvbfe *fe)
return 0; return 0;
} }
static int tune_isdbc(struct dvbfe *fe)
{
struct dtv_property p[] = {
{ .cmd = DTV_CLEAR },
{ .cmd = DTV_FREQUENCY, .u.data = fe->param[PARAM_FREQ] * 1000 },
};
struct dtv_properties c;
int ret;
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_ISDBC);
c.num = ARRAY_SIZE(p);
c.props = p;
ret = ioctl(fe->fd, FE_SET_PROPERTY, &c);
if (ret < 0) {
fprintf(stderr, "FE_SET_PROPERTY returned %d\n", ret);
return -1;
}
if (fe->set & (1UL << PARAM_ISI))
set_property(fe->fd, DTV_STREAM_ID, fe->param[PARAM_ISI]);
set_property(fe->fd, DTV_TUNE, 0);
return 0;
}
static int tune_j83b(struct dvbfe *fe)
{
struct dtv_property p[] = {
{ .cmd = DTV_CLEAR },
{ .cmd = DTV_FREQUENCY, .u.data = fe->param[PARAM_FREQ] * 1000 },
};
struct dtv_properties c;
int ret;
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_DVBC_ANNEX_B);
c.num = ARRAY_SIZE(p);
c.props = p;
ret = ioctl(fe->fd, FE_SET_PROPERTY, &c);
if (ret < 0) {
fprintf(stderr, "FE_SET_PROPERTY returned %d\n", ret);
return -1;
}
set_property(fe->fd, DTV_TUNE, 0);
return 0;
}
static int tune_isdbs(struct dvbfe *fe)
{
struct dtv_property p[] = {
{ .cmd = DTV_CLEAR },
{ .cmd = DTV_FREQUENCY, .u.data = fe->param[PARAM_FREQ] },
};
struct dtv_properties c;
int ret;
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_ISDBS);
c.num = ARRAY_SIZE(p);
c.props = p;
ret = ioctl(fe->fd, FE_SET_PROPERTY, &c);
if (ret < 0) {
fprintf(stderr, "FE_SET_PROPERTY returned %d\n", ret);
return -1;
}
if (fe->set & (1UL << PARAM_ISI))
set_property(fe->fd, DTV_STREAM_ID, fe->param[PARAM_ISI]);
set_property(fe->fd, DTV_TUNE, 0);
return 0;
}
static int tune(struct dvbfe *fe) static int tune(struct dvbfe *fe)
{ {
int ret; int ret;
@ -560,23 +600,33 @@ static int tune(struct dvbfe *fe)
switch (fe->n_param[PARAM_MSYS] - 1) { switch (fe->n_param[PARAM_MSYS] - 1) {
case SYS_DVBS: case SYS_DVBS:
case SYS_DVBS2: case SYS_DVBS2:
ret = tune_sat(fe); ret = tune_dvbs2(fe);
break; break;
case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_A:
ret = tune_c(fe); ret = tune_dvbc(fe);
break; break;
case SYS_DVBT: case SYS_DVBT:
ret = tune_terr(fe); ret = tune_dvbt(fe);
break; break;
case SYS_DVBT2: case SYS_DVBT2:
ret = tune_terr2(fe); ret = tune_dvbt2(fe);
break; break;
case SYS_DVBC2: case SYS_DVBC2:
ret = tune_c2(fe); ret = tune_dvbc2(fe);
break; break;
case SYS_ISDBT: case SYS_ISDBT:
ret = tune_isdbt(fe); ret = tune_isdbt(fe);
break; break;
case SYS_DVBC_ANNEX_B:
ret = tune_j83b(fe);
break;
case SYS_DVBC_ANNEX_C:
case SYS_ISDBC:
ret = tune_isdbc(fe);
break;
case SYS_ISDBS:
ret = tune_isdbs(fe);
break;
default: default:
break; break;
} }
@ -968,7 +1018,7 @@ static void calc_lq(struct dvbfe *fe)
get_property(fe->fd, DTV_INNER_FEC, &fec); get_property(fe->fd, DTV_INNER_FEC, &fec);
fe->param[PARAM_FEC] = fec + 1; fe->param[PARAM_FEC] = fec + 1;
get_property(fe->fd, DTV_MODULATION, &mod); get_property(fe->fd, DTV_MODULATION, &mod);
fe->param[PARAM_MTYPE] = mod + 1; //fe->param[PARAM_MTYPE] = mod + 1;
get_stat(fe->fd, DTV_STAT_PRE_ERROR_BIT_COUNT, &st); get_stat(fe->fd, DTV_STAT_PRE_ERROR_BIT_COUNT, &st);
ber_num = st.stat[0].uvalue; ber_num = st.stat[0].uvalue;
@ -1071,7 +1121,7 @@ void handle_fe(struct dvbfe *fe)
} else { } else {
max = 1; max = 1;
nolock++; nolock++;
if (nolock > 20) if (nolock > 100)
fe->tune = 1; fe->tune = 1;
} }
break; break;
@ -1107,7 +1157,7 @@ int dvb_tune(struct dvbfe *fe, struct dvb_params *p)
return ret; return ret;
} }
static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int msmode) static int init_fe(struct octoserve *os, int a, int f, int fd)
{ {
struct dtv_properties dps; struct dtv_properties dps;
struct dtv_property dp[10]; struct dtv_property dp[10];
@ -1128,8 +1178,11 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
dbgprintf(DEBUG_DVB, "delivery system %d\n", ds); dbgprintf(DEBUG_DVB, "delivery system %d\n", ds);
fe->type |= (1UL << ds); fe->type |= (1UL << ds);
} }
if (nodvbt) if (os->nodvbt)
fe->type &= ~((1UL << SYS_DVBT2) | (1UL << SYS_DVBT)); fe->type &= ~((1UL << SYS_DVBT2) | (1UL << SYS_DVBT));
fe->type_orig = fe->type;
if (os->delsys_mask)
fe->type &= os->delsys_mask;
if (!fe->type) if (!fe->type)
return -1; return -1;
@ -1150,8 +1203,9 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
dbgprintf(DEBUG_DVB, "input prop %u = %u\n", i, fe->input[i]); dbgprintf(DEBUG_DVB, "input prop %u = %u\n", i, fe->input[i]);
} }
if (fe->input[3]) { if (fe->input[3]) {
dbgprintf(DEBUG_DVB, "has_feswitch\n");
os->has_feswitch = 1; os->has_feswitch = 1;
if (!os->scif_type && !msmode) { if (!os->scif_type && !os->msmode) {
if (fe->input[2] >= fe->input[1]) { if (fe->input[2] >= fe->input[1]) {
fe->type = 0; fe->type = 0;
return -1; return -1;
@ -1175,7 +1229,7 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
return 0; return 0;
} }
static int scan_dvbfe(struct octoserve *os, int nodvbt, int msmode) static int scan_dvbfe(struct octoserve *os)
{ {
int a, f, fd; int a, f, fd;
char fname[80]; char fname[80];
@ -1185,7 +1239,7 @@ static int scan_dvbfe(struct octoserve *os, int nodvbt, int msmode)
sprintf(fname, "/dev/dvb/adapter%d/frontend%d", a, f); sprintf(fname, "/dev/dvb/adapter%d/frontend%d", a, f);
fd = open(fname, O_RDWR); fd = open(fname, O_RDWR);
if (fd >= 0) { if (fd >= 0) {
init_fe(os, a, f, fd, nodvbt, msmode); init_fe(os, a, f, fd);
close(fd); close(fd);
} }
} }
@ -1200,11 +1254,10 @@ static int ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
{ {
struct dvbca *ca = arg; struct dvbca *ca = arg;
dbgprintf(DEBUG_DVB, "Application type: %02x\n", application_type); dbgprintf(DEBUG_CI, "Application type: %02x\n", application_type);
dbgprintf(DEBUG_DVB, "Application manufacturer: %04x\n", application_manufacturer); dbgprintf(DEBUG_CI, "Application manufacturer: %04x\n", application_manufacturer);
dbgprintf(DEBUG_DVB, "Manufacturer code: %04x\n", manufacturer_code); dbgprintf(DEBUG_CI, "Manufacturer code: %04x\n", manufacturer_code);
dbgprintf(DEBUG_DVB, "Menu string: %.*s\n", menu_string_length, menu_string); dbgprintf(DEBUG_CI, "Menu string: %.*s\n", menu_string_length, menu_string);
return 0; return 0;
} }
@ -1214,14 +1267,32 @@ static int ca_info_callback(void *arg, uint8_t slot_id, uint16_t snum,
struct dvbca *ca = arg; struct dvbca *ca = arg;
uint32_t i; uint32_t i;
dbgprintf(DEBUG_DVB, "CAM supports the following ca system ids:\n"); dbgprintf(DEBUG_CI, "CAM supports the following ca system ids:\n");
for (i = 0; i < id_count; i++) { for (i = 0; i < id_count; i++) {
dbgprintf(DEBUG_DVB, " 0x%04x\n", ids[i]); dbgprintf(DEBUG_CI, " 0x%04x\n", ids[i]);
} }
ca->sentpmt = 0;
ca->resource_ready = 1; ca->resource_ready = 1;
return 0; return 0;
} }
static int ca_pmt_reply_callback(void *arg, uint8_t slot_id, uint16_t snum,
struct en50221_app_pmt_reply *reply,
uint32_t reply_size)
{
struct dvbca *ca = arg;
uint32_t i;
if (!reply->CA_enable_flag || reply->CA_enable != 1) {
dbgprintf(DEBUG_CI,
"Descrambling not possible:"
"ca_enable_flag: %d, ca_enable: 0x%02x", reply->CA_enable_flag, reply->CA_enable);
return 0;
}
dbgprintf(DEBUG_CI, "Descrambling OK\n");
return 0;
}
#if 0 #if 0
static int handle_pmt(struct dvbca *ca, uint8_t *buf, int size) static int handle_pmt(struct dvbca *ca, uint8_t *buf, int size)
{ {
@ -1231,7 +1302,7 @@ static int handle_pmt(struct dvbca *ca, uint8_t *buf, int size)
struct section_ext *section_ext = section_ext_decode(section, 0); struct section_ext *section_ext = section_ext_decode(section, 0);
struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext); struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext);
dbgprintf(DEBUG_DVB, "handle pmt\n"); dbgprintf(DEBUG_CI, "handle pmt\n");
if (section_ext->version_number == ca->ca_pmt_version && if (section_ext->version_number == ca->ca_pmt_version &&
ca->pmt == ca->pmt_old) ca->pmt == ca->pmt_old)
return; return;
@ -1247,15 +1318,15 @@ static int handle_pmt(struct dvbca *ca, uint8_t *buf, int size)
//return; //return;
} }
ca->sentpmt = 1; ca->sentpmt = 1;
dbgprintf(DEBUG_DVB, "set ca_pmt\n"); dbgprintf(DEBUG_CI, "set ca_pmt\n");
if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), ca->moveca, listmgmt, if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), ca->moveca, listmgmt,
CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) { CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
dbgprintf(DEBUG_DVB, "Failed to format PMT\n"); dbgprintf(DEBUG_CI, "Failed to format PMT\n");
return -1; return -1;
} }
if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt, size)) { if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt, size)) {
dbgprintf(DEBUG_DVB, "Failed to send PMT\n"); dbgprintf(DEBUG_CI, "Failed to send PMT\n");
return -1; return -1;
} }
} }
@ -1279,7 +1350,7 @@ static void handle_tdt(struct dvbca *ca)
len = getsec(ca->input, 0x14, 0, 0x70, sec); len = getsec(ca->input, 0x14, 0, 0x70, sec);
if (len < 0) if (len < 0)
return; return;
dbgprintf(DEBUG_DVB, "got tdt\n"); dbgprintf(DEBUG_CI, "got tdt\n");
section = section_codec(sec, len); section = section_codec(sec, len);
if (section == NULL) if (section == NULL)
@ -1289,11 +1360,12 @@ static void handle_tdt(struct dvbca *ca)
return; return;
dvb_time = dvbdate_to_unixtime(tdt->utc_time); dvb_time = dvbdate_to_unixtime(tdt->utc_time);
dbgprintf(DEBUG_DVB, "set dvbtime\n"); dbgprintf(DEBUG_CI, "set dvbtime\n");
if (ca->stdcam->dvbtime) if (ca->stdcam->dvbtime)
ca->stdcam->dvbtime(ca->stdcam, dvb_time); ca->stdcam->dvbtime(ca->stdcam, dvb_time);
} }
#if 1
static int handle_pmts(struct dvbca *ca) static int handle_pmts(struct dvbca *ca)
{ {
int listmgmt = CA_LIST_MANAGEMENT_ONLY; int listmgmt = CA_LIST_MANAGEMENT_ONLY;
@ -1305,10 +1377,78 @@ static int handle_pmts(struct dvbca *ca)
if (!ca->resource_ready) if (!ca->resource_ready)
return 0; return 0;
dbgprintf(DEBUG_DVB, "handle pmts\n");
for (i = num = 0; i < MAX_PMT; i++) for (i = num = 0; i < MAX_PMT; i++)
if (ca->pmt[i]) if (ca->pmt[i])
num++; num++;
dbgprintf(DEBUG_CI, "ci %u.%u: handle %u pmts\n", ca->anum, ca->fnum, num);
for (i = 0; i < num; i++) {
len = getsec(ca->input, ca->pmt[i] & 0xffff, ca->pmt[i] >> 16, 2, sec);
if (len < 0)
return 0;
section = section_codec(sec, len);
section_ext = section_ext_decode(section, 0);
pmt = mpeg_pmt_section_codec(section_ext);
ca->ca_pmt_version[i] = section_ext->version_number;
if (ca->sentpmt) {
return 0;
listmgmt = CA_LIST_MANAGEMENT_UPDATE;
} else {
listmgmt = CA_LIST_MANAGEMENT_ONLY;
#if 1
if (num > 1) {
listmgmt = CA_LIST_MANAGEMENT_MORE;
if (i == 0)
listmgmt = CA_LIST_MANAGEMENT_FIRST;
if (i == num - 1)
listmgmt = CA_LIST_MANAGEMENT_LAST;
}
#else
if (i > 0)
listmgmt = CA_LIST_MANAGEMENT_ADD;
#endif
}
dbgprintf(DEBUG_CI, "set ca_pmt %d = %u as %s\n",
i, ca->pmt[i] & 0xffff,
(listmgmt == CA_LIST_MANAGEMENT_ONLY) ? "only" :
(listmgmt == CA_LIST_MANAGEMENT_ADD) ? "add" :
(listmgmt == CA_LIST_MANAGEMENT_FIRST) ? "first" :
(listmgmt == CA_LIST_MANAGEMENT_LAST) ? "last" :
"more");
if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), ca->moveca, listmgmt,
CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
dbgprintf(DEBUG_CI, "Failed to format PMT\n");
return -1;
}
dbgprintf(DEBUG_CI, "ci %u.%u: CA_PMT\n", ca->anum, ca->fnum, num);
dump(capmt, size);
if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt, size)) {
dbgprintf(DEBUG_CI, "Failed to send PMT\n");
return -1;
}
}
if (num)
ca->sentpmt = 1;
return 0;
}
#else
static int handle_pmts(struct dvbca *ca)
{
int listmgmt = CA_LIST_MANAGEMENT_ONLY;
uint8_t sec[4096], capmt[MAX_PMT][4096];
struct section *section;
struct section_ext *section_ext;
struct mpeg_pmt_section *pmt;
int i, size[MAX_PMT], num, len;
if (!ca->resource_ready)
return 0;
for (i = num = 0; i < MAX_PMT; i++)
if (ca->pmt[i])
num++;
dbgprintf(DEBUG_CI, "handle %u pmts\n", num);
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
len = getsec(ca->input, ca->pmt[i] & 0xffff, ca->pmt[i] >> 16, 2, sec); len = getsec(ca->input, ca->pmt[i] & 0xffff, ca->pmt[i] >> 16, 2, sec);
if (len < 0) if (len < 0)
@ -1319,10 +1459,11 @@ static int handle_pmts(struct dvbca *ca)
ca->ca_pmt_version[i] = section_ext->version_number; ca->ca_pmt_version[i] = section_ext->version_number;
if (ca->sentpmt) { if (ca->sentpmt) {
//return 0; return 0;
listmgmt = CA_LIST_MANAGEMENT_UPDATE; listmgmt = CA_LIST_MANAGEMENT_UPDATE;
} else { } else {
listmgmt = CA_LIST_MANAGEMENT_ONLY; listmgmt = CA_LIST_MANAGEMENT_ONLY;
#if 0
if (num > 1) { if (num > 1) {
listmgmt = CA_LIST_MANAGEMENT_MORE; listmgmt = CA_LIST_MANAGEMENT_MORE;
if (i == 0) if (i == 0)
@ -1330,25 +1471,40 @@ static int handle_pmts(struct dvbca *ca)
if (i == num - 1) if (i == num - 1)
listmgmt = CA_LIST_MANAGEMENT_LAST; listmgmt = CA_LIST_MANAGEMENT_LAST;
} }
#else
if (i > 0)
listmgmt = CA_LIST_MANAGEMENT_ADD;
#endif
} }
dbgprintf(DEBUG_DVB, "set ca_pmt\n"); dbgprintf(DEBUG_CI, "set ca_pmt %d = %u as %s\n",
i, ca->pmt[i] & 0xffff,
(listmgmt == CA_LIST_MANAGEMENT_ONLY) ? "only" :
(listmgmt == CA_LIST_MANAGEMENT_ADD) ? "add" :
(listmgmt == CA_LIST_MANAGEMENT_FIRST) ? "first" :
(listmgmt == CA_LIST_MANAGEMENT_LAST) ? "last" :
"more");
if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), ca->moveca, listmgmt, if ((size[i] = en50221_ca_format_pmt(pmt, capmt[i], sizeof(capmt[i]), ca->moveca, listmgmt,
CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) { CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
dbgprintf(DEBUG_DVB, "Failed to format PMT\n"); dbgprintf(DEBUG_CI, "Failed to format PMT\n");
return -1; return -1;
} }
dump(capmt, size); dump(capmt[i], size[i]);
if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt, size)) { }
dbgprintf(DEBUG_DVB, "Failed to send PMT\n");
for (i = 0; i < num; i++) {
if (en50221_app_ca_pmt(ca->stdcam->ca_resource, ca->stdcam->ca_session_number, capmt[i], size[i])) {
dbgprintf(DEBUG_CI, "Failed to send PMT\n");
return -1; return -1;
} }
dbgprintf(DEBUG_CI, "ca_pmt %d sent\n", i);
} }
if (num) if (num)
ca->sentpmt = 1; ca->sentpmt = 1;
return 0; return 0;
} }
#endif
static void proc_csock_msg(struct dvbca *ca, uint8_t *buf, int len) static void proc_csock_msg(struct dvbca *ca, uint8_t *buf, int len)
{ {
if (*buf == '\r') { if (*buf == '\r') {
@ -1475,8 +1631,15 @@ static void handle_ci(struct dvbca *ca)
continue; continue;
} }
if (ca->setpmt) { if (ca->setpmt) {
dbgprintf(DEBUG_DVB, "got new PMT %08x\n", ca->pmt_new); dbgprintf(DEBUG_CI, "got new PMT %04x %04x %04x ...\n",
ca->pmt_new[0],
ca->pmt_new[1],
ca->pmt_new[2]);
memcpy(ca->pmt, ca->pmt_new, sizeof(ca->pmt)); memcpy(ca->pmt, ca->pmt_new, sizeof(ca->pmt));
dbgprintf(DEBUG_CI, "copied: %04x %04x %04x ...\n",
ca->pmt[0],
ca->pmt[1],
ca->pmt[2]);
memset(ca->pmt_old, 0, sizeof(ca->pmt_old)); memset(ca->pmt_old, 0, sizeof(ca->pmt_old));
for (i = 0; i < MAX_PMT; i++) for (i = 0; i < MAX_PMT; i++)
ca->ca_pmt_version[i] = -1; ca->ca_pmt_version[i] = -1;
@ -1506,10 +1669,10 @@ static void handle_ci(struct dvbca *ca)
int set_pmt(struct dvbca *ca, uint32_t *pmt) int set_pmt(struct dvbca *ca, uint32_t *pmt)
{ {
dbgprintf(DEBUG_DVB, "set_pmt %08x %08x %08x\n", pmt[0], pmt[1], pmt[2]); dbgprintf(DEBUG_CI, "set_pmt %08x %08x %08x\n", pmt[0], pmt[1], pmt[2]);
pthread_mutex_lock(&ca->mutex); pthread_mutex_lock(&ca->mutex);
ca->setpmt = 1;
memcpy(ca->pmt_new, pmt, sizeof(ca->pmt_new)); memcpy(ca->pmt_new, pmt, sizeof(ca->pmt_new));
ca->setpmt = 1;
pthread_mutex_unlock(&ca->mutex); pthread_mutex_unlock(&ca->mutex);
return 0; return 0;
} }
@ -1600,19 +1763,19 @@ static int init_ca_stack(struct dvbca *ca)
{ {
ca->tl = en50221_tl_create(1, 16); ca->tl = en50221_tl_create(1, 16);
if (ca->tl == NULL) { if (ca->tl == NULL) {
dbgprintf(DEBUG_DVB, "Failed to create transport layer\n"); dbgprintf(DEBUG_CI, "Failed to create transport layer\n");
return -1; return -1;
} }
ca->sl = en50221_sl_create(ca->tl, 16); ca->sl = en50221_sl_create(ca->tl, 16);
if (ca->sl == NULL) { if (ca->sl == NULL) {
dbgprintf(DEBUG_DVB, "Failed to create session layer\n"); dbgprintf(DEBUG_CI, "Failed to create session layer\n");
en50221_tl_destroy(ca->tl); en50221_tl_destroy(ca->tl);
return -1; return -1;
} }
ca->stdcam = en50221_stdcam_llci_create(ca->fd, 0, ca->tl, ca->sl); ca->stdcam = en50221_stdcam_llci_create(ca->fd, 0, ca->tl, ca->sl);
if (!ca->stdcam) { if (!ca->stdcam) {
dbgprintf(DEBUG_DVB, "Failed to create stdcam\n"); dbgprintf(DEBUG_CI, "Failed to create stdcam\n");
en50221_sl_destroy(ca->sl); en50221_sl_destroy(ca->sl);
en50221_tl_destroy(ca->tl); en50221_tl_destroy(ca->tl);
return -1; return -1;
@ -1622,6 +1785,7 @@ static int init_ca_stack(struct dvbca *ca)
} }
if (ca->stdcam->ca_resource) { if (ca->stdcam->ca_resource) {
en50221_app_ca_register_info_callback(ca->stdcam->ca_resource, ca_info_callback, ca); en50221_app_ca_register_info_callback(ca->stdcam->ca_resource, ca_info_callback, ca);
en50221_app_ca_register_pmt_reply_callback(ca->stdcam->ca_resource, ca_pmt_reply_callback, ca);
} }
if (ca->stdcam->mmi_resource) { if (ca->stdcam->mmi_resource) {
en50221_app_mmi_register_close_callback(ca->stdcam->mmi_resource, mmi_close_callback, ca); en50221_app_mmi_register_close_callback(ca->stdcam->mmi_resource, mmi_close_callback, ca);
@ -1631,7 +1795,7 @@ static int init_ca_stack(struct dvbca *ca)
en50221_app_mmi_register_menu_callback(ca->stdcam->mmi_resource, mmi_menu_callback, ca); en50221_app_mmi_register_menu_callback(ca->stdcam->mmi_resource, mmi_menu_callback, ca);
en50221_app_mmi_register_list_callback(ca->stdcam->mmi_resource, mmi_menu_callback, ca); en50221_app_mmi_register_list_callback(ca->stdcam->mmi_resource, mmi_menu_callback, ca);
} else { } else {
dbgprintf(DEBUG_DVB, dbgprintf(DEBUG_CI,
"CAM Menus are not supported by this interface hardware\n"); "CAM Menus are not supported by this interface hardware\n");
} }
return 0; return 0;
@ -1673,7 +1837,7 @@ static int scan_dvbca(struct octoserve *os)
} }
} }
} }
dbgprintf(DEBUG_DVB, "Found %d CA interfaces\n", os->dvbca_num); dbgprintf(DEBUG_CI, "Found %d CA interfaces\n", os->dvbca_num);
} }
void scif_config(struct octoserve *os, char *name, char *val) void scif_config(struct octoserve *os, char *name, char *val)
@ -1776,7 +1940,7 @@ void lnb_config(struct octoserve *os, char *name, char *val)
} }
} }
int init_dvb(struct octoserve *os, int nodvbt, int msmode) int init_dvb(struct octoserve *os)
{ {
int i, j; int i, j;
uint32_t fmode; uint32_t fmode;
@ -1786,13 +1950,16 @@ int init_dvb(struct octoserve *os, int nodvbt, int msmode)
os->scif_type = 0; os->scif_type = 0;
parse_config(os, "scif", &scif_config); parse_config(os, "scif", &scif_config);
scan_dvbfe(os, nodvbt, msmode); scan_dvbfe(os);
scan_dvbca(os); scan_dvbca(os);
if (os->scif_type) if (os->scif_type)
fmode = 0; fmode = 0;
else else
fmode = msmode; fmode = os->msmode;
dbgprintf(DEBUG_DVB, "fmode = %u, msmode = %u hasfeswitch = %u\n",
fmode, os->msmode, os->has_feswitch);
if (os->has_feswitch) if (os->has_feswitch)
set_fmode(fmode); set_fmode(fmode);

View File

@ -162,19 +162,34 @@ void send_xml(struct os_ssdp *ss)
uint8_t *mac = &os->mac[0]; uint8_t *mac = &os->mac[0];
int serial = (mac[5] | (mac[4] << 8) | (mac[3] << 16)) / 2; int serial = (mac[5] | (mac[4] << 8) | (mac[3] << 16)) / 2;
char boxname[80]; char boxname[80];
int i;
read_boxname(boxname); read_boxname(boxname);
len = 0; len = 0;
for (i = 0; i < 5; i++)
switch ((i + os->first_ds) % 5) {
case 0:
if (os->dvbs2num) if (os->dvbs2num)
len += sprintf(cap + len, ",DVBS2-%u", os->dvbs2num); len += sprintf(cap + len, ",DVBS2-%u", os->dvbs2num);
break;
case 1:
if (os->dvbtnum) if (os->dvbtnum)
len += sprintf(cap + len, ",DVBT-%u", os->dvbtnum); len += sprintf(cap + len, ",DVBT-%u", os->dvbtnum);
break;
case 2:
if (os->dvbt2num) if (os->dvbt2num)
len += sprintf(cap + len, ",DVBT2-%u", os->dvbt2num); len += sprintf(cap + len, ",DVBT2-%u", os->dvbt2num);
break;
case 3:
if (os->dvbcnum) if (os->dvbcnum)
len += sprintf(cap + len, ",DVBC-%u", os->dvbcnum); len += sprintf(cap + len, ",DVBC-%u", os->dvbcnum);
break;
case 4:
if (os->dvbc2num) if (os->dvbc2num)
len += sprintf(cap + len, ",DVBC2-%u", os->dvbc2num); len += sprintf(cap + len, ",DVBC2-%u", os->dvbc2num);
break;
}
len = snprintf(buf, sizeof(buf), xmldesc, len = snprintf(buf, sizeof(buf), xmldesc,
ss->configid, boxname, ss->configid, boxname,
serial, ss->uuid_str, cap + 1); serial, ss->uuid_str, cap + 1);
@ -226,6 +241,7 @@ void send_serverinfo(struct os_ssdp *ss)
sendstr(fd, "Octoserve.DeviceID = %u;\r\n", ss->devid); sendstr(fd, "Octoserve.DeviceID = %u;\r\n", ss->devid);
sendstr(fd, "Octoserve.MAC = \"%02x:%02x:%02x:%02x:%02x:%02x\";\r\n", sendstr(fd, "Octoserve.MAC = \"%02x:%02x:%02x:%02x:%02x:%02x\";\r\n",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
sendstr(fd, "Octoserve.DelsysMask = %u;\r\n", os->delsys_mask);
sendstr(fd, "Octoserve.TunerList = new Array();\r\n"); sendstr(fd, "Octoserve.TunerList = new Array();\r\n");
for (i = 0; i < os->dvbfe_num; i++) { for (i = 0; i < os->dvbfe_num; i++) {
struct dvbfe *fe = &os->dvbfe[i]; struct dvbfe *fe = &os->dvbfe[i];
@ -265,7 +281,7 @@ void send_serverinfo(struct os_ssdp *ss)
types[pos] = '-'; types[pos] = '-';
} }
sendstr(fd, "Octoserve.TunerList[%d] = new Object();\r\n", i); sendstr(fd, "Octoserve.TunerList[%d] = new Object();\r\n", i);
sendstr(fd, "Octoserve.TunerList[%d].Type = 0;\r\n", i); sendstr(fd, "Octoserve.TunerList[%d].Type = %u;\r\n", i, fe->type_orig);
sendstr(fd, "Octoserve.TunerList[%d].Desc = \"%s\";\r\n", i, types); sendstr(fd, "Octoserve.TunerList[%d].Desc = \"%s\";\r\n", i, types);
} else { } else {
sendstr(fd, "Octoserve.TunerList[%d] = false;\r\n", i); sendstr(fd, "Octoserve.TunerList[%d] = false;\r\n", i);
@ -330,7 +346,7 @@ void send_json_serverinfo(struct os_ssdp *ss)
types[pos] = '-'; types[pos] = '-';
} }
sendstr(fd, ",\"Present\":true", i); sendstr(fd, ",\"Present\":true", i);
sendstr(fd, ",\"Type\":0"); sendstr(fd, ",\"Type\":%u", fe->type);
sendstr(fd, ",\"Desc\":\"%s\"", types); sendstr(fd, ",\"Desc\":\"%s\"", types);
} else { } else {
sendstr(fd, "\"Present\":false", i); sendstr(fd, "\"Present\":false", i);
@ -561,7 +577,8 @@ void handle_http(struct os_ssdp *ss)
while (buf[j] && buf[j] != '\r' && buf[j] != ' ') while (buf[j] && buf[j] != '\r' && buf[j] != ' ')
j++; j++;
buf[j] = 0; buf[j] = 0;
if (i == j) { if (i == j ||
(NULL !=strstr(buf + i, ".."))) {
send_http_error(ss->csock, 404); send_http_error(ss->csock, 404);
break; break;
} }

View File

@ -55,7 +55,7 @@ void proc_igmp(struct octoserve *os, uint8_t *b, int l, uint8_t *macheader)
//0x0000: 0100 5e07 0101 089e 01b2 03c9 0800 46c0 //0x0000: 0100 5e07 0101 089e 01b2 03c9 0800 46c0
//0x0010: 0020 0000 4000 0102 3159 c0a8 020e ef07 //0x0010: 0020 0000 4000 0102 3159 c0a8 020e ef07
//0x0020: 0101 9404 0000 1600 f9f6 ef07 0101 //0x0020: 0101 9404 0000 1600 f9f6 ef07 0101
dump(b, l); //dump(b, l);
sprintf(sd, "%03d.%03d.%03d.%03d -> %03d.%03d.%03d.%03d", sprintf(sd, "%03d.%03d.%03d.%03d -> %03d.%03d.%03d.%03d",
b[12], b[13], b[14], b[15], b[12], b[13], b[14], b[15],
b[16], b[17], b[18], b[19]); b[16], b[17], b[18], b[19]);

View File

@ -44,14 +44,14 @@ void dump(const uint8_t *b, int l)
for (j = 0; j < l; j += 16, b += 16) { for (j = 0; j < l; j += 16, b += 16) {
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
if (i + j < l) if (i + j < l)
printf("%02x ", b[i]); fprintf(stderr, "%02x ", b[i]);
else else
printf(" "); fprintf(stderr, " ");
printf(" | "); fprintf(stderr, " | ");
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
if (i + j < l) if (i + j < l)
putchar((b[i] > 31 && b[i] < 127) ? b[i] : '.'); fputc((b[i] > 31 && b[i] < 127) ? b[i] : '.', stderr);
printf("\n"); fprintf(stderr, "\n");
} }
} }
@ -214,7 +214,7 @@ void send_error(struct oscon *con, int err)
if (rerr->number == err) if (rerr->number == err)
break; break;
if (!rerr->number) { if (!rerr->number) {
printf("Internal Error: invalid error number %d\n", err); dbgprintf(DEBUG_NET, "Internal Error: invalid error number %d\n", err);
return; return;
} }
len=sprintf(buf, len=sprintf(buf,
@ -246,7 +246,7 @@ static struct dvbca *alloc_ca_num(struct osstrm *str, int num)
pthread_mutex_lock(&os->lock); pthread_mutex_lock(&os->lock);
ca = &os->dvbca[num]; ca = &os->dvbca[num];
if (ca->state == 0) { if (ca->state == 0) {
printf("alloced ca %d\n", num); dbgprintf(DEBUG_CI, "alloced ca %d\n", num);
pthread_mutex_lock(&ca->mutex); pthread_mutex_lock(&ca->mutex);
memset(ca->pmt, 0, sizeof(ca->pmt)); memset(ca->pmt, 0, sizeof(ca->pmt));
ca->state = 1; ca->state = 1;
@ -266,12 +266,12 @@ static struct dvbca *alloc_ca(struct osstrm *str)
struct dvbca *ca; struct dvbca *ca;
uint32_t i; uint32_t i;
printf("alloc ca\n"); dbgprintf(DEBUG_CI, "alloc ca\n");
pthread_mutex_lock(&os->lock); pthread_mutex_lock(&os->lock);
for (i = 0; i < os->dvbca_num; i++) { for (i = 0; i < os->dvbca_num; i++) {
ca = &os->dvbca[i]; ca = &os->dvbca[i];
if (ca->state == 0) { if (ca->state == 0) {
printf("alloced ca %d\n", i); dbgprintf(DEBUG_CI, "alloced ca %d\n", i);
pthread_mutex_lock(&ca->mutex); pthread_mutex_lock(&ca->mutex);
memset(ca->pmt, 0, sizeof(ca->pmt)); memset(ca->pmt, 0, sizeof(ca->pmt));
ca->state = 1; ca->state = 1;
@ -524,21 +524,22 @@ static void check_mccs(struct ossess *sess)
sess->mcc_tag++; sess->mcc_tag++;
send_igmp_query(sess->os, sess->trans.mcip, 10); send_igmp_query(sess->os, sess->trans.mcip, 10);
sess->mcc_time = t; sess->mcc_time = t;
printf("%u: mcc_state 1 done, tag = %d\n", t, sess->mcc_tag); dbgprintf(DEBUG_IGMP, "%u: mcc_state 1 done, tag = %d\n", t, sess->mcc_tag);
} }
break; break;
case 2: case 2:
if (tdiff >= 1) { if (tdiff >= 1) {
sess->mcc_state = 3; sess->mcc_state = 3;
send_igmp_query(sess->os, sess->trans.mcip, 10); send_igmp_query(sess->os, sess->trans.mcip, 10);
printf("%u: mcc_state 2 done, tag = %d\n", t, sess->mcc_tag); dbgprintf(DEBUG_IGMP, "%u: mcc_state 2 done, tag = %d\n", t, sess->mcc_tag);
} }
break; break;
case 3: case 3:
if (tdiff >= 2) { if (tdiff >= 2) {
sess->mcc_state = 0; sess->mcc_state = 0;
sess->mcc_time = t; sess->mcc_time = t;
printf("%u: mcc_state 3 done, tag = %d\n", t, sess->mcc_tag); dbgprintf(DEBUG_IGMP,
"%u: mcc_state 3 done, tag = %d\n", t, sess->mcc_tag);
update = 1; update = 1;
} }
break; break;
@ -666,7 +667,7 @@ static struct oscon *alloc_con(struct octoserve *os)
int die(char *msg) int die(char *msg)
{ {
printf("%s\n", msg); dbgprintf(DEBUG_SYS, "%s\n", msg);
exit(-1); exit(-1);
} }
@ -699,16 +700,17 @@ static void send_option(struct oscon *con)
#define PAR2STR(par) ((p->set & (1UL << PARAM_##par)) ? par##2str[p->param[PARAM_POL]] : "") #define PAR2STR(par) ((p->set & (1UL << PARAM_##par)) ? par##2str[p->param[PARAM_POL]] : "")
char *pol2str[] = {"", "v", "h", "r", "l", NULL}; char *pol2str[] = {"", "v", "h", "r", "l", NULL};
char *msys2str [] = {"", "undef", "dvbc", "dvbcb", "dvbt", "dss", "dvbs", "dvbs2", "dvbh", char *msys2str [] = {"", "undef", "dvbc", "j83b", "dvbt", "dss", "dvbs", "dvbs2", "dvbh",
"isdbt", "isdbs", "isdbc", "atsc", "atscmh", "dtmb", "cmmb", "dab", "isdbt", "isdbs", "isdbc", "atsc", "atscmh", "dtmb", "cmmb", "dab",
"dvbt2", "turbo", "dvbcc", "dvbc2", NULL}; "dvbt2", "turbo", "dvbcc", "dvbc2", NULL};
char *mtype2str [] = {"", "qpsk", "16qam", "32qam", char *mtype2str [] = {"", "qpsk", "16qam", "32qam",
"64qam", "128qam", "256qam", "64qam", "128qam", "256qam",
"autoqam", "8vsb", "16vsb", "8psk", "autoqam", "8vsb", "16vsb", "8psk",
"16apsk", "32apsk", "dqpsk", "4qamnr", NULL}; "16apsk", "32apsk", "dqpsk", "4qamnr",
"64apsk", "128apsk", "256apsk", NULL};
char *pilot2str [] = {"", "on", "off", "auto", NULL}; char *pilot2str [] = {"", "on", "off", "auto", NULL};
char *roll2str [] = {"", "0.35", "0.20", "0.25", NULL}; char *roll2str [] = {"", "0.35", "0.20", "0.25", NULL};
char *fec2str [] = {"", "none", "12", "23", "34", "56", "78", "89", "35", "45", "910", "25", NULL}; char *fec2str [] = {"", "none", "12", "23", "34", "45", "56", "67", "78", "89", "auto", "35", "910", "25", "14", "13", NULL};
char *bw2str [] = {"", "8", "7", "6", "auto", "5", "10", "1.712", NULL }; char *bw2str [] = {"", "8", "7", "6", "auto", "5", "10", "1.712", NULL };
char *tmode2str [] = { "", "2k", "8k", "auto", "4k", "1k", "16k", "32k", "c1", "c3780", NULL}; char *tmode2str [] = { "", "2k", "8k", "auto", "4k", "1k", "16k", "32k", "c1", "c3780", NULL};
char *gi2str [] = { "", "132", "116", "18", "14", "auto", "1128", "19128", "19256", "pn420", "pn595", "pn945", NULL}; char *gi2str [] = { "", "132", "116", "18", "14", "auto", "1128", "19128", "19256", "pn420", "pn595", "pn945", NULL};
@ -1113,12 +1115,13 @@ static int parse_url(struct oscon *con, int streamonly)
dbgprintf(DEBUG_SYS, "t2id=%d, ", p->param[PARAM_T2ID]); dbgprintf(DEBUG_SYS, "t2id=%d, ", p->param[PARAM_T2ID]);
} else if (!strncasecmp(url, "x_isi=", 6)) { } else if (!strncasecmp(url, "x_isi=", 6)) {
url += 6; url += 6;
p->param[PARAM_ISI] = strtoul(url, &end, 10); p->param[PARAM_ISI] = strtoul(url, &end, 0);
if (end == url) if (end == url)
break; break;
p->set |= (1UL << PARAM_ISI); p->set |= (1UL << PARAM_ISI);
dbgprintf(DEBUG_SYS, "x_isi=%d, ", p->param[PARAM_ISI]); dbgprintf(DEBUG_SYS, "x_isi=%d, ", p->param[PARAM_ISI]);
} else if (!strncasecmp(url, "x_pls=", 6)) { } else if (!strncasecmp(url, "x_pls=", 6) ||
!strncasecmp(url, "x_ssi=", 6)) {
url += 6; url += 6;
p->param[PARAM_PLS] = strtoul(url, &end, 0); p->param[PARAM_PLS] = strtoul(url, &end, 0);
if (end == url) if (end == url)
@ -1387,7 +1390,9 @@ static int setup_nsp(struct ostrans *trans, struct dvb_ns_params *nsp)
memset(nsp, 0, sizeof(struct dvb_ns_params)); memset(nsp, 0, sizeof(struct dvb_ns_params));
memcpy(nsp->dmac, trans->cmac, 6); memcpy(nsp->dmac, trans->cmac, 6);
memcpy(nsp->smac, trans->smac, 6); memcpy(nsp->smac, trans->smac, 6);
#ifndef MAC_ODD
nsp->smac[5] |= 1; nsp->smac[5] |= 1;
#endif
nsp->sport = trans->sport; nsp->sport = trans->sport;
nsp->sport2 = trans->sport2; nsp->sport2 = trans->sport2;
nsp->dport = trans->cport; nsp->dport = trans->cport;
@ -1622,7 +1627,7 @@ static int stop_session(struct ossess *sess)
return 0; return 0;
sess->playing &= ~1; sess->playing &= ~1;
if (!session_is_playing(sess)) { if (!session_is_playing(sess)) {
printf("stopping session %d\n", sess->nr); dbgprintf(DEBUG_RTSP, "stopping session %d\n", sess->nr);
if (sess->nsfd >= 0) if (sess->nsfd >= 0)
ioctl(sess->nsfd, NS_STOP); ioctl(sess->nsfd, NS_STOP);
} }
@ -1633,7 +1638,7 @@ static int stop_session(struct ossess *sess)
static int start_session(struct ossess *sess) static int start_session(struct ossess *sess)
{ {
if (!session_is_playing(sess)) { if (!session_is_playing(sess)) {
dbgprintf(DEBUG_SYS, "start session %d\n", sess->nr); dbgprintf(DEBUG_RTSP, "start session %d\n", sess->nr);
if (sess->stream->ca) { if (sess->stream->ca) {
uint8_t canum = sess->stream->ca->nr - 1; uint8_t canum = sess->stream->ca->nr - 1;
if (sess->nsfd >= 0) if (sess->nsfd >= 0)
@ -1713,10 +1718,10 @@ void mc_check(struct ossess *sess, int update)
next = mcc->mcc.le_next; next = mcc->mcc.le_next;
if (((sess->mcc_state == 0) && (sess->mcc_tag != mcc->tag)) || if (((sess->mcc_state == 0) && (sess->mcc_tag != mcc->tag)) ||
(((os->igmp_mode & 1) == 0) && (os->igmp_tag - mcc->gtag) > 1)) { (((os->igmp_mode & 1) == 0) && (os->igmp_tag - mcc->gtag) > 1)) {
printf("removed client at %u.%u.%u.%u\n", dbgprintf(DEBUG_IGMP, "removed client at %u.%u.%u.%u\n",
mcc->ip[0], mcc->ip[1], mcc->ip[2], mcc->ip[3]); mcc->ip[0], mcc->ip[1], mcc->ip[2], mcc->ip[3]);
printf("mcc_tags: %d %d\n", sess->mcc_tag, mcc->tag); dbgprintf(DEBUG_IGMP, "mcc_tags: %d %d\n", sess->mcc_tag, mcc->tag);
printf("gtags: %d %d\n", os->igmp_tag, mcc->gtag); dbgprintf(DEBUG_IGMP, "gtags: %d %d\n", os->igmp_tag, mcc->gtag);
LIST_REMOVE(mcc, mcc); LIST_REMOVE(mcc, mcc);
free(mcc); free(mcc);
} }
@ -1768,18 +1773,19 @@ void mc_join(struct octoserve *os, uint8_t *ip, uint8_t *mac, uint8_t *group)
goto out; goto out;
session_mc_timeout(sess); session_mc_timeout(sess);
printf("matched session %d to join %u.%u.%u.%u\n", dbgprintf(DEBUG_IGMP, "matched session %d to join %u.%u.%u.%u\n",
sess->nr, ip[0], ip[1], ip[2], ip[3]); sess->nr, ip[0], ip[1], ip[2], ip[3]);
for (mcc = sess->mccs.lh_first; mcc; mcc = mcc->mcc.le_next) for (mcc = sess->mccs.lh_first; mcc; mcc = mcc->mcc.le_next)
if (!memcmp(ip, mcc->ip, 4)) { if (!memcmp(ip, mcc->ip, 4)) {
mcc->tag = sess->mcc_tag; mcc->tag = sess->mcc_tag;
mcc->gtag = os->igmp_tag; mcc->gtag = os->igmp_tag;
printf("already in list, tag = %08x, gtag = %08x\n", mcc->tag, mcc->gtag); dbgprintf(DEBUG_IGMP,
"already in list, tag = %08x, gtag = %08x\n", mcc->tag, mcc->gtag);
goto out; goto out;
} }
newmcc = malloc(sizeof(struct osmcc)); newmcc = malloc(sizeof(struct osmcc));
if (!newmcc) { if (!newmcc) {
printf("Could not allocate new multicast client entry\n"); dbgprintf(DEBUG_IGMP, "Could not allocate new multicast client entry\n");
goto out; goto out;
} }
memset(newmcc, 0, sizeof(struct osmcc)); memset(newmcc, 0, sizeof(struct osmcc));
@ -1795,7 +1801,7 @@ void mc_join(struct octoserve *os, uint8_t *ip, uint8_t *mac, uint8_t *group)
port = switch_get_port(newmcc->mac); port = switch_get_port(newmcc->mac);
else else
port = 0; port = 0;
printf("New client at port %02x\n", port); dbgprintf(DEBUG_IGMP, "New client at port %02x\n", port);
if (port >= 0) { if (port >= 0) {
newmcc->port_vec = port; newmcc->port_vec = port;
sess->mcc_port_vec |= port; sess->mcc_port_vec |= port;
@ -1825,7 +1831,7 @@ void mc_leave(struct octoserve *os, uint8_t *ip, uint8_t *group)
if ((sess = match_session(os, group)) == NULL) if ((sess = match_session(os, group)) == NULL)
goto out; goto out;
printf("matched session %d to leave %u.%u.%u.%u\n", dbgprintf(DEBUG_IGMP, "matched session %d to leave %u.%u.%u.%u\n",
sess->nr, ip[0], ip[1], ip[2], ip[3]); sess->nr, ip[0], ip[1], ip[2], ip[3]);
mc_query(sess); mc_query(sess);
@ -1887,7 +1893,7 @@ static int parse_transport(struct oscon *con, char *line)
for (arg = line; *arg == ' '; arg++); for (arg = line; *arg == ' '; arg++);
do { do {
printf("arg:%s\n", arg); dbgprintf(DEBUG_RTSP, "arg:%s\n", arg);
if (!strncasecmp(arg, "RTP/AVP/UDP", 11)) { if (!strncasecmp(arg, "RTP/AVP/UDP", 11)) {
t->rtp = 1; t->rtp = 1;
end = arg + 11; end = arg + 11;
@ -1982,7 +1988,7 @@ static int parse_x_octonet(struct oscon *con, char *line)
if (port < 7) if (port < 7)
con->x_ports |= 1 << (port - 1); con->x_ports |= 1 << (port - 1);
} while (*(arg++) == ','); } while (*(arg++) == ',');
printf("x_ports = %02x\n", con->x_ports); dbgprintf(DEBUG_SWITCH, "x_ports = %02x\n", con->x_ports);
} else } else
return -1; return -1;
arg = end; arg = end;
@ -2229,7 +2235,7 @@ static int proc_line(struct oscon *con)
} }
if (con->x_octonet_parsed) { if (con->x_octonet_parsed) {
con->session->port_vec = con->x_ports; con->session->port_vec = con->x_ports;
printf("port_vec = %02x\n", con->session->port_vec); dbgprintf(DEBUG_SWITCH, "port_vec = %02x\n", con->session->port_vec);
} }
res = play_session(con); res = play_session(con);
if (res < 0) if (res < 0)
@ -2543,7 +2549,7 @@ static int alloc_igmp_raw_socket(struct octoserve *os)
n = setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &sfprog, sizeof(sfprog)); n = setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &sfprog, sizeof(sfprog));
if (n < 0) { if (n < 0) {
printf("could not set filter\n"); dbgprintf(DEBUG_NET, "could not set filter\n");
} }
#if 0 #if 0
@ -2649,7 +2655,7 @@ static void os_serve(struct octoserve *os)
} }
if (FD_ISSET(os->mld_sock, &fds)) { if (FD_ISSET(os->mld_sock, &fds)) {
n = recvfrom(os->mld_sock, buf, sizeof(buf), 0, &cadr, &clen); n = recvfrom(os->mld_sock, buf, sizeof(buf), 0, &cadr, &clen);
printf("n = %d\n", n); //printf("n = %d\n", n);
if (n > 0) if (n > 0)
;//dump(buf, n); ;//dump(buf, n);
} }
@ -2691,91 +2697,6 @@ static void os_serve(struct octoserve *os)
killall_sessions(os); killall_sessions(os);
} }
static struct octoserve *os_init(char *ifname, int nossdp, int nodms, int nodvbt, int msmode)
{
struct octoserve *os;
struct os_ssdp *ss;
struct ifreq ifr;
int s;
pthread_mutexattr_t mta;
os = malloc(sizeof(*os));
if (!os)
return NULL;
dbgprintf(DEBUG_SYS, "allocated octoserve struct, %d bytes\n", sizeof(*os));
memset(os, 0, sizeof(struct octoserve));
pthread_mutexattr_init(&mta);
pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&os->lock, &mta);
os->ifname = ifname;
os->sessionid = random();
if (get_ifa(ifname, AF_INET, (struct sockaddr *) &os->ssdp.sadr) < 0) {
perror("no such interface:");
free(os);
return NULL;
}
get_ifa(ifname, AF_INET6, (struct sockaddr *) &os->ssdp.sadr6);
sockname((struct sockaddr *) &os->ssdp.sadr, os->ssdp.ip);
sockname((struct sockaddr *) &os->ssdp.sadr6, os->ssdp.ip6);
strcpy(ifr.ifr_name, os->ifname);
s = socket(AF_INET, SOCK_DGRAM, 0);
ioctl(s, SIOCGIFHWADDR, &ifr);
close(s);
memcpy(os->mac, ifr.ifr_hwaddr.sa_data, 6);
dbgprintf(DEBUG_NET, "MAC %s=%02x:%02x:%02x:%02x:%02x:%02x\n",
os->ifname,
os->mac[0], os->mac[1], os->mac[2],
os->mac[3], os->mac[4], os->mac[5]);
if (os->has_switch)
switch_get_port(os->mac);
init_dvb(os, nodvbt, msmode);
ss = &os->ssdp;
if (init_ssdp(os, &os->ssdp, debug, nossdp, nodms) < 0) {
release_dvb(os);
free(os);
return NULL;
}
#if 0
if (init_httpos, debug) < 0) {
release_dvb(os);
free(os);
return NULL;
}
#endif
return os;
}
struct octoserve *os;
void term_action(int sig)
{
printf("EXIT\n");
os->exit = 1;
}
static int set_termaction(void)
{
struct sigaction term;
memset(&term, 0, sizeof(term));
term.sa_handler = term_action;
sigemptyset(&term.sa_mask);
term.sa_flags = 0;
sigaction(SIGINT, &term, NULL);
memset(&term, 0, sizeof(term));
term.sa_handler = term_action;
sigemptyset(&term.sa_mask);
term.sa_flags = 0;
sigaction(SIGTERM, &term, NULL);
}
static int fexists(char *fn) static int fexists(char *fn)
{ {
struct stat b; struct stat b;
@ -2783,6 +2704,49 @@ static int fexists(char *fn)
return (!stat(fn, &b)); return (!stat(fn, &b));
} }
static int read_num(char *fn, int *num)
{
FILE *f;
f = fopen(fn, "r");
if (!f)
return -1;
fscanf(f, "%i", num);
fclose(f);
return 0;
}
static void read_first_ds(struct octoserve *os)
{
int num;
int res = read_num("/config/first_ds", &num);
if (res < 0)
os->first_ds = 0;
else
os->first_ds = num;
dbgprintf(DEBUG_SYS, "first_ds = %u\n", os->first_ds);
}
static void read_delsys_mask(struct octoserve *os)
{
int fd, len;
char mask[80];
os->delsys_mask = 0;
fd = open("/config/delsys_mask", O_RDONLY);
if (fd < 0)
return;
len = read(fd, mask, 79);
if (len < 0)
return;
close (fd);
if (len)
os->delsys_mask = strtol(mask, NULL, 0);
dbgprintf(DEBUG_SYS, "delsys_mask = %08x\n", os->delsys_mask);
}
static int read_msmode(char *fn) static int read_msmode(char *fn)
{ {
int fd, len; int fd, len;
@ -2808,17 +2772,108 @@ static int read_msmode(char *fn)
return 0; return 0;
} }
static struct octoserve *os_init(char *ifname, int nossdp, int nodms)
{
struct octoserve *os;
struct os_ssdp *ss;
struct ifreq ifr;
int s;
pthread_mutexattr_t mta;
os = malloc(sizeof(*os));
if (!os)
return NULL;
dbgprintf(DEBUG_SYS, "allocated octoserve struct, %d bytes\n", sizeof(*os));
memset(os, 0, sizeof(struct octoserve));
if (fexists("/config/nodvbt.enabled"))
os->nodvbt = 1;
os->msmode = read_msmode("/config/msmode");
read_first_ds(os);
read_delsys_mask(os);
pthread_mutexattr_init(&mta);
pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&os->lock, &mta);
os->ifname = ifname;
os->sessionid = random();
if (get_ifa(ifname, AF_INET, (struct sockaddr *) &os->ssdp.sadr) < 0) {
perror("no such interface:");
free(os);
return NULL;
}
get_ifa(ifname, AF_INET6, (struct sockaddr *) &os->ssdp.sadr6);
sockname((struct sockaddr *) &os->ssdp.sadr, os->ssdp.ip);
sockname((struct sockaddr *) &os->ssdp.sadr6, os->ssdp.ip6);
strcpy(ifr.ifr_name, os->ifname);
s = socket(AF_INET, SOCK_DGRAM, 0);
ioctl(s, SIOCGIFHWADDR, &ifr);
close(s);
memcpy(os->mac, ifr.ifr_hwaddr.sa_data, 6);
dbgprintf(DEBUG_NET, "MAC %s=%02x:%02x:%02x:%02x:%02x:%02x\n",
os->ifname,
os->mac[0], os->mac[1], os->mac[2],
os->mac[3], os->mac[4], os->mac[5]);
if (os->has_switch)
switch_get_port(os->mac);
switch_set_entry(os->mac, 0x20, 0x08);
init_dvb(os);
ss = &os->ssdp;
if (init_ssdp(os, &os->ssdp, debug, nossdp, nodms) < 0) {
release_dvb(os);
free(os);
return NULL;
}
#if 0
if (init_httpos, debug) < 0) {
release_dvb(os);
free(os);
return NULL;
}
#endif
return os;
}
struct octoserve *os;
void term_action(int sig)
{
dbgprintf(DEBUG_SYS, "EXIT\n");
os->exit = 1;
}
static int set_termaction(void)
{
struct sigaction term;
memset(&term, 0, sizeof(term));
term.sa_handler = term_action;
sigemptyset(&term.sa_mask);
term.sa_flags = 0;
sigaction(SIGINT, &term, NULL);
memset(&term, 0, sizeof(term));
term.sa_handler = term_action;
sigemptyset(&term.sa_mask);
term.sa_flags = 0;
sigaction(SIGTERM, &term, NULL);
}
static void awrite(char *fn, char *txt) static void awrite(char *fn, char *txt)
{ {
FILE *f = fopen(fn, "w"); FILE *f = fopen(fn, "w");
if (f) if (f)
fprintf(f, "%s", txt); fprintf(f, "%s", txt);
fclose(f);
} }
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int nodms = 0, nossdp = 0, nodvbt = 0, vlan = 0, msmode = 1; int nodms = 0, nossdp = 0, vlan = 0;
printf("Octoserve " OCTOSERVE_VERSION printf("Octoserve " OCTOSERVE_VERSION
", Copyright (C) 2012-15 Digital Devices GmbH\n"); ", Copyright (C) 2012-15 Digital Devices GmbH\n");
@ -2832,13 +2887,12 @@ int main(int argc, char **argv)
{"flags", required_argument, 0, 'f'}, {"flags", required_argument, 0, 'f'},
{"nossdp", no_argument, 0, 'n'}, {"nossdp", no_argument, 0, 'n'},
{"nodms", no_argument, 0, 'm'}, {"nodms", no_argument, 0, 'm'},
{"nodvbt", no_argument, 0, 't'},
{"conform", no_argument, 0, 'c'}, {"conform", no_argument, 0, 'c'},
{"help", no_argument , 0, 'h'}, {"help", no_argument , 0, 'h'},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
c = getopt_long(argc, argv, c = getopt_long(argc, argv,
"d:f:nmtsch", "d:f:nmch",
long_options, &option_index); long_options, &option_index);
if (c==-1) if (c==-1)
break; break;
@ -2856,9 +2910,6 @@ int main(int argc, char **argv)
case 'm': case 'm':
nodms = 1; nodms = 1;
break; break;
case 't':
nodvbt = 1;
break;
case 'c': case 'c':
conform = 1; conform = 1;
break; break;
@ -2869,30 +2920,27 @@ int main(int argc, char **argv)
} }
} }
if (optind < argc) { if (optind < argc) {
printf("Warning: unused arguments\n"); dbgprintf(DEBUG_SYS, "Warning: unused arguments\n");
} }
if (fexists("/config/nodms.enabled")) if (fexists("/config/nodms.enabled"))
nodms = 1; nodms = 1;
msmode = read_msmode("/config/msmode");
if (fexists("/config/nodvbt.enabled"))
nodvbt = 1;
if (fexists("/config/vlan.enabled")) { if (fexists("/config/vlan.enabled")) {
awrite("/sys/class/ddbridge/ddbridge0/vlan", "1"); awrite("/sys/class/ddbridge/ddbridge0/vlan", "1");
vlan = 1; vlan = 1;
} else } else
awrite("/sys/class/ddbridge/ddbridge0/vlan", "0"); awrite("/sys/class/ddbridge/ddbridge0/vlan", "0");
printf("nodms = %d, nodvbt = %d, vlan = %d\n", nodms, nodvbt, vlan); dbgprintf(DEBUG_SYS, "nodms = %d, vlan = %d\n", nodms, vlan);
os = os_init("eth0", nossdp, nodms, nodvbt, msmode); os = os_init("eth0", nossdp, nodms);
if (!os) if (!os)
return -1; return -1;
set_termaction(); set_termaction();
os->has_switch = switch_test(); os->has_switch = switch_test();
if (os->has_switch) if (os->has_switch)
printf("Switch detected\n"); dbgprintf(DEBUG_SYS, "Switch detected\n");
else else
printf("No switch detected\n"); dbgprintf(DEBUG_SYS, "No switch detected\n");
os_serve(os); os_serve(os);
if (!nossdp) if (!nossdp)

View File

@ -73,6 +73,7 @@
#define DEBUG_DVB 16 #define DEBUG_DVB 16
#define DEBUG_IGMP 32 #define DEBUG_IGMP 32
#define DEBUG_SWITCH 64 #define DEBUG_SWITCH 64
#define DEBUG_CI 128
#define DEBUG_DEBUG 256 #define DEBUG_DEBUG 256
#if 0 #if 0
@ -182,6 +183,7 @@ struct dvbfe {
int fd; int fd;
int dmx; int dmx;
uint32_t type; uint32_t type;
uint32_t type_orig;
int anum; int anum;
int fnum; int fnum;
int state; int state;
@ -501,6 +503,10 @@ struct octoserve {
int mld_sock; int mld_sock;
int has_switch; int has_switch;
int strict; int strict;
uint32_t delsys_mask;
int msmode;
int nodvbt;
uint32_t first_ds;
}; };
int streamsock(const char *port, int family, struct sockaddr *sadr); int streamsock(const char *port, int family, struct sockaddr *sadr);
@ -508,7 +514,7 @@ void sockname(struct sockaddr *sadr, char *name);
int get_ifa(const char *ifname, int iffam, struct sockaddr *sadr); int get_ifa(const char *ifname, int iffam, struct sockaddr *sadr);
int init_ssdp(struct octoserve *os, struct os_ssdp *ss, uint32_t d, int nossdp, int nodms); int init_ssdp(struct octoserve *os, struct os_ssdp *ss, uint32_t d, int nossdp, int nodms);
int dvb_tune(struct dvbfe *fe, struct dvb_params *p); int dvb_tune(struct dvbfe *fe, struct dvb_params *p);
int init_dvb(struct octoserve *os, int nodvbt, int noswitch); int init_dvb(struct octoserve *os);
int release_dvb(struct octoserve *os); int release_dvb(struct octoserve *os);
void parse_config(struct octoserve *os, char *sec, void parse_config(struct octoserve *os, char *sec,
void (*cb)(struct octoserve *, char *, char *)); void (*cb)(struct octoserve *, char *, char *));

View File

@ -105,6 +105,27 @@ int mdio_close(int fd)
close(fd); close(fd);
} }
int switch_set_entry(uint8_t mac[6], uint8_t vec, uint8_t type)
{
int fd = mdio_open();
dbgprintf(DEBUG_SWITCH, "switch_set_entry %02x:%02x:%02x:%02x:%02x:%02x = %02x %02x\n",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], vec, type);
if (fd < 0)
return -1;
if (vec)
mdio_writereg(fd, 0x1b, 0x0c, (vec << 4) | type);
else
mdio_writereg(fd, 0x1b, 0x0c, 0);
mdio_writereg(fd, 0x1b, 0x0d, ((uint16_t) mac[0] << 8) | mac[1]);
mdio_writereg(fd, 0x1b, 0x0e, ((uint16_t) mac[2] << 8) | mac[3]);
mdio_writereg(fd, 0x1b, 0x0f, ((uint16_t) mac[4] << 8) | mac[5]);
mdio_writereg(fd, 0x1b, 0x0b, 0xb000);
mdio_wait_switch(fd, 0x1b, 0x0b);
mdio_close(fd);
return 0;
}
int switch_get_port(uint8_t mac[6]) int switch_get_port(uint8_t mac[6])
{ {
int fd = mdio_open(); int fd = mdio_open();
@ -149,6 +170,7 @@ int switch_get_port(uint8_t mac[6])
return -1; return -1;
} }
int switch_set_multicast(uint8_t mac[6], uint8_t vec) int switch_set_multicast(uint8_t mac[6], uint8_t vec)
{ {
int fd = mdio_open(); int fd = mdio_open();

File diff suppressed because one or more lines are too long

View File

@ -97,6 +97,10 @@ else
Params = Params .. " --msys="..v Params = Params .. " --msys="..v
elseif p == "sr" then elseif p == "sr" then
Params = Params .. " --sr="..v Params = Params .. " --sr="..v
elseif p == "bw" then
Params = Params .. " --bw="..v
elseif p == "plp" then
Params = Params .. " --plp="..v
elseif p == "mtype" then elseif p == "mtype" then
Params = Params .. " --mtype="..v Params = Params .. " --mtype="..v
end end

View File

@ -189,6 +189,10 @@ if tl.SourceList then
Params = Params .. " --msys="..v Params = Params .. " --msys="..v
elseif p == "sr" then elseif p == "sr" then
Params = Params .. " --sr="..v Params = Params .. " --sr="..v
elseif p == "bw" then
Params = Params .. " --bw="..v
elseif p == "plp" then
Params = Params .. " --plp="..v
elseif p == "mtype" then elseif p == "mtype" then
Params = Params .. " --mtype="..v Params = Params .. " --mtype="..v
end end

41
octoserve/var/monitor/fancontrol.lua Executable file → Normal file
View File

@ -9,9 +9,31 @@ local LogFile = "/tmp/Temperatur.log"
local HighTemp = 50 local HighTemp = 50
local LowTemp = 45 local LowTemp = 45
function ReadAttribute(attribute)
local value = 0
local ddbridge = io.open(devicepath.."/"..attribute,"r");
if ddbridge then
value = ddbridge:read("*l")
ddbridge:close()
end
return value
end
function ReadTemp(sensor) function ReadTemp(sensor)
local temp = 0 local temp = 0
local file = io.open(devicepath.."/temp"..sensor) local file;
if sensor > 3 then
sensor = sensor - 4
if sensor == 0 then
file = io.open(devicepath.."/temp")
else
file = io.open(devicepath.."/templ"..sensor)
end
else
file = io.open(devicepath.."/temp"..sensor)
end
if file then if file then
temp = file:read() temp = file:read()
if temp == "no sensor" then if temp == "no sensor" then
@ -55,24 +77,21 @@ local fanstate = -1
sleep(30) sleep(30)
local ddbridge = io.open("/sys/class/ddbridge/ddbridge0/devid0","r"); local devid = ReadAttribute("devid0")
if ddbridge then
local devid = ddbridge:read("*l")
ddbridge:close()
if devid == "0307dd01" then if devid == "0307dd01" then
fanstate = 1 fanstate = 1
ddbridge = io.open("/sys/class/ddbridge/ddbridge0/fanspeed1","r"); local devid1 = ReadAttribute("devid1")
if ddbridge then if devid1 == "0009dd01" or devid1 == "000add01" then
local fs = tonumber(ddbridge:read("*l")) fanstate = -2
ddbridge:close() else
local fs = tonumber(ReadAttribute("fanspeed1"))
if fs > 0 and fs < 17000 then if fs > 0 and fs < 17000 then
fanstate = -2 fanstate = -2
end end
end end
end end
end
for i = 0,4,1 do for i = 0,8,1 do
temp = ReadTemp(i) temp = ReadTemp(i)
if temp > 0 then if temp > 0 then
Sensor[NumSensors] = i Sensor[NumSensors] = i

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -1,8 +1,44 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- (c)2012 Digital Devices GmbH. All rights reserved --> <!-- (c)2012 Digital Devices GmbH. All rights reserved -->
<!-- $Id: SCIFDataBase.xml 645 2016-02-09 18:33:05Z manfred $ --> <!-- $Id: SCIFDataBase.xml 695 2016-12-16 11:53:04Z manfred $ -->
<SCIFDataBase xmlns="http://schemas.DigitalDevices.de/SCIFDataBase"> <SCIFDataBase xmlns="http://schemas.DigitalDevices.de/SCIFDataBase">
<OutdoorUnit Name="IDLU-32UL40-UNBOO-OPP" Manufacturer="Inverto" Type="LNB" Protocol="EN50607"> <OutdoorUnit Name="IDLU-UST110-CUO4O-32P (4x16)" Manufacturer="Inverto" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" />
<UBSlot Frequency="1420" />
<UBSlot Frequency="1680" />
<UBSlot Frequency="2040" />
<UBSlot Frequency="985" />
<UBSlot Frequency="1050" />
<UBSlot Frequency="1115" />
<UBSlot Frequency="1275" />
<UBSlot Frequency="1340" />
<UBSlot Frequency="1485" />
<UBSlot Frequency="1550" />
<UBSlot Frequency="1615" />
<UBSlot Frequency="1745" />
<UBSlot Frequency="1810" />
<UBSlot Frequency="1875" />
<UBSlot Frequency="1940" />
</OutdoorUnit>
<OutdoorUnit Name="IDLU-UST110-CUO8O-32PP (8x16)" Manufacturer="Inverto" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" />
<UBSlot Frequency="1420" />
<UBSlot Frequency="1680" />
<UBSlot Frequency="2040" />
<UBSlot Frequency="985" />
<UBSlot Frequency="1050" />
<UBSlot Frequency="1115" />
<UBSlot Frequency="1275" />
<UBSlot Frequency="1340" />
<UBSlot Frequency="1485" />
<UBSlot Frequency="1550" />
<UBSlot Frequency="1615" />
<UBSlot Frequency="1745" />
<UBSlot Frequency="1810" />
<UBSlot Frequency="1875" />
<UBSlot Frequency="1940" />
</OutdoorUnit>
<OutdoorUnit Name="IDLU-32UL40-UNBOO-OPP" Manufacturer="Inverto" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" /> <UBSlot Frequency="1210" />
<UBSlot Frequency="1420" /> <UBSlot Frequency="1420" />
<UBSlot Frequency="1680" /> <UBSlot Frequency="1680" />
@ -36,7 +72,7 @@
<UBSlot Frequency="2112" /> <UBSlot Frequency="2112" />
<UBSlot Frequency="2147" /> <UBSlot Frequency="2147" />
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="IDLU-24UL40-UNMOO-OPP" Manufacturer="Inverto" Type="LNB" Protocol="EN50607"> <OutdoorUnit Name="IDLU-24UL40-UNMOO-OPP" Manufacturer="Inverto" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" /> <UBSlot Frequency="1210" />
<UBSlot Frequency="1420" /> <UBSlot Frequency="1420" />
<UBSlot Frequency="1680" /> <UBSlot Frequency="1680" />
@ -106,7 +142,7 @@
<UBSlot Frequency="1680"/> <UBSlot Frequency="1680"/>
<UBSlot Frequency="2040"/> <UBSlot Frequency="2040"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="IDLU-UST110-CUO1O-32P" Manufacturer="Inverto" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="IDLU-UST110-CUO1O-32P" Manufacturer="Inverto" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210"/> <UBSlot Frequency="1210"/>
<UBSlot Frequency="1420"/> <UBSlot Frequency="1420"/>
<UBSlot Frequency="1680"/> <UBSlot Frequency="1680"/>
@ -140,6 +176,66 @@
<UBSlot Frequency="2112"/> <UBSlot Frequency="2112"/>
<UBSlot Frequency="2148"/> <UBSlot Frequency="2148"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="IDLU-UWT110-CUO1O-32P" Manufacturer="Inverto" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210"/>
<UBSlot Frequency="1420"/>
<UBSlot Frequency="1680"/>
<UBSlot Frequency="2040"/>
<UBSlot Frequency="984"/>
<UBSlot Frequency="1020"/>
<UBSlot Frequency="1056"/>
<UBSlot Frequency="1092"/>
<UBSlot Frequency="1128"/>
<UBSlot Frequency="1164"/>
<UBSlot Frequency="1256"/>
<UBSlot Frequency="1292"/>
<UBSlot Frequency="1328"/>
<UBSlot Frequency="1364"/>
<UBSlot Frequency="1458"/>
<UBSlot Frequency="1494"/>
<UBSlot Frequency="1530"/>
<UBSlot Frequency="1566"/>
<UBSlot Frequency="1602"/>
<UBSlot Frequency="1638"/>
<UBSlot Frequency="1716"/>
<UBSlot Frequency="1752"/>
<UBSlot Frequency="1788"/>
<UBSlot Frequency="1824"/>
<UBSlot Frequency="1860"/>
<UBSlot Frequency="1896"/>
<UBSlot Frequency="1932"/>
<UBSlot Frequency="1968"/>
<UBSlot Frequency="2004"/>
<UBSlot Frequency="2076"/>
<UBSlot Frequency="2112"/>
<UBSlot Frequency="2148"/>
</OutdoorUnit>
<OutdoorUnit Name="Unicable II LNB Diavolo" Manufacturer="Megasat" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" />
<UBSlot Frequency="1420" />
<UBSlot Frequency="1680" />
<UBSlot Frequency="2040" />
<UBSlot Frequency="1005" />
<UBSlot Frequency="1050" />
<UBSlot Frequency="1095" />
<UBSlot Frequency="1140" />
<UBSlot Frequency="1260" />
<UBSlot Frequency="1305" />
<UBSlot Frequency="1350" />
<UBSlot Frequency="1475" />
<UBSlot Frequency="1520" />
<UBSlot Frequency="1565" />
<UBSlot Frequency="1610" />
<UBSlot Frequency="1725" />
<UBSlot Frequency="1770" />
<UBSlot Frequency="1815" />
<UBSlot Frequency="1860" />
<UBSlot Frequency="1905" />
<UBSlot Frequency="1950" />
<UBSlot Frequency="1995" />
<UBSlot Frequency="2085" />
<UBSlot Frequency="2130" />
</OutdoorUnit>
<OutdoorUnit Name="TechniRouter 5/1x8" Manufacturer="TechniSat" Type="Switch"> <OutdoorUnit Name="TechniRouter 5/1x8" Manufacturer="TechniSat" Type="Switch">
<UBSlot Frequency="1284"/> <UBSlot Frequency="1284"/>
<UBSlot Frequency="1400"/> <UBSlot Frequency="1400"/>
@ -150,6 +246,32 @@
<UBSlot Frequency="1980"/> <UBSlot Frequency="1980"/>
<UBSlot Frequency="2096"/> <UBSlot Frequency="2096"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="UNYSAT-24TN-LNB" Manufacturer="TechniSat" Type="LNB">
<UBSlot Frequency="975"/>
<UBSlot Frequency="1025"/>
<UBSlot Frequency="1075"/>
<UBSlot Frequency="1125"/>
<UBSlot Frequency="1175"/>
<UBSlot Frequency="1225"/>
<UBSlot Frequency="1275"/>
<UBSlot Frequency="1325"/>
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
<UBSlot Frequency="1575"/>
<UBSlot Frequency="1625"/>
<UBSlot Frequency="1675"/>
<UBSlot Frequency="1725"/>
<UBSlot Frequency="1775"/>
<UBSlot Frequency="1825"/>
<UBSlot Frequency="1875"/>
<UBSlot Frequency="1925"/>
<UBSlot Frequency="1975"/>
<UBSlot Frequency="2025"/>
<UBSlot Frequency="2075"/>
<UBSlot Frequency="2125"/>
</OutdoorUnit>
<OutdoorUnit Name="TechniRouter 9/1x8" Manufacturer="TechniSat" Type="Switch"> <OutdoorUnit Name="TechniRouter 9/1x8" Manufacturer="TechniSat" Type="Switch">
<UBSlot Frequency="1284"/> <UBSlot Frequency="1284"/>
<UBSlot Frequency="1400"/> <UBSlot Frequency="1400"/>
@ -246,7 +368,7 @@
<UBSlot Frequency="1400"/> <UBSlot Frequency="1400"/>
<UBSlot Frequency="1516"/> <UBSlot Frequency="1516"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="EXE 159" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true"> <OutdoorUnit Name="EXE 159" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true" PowerupDelay="1000">
<UBSlot Frequency="974"/> <UBSlot Frequency="974"/>
<UBSlot Frequency="1076"/> <UBSlot Frequency="1076"/>
<UBSlot Frequency="1178"/> <UBSlot Frequency="1178"/>
@ -257,7 +379,7 @@
<UBSlot Frequency="1688"/> <UBSlot Frequency="1688"/>
<UBSlot Frequency="1790"/> <UBSlot Frequency="1790"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="EXE 1512/2512" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true"> <OutdoorUnit Name="EXE 1512/2512" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true" PowerupDelay="1000">
<UBSlot Frequency="974"/> <UBSlot Frequency="974"/>
<UBSlot Frequency="1076"/> <UBSlot Frequency="1076"/>
<UBSlot Frequency="1178"/> <UBSlot Frequency="1178"/>
@ -270,6 +392,92 @@
<UBSlot Frequency="1892"/> <UBSlot Frequency="1892"/>
<UBSlot Frequency="1994"/> <UBSlot Frequency="1994"/>
<UBSlot Frequency="2096"/> <UBSlot Frequency="2096"/>
</OutdoorUnit>
<OutdoorUnit Name="EXD 1532/2532 - Mode C (30 Userbands Output)" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
<UBSlot Frequency="970"/>
<UBSlot Frequency="1010"/>
<UBSlot Frequency="1050"/>
<UBSlot Frequency="1090"/>
<UBSlot Frequency="1130"/>
<UBSlot Frequency="1170"/>
<UBSlot Frequency="1210"/>
<UBSlot Frequency="1250"/>
<UBSlot Frequency="1290"/>
<UBSlot Frequency="1330"/>
<UBSlot Frequency="1370"/>
<UBSlot Frequency="1410"/>
<UBSlot Frequency="1450"/>
<UBSlot Frequency="1490"/>
<UBSlot Frequency="1530"/>
<UBSlot Frequency="1570"/>
<UBSlot Frequency="1610"/>
<UBSlot Frequency="1650"/>
<UBSlot Frequency="1690"/>
<UBSlot Frequency="1730"/>
<UBSlot Frequency="1770"/>
<UBSlot Frequency="1810"/>
<UBSlot Frequency="1850"/>
<UBSlot Frequency="1890"/>
<UBSlot Frequency="1930"/>
<UBSlot Frequency="1970"/>
<UBSlot Frequency="2010"/>
<UBSlot Frequency="2050"/>
<UBSlot Frequency="2090"/>
<UBSlot Frequency="2130"/>
</OutdoorUnit>
<OutdoorUnit Name="EXD 1532/2532 - Mode B (24 Userbands Output)" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
<UBSlot Frequency="975"/>
<UBSlot Frequency="1025"/>
<UBSlot Frequency="1075"/>
<UBSlot Frequency="1125"/>
<UBSlot Frequency="1175"/>
<UBSlot Frequency="1225"/>
<UBSlot Frequency="1275"/>
<UBSlot Frequency="1325"/>
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
<UBSlot Frequency="1575"/>
<UBSlot Frequency="1625"/>
<UBSlot Frequency="1675"/>
<UBSlot Frequency="1725"/>
<UBSlot Frequency="1775"/>
<UBSlot Frequency="1825"/>
<UBSlot Frequency="1875"/>
<UBSlot Frequency="1925"/>
<UBSlot Frequency="1975"/>
<UBSlot Frequency="2025"/>
<UBSlot Frequency="2075"/>
<UBSlot Frequency="2125"/>
</OutdoorUnit>
<OutdoorUnit Name="EXD 1532/2532 - Mode B (8 Userbands Output)" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
<UBSlot Frequency="975"/>
<UBSlot Frequency="1025"/>
<UBSlot Frequency="1075"/>
<UBSlot Frequency="1125"/>
<UBSlot Frequency="1175"/>
<UBSlot Frequency="1225"/>
<UBSlot Frequency="1275"/>
<UBSlot Frequency="1325"/>
</OutdoorUnit>
<OutdoorUnit Name="EXD 1532/2532 - Mode A (16 Userbands Outputs)" Manufacturer="Kathrein" Type="Switch" Protocol="EN50607" PinProtected="true">
<UBSlot Frequency="975"/>
<UBSlot Frequency="1025"/>
<UBSlot Frequency="1075"/>
<UBSlot Frequency="1125"/>
<UBSlot Frequency="1175"/>
<UBSlot Frequency="1225"/>
<UBSlot Frequency="1275"/>
<UBSlot Frequency="1325"/>
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
<UBSlot Frequency="1575"/>
<UBSlot Frequency="1625"/>
<UBSlot Frequency="1675"/>
<UBSlot Frequency="1725"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="EXE 259" Manufacturer="Kathrein" Type="Switch"> <OutdoorUnit Name="EXE 259" Manufacturer="Kathrein" Type="Switch">
<UBSlot Frequency="974" /> <UBSlot Frequency="974" />
@ -369,7 +577,17 @@
<UBSlot Frequency="1892" /> <UBSlot Frequency="1892" />
<UBSlot Frequency="1994" /> <UBSlot Frequency="1994" />
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="UK 124" Manufacturer="Dura-Sat" Type="LNB" Protocol="EN50607"> <OutdoorUnit Name="DCR 5-1-8K" Manufacturer="Dura-Sat" Type="Switch" PinProtected="true">
<UBSlot Frequency="1280" />
<UBSlot Frequency="1382" />
<UBSlot Frequency="1484" />
<UBSlot Frequency="1586" />
<UBSlot Frequency="1688" />
<UBSlot Frequency="1790" />
<UBSlot Frequency="1892" />
<UBSlot Frequency="1994" />
</OutdoorUnit>
<OutdoorUnit Name="UK 124" Manufacturer="Dura-Sat" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" /> <UBSlot Frequency="1210" />
<UBSlot Frequency="1420" /> <UBSlot Frequency="1420" />
<UBSlot Frequency="1680" /> <UBSlot Frequency="1680" />
@ -395,7 +613,7 @@
<UBSlot Frequency="2085" /> <UBSlot Frequency="2085" />
<UBSlot Frequency="2130" /> <UBSlot Frequency="2130" />
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="DUR-Line DPC-32 K (32 UB-Unicable Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="DUR-Line DPC-32 K (32 UB-Unicable Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" /> <UBSlot Frequency="1210" />
<UBSlot Frequency="1420" /> <UBSlot Frequency="1420" />
<UBSlot Frequency="1680" /> <UBSlot Frequency="1680" />
@ -429,7 +647,7 @@
<UBSlot Frequency="2112" /> <UBSlot Frequency="2112" />
<UBSlot Frequency="2147" /> <UBSlot Frequency="2147" />
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="DUR-Line DPC-32 K (16 UB-Unicable Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="DUR-Line DPC-32 K (16 UB-Unicable Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" /> <UBSlot Frequency="1210" />
<UBSlot Frequency="1420" /> <UBSlot Frequency="1420" />
<UBSlot Frequency="1680" /> <UBSlot Frequency="1680" />
@ -447,7 +665,7 @@
<UBSlot Frequency="1458" /> <UBSlot Frequency="1458" />
<UBSlot Frequency="1494" /> <UBSlot Frequency="1494" />
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="DUR-Line DPC-32 K (16 UB-Legacy Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="DUR-Line DPC-32 K (16 UB-Legacy Output)" Manufacturer="Dura-Sat" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1530" /> <UBSlot Frequency="1530" />
<UBSlot Frequency="1566" /> <UBSlot Frequency="1566" />
<UBSlot Frequency="1602" /> <UBSlot Frequency="1602" />
@ -717,6 +935,34 @@
<UBSlot Frequency="1864"/> <UBSlot Frequency="1864"/>
<UBSlot Frequency="1980"/> <UBSlot Frequency="1980"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="SUS SUS 9942/8 (4x2 Mode, Output 1)" Manufacturer="Spaun" Type="Switch">
<UBSlot Frequency="1076"/>
<UBSlot Frequency="1178"/>
</OutdoorUnit>
<OutdoorUnit Name="SUS SUS 9942/8 (4x2 Mode, Output 2)" Manufacturer="Spaun" Type="Switch">
<UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/>
</OutdoorUnit>
<OutdoorUnit Name="SUS SUS 9942/8 (4x2 Mode, Output 3)" Manufacturer="Spaun" Type="Switch">
<UBSlot Frequency="1076"/>
<UBSlot Frequency="1178"/>
</OutdoorUnit>
<OutdoorUnit Name="SUS SUS 9942/8 (4x2 Mode, Output 4)" Manufacturer="Spaun" Type="Switch">
<UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/>
</OutdoorUnit>
<OutdoorUnit Name="SUS SUS 9942/8 (2x4 Mode, Output 1 und 2)" Manufacturer="Spaun" Type="Switch">
<UBSlot Frequency="1076"/>
<UBSlot Frequency="1178"/>
<UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/>
</OutdoorUnit>
<OutdoorUnit Name="SUS SUS 9942/8 (2x4 Mode, Output 3 und 4)" Manufacturer="Spaun" Type="Switch">
<UBSlot Frequency="1076"/>
<UBSlot Frequency="1178"/>
<UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/>
</OutdoorUnit>
<OutdoorUnit Name="SUS 5581/33 NF (3x3 Mode, Output 1)" Manufacturer="Spaun" Type="Switch"> <OutdoorUnit Name="SUS 5581/33 NF (3x3 Mode, Output 1)" Manufacturer="Spaun" Type="Switch">
<UBSlot Frequency="1068"/> <UBSlot Frequency="1068"/>
<UBSlot Frequency="1284"/> <UBSlot Frequency="1284"/>
@ -767,12 +1013,12 @@
<UBSlot Frequency="1382"/> <UBSlot Frequency="1382"/>
<UBSlot Frequency="1484"/> <UBSlot Frequency="1484"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="JPSxxxx-3A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="JPSxxxx-3A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1280"/> <UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/> <UBSlot Frequency="1382"/>
<UBSlot Frequency="1484"/> <UBSlot Frequency="1484"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="JPSxxxx-6A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="JPSxxxx-6A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1280"/> <UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/> <UBSlot Frequency="1382"/>
<UBSlot Frequency="1484"/> <UBSlot Frequency="1484"/>
@ -780,7 +1026,7 @@
<UBSlot Frequency="1688"/> <UBSlot Frequency="1688"/>
<UBSlot Frequency="1790"/> <UBSlot Frequency="1790"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="JPSxxxx-8A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="JPSxxxx-8A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1076"/> <UBSlot Frequency="1076"/>
<UBSlot Frequency="1178"/> <UBSlot Frequency="1178"/>
<UBSlot Frequency="1280"/> <UBSlot Frequency="1280"/>
@ -790,7 +1036,7 @@
<UBSlot Frequency="1688"/> <UBSlot Frequency="1688"/>
<UBSlot Frequency="1790"/> <UBSlot Frequency="1790"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="JPSxxxx-12AN/TN " Manufacturer="Jultec" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="JPSxxxx-12AN/TN " Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="974"/> <UBSlot Frequency="974"/>
<UBSlot Frequency="1076"/> <UBSlot Frequency="1076"/>
<UBSlot Frequency="1178"/> <UBSlot Frequency="1178"/>
@ -804,10 +1050,74 @@
<UBSlot Frequency="1994"/> <UBSlot Frequency="1994"/>
<UBSlot Frequency="2096"/> <UBSlot Frequency="2096"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="JPS0501-8M2" Manufacturer="Jultec" Type="Switch">
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
<UBSlot Frequency="1575"/>
<UBSlot Frequency="1625"/>
<UBSlot Frequency="1675"/>
<UBSlot Frequency="1725"/>
</OutdoorUnit>
<OutdoorUnit Name="JPS0501-16MN/16TN" Manufacturer="Jultec" Type="Switch">
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
<UBSlot Frequency="1575"/>
<UBSlot Frequency="1625"/>
<UBSlot Frequency="1675"/>
<UBSlot Frequency="1725"/>
<UBSlot Frequency="1775"/>
<UBSlot Frequency="1825"/>
<UBSlot Frequency="1875"/>
<UBSlot Frequency="1925"/>
<UBSlot Frequency="1975"/>
<UBSlot Frequency="2025"/>
<UBSlot Frequency="2075"/>
<UBSlot Frequency="2125"/>
</OutdoorUnit>
<OutdoorUnit Name="JPS0502-8T/M" Manufacturer="Jultec" Type="Switch">
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
<UBSlot Frequency="1575"/>
<UBSlot Frequency="1625"/>
<UBSlot Frequency="1675"/>
<UBSlot Frequency="1725"/>
</OutdoorUnit>
<OutdoorUnit Name="JPS0508-8T/M" Manufacturer="Jultec" Type="Switch">
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
<UBSlot Frequency="1575"/>
<UBSlot Frequency="1625"/>
<UBSlot Frequency="1675"/>
<UBSlot Frequency="1725"/>
</OutdoorUnit>
<OutdoorUnit Name="JPS0901-8T/8M" Manufacturer="Jultec" Type="Switch">
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
<UBSlot Frequency="1575"/>
<UBSlot Frequency="1625"/>
<UBSlot Frequency="1675"/>
<UBSlot Frequency="1725"/>
</OutdoorUnit>
<OutdoorUnit Name="JRS0502-2+4T" Manufacturer="Jultec" Type="Switch"> <OutdoorUnit Name="JRS0502-2+4T" Manufacturer="Jultec" Type="Switch">
<UBSlot Frequency="1280"/> <UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/> <UBSlot Frequency="1382"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="JRS0502-4+4T" Manufacturer="Jultec" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1375"/>
<UBSlot Frequency="1425"/>
<UBSlot Frequency="1475"/>
<UBSlot Frequency="1525"/>
</OutdoorUnit>
<OutdoorUnit Name="JRS0504-2A/T" Manufacturer="Jultec" Type="Switch"> <OutdoorUnit Name="JRS0504-2A/T" Manufacturer="Jultec" Type="Switch">
<UBSlot Frequency="1280"/> <UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/> <UBSlot Frequency="1382"/>
@ -834,7 +1144,7 @@
<UBSlot Frequency="1680"/> <UBSlot Frequency="1680"/>
<UBSlot Frequency="2040"/> <UBSlot Frequency="2040"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="GT-DLNB1T" Manufacturer="GT-SAT" Type="LNB" Protocol="EN50607"> <OutdoorUnit Name="GT-DLNB1T" Manufacturer="GT-SAT" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="975"/> <UBSlot Frequency="975"/>
<UBSlot Frequency="1025"/> <UBSlot Frequency="1025"/>
<UBSlot Frequency="1075"/> <UBSlot Frequency="1075"/>
@ -860,7 +1170,7 @@
<UBSlot Frequency="2075"/> <UBSlot Frequency="2075"/>
<UBSlot Frequency="2125"/> <UBSlot Frequency="2125"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="MCR 221" Manufacturer="Fuba" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="MCR 221" Manufacturer="Fuba" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1280"/> <UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/> <UBSlot Frequency="1382"/>
</OutdoorUnit> </OutdoorUnit>
@ -868,7 +1178,7 @@
<UBSlot Frequency="1280"/> <UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/> <UBSlot Frequency="1382"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="MCR 441" Manufacturer="Fuba" Type="Switch" Protocol="EN50607"> <OutdoorUnit Name="MCR 441" Manufacturer="Fuba" Type="Switch" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1280"/> <UBSlot Frequency="1280"/>
<UBSlot Frequency="1382"/> <UBSlot Frequency="1382"/>
<UBSlot Frequency="1484"/> <UBSlot Frequency="1484"/>
@ -952,4 +1262,30 @@
<UBSlot Frequency="1790"/> <UBSlot Frequency="1790"/>
<UBSlot Frequency="1892"/> <UBSlot Frequency="1892"/>
</OutdoorUnit> </OutdoorUnit>
<OutdoorUnit Name="H21dCSS" Manufacturer="Selfsat" Type="LNB" Protocol="EN50607" PowerupDelay="1000">
<UBSlot Frequency="1210" />
<UBSlot Frequency="1420" />
<UBSlot Frequency="1680" />
<UBSlot Frequency="2040" />
<UBSlot Frequency="1005" />
<UBSlot Frequency="1050" />
<UBSlot Frequency="1095" />
<UBSlot Frequency="1140" />
<UBSlot Frequency="1260" />
<UBSlot Frequency="1305" />
<UBSlot Frequency="1350" />
<UBSlot Frequency="1475" />
<UBSlot Frequency="1520" />
<UBSlot Frequency="1565" />
<UBSlot Frequency="1610" />
<UBSlot Frequency="1725" />
<UBSlot Frequency="1770" />
<UBSlot Frequency="1815" />
<UBSlot Frequency="1860" />
<UBSlot Frequency="1905" />
<UBSlot Frequency="1950" />
<UBSlot Frequency="1995" />
<UBSlot Frequency="2085" />
<UBSlot Frequency="2130" />
</OutdoorUnit>
</SCIFDataBase> </SCIFDataBase>

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
MenuItems = new Array(); MenuItems = new Array();
MenuItems.push( { Text:"Home", Link:"index.html" } ); MenuItems.push( { Text:"Home", Link:"index.html" } );
MenuItems.push( { Text:"Browser TV", Link:"browsertv.html" } ); //MenuItems.push( { Text:"Browser TV", Link:"browsertv.html" } );
MenuItems.push( { Text:"EPG", Link:"epg.html" } ); MenuItems.push( { Text:"EPG", Link:"epg.html" } );
MenuItems.push( { Text:"Stream Status", Link:"streamstatus.html" } ); MenuItems.push( { Text:"Stream Status", Link:"streamstatus.html" } );
MenuItems.push( { Text:"Tuner Status", Link:"tunerstatus.html" } ); MenuItems.push( { Text:"Tuner Status", Link:"tunerstatus.html" } );

View File

@ -12,6 +12,29 @@
<!-- Add page scripts here --> <!-- Add page scripts here -->
<script type="text/javascript"> <script type="text/javascript">
var xmlhttp = new XMLHttpRequest();
var url = "/octoserve/tunerstatus.json";
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState == 4 )
{
if( xmlhttp.status == 200 )
myFunction(xmlhttp.responseText);
}
}
function myFunction(response)
{
try
{
var tl = JSON.parse(response);
for(i= 0; i < tl.TunerList.length; i++ )
document.getElementById("trTuner"+i).style.display = "table-row";
}
catch(err) {}
}
SCIFEnabled = false; SCIFEnabled = false;
SelectedManufacturer = 0; SelectedManufacturer = 0;
SelectedUnit = 0; SelectedUnit = 0;
@ -97,14 +120,10 @@ function OnLoad()
{ {
SCIFEnabled = false; SCIFEnabled = false;
TunerList[0] = document.Tuner1; for( i = 0; i < 12 ; i++ )
TunerList[1] = document.Tuner2; {
TunerList[2] = document.Tuner3; TunerList[i] = document.getElementById("formTuner"+i);
TunerList[3] = document.Tuner4; }
TunerList[4] = document.Tuner5;
TunerList[5] = document.Tuner6;
TunerList[6] = document.Tuner7;
TunerList[7] = document.Tuner8;
document.Manufacturer.Select.length = 0; document.Manufacturer.Select.length = 0;
for( i = 0; i < ManufacturerList.length ; i++ ) for( i = 0; i < ManufacturerList.length ; i++ )
@ -141,6 +160,8 @@ function OnLoad()
document.getElementById("EnableButton").checked = SCIFEnabled; document.getElementById("EnableButton").checked = SCIFEnabled;
document.getElementById("SetButton").disabled = true; document.getElementById("SetButton").disabled = true;
xmlhttp.open("GET", url, true);
xmlhttp.send();
} }
</script> </script>
@ -196,93 +217,22 @@ function OnLoad()
</td> </td>
</tr> </tr>
<tr> <script type="text/javascript">
<td>Tuner 1</td> for( var i = 0; i < 12 ; i++ )
<td> {
<form name="Tuner1" action=""> // document.write('<tr id="trTuner'+i+'">');
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(1,document.Tuner1.Select.selectedIndex)"> document.write('<tr id="trTuner'+i+'" style="display:none">');
<option>----</option> document.write('<td>Tuner ' + (i+1) + '</td>');
</select> document.write('<td>');
</form> document.write('<form name="Tuner'+(i+1)+'" id="formTuner'+i+'" action="">');
</td> document.write('<select name="Select" size="1" style="width: 300px" onchange="SetSlot(1,document.Tuner' +(i+1)+'.Select.selectedIndex)">');
</tr> document.write('</option>----</option>');
document.write('</select>');
<tr> document.write('</form>');
<td>Tuner 2</td> document.write('</td>');
<td> document.write('</tr>');
<form name="Tuner2" action=""> }
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(2,document.Tuner2.Select.selectedIndex)"> </script>
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 3</td>
<td>
<form name="Tuner3" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(3,document.Tuner3.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 4</td>
<td>
<form name="Tuner4" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(4,document.Tuner4.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 5</td>
<td>
<form name="Tuner5" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(5,document.Tuner5.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 6</td>
<td>
<form name="Tuner6" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(6,document.Tuner6.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 7</td>
<td>
<form name="Tuner7" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(7,document.Tuner7.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 8</td>
<td>
<form name="Tuner8" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(8,document.Tuner8.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr><td colspan="2" align="right"> <tr><td colspan="2" align="right">
<div style="width: 300px"> <div style="width: 300px">

View File

@ -6,12 +6,39 @@
<link rel="stylesheet" type="text/css" href="/style.css"> <link rel="stylesheet" type="text/css" href="/style.css">
<script type="text/javascript" src="/menu.js"></script> <script type="text/javascript" src="/menu.js"></script>
<!-- Add included scripts here --> <!-- Add included scripts here -->
<script type="text/javascript">Octoserve = false;</script>
<script type="text/javascript" src="/octoserve/serverinfo.js"></script>
<!-- Add page scripts here --> <!-- Add page scripts here -->
<script type="text/javascript"> <script type="text/javascript">
var NewSettings = null; var NewSettings = null;
var OldSettings = null; var OldSettings = null;
var SupportedDelsys = 0;
var DelSysID = new Array();
DelSysID[ 0] = "SYS_UNDEFINED";
DelSysID[ 1] = "SYS_DVBC_ANNEX_A";
DelSysID[ 2] = "SYS_DVBC_ANNEX_B";
DelSysID[ 3] = "SYS_DVBT";
DelSysID[ 4] = "SYS_DSS";
DelSysID[ 5] = "SYS_DVBS";
DelSysID[ 6] = "SYS_DVBS2";
DelSysID[ 7] = "SYS_DVBH";
DelSysID[ 8] = "SYS_ISDBT";
DelSysID[ 9] = "SYS_ISDBS";
DelSysID[10] = "SYS_ISDBC";
DelSysID[11] = "SYS_ATSC";
DelSysID[12] = "SYS_ATSCMH";
DelSysID[13] = "SYS_DTMB";
DelSysID[14] = "SYS_CMMB";
DelSysID[15] = "SYS_DAB";
DelSysID[16] = "SYS_DVBT2";
DelSysID[17] = "SYS_TURBO";
DelSysID[18] = "SYS_DVBC_ANNEX_C";
DelSysID[19] = "SYS_DVBC2";
var xmlhttp = new XMLHttpRequest(); var xmlhttp = new XMLHttpRequest();
var url = "/systemsettings.lua"; var url = "/systemsettings.lua";
@ -44,19 +71,19 @@ function myFunction(response)
document.getElementById("QOSButton").checked = settings.vlanEnabled; document.getElementById("QOSButton").checked = settings.vlanEnabled;
document.getElementById("TelnetButton").checked = settings.telnetEnabled; document.getElementById("TelnetButton").checked = settings.telnetEnabled;
document.getElementById("NODMSButton").checked = settings.nodmsEnabled; document.getElementById("NODMSButton").checked = settings.nodmsEnabled;
document.getElementById("NODVBTButton").checked = settings.nodvbtEnabled;
document.getElementById("STRICTButton").checked = settings.strictEnabled; document.getElementById("STRICTButton").checked = settings.strictEnabled;
document.getElementById("QOSButton").disabled = false; document.getElementById("QOSButton").disabled = false;
document.getElementById("TelnetButton").disabled = false; document.getElementById("TelnetButton").disabled = false;
document.getElementById("NODMSButton").disabled = false; document.getElementById("NODMSButton").disabled = false;
document.getElementById("NODVBTButton").disabled = false;
document.getElementById("STRICTButton").disabled = false; document.getElementById("STRICTButton").disabled = false;
document.getElementById("BoxName").disabled = false; document.getElementById("BoxName").disabled = false;
document.getElementById("MSMode").disabled = false; document.getElementById("MSMode").disabled = false;
OldSettings = settings; OldSettings = settings;
NewSettings = JSON.parse(response); NewSettings = JSON.parse(response);
if( Octoserve )
NewSettings.DelsysMask = Octoserve.DelsysMask;
} }
function SaveSettings() function SaveSettings()
@ -88,12 +115,6 @@ function SaveSettings()
param += "nodms=" + (NewSettings.nodmsEnabled?"1":"0"); param += "nodms=" + (NewSettings.nodmsEnabled?"1":"0");
} }
if( OldSettings.nodvbtEnabled != NewSettings.nodvbtEnabled )
{
if( param != "" ) param += "&";
param += "nodvbt=" + (NewSettings.nodvbtEnabled?"1":"0");
}
if( OldSettings.MSMode != NewSettings.MSMode ) if( OldSettings.MSMode != NewSettings.MSMode )
{ {
if( param != "" ) param += "&"; if( param != "" ) param += "&";
@ -106,6 +127,17 @@ function SaveSettings()
param += "strict=" + (NewSettings.strictEnabled?"1":"0"); param += "strict=" + (NewSettings.strictEnabled?"1":"0");
} }
if( Octoserve )
{
var DelsysMask = NewSettings.DelsysMask;
if( DelsysMask != Octoserve.DelsysMask )
{
if( DelsysMask == SupportedDelsys ) DelsysMask = 0;
if( param != "" ) param += "&";
param += "delsysmask=" + DelsysMask;
}
}
document.getElementById("SetButton").disabled = true; document.getElementById("SetButton").disabled = true;
if( param != "" ) if( param != "" )
{ {
@ -125,14 +157,59 @@ function ClearSettings()
NewSettings.nodvbtEnabled = false; NewSettings.nodvbtEnabled = false;
NewSettings.strictEnabled = false; NewSettings.strictEnabled = false;
NewSettings.MSMode = "quad"; NewSettings.MSMode = "quad";
NewSettings.DelsysMask = 0;
SaveSettings(); SaveSettings();
} }
} }
function ShowDelsys()
{
if( Octoserve )
{
SupportedDelsys = 0;
for(var i = 0; i < Octoserve.TunerList.length; i++ )
{
if( Octoserve.TunerList[i] )
{
SupportedDelsys = SupportedDelsys | Octoserve.TunerList[i].Type;
}
}
for(var i = 0; i < DelSysID.length; i++ )
{
var Element = document.getElementById(DelSysID[i]);
if( Element )
{
if( SupportedDelsys & (1<<i) )
{
Element.disabled = false;
Element.checked = (( Octoserve.DelsysMask & (1<<i)) != 0) || (Octoserve.DelsysMask == 0);
Element.parentElement.style.visibility = "visible";
}
else
{
Element.disabled = true;
Element.checked = false;
Element.parentElement.style.visibility = "hidden";
}
}
else
{
SupportedDelsys &= ~(1<<i);
}
}
for(var i = DelSysID.length; i < 32; i++ )
{
SupportedDelsys &= ~(1<<i);
}
}
}
function OnLoad() function OnLoad()
{ {
xmlhttp.open("GET", url, true); xmlhttp.open("GET", url, true);
xmlhttp.send(); xmlhttp.send();
ShowDelsys();
} }
function ChangeBoxName() function ChangeBoxName()
@ -147,8 +224,6 @@ function ChangeBoxName()
} }
} }
function Change() function Change()
{ {
if( NewSettings ) if( NewSettings )
@ -157,12 +232,54 @@ function Change()
NewSettings.vlanEnabled = document.getElementById("QOSButton").checked; NewSettings.vlanEnabled = document.getElementById("QOSButton").checked;
NewSettings.telnetEnabled = document.getElementById("TelnetButton").checked; NewSettings.telnetEnabled = document.getElementById("TelnetButton").checked;
NewSettings.nodmsEnabled = document.getElementById("NODMSButton").checked; NewSettings.nodmsEnabled = document.getElementById("NODMSButton").checked;
NewSettings.nodvbtEnabled = document.getElementById("NODVBTButton").checked;
NewSettings.strictEnabled = document.getElementById("STRICTButton").checked; NewSettings.strictEnabled = document.getElementById("STRICTButton").checked;
document.getElementById("SetButton").disabled = false; document.getElementById("SetButton").disabled = false;
} }
} }
function ChangeDelSys(delsys)
{
if( NewSettings )
{
if( NewSettings.DelsysMask == 0 )
NewSettings.DelsysMask = SupportedDelsys;
var Element = document.getElementById(DelSysID[delsys]);
if( Element )
{
if( Element.checked )
{
NewSettings.DelsysMask |= ((1<<delsys) & SupportedDelsys);
if( delsys == 16 )
{
NewSettings.DelsysMask |= (1<<3);
document.getElementById(DelSysID[3]).checked = true;
}
if( delsys == 6 )
{
NewSettings.DelsysMask |= (1<<5);
document.getElementById(DelSysID[5]).checked = true;
}
}
else
{
NewSettings.DelsysMask &= ~(1<<delsys);
if( delsys == 3 )
{
NewSettings.DelsysMask &= ~(1<<16);
document.getElementById(DelSysID[16]).checked = false;
}
if( delsys == 5 )
{
NewSettings.DelsysMask &= ~(1<<6);
document.getElementById(DelSysID[6]).checked = false;
}
}
}
document.getElementById("SetButton").disabled = false;
}
}
function SetPassword() function SetPassword()
{ {
var pwd1 = document.getElementById("pwd1").value; var pwd1 = document.getElementById("pwd1").value;
@ -249,17 +366,7 @@ function ToggleHelp(id)
</tr> </tr>
<tr> <tr>
<td>Disable DVBT announcement</td> <td>Enforce strict SAT&gt;IP</td>
<td style="text-align:right">
<form action="">
<input id="NODVBTButton" type="checkbox" value="Check" disabled="true" checked="false" onclick="Change()" />
</form>
</td>
<td></td>
</tr>
<tr>
<td>Enforce strict SAT>IP</td>
<td style="text-align:right"> <td style="text-align:right">
<form action=""> <form action="">
<input id="STRICTButton" type="checkbox" value="Check" disabled="true" checked="false" onclick="Change()" /> <input id="STRICTButton" type="checkbox" value="Check" disabled="true" checked="false" onclick="Change()" />
@ -288,6 +395,67 @@ function ToggleHelp(id)
</td> </td>
</tr> </tr>
<tr>
<td colspan="3" >
<form action="">
<table id="delsystable" cellpadding="2px" align="center" width="100%">
<colgroup>
<col width="25%">
<col width="25%">
<col width="25%">
<col width="25%">
</colgroup>
<tr>
<td>
<input id="SYS_DVBS" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(5)"/>
DVB-S
</td>
<td>
<input id="SYS_DVBS2" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(6)"/>
DVB-S2/S2X
</td>
<td>
<input id="SYS_ISDBS" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(9)"/>
ISDB-S
</td>
</tr>
<tr>
<td>
<input id="SYS_DVBT" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(3)"/>
DVB-T
</td>
<td>
<input id="SYS_DVBT2" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(16)"/>
DVB-T2
</td>
<td>
<input id="SYS_ISDBT" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(8)"/>
ISDB-T
</td>
</tr>
<tr>
<td>
<input id="SYS_DVBC_ANNEX_A" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(1)"/>
DVB-C
</td>
<td>
<input id="SYS_DVBC2" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(19)"/>
DVB-C2
</td>
<td>
<input id="SYS_ISDBC" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(10)"/>
ISDB-C
</td>
<td>
<input id="SYS_DVBC_ANNEX_B" type="checkbox" disabled="true" checked="false" onclick="ChangeDelSys(4)"/>
J83.B
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr> <tr>
<td colspan="2" align="right"> <td colspan="2" align="right">
<div style="width: 300px"> <div style="width: 300px">
@ -397,27 +565,27 @@ function ToggleHelp(id)
<div id="strict_hlpE" onclick="ToggleHelp('strict_hlpE')" <div id="strict_hlpE" onclick="ToggleHelp('strict_hlpE')"
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;"> style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
<div style="position: relative; margin:20px; clear:both"> <div style="position: relative; margin:20px; clear:both">
<h3>Enforce strict SAT>IP</h3> <h3>Enforce strict SAT&gt;IP</h3>
<p/> <p/>
The SAT>IP specification allows a second client to receive a stream created by another client. The SAT&gt;IP specification allows a second client to receive a stream created by another client.
The OctopusNet allows to modify some parameters (like PIDs) on this second stream. The original stream is not affected by this. The OctopusNet allows to modify some parameters (like PIDs) on this second stream. The original stream is not affected by this.
<p/> <p/>
Enforce strict SAT>IP disables this enhancment. Enforce strict SAT&gt;IP disables this enhancment.
<br/> <br/>
Do this for testing clients to ensure they are compatible with other SAT>IP servers Do this for testing clients to ensure they are compatible with other SAT&gt;IP servers
</div> </div>
</div> </div>
<div id="strict_hlpD" onclick="ToggleHelp('strict_hlpD')" <div id="strict_hlpD" onclick="ToggleHelp('strict_hlpD')"
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;"> style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
<div style="position: relative; margin:20px; clear:both"> <div style="position: relative; margin:20px; clear:both">
<h3>Erzwinge striktes SAT>IP</h3> <h3>Erzwinge striktes SAT&gt;IP</h3>
<p/> <p/>
Die SAT>IP Spezifikation erlaubt einem zweiten Client das Empfangen eines von einem anderen Client angelegten Stream. Die OctopusNet erlaubt Die SAT&gt;IP Spezifikation erlaubt einem zweiten Client das Empfangen eines von einem anderen Client angelegten Stream. Die OctopusNet erlaubt
die &Auml;nderung einiger Parameter (z.B. PIDs) für diesen Stream. Der orginale Stream wird dadurch nicht beeinflusst. die &Auml;nderung einiger Parameter (z.B. PIDs) für diesen Stream. Der orginale Stream wird dadurch nicht beeinflusst.
<p/> <p/>
Das Erzwingen von strikten SAT>IP schaltet diese Erweiterung ab. Das Erzwingen von strikten SAT&gt;IP schaltet diese Erweiterung ab.
<br/> <br/>
Beim Testen von Clients ist es sinnvoll diesen Parameter zu setzen um die Kompatibilit&auml;t mit anderen SAT>IP Servern sicherzustellen. Beim Testen von Clients ist es sinnvoll diesen Parameter zu setzen um die Kompatibilit&auml;t mit anderen SAT&gt;IP Servern sicherzustellen.
</div> </div>
</div> </div>
<!-- End Content --> <!-- End Content -->
@ -429,5 +597,3 @@ function ToggleHelp(id)
</body> </body>
</html> </html>
</html>

View File

@ -66,6 +66,12 @@ function CheckMaxS8()
if devid == "0007dd01" then if devid == "0007dd01" then
isMaxS8 = "true" isMaxS8 = "true"
end end
if devid == "0009dd01" then
isMaxS8 = "true"
end
if devid == "000bdd01" then
isMaxS8 = "true"
end
end end
return isMaxS8 return isMaxS8
end end
@ -156,13 +162,20 @@ if query ~= "" then
end end
restart = 1; restart = 1;
restartdms = 1; restartdms = 1;
elseif name == "delsysmask" then
if value ~= "0" then
WriteConfigFile("delsys_mask",value)
os.remove("/config/nodvbt.enabled")
else
os.remove("/config/delsys_mask")
end
restart = 1;
elseif( WriteSetting(name,value == "1") ) then elseif( WriteSetting(name,value == "1") ) then
if name == "telnet" then if name == "telnet" then
os.execute("/etc/init.d/S91telnet restart") os.execute("/etc/init.d/S91telnet restart")
end end
if name == "vlan" then restart = 1 end if name == "vlan" then restart = 1 end
if name == "nodms" then restart = 1 end if name == "nodms" then restart = 1 end
if name == "nodvbt" then restart = 1 end
if name == "strict" then restart = 1 end if name == "strict" then restart = 1 end
end end
end end
@ -193,7 +206,6 @@ else
http_print(' "telnetEnabled":' .. ReadSetting('telnet') .. ',') http_print(' "telnetEnabled":' .. ReadSetting('telnet') .. ',')
http_print(' "vlanEnabled":' .. ReadSetting('vlan') .. ',') http_print(' "vlanEnabled":' .. ReadSetting('vlan') .. ',')
http_print(' "nodmsEnabled":' .. ReadSetting('nodms') .. ',') http_print(' "nodmsEnabled":' .. ReadSetting('nodms') .. ',')
http_print(' "nodvbtEnabled":' .. ReadSetting('nodvbt') .. ',')
http_print(' "MSMode":"' .. GetMSMode() .. '",') http_print(' "MSMode":"' .. GetMSMode() .. '",')
http_print(' "strictEnabled":' .. ReadSetting('strict')) http_print(' "strictEnabled":' .. ReadSetting('strict'))

View File

@ -52,7 +52,7 @@ function Show(TunerList)
if( TunerList[i].Status == "Active" ) if( TunerList[i].Status == "Active" )
document.getElementById("tdStatus"+i).firstChild.nodeValue = "No Signal"; document.getElementById("tdStatus"+i).firstChild.nodeValue = "No Signal";
else else
document.getElementById("tdStatus"+i).firstChild.nodeValue = ""; document.getElementById("tdStatus"+i).firstChild.nodeValue = "IDLE";
document.getElementById("tdStrength"+i).firstChild.nodeValue = ""; document.getElementById("tdStrength"+i).firstChild.nodeValue = "";
document.getElementById("tdSNR"+i).firstChild.nodeValue = ""; document.getElementById("tdSNR"+i).firstChild.nodeValue = "";
document.getElementById("tdQuality"+i).firstChild.nodeValue = ""; document.getElementById("tdQuality"+i).firstChild.nodeValue = "";

View File

@ -19,5 +19,5 @@
#ifndef _OCTOSERVE_VERSION_ #ifndef _OCTOSERVE_VERSION_
#define _OCTOSERVE_VERSION_ #define _OCTOSERVE_VERSION_
#define OCTOSERVE_VERSION "1.0.81" #define OCTOSERVE_VERSION "1.1.6"
#endif #endif