Mailing List archive

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

[linux-dvb] The status of my Frontend doesn' t get better...



Hi there,

I try to tune on a PID on HotBird and I can't get the status of the 
frontend to FE_HAS_LOCK.

If I plug an Astra cable on my PC, I can tune (on a another PID/freq/...) 
without problem.  And if I plug a set top box on that Hotbird cable, it 
works... So my guess is that it's not an installation issue (?).

After setting the SEC parameters, I set the tuning parameters. Then, I wait 
for the Frontend to send me a COMPLETION_EV. And I only get UNEXPECTED_EV 
and then I get FAILURE_EV...(failure code is 20 (decimal)).
After 20 tries, I get bored and I try to get the frontend status : the 
status remains HAS_POWER...

Has someone experienced that before ? Is there something I missed somewhere ?

Thanks in advance,
Sicerely,
Karim

PS : For the Audacious, here is test.c (in DVB/apps/test), I (quickly) 
modified to suit my needs and further down, you'll find the output.

***********************************************************************
Code is :
***********************************************************************
  fd_sec = open("/dev/ost/sec0", O_RDWR);
if (fd_sec <0)
         perror("Error opening sec0 device\n");
/* setting parameters we want for the SEC */
scmds.voltage= SEC_VOLTAGE_13;
scmds.miniCommand= SEC_MINI_NONE;
scmds.continuousTone= SEC_TONE_OFF;
scmds.numCommands= 1;
scmds.commands = &scmd;
scmd.type=0;
scmd.u.diseqc.addr=0x10;
scmd.u.diseqc.cmd=0x38;
scmd.u.diseqc.numParams=1;
scmd.u.diseqc.params[0]=0xf0;


