Re: [Discuss-gnuradio] how to convert python file in dat file

2013-04-29 Thread Hanz
If you want to load files into Matlab which you saved for example through a
file sink, you can do that via the command fread. Check the documentation of
it. For the correspondences between Matlab and GNU Radio Type, compare the
fread documentation and this site of J.Blum:
http://www.joshknows.com/gnuradio#datatypes

Regards



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/how-to-convert-python-file-in-dat-file-tp41048p41061.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Usage of Message Queues

2013-02-27 Thread Hanz
Thank you again for your answer. I looked up the Header File of gr_message
and it should have the msg() attribute. But when I tried to access, it gave
me the error that this attribute isnt existing.
Anyway, I now figured out a way which is enough for me: I converted the
returned string to a list of bits, and then conert them to a list of bytes,
This gives me back the wanted output stream of the demodulator.



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Usage-of-Message-Queues-tp39295p39893.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Usage of Message Queues

2013-02-23 Thread Hanz
Thank you much for your answer. Indeed, its a shared pointer. I now figured
out, the the only way to get the data is via .to_string(). Though, im stuck
again. I use the following code to initialize the queue and message sink:

self.sink_queue = gr.msg_queue()
self.gr_file_source_0 = gr.file_source(gr.sizeof_char*1, 
"stream", False)
self.gr_message_sink_0 = gr.message_sink(gr.sizeof_char*1,
self.sink_queue, False)

Then I'm putting a DPSK mod and demod between and connect the output of the
demod to the message sink:

self.connect((self.gr_file_source_0, 0), (self.gr_throttle_0, 
0))
self.connect((self.gr_throttle_0, 0), 
(self.digital_dxpsk_mod_0, 0))
self.connect((self.digital_dxpsk_mod_0, 0), 
(self.digital_dxpsk_demod_0,
0))
self.connect((self.digital_dxpsk_demod_0, 0), 
(self.gr_message_sink_0, 0))

So my thought was, that all the messages then should contain one byte (with
one bit information). At the end, my code looks like that:

tb = top_block()
tb.start()

while 1:

point=tb.sink_queue.delete_head()
point=point.to_string()
print len(point)

The first curiosity is, that the length variates from 2 up to 2048. Can
somebody explain why? The next question is, how to i convert the "bitvalue"
of the string to an actual char?



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Usage-of-Message-Queues-tp39295p39815.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Usage of Message Queues

2013-02-06 Thread Hanz
Im sorry that im pushing my question, but its still unsolved for me and need
it for my project..

So again, my message queue is filling, i checked that via
tb.sink_queue.count(), but if i want to transfer pop a message, it just
returns me that message_sptr thing. Can someone help me on that? I cant find
a proper manual how to use the message queues/sinks.

Again, thanks in advance for any hints :).



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Usage-of-Message-Queues-tp39295p39455.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Usage of Message Queues

2013-01-30 Thread Hanz
Hello!
I have another question, this time about message queues. I have a
demodulator hooked up to message sink. But when I want to pop a message via
tb.sink_queue.delete_head(), its just returning that to me:

 >

I dont know so much about Python and GnuRadio, but it looks like a Pointer
of that SWIG for me. How can I get the value?
Thanks in advance



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Usage-of-Message-Queues-tp39295.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] File Sink open/close question

2013-01-22 Thread Hanz
I setted X some lines before as 1000. And the tb.sink_queue.count() is
resetted by tb.sink_queue.flush() i thought.



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/File-Sink-open-close-question-tp39098p39101.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] File Sink open/close question

2013-01-22 Thread Hanz
Hi!
Im using a message queue to count data, while the data is sinked to a file.
Then if the counter reaches X i want the old file to be closed and continue
sinking in a new file. Then again if reaches X to switch to the old file. So
my bottom part code looks like that:

tb = top_block()
tb.start()
a=0

while 1:
if tb.sink_queue.count()>X:
tb.gr_file_sink_0.close()
tb.sink_queue.flush()
if a==0:
tb.gr_file_sink_0.open("PLACE_TO_SAVE\two")
a=1
else:
tb.gr_file_sink_0.open("PLACE_TO_SAVE\one")
a=0 

Right now, it simply closes the first file, but does not begin with the
second one. Can anyone help me with that? Thanks in advance



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/File-Sink-open-close-question-tp39098.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Help on "easy" digital TX/RX

2013-01-14 Thread Hanz
I now have 2 new problems :(
1. I have a random source hooked to a Modulator and then to USRP. From the
same device i listen at the same Frequency. But since the antennas are just
a few cm's away, the constellation graph is completely diffuse and the
points are anywhere, there arent any fixed points noticeable. Do I have to
change something at the gain or add something?
 
2. How can i differentiate if there is a signal receiving or just some
background noise. I mean if i put the Demodulator directly after the USRP
and stream it to file, then of course ill mostly get just random amplified
noise...



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Help-on-easy-digital-TX-RX-tp38924p38994.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Simple Digital Mod Problem

2013-01-11 Thread Hanz
This is actually what i would like to do later by hand. Isnt there a
possibity how i can fetch the raw bits or bytes directly after receiving?
Sorry if its a stupid question..



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Simple-Digital-Mod-Problem-tp38857p38944.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Simple Digital Mod Problem

2013-01-11 Thread Hanz
Thanks! I see now what you mean, but how can i get rid of these boundary
mistakes? The Result is similar to the original, but the bytes are kind of
"shifted". So from a "FF 00" results a "FE 01"..



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Simple-Digital-Mod-Problem-tp38857p38936.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Help on "easy" digital TX/RX

2013-01-11 Thread Hanz
Thank you for the advising! That looks like something what i could use.
I just came up with another question:
I simply tried to simulate a DPBSK Path with noise, loaded from a file and
sinked to a file. Between Demod and Sink i placed a "Pack K Bits" with K=8.
 
But my received data just contains 0's! It has the right length, but just
zeros... Any ideas anyone?



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Help-on-easy-digital-TX-RX-tp38924p38935.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Help on "easy" digital TX/RX

2013-01-10 Thread Hanz
Hello!
As to introduct me, im very new to GnuRadio and the general topic of SDR.
However, i have a project in which i should implement a very basic way of
sending packets. This given packet format has a constant preamble and a
constant length of  appended databits. For detecting those out of a stream
etc. ive already written a working matlab script, now im stuck at the
GnuRadio side.
As a simple Presentation it would be enough to save a captured bitstream
from GnuRadio to harddrive which i later load in Matlab and send it through
my script.

So my question is, how can setup the most easily a one way tx/rx connection
between 2 SDR's, without any packet format or, which simply gives me the
received bits? My basic idea is like that:
TX:
 
RX:
 
I simply cant get it working at all. It would be too kind if somebody could
give me some kind of introduction how to handle that. 

Regards



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Help-on-easy-digital-TX-RX-tp38924.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Simple Digital Mod Problem

2013-01-07 Thread Hanz
Im a total newbie to GNURadio. So my plan was to simply test a digital
modulation path, without channel. Then compare input file and output file.
The input file was a previously captured random file through GNURadio. But
the problem is, that the output file is about 8 times bigger and clearly not
the same!
Any help :)?
 



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Simple-Digital-Mod-Problem-tp38857.html
Sent from the GnuRadio mailing list archive at Nabble.com.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio