Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] operation not permitted



Hi all

I'm trying to setup my skystar2 card to receive EUMETCAST data from HotBird13
 (see at  http://www.eumetsat.de/en/index.html?area=left7.html&body=/en/dps/dissemination/eumetcast.html&a=710&b=1&c=700&d=700&e=0)

on my Red Hat 9.0 workstation using linuxtv 1.1.0.

all modules and programs are compiled without errors.
all necessary modules are inserted in the kernel without errors.

in linuxtv-dvb-1.0.1 distribution there is a program called
"scan" and this program works well: I obtainel the full list
of channels on HotBird13.

the problem is with the dvbtune command:



looking  at dvbtune.c source code and as we can see in the fragment below
the message "Successfully opened network device, please configure the dvb interface\n"
is printed indipendently from the result of ioctl

   1398 #ifdef NEWSTRUCT
   1399     sprintf(devnamen,"/dev/dvb/adapter%d/net0",dev);
   1400 #else
   1401     sprintf(devnamen,"/dev/ost/net%d",dev);
   1402 #endif
   1403     //printf("Trying to open %s\n",devnamen);
   1404     if((fdn = open(devnamen,O_RDWR|O_NONBLOCK)) < 0) {
   1405       fprintf(stderr, "Failed to open DVB NET DEVICE");
   1406       close(fd_frontend);
   1407       if (fd_sec) close(fd_sec);
   1408     } else {
   1409       // Add the network interface
   1410       ioctl( fdn,NET_ADD_IF,&netif);
   1411
   1412       close (fdn);
   1413       printf("Successfully opened network device, please configure the dvb interface\n");
   1414     }
   1415   }
 

so I decided to modify the sorce code and I added some printf for diagnostic



   1408     } else {
   1409       // Add the network interface
printf("trying to open %s\n",
devnamen);
   1410    //   ioctl( fdn,NET_ADD_IF,&netif);
printf("result from ioctl : %d errno = %d\n",
ioctl( fdn,NET_ADD_IF,&netif), errno);
perror("ioctl message:);

   1411
   1412       close (fdn);
   1413       printf("Successfully opened network device, please configure the dvb interface\n");
   1414     }
   1415   }
 


and then, running the program:


[root@localhost dvbtune]# strace -o tune.log ./dvbtune -c 0 -f 11096000 -p H -s 27500 -n 100
Using DVB card "Zarlink MT312"
tuning DVB-S to L-Band:1107311556, Pol:H Srate=27500000, 22kHz=off
polling....
Getting frontend event
FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_SYNC
Bit error rate: 0
Signal strength: 16022
SNR: 51199
FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_SYNC
trying to open /dev/dvb/adapter0/net0
result from ioctl : -1 errno = 0
ioctl message: Operation not permitted
Successfully opened network device, please configure the dvb interface




so we can see that ioctl fails with message "operation not permitted"

in attachmet there is also the file tune.log

and the network interface 
dvb0_0 IS NOT CREATED .

thanks for the help


Andrea






execve("./dvbtune", ["./dvbtune", "-c", "0", "-f", "11096000", "-p", "H", "-s", "27500", "-n", "100"], [/* 38 vars */]) = 0
uname({sys="Linux", node="localhost.localdomain", ...}) = 0
brk(0)                                  = 0x804f688
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=115585, ...}) = 0
old_mmap(NULL, 115585, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`V\1B4\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1531064, ...}) = 0
old_mmap(0x42000000, 1257224, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x42000000
old_mmap(0x4212e000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12e000) = 0x4212e000
old_mmap(0x42131000, 7944, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42131000
close(3)                                = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0x40016a00, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0x40017000, 115585)              = 0
open("/dev/dvb/adapter0/dvr0", O_RDONLY|O_NONBLOCK) = 3
open("/dev/dvb/adapter0/frontend0", O_RDWR) = 4
open("/dev/dvb/adapter0/demux0", O_RDWR|O_NONBLOCK) = 5
open("/dev/dvb/adapter0/demux0", O_RDWR) = 6
open("/dev/dvb/adapter0/demux0", O_RDWR) = 7
open("/dev/dvb/adapter0/demux0", O_RDWR) = 8
open("/dev/dvb/adapter0/demux0", O_RDWR) = 9
open("/dev/dvb/adapter0/demux0", O_RDWR|O_NONBLOCK) = 10
ioctl(7, 0x6f2a, 0)                     = 0
ioctl(6, 0x6f2a, 0)                     = 0
ioctl(8, 0x6f2a, 0)                     = 0
ioctl(4, 0x80a86f3d, 0xbffff550)        = 0
write(2, "Using DVB card \"Zarlink MT312\"\n", 31) = 31
write(2, "tuning DVB-S to L-Band:110731155"..., 67) = 67
ioctl(4, 0x6f43, 0x1)                   = 0
ioctl(4, 0x6f42, 0x1)                   = 0
nanosleep({0, 100000000}, NULL)         = 0
ioctl(4, 0x40246f4c, 0xbffff600)        = 0
write(2, "polling....\n", 12)           = 12
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 10000) = 1
write(2, "Getting frontend event\n", 23) = 23
ioctl(4, 0x80286f4e, 0xbffff4e0)        = 0
write(2, "FE_STATUS:", 10)              = 10
write(2, " FE_HAS_SIGNAL", 14)          = 14
write(2, " FE_HAS_LOCK", 12)            = 12
write(2, " FE_HAS_CARRIER", 15)         = 15
write(2, " FE_HAS_SYNC", 12)            = 12
write(2, "\n", 1)                       = 1
ioctl(4, 0x80046f46, 0xbffff51c)        = 0
write(2, "Bit error rate: 0\n", 18)     = 18
ioctl(4, 0x80026f47, 0xbffff51c)        = 0
write(2, "Signal strength: 16022\n", 23) = 23
ioctl(4, 0x80026f48, 0xbffff51c)        = 0
write(2, "SNR: 51199\n", 11)            = 11
ioctl(4, 0x80046f45, 0xbffff518)        = 0
write(2, "FE_STATUS:", 10)              = 10
write(2, " FE_HAS_SIGNAL", 14)          = 14
write(2, " FE_HAS_LOCK", 12)            = 12
write(2, " FE_HAS_CARRIER", 15)         = 15
write(2, " FE_HAS_SYNC", 12)            = 12
write(2, "\n", 1)                       = 1
open("/dev/dvb/adapter0/net0", O_RDWR|O_NONBLOCK) = 11
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
write(1, "trying to open /dev/dvb/adapter0"..., 38) = 38
ioctl(11, 0xc0046f34, 0xbffff6ac)       = -1 EPERM (Operation not permitted)
write(1, "result from ioctl : -1 errno = 0"..., 33) = 33
write(2, "ioctl message: Operation not per"..., 39) = 39
close(11)                               = 0
write(1, "Successfully opened network devi"..., 71) = 71
close(4)                                = 0
munmap(0x40017000, 4096)                = 0
exit_group(0)                           = ?

Home | Main Index | Thread Index