/* dvbscan utility Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net) 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include #include #include #include "dvbscan.h" #define OUTPUT_TYPE_RAW 1 #define OUTPUT_TYPE_CHANNELS 2 #define OUTPUT_TYPE_VDR12 3 #define OUTPUT_TYPE_VDR13 4 #define SERVICE_FILTER_TV 1 #define SERVICE_FILTER_RADIO 2 #define SERVICE_FILTER_OTHER 4 #define SERVICE_FILTER_ENCRYPTED 8 #define TIMEOUT_WAIT_LOCK 2 // transponders we have yet to scan static struct transponder *toscan = NULL; static struct transponder *toscan_end = NULL; // transponders we have scanned static struct transponder *scanned = NULL; static struct transponder *scanned_end = NULL; static void usage(void) { static const char *_usage = "\n" " dvbscan: A digital tv channel scanning utility\n" " Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)\n\n" " usage: dvbscan as follows:\n" " -h help\n" " -adapter adapter to use (default 0)\n" " -frontend frontend to use (default 0)\n" " -demux demux to use (default 0)\n" " -secfile Optional sec.conf file.\n" " -secid ID of the SEC configuration to use, one of:\n" " * UNIVERSAL (default) - Europe, 10800 to 11800 MHz and 11600 to 12700 Mhz,\n" " Dual LO, loband 9750, hiband 10600 MHz.\n" " * DBS - Expressvu, North America, 12200 to 12700 MHz, Single LO, 11250 MHz.\n" " * STANDARD - 10945 to 11450 Mhz, Single LO, 10000 Mhz.\n" " * ENHANCED - Astra, 10700 to 11700 MHz, Single LO, 9750 MHz.\n" " * C-BAND - Big Dish, 3700 to 4200 MHz, Single LO, 5150 Mhz.\n" " * C-MULTI - Big Dish - Multipoint LNBf, 3700 to 4200 MHz,\n" " Dual LO, H:5150MHz, V:5750MHz.\n" " * One of the sec definitions from the secfile if supplied\n" " -satpos Specify DISEQC switch position for DVB-S.\n" " -inversion Specify inversion (default: auto).\n" " -uk-ordering Use UK DVB-T channel ordering if present.\n" " -timeout Specify filter timeout to use (standard specced values will be used by default)\n" " -filter Specify service filter, a comma seperated list of the following tokens:\n" " (If no filter is supplied, all services will be output)\n" " * tv - Output TV channels\n" " * radio - Output radio channels\n" " * other - Output other channels\n" " * encrypted - Output encrypted channels\n" " -out raw |- Output in raw format to or stdout\n" " channels |- Output in channels.conf format to or stdout.\n" " vdr12 |- Output in vdr 1.2.x format to or stdout.\n" " vdr13 |- Output in vdr 1.3.x format to or stdout.\n" " \n"; fprintf(stderr, "%s\n", _usage); exit(1); } static int scan_load_callback(struct dvbcfg_scanfile *channel, void *private_data) { struct dvbfe_info *feinfo = (struct dvbfe_info *) private_data; if (channel->fe_type != feinfo->type) return 0; struct transponder *t = new_transponder(); append_transponder(t, &toscan, &toscan_end); memcpy(&t->params, &channel->fe_params, sizeof(struct dvbfe_parameters)); add_frequency(t, t->params.frequency); t->params.frequency = 0; return 0; } int main(int argc, char *argv[]) { u
# 2014-04-18 Antti Palosaari <crope@iki.fi>
# generated from http://www.digita.fi/kuluttajat/tv/nakyvyysalueet/kanavanumerot_ja_taajuudet

[Kajaani_Pollyvaara]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 546000000
	BANDWIDTH_HZ = 8000000

[Kajaani_Pollyvaara]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 722000000
	BANDWIDTH_HZ = 8000000

[Kajaani_Pollyvaara]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 754000000
	BANDWIDTH_HZ = 8000000
nt demux, uint16_t pid, uint8_t table_id) { int demux_fd = -1; uint8_t filter[18]; uint8_t mask[18]; // open the demuxer if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) { return -1; } // create a section filter memset(filter, 0, sizeof(filter)); memset(mask, 0, sizeof(mask)); filter[0] = table_id; mask[0] = 0xFF; if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) { close(demux_fd); return -1; } // done return demux_fd; }