[Discuss-gnuradio] Continuos data transmission using messages ...
I am having a little problem working with messages. I want to transmit an entire binary file using messages over and over again. Eg., msg1 transmits file x, msg2 again transmits file x and so forth. My problem is that I'm unable to find a way to loop over the file again and again. I tried using tx_voice.py as a reference but was unable to find something suitable. Setting repeat to true in gr.file_source won't help either. My goal is to send this file using packets(which is why I started out with a shorter script using messages) , so repeating or throttling ends up making them strings longer than 4096. Any help would be much appreciated. Thanks in advance. Regards, Kshitij - from gnuradio import gr from struct import unpack queue = gr.msg_queue(10) source = gr.file_source(gr.sizeof_char,'/home/kshitij/work/tp.dat', False) c2f = gr.char_to_float() sink = gr.message_sink(gr.sizeof_float,queue,False) tb = gr.top_block() tb.connect(source,c2f,sink) try: tb.start() msg = queue.delete_head() payload = msg.to_string() data = unpack('512f', payload) print data, len(payload) print msg.type(), msg.arg1(), msg.arg2(), msg.length() except KeyboardInterrupt: pass - ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Multiple simultaneous top blocks?
Eric, thanks for the quick reply. The file 'transmit.dat' is a binary file of unsigned chars created using gr.vector_sink_b, so when importing it in this manner, all i get to see is gibberish on the screen... Johnathan, scoping out the first script works just fine. .. thanks. Regards, Kshitij ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] Multiple simultaneous top blocks?
Hi, For an application I needed to import some data into my module and then packetize it. The data being quite large, comes from a file. My problem is that multiple instances of top_block aren't allowed, so once I have imported my data, I can't run my program. Even if I nest this inside a gr.hier_block2 class, I don't know how to create a nestable flow graph so that I run this module/class first and then proceed with the execution of the program once I have the data. I went through the tx_voice.py example and noticed that all the transmit_path.py and pick_bitrate.py do is to provide some necessary functions (none of them need to 'run' some module beforehand). Is there some way I could get this done using nestable flow graphs, or do I end up putting the data in a ten page tuple like random_mask? Kindly help. Thanks in advance. - #testbot.py #This module just takes some data from a file and stores it in a variable (just a huge string) #which is imported in another module which then transmits it in the form of # packets. Note that the data to be imported is quite large in size else this operation #would have simply been reduced a payload='abcd' string. Thus we import the #data as: #''import testbot # testbot.data'' in our module. from gnuradio import gr, packet_utils src = gr.file_source(gr.sizeof_char,'/home/kshitij/work/transmit.dat',False) sink = gr.vector_sink_b() tb = gr.top_block() tb.connect(src,sink) try: tb.run() a = sink.data() y=[] for b in a: y.append(str(b)) data = [] data = ''.join(y) except KeyboardInterrupt: pass -- Regards, Kshitij ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] Problem setting transmit gain values....
Hi, I tried out a simple script to get the gain range of the USRP (I had read in earlier mail archive that we were provided a single gain knob to tune over the entire range of 0 to 90 dB): - from gnuradio import gr, usrp u = usrp.sink_c(0) subdev = usrp.selected_subdev(u, (0,0)) #I use an RFX 2400 subdev.gain_range() - I get the following (0.0, 0.0, 1.0). This doesn't make sense. I even actually tried setting the gain to subdev.gain_range()[1]/subdev.gain_range()[0], but was still transmitting at a constant power level of around 11-12 dBm. Could someone please help me out with this. Thanks in advance. Regards, Kshitij ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Problem setting transmit gain values....
On Thu, 2008-01-31 at 11:33 -0800, Matt Ettus wrote: Kshitij Kumar Singh wrote: Hi, I tried out a simple script to get the gain range of the USRP (I had read in earlier mail archive that we were provided a single gain knob to tune over the entire range of 0 to 90 dB): There is no gain control on transmit with the RFX boards. There is 90dB of gain range on the RECEIVE side. To change transmit power, you need to lower the level of the signal you send. So +/-32767 is max power, +/-16383 is 6dB less power, +/-8192 is 12 dB less power, etc. Matt Thanks Matt .. I was just trying out things by myself after reading usrp_siggen.py and got had these few doubts. I had another question regarding the 'u.tune()' method. Let me explain my problem. I tried generating a sinusoid at 2.39G. I got a DUC frequency of -43M. The tuning results were: Baseband: 2.396G, DUC freq = -6M. I understand that since we use an IF, our LO on the RFX board was tuned to 2.396G ( goes from 2.3 to 2.7G in steps of 4M), the IF came in at around 6M so we got 2.396+0.006 and 2.396-0.006 and chose the latter. Is this correct? But what about the -43M from usrp.calc_dxc_freq() ? I also tried transmitting at 2.396+6= 2.402G but then the tuning results were: Baseband:2.408,DUC=-6M. Why always a negative DUC freq(why not 2.396 +0.006)? Could you please explain this tuning is a two step process using a small numerical example? Thanks in advance and sorry for bugging you guys constantly. I tried reading usrp.py but got confused. Regards, Kshitij ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Storing A/D samples in memory.........
Thanks David, I was looking to store the decimated samples(Would be quite a problem storing raw samples at 64 MHz :) coming in through the USB.) This is definitely helpful. @Zhifeng , I was working on some cooperative communications protocol (honestly, just a fancy multi-hop prototype) where the samples received from the transmitter and the relay could be utilized towards providing a better SNR at the receiver , hopefully, by forming a virtual antenna array (of sorts). Regards, Kshitij On 7/19/07, zhifeng chen [EMAIL PROTECTED] wrote: Hi Kshitij, I am considering the channel estimation by pilot. So, it may very like what you want. Could you give more detail what is your target? Is there any one have experience on the real time channel estimation (with pilot) on GNU Radio? 2007/7/18, David Scaperoth [EMAIL PROTECTED]: On Jul 18, 2007, at 4:53 PM, Kshitij Kumar Singh wrote: As a part of some research work on cooperative communications in wireless networks, I had decided to use the USRP as one the of my implementation platforms. I used the tutorials by D. Shen as a reference. There are, however , some specific problems I need help with : -- - I need to store the received signal A/D samples (before all the post-demod processing stuff takes place) in memory and to correlate them with similar samples stored somewhere else in memory. do you want the raw A/D samples? this would have to be a hardware solution (pinout to the FPGA). However, If you just want the samples that are coming across the USB (these samples have been decimated and filtered) , then you can do a simple write to a file fg = gr.flow_graph() src = usrp.souce() snk = gr.file_sink_c(...) fg.connect(src,snk) then you can do what you want with the data offline Once this initial processing is done, I can move on to the demod part. The sample storage/correlation part is where I am getting stuck time and again. Is there some specific block I am going to need or do I need to write my own signal processing block from scratch? I tried looking in the mailing list archives but couldn't find anything similar. Kindly point to any suitable reference on this topic I may have overlooked. - Sincerely, Kshitij ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] Storing A/D samples in memory.........
As a part of some research work on cooperative communications in wireless networks, I had decided to use the USRP as one the of my implementation platforms. I used the tutorials by D. Shen as a reference. There are, however , some specific problems I need help with : --- I need to store the received signal A/D samples (before all the post-demod processing stuff takes place) in memory and to correlate them with similar samples stored somewhere else in memory. Once this initial processing is done, I can move on to the demod part. The sample storage/correlation part is where I am getting stuck time and again. Is there some specific block I am going to need or do I need to write my own signal processing block from scratch? I tried looking in the mailing list archives but couldn't find anything similar. Kindly point to any suitable reference on this topic I may have overlooked. - Sincerely, Kshitij ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] Interfacing USRP through LabView..........
I need to interface the USRP to a PC running Windows ( no Linux here...must use Windows) through LabView..need to do some initial spectral analysis on the received datajust an FFT,(maybe more?) Does anyone know of any specific GUI's designed for this purpose?...any help would be appreciated.Also, can the Instrument Control Toolbox in Matlab be used for the same purpose?...if so, the I might be able to design a GUI using 'guide' PS: Are there any newer ports of USRP on Windows other than http://www.olifantasia.com/projects/gnuradio/mdvh/mingw/ .? Kshitij Kumar Singh ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio