[pyar] Ctypes + IOError: [Errno 1] Operation not permitted

Alejandro Santos listas en alejolp.com
Mie Oct 26 13:44:38 ART 2011


On Wed, Oct 26, 2011 at 1:37 PM, Alejandro Santos <listas en alejolp.com> wrote:
> 2011/10/26 Sergio Daniel Gomez <sergiogomez en tostado.com.ar>:
>>
>>>>> import frontend
>>>>> fe = open('/dev/dvb/adapter0/frontend0', 'rw')
>>>>> f = frontend.SatelliteFrontend(fe)
>>>>> f.tune(12163)
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in <module>
>>  File "frontend.py", line 476, in tune
>>    self._tune(params)
>>  File "frontend.py", line 412, in _tune
>>    fcntl.ioctl(self._fd, FE_SET_FRONTEND, params)
>> IOError: [Errno 1] Operation not permitted
>>
>
>
> Otra razón para que ioctl dispare ese error es que el driver no esté
> disponible/no te lo permita.
>

Yep, me juego por la segunda. Segun la doc de dvb[1], hacer
ioctl(FE_SET_FRONTEND) significa que el sintonizador dio error al
intentar inicializar el driver. Tiene toda la pinta de ser un problema
hardware y/o firmware más que de Python y Ctypes.

Lo que podés hacer es fijarte qué valor tenés en errno despues de
hacer la llamda a ioctl().

[1] http://www.linuxtv.org/docs/dvbapi/DVB_Frontend_API.html#SECTION00328000000000000000

-- 
Alejandro Santos



More information about the pyar mailing list