I'm not sure I'm afraid - that code is old, so might no longer be fully  
compatible with the dvb3 bindings that kamaelia now uses.

My suggestion would be to take the source code for DVB_Multiplex:

http://code.google.com/p/kamaelia/source/browse/trunk/Code/Python/Kamaelia/Kamaelia.Device/DVB/Core.py

... and take your own copy to modify. Then locate the "tune_dvb" function  
and add to it the code needed to set the SEC voltage. See if it works.


regards



Matt

On Sat, 21 Nov 2009 00:10:26 -0000, luca72 <lucabe...@libero.it> wrote:

> hello i have make this:
>
> import dvb3
> scheda = dvb3.frontend.Frontend(0)
> parametri = dvb3.frontend.QPSKParameters(frequency=11977,
> inversion=2 , symbol_rate=27500,  fec_inner=9)
> demuxer = dvb3.dmx.Demux(0, blocking = 0)
> pid = 1296
> demuxer.set_pes_filter( pid,
>                                 dvb3.dmx.DMX_IN_FRONTEND,
>                                 dvb3.dmx.DMX_OUT_TS_TAP,
>                                 dvb3.dmx.DMX_PES_OTHER,
>                                 dvb3.dmx.DMX_IMMEDIATE_START )
>
> pol = 'v'
> if pol =='v':
>     scheda.set_voltage(13)
>
> segnal = scheda.read_signal_strength()
> print 'segnale = ' + str(segnal)
> status = scheda.read_status()
> print 'status = ' + str(status)
> ber_= scheda.read_ber()
> print 'ber = ' +str(ber_)
> snr_ = scheda.read_snr()
> print'snr = ' + str(snr_)
> front_end = scheda.get_frontend()
> print'frontend = ' +str(front_end)
>
> I have no error i have the ber = 0
> the signal that go from 0 to max 2500
>
> Do you have any idea.
> Idon' find the commandfor close the dvb3.frontend.Frontend(0) can you
> hel me?
>
> Thanks
>
> Luca
>
> On 20 Nov, 11:17, "Matt Hammond" <matt.hamm...@rd.bbc.co.uk> wrote:
>> Maybe better to look at a layer closer to the python. See:
>>
>>      
>>  http://code.google.com/p/kamaelia/source/browse/trunk/Code/Python/Bin...
>>
>> Teh QPSKParameters class is filled from the 'frequency' parameter and  
>> the 'feparams' you provide. You therefore need to specify:
>>
>>      inversion
>>      symbol_rate
>>      fec_inner
>>
>> in the feparams dict you are creating.
>>
>> Ignore my earlier mesasge where I incorrectly assumed you were trying  
>> to tune to the BBC freesat service! Use the symbol rate and frequency  
>> that  you have been using. Hein suggests the FEC you need is 3/4. You  
>> can probably set inversion to auto - or at worst just try all three  
>> options.
>>
>> The old code Michael attached to an earlier email seems to indicate  
>> that to set the polarisation, other stuff needs doing - to do with SEC  
>> voltages (I've no idea what they are). You could try taking you own  
>> copy of the DVB_Multiplex.py and adding the code to set the  
>> polarisation?
>>
>> Matt
>>
>>
>>
>> On Fri, 20 Nov 2009 10:00:24 -0000, luca72 <lucabe...@libero.it> wrote:
>> > Thanks
>> > I try to explain what i need to do using python.
>>
>> > The base data are:
>> > DVB-S
>> > Frequency 11977
>> > pid 1296 Sky Italy ECM pid
>> > Polarization Horizontal
>> > symbol rate 27500
>>
>> > If i understand right at first i have to setup the front end is it
>> > correct?
>> > Locking dvb-3 api for dvb-s frontend i have the follow params:
>>
>> > struct dvb_frontend_parameters {
>> >         uint32_t frequency;       /* (absolute) frequency in Hz for
>> > QAM/OFDM */
>> >                                   /* intermediate frequency in kHz for
>> > QPSK */
>> >         fe_spectral_inversion_t inversion;
>> >         union {
>> >                 struct dvb_qpsk_parameters qpsk;
>> >                 struct dvb_qam_parameters  qam;
>> >                 struct dvb_ofdm_parameters ofdm;
>> >         } u;
>> > };
>>
>> > For satellite QPSK frontends you have to use the QPSKParameters member
>> > defined by
>>
>> > struct dvb_qpsk_parameters {
>> >         uint32_t        symbol_rate;  /* symbol rate in Symbols per
>> > second */
>> >         fe_code_rate_t  fec_inner;    /* forward error correction (see
>> > above) */
>> > };
>>
>> > freq = 119.770000
>> > feparams = {"symbol_rate" : 27500,
>> >     }
>>
>> > I stop just here  i heve made no more code because i have the error,
>> > so i don't continue.
>>
>> > Now my idea is ,today when i'm at home i write this small script and i
>> > see the output and the i post here so we can have a new idea.
>>
>> > #include <linux/dvb/frontend.h>
>>
>> >    struct dvb_frontend_info info;
>> >    int fd;
>>
>> >    if ((fd = open ("/dev/dvb/adapter0/frontend0", O_RDWR)) < 0) {
>> >            perror ("open failed");
>> >            return -1;
>> >    }
>>
>> >    ioctl (fd, FE_GET_INFO, &info);
>>
>> > Regards
>>
>> > Luca
>>
>> > On 20 Nov, 10:36, Michael Sparks <spark...@gmail.com> wrote:
>> >> Hi Luca,
>>
>> >> On Friday 20 November 2009 07:39:12 luca72 wrote:
>>
>> >> > now i can't test it
>>
>> >> > Many thanks i will inform you.
>> >> > PS:I think that i'm your nightmare (sorry)
>>
>> >> No, not nightmare. Someone testing current code in a scenario we >>  
>> haven't tried
>> >> since that code was written is actually a dream scenario. What is >>  
>> making it
>> >> hard to help is not posting a copy of the actual code you're running.
>>
>> >> Fragments are good, and you have the context of the fragments, so  
>> they >> make
>> >> sense to you. However, simply posting this by itself...
>>
>> >>     from Kamaelia.Device.DVB.Core import DVB_Multiplex
>> >>     from Kamaelia.Chassis.Pipeline import Pipeline
>> >>     from Kamaelia.File.Writing import SimpleFileWriter
>>
>> >>     import dvb3
>>
>> >>     freq = 119.770000
>> >>     feparams = {"symbol_rate" : 27500,
>> >>     }
>>
>> >>     (for example - some your mail at 13:41:15 -0800 (PST) )
>>
>> >> ... doesn't give me the full picture.
>>
>> >> When you then post this:
>> >>    and i get  the following error
>>
>> >>    The file frontend.pyx could not be opened.
>> >> ...
>> >>    and after i gat :
>> >>    The debugged program raised the exception unhandled IOError
>> >>    "(22, 'Invalid argument')"
>> >>    File: frontend.pyx, Line: 364
>>
>> >> These two errors look contradictory, which is confusing.
>>
>> >> I'm explaining this because taking the time to report what you're >>  
>> trying, and
>> >> the results you're seeing is fantastic feedback, and I suspect  
>> looking >> at the
>> >> original early code that we may need to change some code with regard  
>> to
>> >> configuring the front end, but until I see the full file you're >>  
>> *currently*
>> >> editting and the *current* sourcefile, I have no chance of >>  
>> reconstructing
>> >> exactly what's happening.
>>
>> >> In order to allow me to help you, I simply need that information.
>>
>> >> Once again, regarding this:
>>
>> >> > PS:I think that i'm your nightmare (sorry)
>>
>> >> Please let me put your mind at rest - someone (anyone) taking the  
>> time >> to
>> >> report back and try using code that hasn't been tested in the  
>> scenario >> you're
>> >> using it, is not a nightmare, it's closer to a dream scenario -  
>> since >> it's
>> >> useful feedback.
>>
>> >> At present I think, that the current code is not configuring the >>  
>> satellite
>> >> frontend before passing in the fe.params. It looks like with DVB-T &  
>> -C >> you
>> >> can more or less "just use it", whereas with DVB-S the setting of >>  
>> horizontal
>> >> matters. This quite possibly requires a change to our code as well  
>> as >> yours,
>> >> hence me asking for information which you may feel repetitious,  
>> however >> what
>> >> I'm simply doing is trying to see precisely what's changing in the  
>> >> system as
>> >> a whole :-)
>>
>> >> Thanks for persevering! :-)
>>
>> >> Regards,
>>
>> >> Michael.
>> >>  
>> --http://yeoldeclue.com/bloghttp://twitter.com/kamaelianhttp://www.kama...
>>
>> > --
>>
>> > You received this message because you are subscribed to the Google >  
>> Groups "kamaelia" group.
>> > To post to this group, send email to kamae...@googlegroups.com.
>> > To unsubscribe from this group, send email to >  
>> kamaelia+unsubscr...@googlegroups.com.
>> > For more options, visit this group at  
>> >http://groups.google.com/group/kamaelia?hl=.
>>
>> --
>> | Matt Hammond
>> | Research Engineer, FM&T, BBC, Kingswood Warren, Tadworth, Surrey, UK
>> |http://www.bbc.co.uk/rd/


-- 
| Matt Hammond
| Research Engineer, FM&T, BBC, Kingswood Warren, Tadworth, Surrey, UK
| http://www.bbc.co.uk/rd/

--

You received this message because you are subscribed to the Google Groups 
"kamaelia" group.
To post to this group, send email to kamae...@googlegroups.com.
To unsubscribe from this group, send email to 
kamaelia+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/kamaelia?hl=.


Reply via email to