Jim Lesurf wrote:
> In article<508130e6$0$18682$
91ce...@newsreader03.highway.telekom.at>,
> Johann Klammer<
klam...@NOSPAM.a1.net> wrote:
>> Jim Lesurf wrote:
>>>
>>> Is the problem likely to be in the kernel modules, or in tzap? I was
>>> hoping it was tzap so that I might be able to write a tweaked version.
>>> :-) Alas, kernel modules are - so far - well beyond what I've managed
>>> to understand beyond the general level.
>
>
>> The linux Kernel supplies some filedescriptors for reading TS packets,
>> unpacked PES and section data. I do not think tzap would be able to get
>> any relevant signal data from those. There are also a whole lot of
>> ioctls for controlling/querying the frontend.
>
>> Those relevant for signal quality are:
>> FE_READ_STATUS
>> FE_READ_BER
>> FE_READ_SIGNAL_STRENGTH
>> FE_READ_UNCORRECTED_BLOCKS
>> FE_READ_SNR
>
> I'm wondering how tzap gets the values it lists once per second for signal
> (level) snr, etc. Does it call and report the above? If so,can you/someone
Very likely. probably something like this.
<code>
int dvbFeStatus(dvb_s *adapter, fe_status_t *status,
unsigned int *ber, unsigned int *strength,
unsigned int *snr, unsigned int *ucblock)
{
uint32_t tempU32;
uint16_t tempU16;
if (status)
{
if (ioctl(adapter->frontend_fd, FE_READ_STATUS, status) < 0)
{
errMsg("FE_READ_STATUS: %s\n", strerror(errno));
return -1;
}
}
if (ber)
{
if(ioctl(adapter->frontend_fd,FE_READ_BER, &tempU32) < 0)
{
errMsg("FE_READ_BER: %s\n", strerror(errno));
*ber = 0xffffffff;
}
else
{
*ber = tempU32;
}
}
if (strength)
{
if(ioctl(adapter->frontend_fd,FE_READ_SIGNAL_STRENGTH,&tempU16)
< 0)
{
errMsg("FE_READ_SIGNAL_STRENGTH: %s\n", strerror(errno));
*strength = 0xffff;
}
else
{
*strength = tempU16;
}
}
if (snr)
{
if(ioctl(adapter->frontend_fd,FE_READ_SNR,&tempU16) < 0)
{
errMsg("FE_READ_SNR: %s\n", strerror(errno));
*snr = 0xffff;
}
else
{
*snr = tempU16;
}
}
if (ucblock)
{
if(ioctl(adapter->frontend_fd,FE_READ_UNCORRECTED_BLOCKS,&tempU32) < 0)
{
errMsg("FE_READ_UNCORRECTED_BLOCKS: %s\n", strerror(errno));
*ucblock = 0xffffffff;
}
else
{
*ucblock = tempU32;
}
}
return 0;
}
<\code>
If you need to know exactly try apg-get source dvb-apps. (Assuming it is
a debian based box).
> point me at how to do this or alter the settings given to the module, etc,
> whilst working? Afraid this is a level I'm currently ignorant about!
>
>> Not all of those are always implemented(may return ENOSYS or similar)
>
>> You can use strace to find out what kernel level function calls tzap
>> uses(and what is being returned).
>
> Again, I'll have to try and find out about that as I've never done it
> before! :-)
>
> Slainte,
>
> Jim
>
The documentation I used were .pdf files called "Linux DVB API Version
3" and "Linux DVB API Version 4". filenames: linux-dvb-api-1.0.0.pdf and
linux-dvb-api-v4-0-3.pdf. They should be somewhere on the net... Do not
rely on the specification too much, use kernel headers for definitive
reference. Also, the sources for dvbstream and dvbsnoop are worth reading.