discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] pySerial and GNU Radio


From: s042353
Subject: [Discuss-gnuradio] pySerial and GNU Radio
Date: Wed, 13 Jan 2010 22:35:54 +0100 (W. Europe Standard Time)
User-agent: SquirrelMail/1.4.2

Hi there Gurus of Software Defined Radio Heaven,

I have been trying to get pySerial and GNU Radio to work together but only
with limited success. The goal is to read data from a serial connection,
say '/dev/ttyUSB0', and use it to calculate the bit error rate.

I'm using pySerial in GNU Radio the following way,

   [...]
   self.ser = serial.Serial('/dev/ttyUSB0')
   self.src = gr_file_descriptor_source(gr.sizeof_char, self.ser.fileno(),
False)
   [...]

If I put a self.ser.readline() in there somewhere (before calling Run())
the next line is read correctly from the serial connection.

When I connect a file_descriptor_source with both a file_sink and a
scope_sink the result is that the file contains the correct data, no
problem, but the scope_sink just never gets updated. No errors, no
nothing. When I change the repeat parameter to true, I get a 'lseek'
Invalid seek error.

Any ideas on how to get it working?

- Martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]