aboutsummaryrefslogtreecommitdiffstats
path: root/util/scan/dvb-t/de-Bremen
blob: 9a790385460bdb4f75b0125ce958e5a94f9d7a7d (plain)
1
2
3
4
5
6
7
8
9
# DVB-T Bremen
# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: Das Erste (RB), RB TV (NDR NDS), arte, Phoenix
T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
T 562000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH32: ZDF, 3sat, KiKa / ZDFneo, ZDFinfokanal
T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: RTL, RTL II, Super RTL, VOX
T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: Tele 5, Neun live, Eurosport, MonaTV/ DMAX
T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: Pro7, Sat.1, Kabel1, N24
/* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 *  Copyright (C) 2006 by Michel Verbraak <michel@verbraak.org>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the
 *  Free Software Foundation, Inc.,
 *  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */


#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <libdvbapi/dvbfe.h>
#include <libdvbsec/dvbsec_api.h>

static char *usage_str =
	"\nusage: gotox [options] -d <angle>\n"
	"         Goto the specified angle. Positive value for East rotation\n"
	"         Negative value for West rotation on Northern Hemisphere.\n"
	"     -d degrees : Angle to turn to in degrees (default 0)\n"
	"     -a number : use given adapter (default 0)\n"
	"     -f number : use given frontend (default 0)\n"
	"     -t seconds : leave power on to rotor for at least specified seconds of time (default 30)\n\n";

int main(int argc, char *argv[])
{
	struct dvbfe_handle *fe;
	unsigned int adapter = 0, frontend = 0;
	double angle = 0;
	int opt;
	unsigned int sleepcount = 30;
	static char *weststr = "west";
	static char *eaststr = "east";

	while ((opt = getopt(argc, argv, "ha:f:t:d:")) != -1) {

		switch (opt){
		case '?':
		case 'h':
		default:
			fprintf(stderr, "%s", usage_str);
			return EXIT_SUCCESS; 

		case 'a':
			adapter = strtoul(optarg, NULL, 0);
			break;

		case 'f':
			frontend = strtoul(optarg, NULL, 0);
			break;

		case 't':
			sleepcount = strtoul(optarg, NULL, 0);
			break;

		case 'd':
			angle = strtod(optarg, NULL);
			break;
		}
	}

	printf("Will try to rotate %s to %.2f degrees.\n", (angle < 0.0) ? weststr : eaststr, angle );

	fe = dvbfe_open(adapter, frontend, 0);
	if (fe == NULL) {
		fprintf(stderr, "Could not open frontend %d on adapter %d.\n", frontend, adapter);
		exit(1);
	}

	if (dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_OFF) != 0) {
		fprintf(stderr, "Could not turn off power.\n");
		dvbfe_close(fe);
		return 1;
	}
	else
		printf("Power OFF.\n");

	sleep(1);

	if (dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_18) != 0) {
		fprintf(stderr, "Could not turn on power.\n");
		dvbfe_close(fe);
		return 1;
	}
	else
		printf("Power on to 18V.\n");

	sleep(1);

	if (abs(angle) == 0.0) {

		if (dvbsec_diseqc_goto_satpos_preset(fe, DISEQC_ADDRESS_POLAR_AZIMUTH_POSITIONER, 0) != 0) {
			fprintf(stderr, "Could not goto 0.\n");
			dvbfe_close(fe);
			return 2;
		} else {
			printf("Going to home base 0 degrees.\n");
		}
	} else {

		if (dvbsec_diseqc_goto_rotator_bearing(fe, DISEQC_ADDRESS_POLAR_AZIMUTH_POSITIONER, angle) != 0) {
			fprintf(stderr, "Could not rotate.\n");
			dvbfe_close(fe);
			return 2;
		}
	}

	while (sleepcount != 0) {
		printf("%d: Rotating to %.2f.\r", sleepcount, angle);
		fflush(NULL);
		sleepcount--;
		sleep(1);
	}

	printf("\nRotated.\n");

	if (dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_OFF) != 0) {
		fprintf(stderr, "Could not turn off power.\n");
		dvbfe_close(fe);
		return 1;
	}
	else
		printf("Power OFF.\n");

	sleep(1);

	dvbfe_close(fe);

	return EXIT_SUCCESS;
}