[vdr] select() problem seen with vdr-plugin-streamdev 0.6.1

2015-03-26 Thread Hans Petter Selasky

Hi,

I'm seeing this strange problem that a select statement in the streamdev 
server is returning EBADF and then the streamdev server exits and refuse 
to accept more connections. This typically happens when trying to stream 
a specific channel. Trying to stream other channels does not exhibit 
this problem.


I can recompile code and try patches.

I've made simple and crude patch to make the streamdev server plugin a 
bit more fault tolerant. See attachment.


OS: FreeBSD-11-current
Driver: Wecamd (Same as what is in Linux 3.18)

BTW: Thank you for keeping VDR up to date!

--HPS
--- ./work/streamdev-0.6.1/server/server.c	2012-10-15 22:19:22.0 +0200
+++ server.c	2015-03-26 14:36:11.710805000 +0100
@@ -111,8 +111,10 @@
 		if (!Running())
 			break;
 		if (sel  0) {
-			esyslog(fatal error, server exiting: %m);
-			break;
+			//esyslog(fatal error, server exiting: %m);
+			//break;
+			sel = 0;
+			usleep(10);
 		}
 	
 		/* Ask all Server components to act on signalled sockets */
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] Add support for [non-standard?] DiSEqC switch MAXIMUM DiSEqC 4/1

2011-03-14 Thread Hans Petter Selasky
Hi,

The local guy over here mounted what he claimed is a fully standard 4/1
DiSEqC switch which works with every sat-receiver around. After some
brief investigation, it appears this DiSEqC switch is using a non-standard?
scheme, which is not supported by w_scan nor vdr. Correct me if I'm wrong.

To get the switch working with VDR I need an option to turn off the switch
power. This is part of the sequence to program the switch.

I've attached patches for w_scan and VDR to work with the DiSEqC
switch I've got. I don't have any documentation on the switch. All the
programming was the result of two days of reverse engineering. And I did
not open the switch either :-)

Manufacturer homepage:
http://www.kjaerulff1.com/en-gb/p/30_maximum_diseqc_41_switch

Information needed for VDR's diseqc.conf

#
# Full sequence for LNB-A
#
LNB.A 11700 V  9750 t F W45 v W15 W45 F W45 v W15 W45 t W45
LNB.A 9 V 10600 t F W45 v W15 W45 F W45 v W15 W45 T W45
LNB.A 11700 H  9750 t F W45 V W15 W45 F W45 V W15 W45 t W45
LNB.A 9 H 10600 t F W45 V W15 W45 F W45 V W15 W45 T W45

#
# Full sequence for LNB-B
#
LNB.B 11700 V  9750 t F W45 v W15 [E0 10 26] W45 F W45 v W15 [E0 10 26] W45 t 
W45
LNB.B 9 V 10600 t F W45 v W15 [E0 10 26] W45 F W45 v W15 [E0 10 26] W45 T 
W45
LNB.B 11700 H  9750 t F W45 V W15 [E0 10 26] W45 F W45 V W15 [E0 10 26] W45 t 
W45
LNB.B 9 H 10600 t F W45 V W15 [E0 10 26] W45 F W45 V W15 [E0 10 26] W45 T 
W45

#
# Full sequence for LNB-C
#
LNB.C 11700 V  9750 t F W45 v W15 [E0 10 27] W45 F W45 v W15 [E0 10 27] W45 t 
W45
LNB.C 9 V 10600 t F W45 v W15 [E0 10 27] W45 F W45 v W15 [E0 10 27] W45 T 
W45
LNB.C 11700 H  9750 t F W45 V W15 [E0 10 27] W45 F W45 V W15 [E0 10 27] W45 t 
W45
LNB.C 9 H 10600 t F W45 V W15 [E0 10 27] W45 F W45 V W15 [E0 10 27] W45 T 
W45

