Hi All,
I use an USB DVB-T receiver. This works ok, but the snr meter at the bottom of the screen is never filled more than a few pixels, no matter how good the signal is. The problem with this receiver is that the snr figure never goes above 0x00d0. Is there a way to adjust the scaling of the signal and snr bars? I would like the snr bar to be fully filled when the figure is 0x00ff
Best regards, Cedric
$ lsusb Bus 001 Device 004: ID 2013:0245 PCTV Systems PCTV 73ESE
$ tzap -a 0 -r 'Nederland 1' using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' reading channels from file '/home/cedric/.tzap/channels.conf' tuning to 474000000 Hz video pid 0x1b63, audio pid 0x1b64 status 1b | signal 0dbd | snr 00a2 | ber 001fffff | unc 00000000 | FE_HAS_LOCK
$ dmesg [ 3.519233] dvb-usb: found a 'Pinnacle PCTV 73e SE' in cold state, will try to load a firmware [ 3.529962] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw' [ 3.871202] dib0700: firmware started successfully. [ 4.373456] dvb-usb: found a 'Pinnacle PCTV 73e SE' in warm state. [ 4.373567] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 4.373732] DVB: registering new adapter (Pinnacle PCTV 73e SE) [ 4.568680] DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)... [ 4.766795] DiB0070: successfully identified [ 4.830021] Registered IR keymap rc-dib0700-rc5 [ 4.831325] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:10.4/usb1/1-6/rc/rc0/input6 [ 4.831485] rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:10.4/usb1/1-6/rc/rc0 [ 4.831681] dvb-usb: schedule remote query interval to 50 msecs. [ 4.831688] dvb-usb: Pinnacle PCTV 73e SE successfully initialized and connected.
On 04.12.2012 20:35, cedric.dewijs@telfort.nl wrote:
Hi All,
I use an USB DVB-T receiver. This works ok, but the snr meter at the bottom of the screen is never filled more than a few pixels, no matter how good the signal is. The problem with this receiver is that the snr figure never goes above 0x00d0. Is there a way to adjust the scaling of the signal and snr bars? I would like the snr bar to be fully filled when the figure is 0x00ff
Best regards, Cedric
$ lsusb Bus 001 Device 004: ID 2013:0245 PCTV Systems PCTV 73ESE
$ tzap -a 0 -r 'Nederland 1' using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' reading channels from file '/home/cedric/.tzap/channels.conf' tuning to 474000000 Hz video pid 0x1b63, audio pid 0x1b64 status 1b | signal 0dbd | snr 00a2 | ber 001fffff | unc 00000000 | FE_HAS_LOCK
$ dmesg [ 3.519233] dvb-usb: found a 'Pinnacle PCTV 73e SE' in cold state, will try to load a firmware [ 3.529962] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw' [ 3.871202] dib0700: firmware started successfully. [ 4.373456] dvb-usb: found a 'Pinnacle PCTV 73e SE' in warm state. [ 4.373567] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 4.373732] DVB: registering new adapter (Pinnacle PCTV 73e SE) [ 4.568680] DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)... [ 4.766795] DiB0070: successfully identified [ 4.830021] Registered IR keymap rc-dib0700-rc5 [ 4.831325] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:10.4/usb1/1-6/rc/rc0/input6 [ 4.831485] rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:10.4/usb1/1-6/rc/rc0 [ 4.831681] dvb-usb: schedule remote query interval to 50 msecs. [ 4.831688] dvb-usb: Pinnacle PCTV 73e SE successfully initialized and connected.
It's a real pitty that the DVB drivers don't provide a standardized way of getting signal strength and quality. They all deliver some bogus values in various different ranges, which are pretty useless to applications. That's why VDR's cDvbTuner tries to work around this deficiency in its cDvbTuner::GetSignalStrength() and cDvbTuner::GetSignalQuality() functions by scaling the individual values so that they fall into a defined range of 0..100. See these functions in dvbdevice.c and how they use the subsystemId to set an individual maximum value for the "TT-budget S2-3200". Maybe you can do something similar for your device. Please send me a proper patch if you have any success with this.
Klaus
P.S.: ceterum censeo: the DVB drivers should finally get an interface that delivers these values right away. After all, the driver is the only place where this can be done reasonably. It wouldn't even matter whether the range is 0..100, 0x0000..0xFFFF or anything else - just the *same* for all drivers! Or does this already exist and I just missed it?
On Tue, Dec 4, 2012 at 1:40 PM, Klaus Schmidinger Klaus.Schmidinger@tvdr.de wrote:
It's a real pitty that the DVB drivers don't provide a standardized way of getting signal strength and quality. They all deliver some bogus values in various different ranges, which are pretty useless to applications.
This very subject has been discussed at least a few times on the linux-media mailing list but unfortunately nothing has even been finalized and implemented. I can't remember why now -- probably people disagreeing on what metric to use or some other stupid reason that shouldn't hold it back from getting done once and for all. I personally think it's worth bringing up again, but someone else can do it. I've already done that myself a couple times.
Please send me a proper patch if you have any success with this.
Klaus
Hi Klaus,
I have not yet tested this, but the below code should work. I assume the receiver has a snr of 0x0000 to 0x00ff based on the following datapoints: 0x0080 almost never lock, unwatchable 0x0090 almost always lock, lots of disturbances 0x00A0 always lock, almost never disturbances 0x00D0 best signal ever received.
$ lsusb Bus 001 Device 004: ID 2013:0245 PCTV Systems PCTV 73ESE
uint16_t MaxSnr = 0xFFFF; // Let's assume the default is using the entire range. // Use the subsystemId to identify individual devices in case they need // special treatment to map their Snr value into the range 0...0xFFFF. switch (subsystemId) { case 0x13C21019: MaxSnr = 200; break; // TT-budget S2-3200 (DVB-S/DVB-S2) case 0x20130245: MaxSnr = 0x00ff; break; //PCTV Systems PCTV 73ESE } int a = int(Snr) * 100 / MaxSnr; int b = 100 - (Unc * 10 + (Ber / 256) * 5);
Sorry for not sending a proper patch as requested, I have not yet found the time to test it properly.
Best regards, Cedric
On 30.12.2012 10:15, cedric.dewijs@telfort.nl wrote:
Please send me a proper patch if you have any success with this.
Klaus
Hi Klaus,
I have not yet tested this, but the below code should work. I assume the receiver has a snr of 0x0000 to 0x00ff based on the following datapoints: 0x0080 almost never lock, unwatchable 0x0090 almost always lock, lots of disturbances 0x00A0 always lock, almost never disturbances 0x00D0 best signal ever received.
$ lsusb Bus 001 Device 004: ID 2013:0245 PCTV Systems PCTV 73ESE
uint16_t MaxSnr = 0xFFFF; // Let's assume the default is using the entire range. // Use the subsystemId to identify individual devices in case they need // special treatment to map their Snr value into the range 0...0xFFFF. switch (subsystemId) { case 0x13C21019: MaxSnr = 200; break; // TT-budget S2-3200 (DVB-S/DVB-S2) case 0x20130245: MaxSnr = 0x00ff; break; //PCTV Systems PCTV 73ESE } int a = int(Snr) * 100 / MaxSnr; int b = 100 - (Unc * 10 + (Ber / 256) * 5);
Sorry for not sending a proper patch as requested, I have not yet found the time to test it properly.
No problem, I can easily insert this one-liner ;-).
Are you sure about the "subsystemId"? IIRC somebody claimed that these don't apply to USB devices (which yours apparently is, since you did an "lsusb"). Just wondering...
Klaus
On Sun, Dec 30, 2012 at 10:41:48AM +0100, Klaus Schmidinger wrote:
On 30.12.2012 10:15, cedric.dewijs@telfort.nl wrote:
Please send me a proper patch if you have any success with this.
Klaus
Hi Klaus,
I have not yet tested this, but the below code should work. I assume the receiver has a snr of 0x0000 to 0x00ff based on the following datapoints: 0x0080 almost never lock, unwatchable 0x0090 almost always lock, lots of disturbances 0x00A0 always lock, almost never disturbances 0x00D0 best signal ever received.
$ lsusb Bus 001 Device 004: ID 2013:0245 PCTV Systems PCTV 73ESE
uint16_t MaxSnr = 0xFFFF; // Let's assume the default is using the entire range. // Use the subsystemId to identify individual devices in case they need // special treatment to map their Snr value into the range 0...0xFFFF. switch (subsystemId) { case 0x13C21019: MaxSnr = 200; break; // TT-budget S2-3200 (DVB-S/DVB-S2) case 0x20130245: MaxSnr = 0x00ff; break; //PCTV Systems PCTV 73ESE } int a = int(Snr) * 100 / MaxSnr; int b = 100 - (Unc * 10 + (Ber / 256) * 5);
Sorry for not sending a proper patch as requested, I have not yet found the time to test it properly.
No problem, I can easily insert this one-liner ;-).
Are you sure about the "subsystemId"? IIRC somebody claimed that these don't apply to USB devices (which yours apparently is, since you did an "lsusb"). Just wondering...
Klaus
Same maximum seems to be valid also for ID 2013:024f (PCTV Systems nanoStick T2 290e) also. Atleast I've never seen anything higher than 0x00F0. It is also USB device though.
Are you sure about the "subsystemId"? IIRC somebody claimed that these don't apply to USB devices (which yours apparently is, since you did an "lsusb"). Just wondering...
Klaus
I am not sure. When I have time I'll build vdr with a strategic placed printf :-)
Regards, Cedric