summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-01-26 12:02:14 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-01-26 12:02:14 +0100
commit4aa496b079925877c5cdf171597f4edc7df0a9b1 (patch)
tree851af34bb6c73b0e8f4ddb21b82641c56f0a3b69
parent4fcd3ba56e37ced65a7591d9165322154ed86fce (diff)
downloadvdr-4aa496b079925877c5cdf171597f4edc7df0a9b1.tar.gz
vdr-4aa496b079925877c5cdf171597f4edc7df0a9b1.tar.bz2
Added support for "Satellite Channel Routing" (SCR) according to EN50607, also known as "JESS"
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--INSTALL5
-rw-r--r--diseqc.c58
-rw-r--r--diseqc.conf24
-rw-r--r--scr.conf22
6 files changed, 86 insertions, 27 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 885c5e91..4202b3e1 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2984,6 +2984,7 @@ Frank Neumann <fnu@yavdr.org>
for suggesting to reduce the thread and I/O priority cCuttingThread::Action()
for reporting a problem with tuning timeouts when using SCR with multiple tuners
for fixing the German translation of "VDR will shut down in %s minutes"
+ for adding support for "Satellite Channel Routing" (SCR) according to EN50607 ("JESS")
Gerald Dachs <vdr@dachsweb.de>
for reporting a problem with checking for minimum line length of 21 characters in
@@ -3247,6 +3248,7 @@ Seppo Ingalsuo <seppo.ingalsuo@iki.fi>
Manfred Völkel <mvoelkel@digitaldevices.de>
for suggesting to make all bonded devices (except for the master) turn off their LNB
power completely to avoid problems when receiving vertically polarized transponders
+ for adding support for "Satellite Channel Routing" (SCR) according to EN50607 ("JESS")
Thomas Maass <mase@setho.org>
for reporting a difference in the internal sequence of actions when pressing the Blue
diff --git a/HISTORY b/HISTORY
index 5e988820..578bd8d5 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8434,3 +8434,5 @@ Video Disk Recorder Revision History
+ The '8' key for testing an edited sequence now always jumps to the next *end*
mark. This allows for testing edits in recordings that have actually been cut, as
well as recordings that have not been cut, in case "Skip edited parts" is enabled.
+- Added support for "Satellite Channel Routing" (SCR) according to EN50607, also
+ known as "JESS" (thanks to Manfred Völkel and Frank Neumann).
diff --git a/INSTALL b/INSTALL
index 2dff5e34..07581b56 100644
--- a/INSTALL
+++ b/INSTALL
@@ -391,8 +391,9 @@ access your DiSEqC equipment (see man vdr(5) for details).
A special form of DiSEqC is used to connect several receivers to one signal
source using only a single cable. This method, known as "Satellite Channel Routing"
according to EN50494 (aka "Unicable(TM)", "OLT(TM)", "SatCR", "Single Cable
-Distribution", "Channel Stacking System" or "Single Cable Interface") uses
-the file "scr.conf" to specify which SCR channels use which user band frequency.
+Distribution", "Channel Stacking System" or "Single Cable Interface") or
+EN50607 (aka "JESS") uses the file "scr.conf" to specify which SCR channels
+use which user band frequency.
If DVB-S devices need to be connected to the same satellite cable, but no
"Satellite Channel Routing" is available, they can be set to be "bonded" in
diff --git a/diseqc.c b/diseqc.c
index 2517caf6..de64257f 100644
--- a/diseqc.c
+++ b/diseqc.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: diseqc.c 3.3 2013/12/28 11:33:08 kls Exp $
+ * $Id: diseqc.c 3.4 2015/01/26 12:02:14 kls Exp $
*/
#include "diseqc.h"
@@ -164,7 +164,7 @@ bool cScr::Parse(const char *s)
bool result = false;
int fields = sscanf(s, "%d %u %d", &channel, &userBand, &pin);
if (fields == 2 || fields == 3) {
- if (channel >= 0 && channel < 8) {
+ if (channel >= 0 && channel < 32) {
result = true;
if (fields == 3 && (pin < 0 || pin > 255)) {
esyslog("Error: invalid SCR pin '%d'", pin);
@@ -255,26 +255,52 @@ bool cDiseqc::Parse(const char *s)
uint cDiseqc::SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const
{
- uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding!
- if (t < 1024 && Scr->Channel() >= 0 && Scr->Channel() < 8) {
- Codes[3] = t >> 8 | (t == 0 ? 0 : scrBank << 2) | Scr->Channel() << 5;
- Codes[4] = t;
- if (t)
- return (t + 350) * 4 - SatFrequency;
+ if ((Codes[0] & 0xF0) == 0x70 ) { // EN50607 aka JESS
+ uint t = SatFrequency == 0 ? 0 : (SatFrequency - 100);
+ if (t < 2048 && Scr->Channel() >= 0 && Scr->Channel() < 32) {
+ Codes[1] = t >> 8 | Scr->Channel() << 3;
+ Codes[2] = t;
+ Codes[3] = (t == 0 ? 0 : scrBank);
+ if (t)
+ return Scr->UserBand();
+ }
+ }
+ else { // EN50494 aka Unicable
+ uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding!
+ if (t < 1024 && Scr->Channel() >= 0 && Scr->Channel() < 8) {
+ Codes[3] = t >> 8 | (t == 0 ? 0 : scrBank << 2) | Scr->Channel() << 5;
+ Codes[4] = t;
+ if (t)
+ return (t + 350) * 4 - SatFrequency;
+ }
}
+ esyslog("ERROR: invalid SCR channel number %d or frequency %d", Scr->Channel(),SatFrequency);
return 0;
}
int cDiseqc::SetScrPin(const cScr *Scr, uint8_t *Codes) const
{
- if (Scr->Pin() >= 0 && Scr->Pin() <= 255) {
- Codes[2] = 0x5C;
- Codes[5] = Scr->Pin();
- return 6;
+ if ((Codes[0] & 0xF0) == 0x70 ) { // EN50607 aka JESS
+ if (Scr->Pin() >= 0 && Scr->Pin() <= 255) {
+ Codes[0] = 0x71;
+ Codes[4] = Scr->Pin();
+ return 5;
+ }
+ else {
+ Codes[0] = 0x70;
+ return 4;
+ }
}
- else {
- Codes[2] = 0x5A;
- return 5;
+ else { // EN50494 aka Unicable
+ if (Scr->Pin() >= 0 && Scr->Pin() <= 255) {
+ Codes[2] = 0x5C;
+ Codes[5] = Scr->Pin();
+ return 6;
+ }
+ else {
+ Codes[2] = 0x5A;
+ return 5;
+ }
}
}
@@ -319,7 +345,7 @@ const char *cDiseqc::GetScrBank(const char *s) const
char *p = NULL;
errno = 0;
int n = strtol(s, &p, 10);
- if (!errno && p != s && n >= 0 && n < 8) {
+ if (!errno && p != s && n >= 0 && n < 256) {
if (parsing) {
if (scrBank < 0)
scrBank = n;
diff --git a/diseqc.conf b/diseqc.conf
index 4c48ecc1..77324b88 100644
--- a/diseqc.conf
+++ b/diseqc.conf
@@ -82,7 +82,7 @@ S13.0E 99999 H 10600 t V W15 [E0 10 38 F7] W15 B W15 T
# S19.2E 12110 V 11080 t v
# S19.2E 99999 V 10720 t v
#
-# SCR (Satellite Channel Routing):
+# SCR (Satellite Channel Routing) EN50494:
#
# S19.2E 11700 V 9750 t V W10 S0 [E0 10 5A 00 00] W10 v
# S19.2E 99999 V 10600 t V W10 S1 [E0 10 5A 00 00] W10 v
@@ -94,6 +94,28 @@ S13.0E 99999 H 10600 t V W15 [E0 10 38 F7] W15 B W15 T
# S13.0E 11700 H 9750 t V W10 S6 [E0 10 5A 00 00] W10 v
# S13.0E 99999 H 10600 t V W10 S7 [E0 10 5A 00 00] W10 v
#
+# SCR (Satellite Channel Routing) EN50607 "JESS":
+#
+# S19.2E 11700 V 9750 t V W10 S0 [70 00 00 00] W10 v
+# S19.2E 99999 V 10600 t V W10 S1 [70 00 00 00] W10 v
+# S19.2E 11700 H 9750 t V W10 S2 [70 00 00 00] W10 v
+# S19.2E 99999 H 10600 t V W10 S3 [70 00 00 00] W10 v
+#
+# S13.0E 11700 V 9750 t V W10 S4 [70 00 00 00] W10 v
+# S13.0E 99999 V 10600 t V W10 S5 [70 00 00 00] W10 v
+# S13.0E 11700 H 9750 t V W10 S6 [70 00 00 00] W10 v
+# S13.0E 99999 H 10600 t V W10 S7 [70 00 00 00] W10 v
+#
+# S23.0E 11700 V 9750 t V W10 S8 [70 00 00 00] W10 v
+# S23.0E 99999 V 10600 t V W10 S9 [70 00 00 00] W10 v
+# S23.0E 11700 H 9750 t V W10 S10 [70 00 00 00] W10 v
+# S23.0E 99999 H 10600 t V W10 S11 [70 00 00 00] W10 v
+#
+# S28.2E 11700 V 9750 t V W10 S12 [70 00 00 00] W10 v
+# S28.2E 99999 V 10600 t V W10 S13 [70 00 00 00] W10 v
+# S28.2E 11700 H 9750 t V W10 S14 [70 00 00 00] W10 v
+# S28.2E 99999 H 10600 t V W10 S15 [70 00 00 00] W10 v
+#
# Positioner for steerable dish:
#
# S360E 11700 V 9750 t V W20 P W20 t v
diff --git a/scr.conf b/scr.conf
index 61e09f1c..84cdcec7 100644
--- a/scr.conf
+++ b/scr.conf
@@ -14,11 +14,17 @@
#
# Examples:
-# 0 1284
-# 1 1400
-# 2 1516
-# 3 1632
-# 4 1748
-# 5 1864
-# 6 1980
-# 7 2096
+# EN50494 & EN50607 ("JESS")
+# 0 974
+# 1 1076
+# 2 1178
+# 3 1280
+# 4 1382
+# 5 1484
+# 6 1586
+# 7 1688
+# EN50607 ("JESS") only
+# 8 1790
+# 9 1892
+# 10 1994
+# 11 2096