#
# Full sequence for LNB-D
#
LNB.D 11700 V  9750 t F W45 v W15 [E0 10 27] W45 F W45 v W15 [E0 10 26] W45 F 
W45 v W15 [E0 10 27] W45 F W45 v W15 [E0 10 26] W45 t W45
LNB.D 9 V 10600 t F W45 v W15 [E0 10 27] W45 F W45 v W15 [E0 10 26] W45 F 
W45 v W15 [E0 10 27] W45 F W45 v W15 [E0 10 26] W45 T W45
LNB.D 11700 H  9750 t F W45 V W15 [E0 10 27] W45 F W45 V W15 [E0 10 26] W45 F 
W45 V W15 [E0 10 27] W45 F W45 V W15 [E0 10 26] W45 t W45
LNB.D 9 H 10600 t F W45 V W15 [E0 10 27] W45 F W45 V W15 [E0 10 26] W45 F 
W45 V W15 [E0 10 27] W45 F W45 V W15 [E0 10 26] W45 T W45


Good luck!

I hope the patches can be included into VDR and w_scan. Not sure if this is the 
right list to post the patches.

--HPS
diff -u -r work.orig/vdr-1.7.16/diseqc.c work/vdr-1.7.16/diseqc.c
--- work.orig/vdr-1.7.16/diseqc.c	2011-03-13 15:01:52.0 +0100
+++ work/vdr-1.7.16/diseqc.c	2011-03-13 15:02:26.0 +0100
@@ -137,6 +137,7 @@
   case ' ': break;
   case 't': return daToneOff;
   case 'T': return daToneOn;
+  case 'F': return daVoltageOff;
   case 'v': return daVoltage13;
   case 'V': return daVoltage18;
   case 'A': return daMiniA;
diff -u -r work.orig/vdr-1.7.16/diseqc.conf work/vdr-1.7.16/diseqc.conf
--- work.orig/vdr-1.7.16/diseqc.conf	2011-03-13 15:01:52.0 +0100
+++ work/vdr-1.7.16/diseqc.conf	2011-03-13 15:02:40.0 +0100
@@ -14,6 +14,7 @@
 # command:
 #   t tone off
 #   T tone on
+#   F voltage off (0V)
 #   v voltage low (13V)
 #   V voltage high (18V)
 #   A mini A
diff -u -r work.orig/vdr-1.7.16/diseqc.h work/vdr-1.7.16/diseqc.h
--- work.orig/vdr-1.7.16/diseqc.h	2011-03-13 15:01:52.0 +0100
+++ work/vdr-1.7.16/diseqc.h	2011-03-13 15:02:49.0 +0100
@@ -18,6 +18,7 @@
 daNone,
 daToneOff,
 daToneOn,
+daVoltageOff,
 daVoltage13,
 daVoltage18,
 daMiniA,
diff -u -r work.orig/vdr-1.7.16/dvbdevice.c work/vdr-1.7.16/dvbdevice.c
--- work.orig/vdr-1.7.16/dvbdevice.c	2011-03-13 15:01:52.0 +0100
+++ work/vdr-1.7.16/dvbdevice.c	2011-03-13 15:03:14.0 +0100
@@ -402,6 +402,7 @@
 case cDiseqc::daNone:  break;
 case cDiseqc::daToneOff:   CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_OFF)); break;
 case cDiseqc::daToneOn:CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_ON)); break;
+case cDiseqc::daVoltageOff: CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_OFF)); break;
 case cDiseqc::daVoltage13: CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_13)); break;
 case cDiseqc::daVoltage18: CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_18)); break;
 case cDiseqc::daMiniA: CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_BURST, SEC_MINI_A)); break;
diff -u -r work.orig/vdr-1.7.16/include/vdr/diseqc.h work/vdr-1.7.16/include/vdr/diseqc.h
--- work.orig/vdr-1.7.16/include/vdr/diseqc.h	2011-03-13 15:01:52.0 +0100
+++ work/vdr-1.7.16/include/vdr/diseqc.h	2011-03-13 15:02:49.0 +0100
@@ -18,6 +18,7 @@
 daNone,