if (ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds)<0)
         {
         perror("Attempt to send a cmd sequence to the disecq for card 0 
(TPS)");
         return;
         }
usleep(300000);

if (ioctl(fd_sec, SEC_SET_VOLTAGE, SEC_VOLTAGE_13)<0)
         {
         perror("Attempt to set the disec voltage for card 0 (TPS)");
         return;
         }
usleep(100000);

   if (ioctl(fd_sec, SEC_SET_TONE, SEC_TONE_OFF)<0)
         {
         perror("Attempt to set the disec 22 KHz for card 0 (TPS)");
         return;
         }
usleep(100000);

   if (ioctl(fd_sec, SEC_GET_STATUS, &sec_status)<0)
         {
         perror("Attempt to get the status for card 0 (TPS)");
         return;
         }

usleep(100000);

if (sec_status.busMode == SEC_BUS_OFF)
         {
         /* bus is dead : reset the bus */
         printf("Bus has been found dead : sending reset command\n");
         if (ioctl(fd_sec, SEC_RESET_OVERLOAD)<0)
                 {
                 perror("Attempt to reset the bus for card 0 (TPS)");
                 return;
                 }
         }


printf(" Status for sec0 (TPS)\n bus mode %d voltage %d 22K %d\n", 
sec_status.busMode, sec_status.selVolt, sec_status.contTone);

/* setting the front end for card 0 */
/* card 1 is TPS */
fd_frontend = open("/dev/ost/qpskfe0", O_RDWR|O_NONBLOCK);
if (fd_frontend <0)
         perror("Error opening frontend device\n");

   qpsk.iFrequency=(10911000-9750000); /* frequency is 10.911 GHz so LOF1 
should be 9.75 GHz ? */
   qpsk.SymbolRate=27500000;
   qpsk.FEC_inner=FEC_3_4;

   printf("Attempting to set QPSK for card 0 Tuning frequency : %d Symbol 
rate : %d FEC : %d\n",qpsk.iFrequency, qpsk.SymbolRate, qpsk.FEC_inner);
   if (ioctl(fd_frontend, QPSK_TUNE, &qpsk) < 0)
         {
         perror("Attempt to tune the frontend in senf()\n");
         return;
         }

usleep(100000);
   feEvent.type =0;
   count = 0;
   /* we are going to wait for the completion of our Tune request */
   while (feEvent.type != FE_COMPLETION_EV && count <30)
         {
         ioctl(fd_frontend, QPSK_GET_EVENT, &feEvent);
         if (feEvent.type == FE_FAILURE_EV)
                 printf("On try %d, we get a failure. Failure status is 
%d\n", count, feEvent.u.failureEvent);
         if (feEvent.type == FE_UNEXPECTED_EV)
                 printf("On try %d, we get an unexpected command.\nBefore 
status is %d\nAfter status is %d\n", count, 
feEvent.u.unexpectedEvent.previousStatus, 
feEvent.u.unexpectedEvent.currentStatus);
         else
                 printf("On try %d, we get a %d\n", count, feEvent.type);
         count ++;
         usleep(100000);
         }
   if (count < 30)
         printf("Tuning Completed OK\n");
   else
         printf("Tuning Not Completed !!\n");

frontend_status =1;
count = 0;
/* we are going to wait for the completion of our Tune request */
while (frontend_status != 11 && count <30)
{
   if (ioctl(fd_frontend, FE_READ_STATUS, &frontend_status) < 0)
         {
         perror("Attempt to get status for the frontend in senf()\n");
         return;
         }
   usleep(100000);
   count++;
   printf("Status for frontend is %d on try %d\n",frontend_status,count);
}
   printf("QPSK for card 0 OK\n");

if (ioctl(fd_frontend, QPSK_FE_INFO, &feInfo) < 0)
         {
         perror("Attempt to get infos for the frontend in senf()\n");
         return;
         }
   printf("Infos for frontend are \nMin Freq : %d\nMax Freq : 
%d\nMinSymbolRate : %d\nMaxSymbolRate : %d\nHW type : %d\nHW version : 
%d\n",feInfo.minFrequency, feInfo.maxFrequency, feInfo.minSymbolRate, 
feInfo.maxSymbolRate, feInfo.hwType, feInfo.hwVersion);
   printf("QPSK for card 0 OK\n");

***********************************************************************
output is :
***********************************************************************
Status for sec0 (TPS)
  bus mode 0 voltage 2 22K 1
Attempting to set QPSK for card 0 Tuning frequency : 1161000 Symbol rate : 
27500000 FEC : 3
On try 0, we get an unexpected command.
Before status is 0
After status is 0
On try 1, we get an unexpected command.
Before status is 0
After status is 0
On try 2, we get an unexpected command.
Before status is 0
After status is 0
On try 3, we get an unexpected command.
Before status is 0
After status is 0
On try 4, we get an unexpected command.
Before status is 0
After status is 0
On try 5, we get an unexpected command.
Before status is 0
After status is 0
On try 6, we get an unexpected command.
Before status is 0
After status is 0
On try 7, we get an unexpected command.
Before status is 0
After status is 0
On try 8, we get an unexpected command.
Before status is 0
After status is 0
On try 9, we get an unexpected command.
Before status is 0
After status is 0
On try 10, we get an unexpected command.
Before status is 0
After status is 0
On try 11, we get an unexpected command.
Before status is 0
After status is 0
On try 12, we get an unexpected command.
Before status is 0
After status is 0
On try 13, we get an unexpected command.
Before status is 0
After status is 0
On try 14, we get an unexpected command.
Before status is 0
After status is 0
On try 15, we get an unexpected command.
Before status is 0
After status is 0
On try 16, we get an unexpected command.
Before status is 0
After status is 0
On try 17, we get an unexpected command.
Before status is 0
After status is 0
On try 18, we get an unexpected command.
Before status is 0
After status is 0
On try 19, we get an unexpected command.
Before status is 0
After status is 0
On try 20, we get a failure. Failure status is 20
On try 20, we get a 2
On try 21, we get a failure. Failure status is 20
On try 21, we get a 2
On try 22, we get a failure. Failure status is 20
On try 22, we get a 2
On try 23, we get a failure. Failure status is 20
On try 23, we get a 2
On try 24, we get a failure. Failure status is 20
On try 24, we get a 2
On try 25, we get a failure. Failure status is 20
On try 25, we get a 2
On try 26, we get a failure. Failure status is 20
On try 26, we get a 2
On try 27, we get a failure. Failure status is 20
On try 27, we get a 2
On try 28, we get a failure. Failure status is 20
On try 28, we get a 2
On try 29, we get a failure. Failure status is 20
On try 29, we get a 2
Tuning Not Completed !!
Status for frontend is 1 on try 1
Status for frontend is 1 on try 2
Status for frontend is 1 on try 3
Status for frontend is 1 on try 4
Status for frontend is 1 on try 5
Status for frontend is 1 on try 6
Status for frontend is 1 on try 7
Status for frontend is 1 on try 8
Status for frontend is 1 on try 9
Status for frontend is 1 on try 10
Status for frontend is 1 on try 11
Status for frontend is 1 on try 12
Status for frontend is 1 on try 13
Status for frontend is 1 on try 14
Status for frontend is 1 on try 15
Status for frontend is 1 on try 16
Status for frontend is 1 on try 17
Status for frontend is 1 on try 18
Status for frontend is 1 on try 19
Status for frontend is 1 on try 20
Status for frontend is 1 on try 21
Status for frontend is 1 on try 22
Status for frontend is 1 on try 23
Status for frontend is 1 on try 24
Status for frontend is 1 on try 25
Status for frontend is 1 on try 26
Status for frontend is 1 on try 27
Status for frontend is 1 on try 28
Status for frontend is 1 on try 29
Status for frontend is 1 on try 30



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.


Home | Main Index | Thread Index