From owner-freebsd-multimedia@FreeBSD.ORG Tue Jun 26 18:28:02 2012 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 76AE0106566B for ; Tue, 26 Jun 2012 18:28:02 +0000 (UTC) (envelope-from mlist@itservice-schaefer.de) Received: from v220101070074062.yourvserver.net (static.68.133.47.78.clients.your-server.de [78.47.133.68]) by mx1.freebsd.org (Postfix) with ESMTP id E60108FC08 for ; Tue, 26 Jun 2012 18:28:01 +0000 (UTC) Received: from [192.168.1.131] (ip-88-153-232-225.unitymediagroup.de [88.153.232.225]) by v220101070074062.yourvserver.net (Postfix) with ESMTPA id 941DE1F414AA; Tue, 26 Jun 2012 20:28:00 +0200 (CEST) Message-ID: <4FE9FF30.9070103@itservice-schaefer.de> Date: Tue, 26 Jun 2012 20:28:00 +0200 From: =?ISO-8859-1?Q?Timo_Sch=E4fer?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Juergen Lock References: <4FE83768.6000909@itservice-schaefer.de> <4FE9D99F.5000005@itservice-schaefer.de> <4FE9DB34.7010806@itservice-schaefer.de> <201206261725.q5QHPV4r070734@triton8.kn-bremen.de> <20120626174614.GA71689@triton8.kn-bremen.de> In-Reply-To: <20120626174614.GA71689@triton8.kn-bremen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-multimedia@freebsd.org Subject: Re: DVB-C (CT-3650) with UnityMedia CI Module not working X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 18:28:02 -0000 Am 26.06.2012 19:46, schrieb Juergen Lock: > On Tue, Jun 26, 2012 at 07:25:31PM +0200, Juergen Lock wrote: >> In article <201206261804.05819.hselasky@c2i.net> you write: >>> On Tuesday 26 June 2012 17:54:28 Timo Schäfer wrote: >>>> Am 26.06.2012 17:47, schrieb Timo Schäfer: >>>>> Am 26.06.2012 17:37, schrieb Hans Petter Selasky: >>>>>> On Monday 25 June 2012 17:48:05 Timo Schäfer wrote: >>>>>>> ./adapter0/ca0 >>>>>> Can you use the device shown above? >>>>>> >>>>>> --HPS >>>>> how? vdr is not talking to it / does not detect it. >>>>> >>>>> under linux vdr looks at the attached ci module and inserted smartcard >>>>> to unscramble >>>>> the channel if needed. >>>>> >>>>> with my freebsd setup vdr does not detect the ci module and cannot use >>>>> the smartcard >>>>> to open the scrambled channels. >>>>> >>>>> crw-rw---- 1 webcamd webcamd 0, 97 Jun 26 17:40 ca0 >>>>> >>>>> has the needed rights, but i guess its not used/detected. >>>> Ah there is something in /var/log/messages: >>>> >>>> Jun 26 14:00:20 barney vdr: [680406016] ERROR: can't get info of CAM >>>> slot 0 on device 0: Invalid argument >>>> Jun 26 14:00:28 barney last message repeated 15 times >>> Hi, >>> >>>> does not look good but that seems to be the problem. >>> Maybe it is a known IOCTL issue. Some IOCTL needs to be fixed before they can >>> be used, because the RW flags are not correct. >>> >>> Try figuring out what IOCTL this is with ktrace or something like that. Or >>> simply grep in the code for that error message. Then see if the RW flags are >>> correct. >> Bingo! :) At least CA_GET_SLOT_INFO needs to be _IOWR not _IOR. >> Try this patch in ports/multimedia/v4l_compat/files/patch-dvb-ca.h: >> >> --- dvb/ca.h.orig >> +++ dvb/ca.h >> @@ -80,7 +80,13 @@ typedef struct ca_pid { >> >> #define CA_RESET _IO('o', 128) >> #define CA_GET_CAP _IOR('o', 129, ca_caps_t) >> + >> +/* At least CA_GET_SLOT_INFO needs to be _IOWR not _IOR. >> + * This is wrong on Linux too but there the driver doesn't care. >> + * >> #define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t) >> + */ >> +#define CA_GET_SLOT_INFO _IOWR('o', 130, ca_slot_info_t) >> #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t) >> #define CA_GET_MSG _IOR('o', 132, ca_msg_t) >> #define CA_SEND_MSG _IOW('o', 133, ca_msg_t) >> >> .and a very similar one in >> ports/multimedia/webcamd/files/patch-media_tree-include-linux-dvb-ca.h: >> >> --- media_tree/include/linux/dvb/ca.h.orig >> +++ media_tree/include/linux/dvb/ca.h >> @@ -80,7 +80,13 @@ typedef struct ca_pid { >> >> #define CA_RESET _IO('o', 128) >> #define CA_GET_CAP _IOR('o', 129, ca_caps_t) >> + >> +/* At least CA_GET_SLOT_INFO needs to be _IOWR not _IOR. >> + * This is wrong on Linux too but there the driver doesn't care. >> + * >> #define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t) >> + */ >> +#define CA_GET_SLOT_INFO _IOWR('o', 130, ca_slot_info_t) >> #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t) >> #define CA_GET_MSG _IOR('o', 132, ca_msg_t) >> #define CA_SEND_MSG _IOW('o', 133, ca_msg_t) >> >> and then rebuild these two and multimedia/vdr too. >> >> Good luck, :) >> Juergen >> >> PS: The submitter of the WebcamCompat wiki TT S2-3650 entry told me >> he tested the CI too, I wonder what he tested... (Or maybe the old >> vdr version ignored the error?) > And seems CA_GET_MSG needs to be _IOWR too, tho vdr doesn't use it > so the two patches should still be enough for testing. > > Juergen > _______________________________________________ > freebsd-multimedia@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia > To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@freebsd.org" YES! Thank you Hans Petter and Jürgen, after applying the patches: un 26 20:22:23 barney vdr: [680397824] CAM 1: module present Jun 26 20:22:25 barney vdr: [680397824] CAM 1: module ready Jun 26 20:22:28 barney vdr: [680397824] CAM 1: AlphaCrypt, 01, 4A20, 4A20 Jun 26 20:22:29 barney vdr: [680403968] CAM 1: assigned to device 1 Jun 26 20:22:33 barney vdr: [680403968] CAM 1: unassigned Jun 26 20:22:37 barney vdr: [680403968] CAM 1: assigned to device 1 CAM works now and unscrambles the crypted channels my smartcard enables to. Timo