[Discuss-gnuradio] Extracting tags from gr-zeromq blocks directly in python with pmt.deserialize

2016-04-05 Thread Johannes Schmitz
Hello everyone, is there a way to use pmt.serialize(pmt_t obj, std::streambuf sink) and especially pmt.deserialize(std::streambuf source) in Python? Or is there another recommended way how to extract the serialized data from the zeromq messages? See documentation here http://gnuradio.org/doc/s

[Discuss-gnuradio] phase shift block

2015-02-02 Thread Johannes Schmitz
Hi, Application Note "Synchronization and MIMO Capability with USRP Devices" from Ettus includes a "phase_shift" block in Figure 5. Whatever happend to that block? Can't find it, did it get replaced? Regards Johannes ___ Discuss-gnuradio mailing lis

[Discuss-gnuradio] gr_delay behaviour

2012-10-23 Thread Johannes Schmitz
One short question. What happens if I call the set_delay method of the gr_delay block during runtime. Will it throw away/add some samples when the delay is changed? I am actually trying to create a block that throws away some samples whenever I call a memberfunction skip() but having difficulties t

Re: [Discuss-gnuradio] gr_delay behaviour

2012-10-23 Thread Johannes Schmitz
I am now just using a simple gr_block to asynchronously skip some samples from time to time by calling consume_each(d_skip_size); return 0; I didn't define any forecast function and it seems to work fine but I am wondering what is the performance impact of not doing this. Shouldn't I basically so

[Discuss-gnuradio] PMT Python Bug

2013-08-06 Thread Johannes Schmitz
When I go to pmt and back to Python with a dict ints are converted to long. Is that on purpose? import pmt a = {'asdf': 34, 'qwer': 3.7} In [26]: pmt.to_python(pmt.to_pmt(a)) Out[26]: {'asdf': 34L, 'qwer': 3.7} ___ Discuss-gnuradio mailing list Disc

[Discuss-gnuradio] how to trigger dynamic reconfiguration with lock/disconnect

2011-05-24 Thread Johannes Schmitz
Hello Guys, I am working on a cognitive radio application and I need to dynamically reconfigure my receiver, switching between a detector and the core receiver. I found lock, unlock, connect, disconnect functions but it seems to be almost impossible to find some documentation or a working examples

[Discuss-gnuradio] Reconfigure example with lock/disconnect/connect/unlock code hangs randomly

2011-05-26 Thread Johannes Schmitz
Hey guys, I have written some example code to learn how to dynamically reconfigure gnuradio based on events generated by probe blocks and a watcher thread. First I thought everything is running very well but later I noticed that the program hangs if you let it run long enough. If you uncomment the

Re: [Discuss-gnuradio] Reconfigure example with lock/disconnect/connect/unlock code hangs randomly

2011-05-26 Thread Johannes Schmitz
There should be another sleep in the reconfigure method to make it working fine. def reconfigure(self): self.lock() self.disconnect(self.h_block_one) self.connect(self.h_block_two) sleep(0.0001) self.unlock() I am not sure how long we have to sleep in order t

Re: [Discuss-gnuradio] how to trigger dynamic reconfiguration with lock/disconnect

2011-05-27 Thread Johannes Schmitz
Hello Alex, > What documentation was possible to find? Was this part of it: > http://gnuradio.org/redmine/wiki/gnuradio/TutorialsWritePythonApplications#Controlling-flow-graphs In this document disconnect is not mentioned at all. Your example and another example from the mailing list helped me to

Re: [Discuss-gnuradio] how to trigger dynamic reconfiguration with lock/disconnect

2011-05-27 Thread Johannes Schmitz
I did some more research on the topic to get some ideas. Now it seems there are two possibilities to send control signals between the blocks: 1. Use a message queue and a watcher thread like in the digital example pkt.py 2. Use a probe block like gr.probe_avg_mag_sqrd and an endless while loop in

Re: [Discuss-gnuradio] how to trigger dynamic reconfiguration with lock/disconnect

2011-05-27 Thread Johannes Schmitz
Hi Scott, > This works well during testing. Once you get some kind of protocol or some > series of steps that you want to do, you can just test a flag, and whenever > your block finishes set it to true, then reconfigure. What do you mean with "your block finishes" ? How do you implement this flag

[Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-27 Thread Johannes Schmitz
I am getting this error: fusb: (rd status -2) No such file or directory What does it mean and what can I do to solve this. Crazy thing is it doesn't happen every time I call my rx script. I tried to pull usrp power plug and usb plug but it did not help. Johannes

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-27 Thread Johannes Schmitz
I made a simple example to show how it happens. It is a problem of lock/unlock in combination with usrp. Like this the lock unlock disconnect seems to absolutely unusable :( - #!/usr/bin/env python from gnuradio import gr from gnuradio import usrp from time

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-27 Thread Johannes Schmitz
We are running Ubuntu 10.10, I can not look up the kernel version because I am at home right now but it should be 2.6.35-28. Do you need further details? Johannes ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/l

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-30 Thread Johannes Schmitz
In your gnuradio generated code you use run() instead of start() method and you forgot to put unlock(). After changing this it crashes with fusb error. 2011/5/27 Brett L. Trotter : > Does this crash you? > > from gnuradio import eng_notation > from gnuradio import gr > from gnuradio.eng_option imp

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-30 Thread Johannes Schmitz
> The error is coming from the kernel. Can you describe your system setup? We tried to run the code on Ubuntu 10.04, 10.10 and 11.04. Every time we get the fusb error :( It seems we have to throw away our USRP1's and move to USRP2... Johannes ___ Discu

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-30 Thread Johannes Schmitz
Hello Marcus, > Have you tried it under UHD? we did not try it under UHD. Honestly I don't have any experience with UHD. But do you want to say that the "traditional API" is not supported anymore? If yes, what is the best way to get started with UHD? Johannes ___

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-30 Thread Johannes Schmitz
Hello Brett, please use "Reply All" when answering, or send it only to the mailinglist. But don't send it only to me. Of course I inserted unlock somewhere after lock. Also you have to replace tb.run() with tb.start(). Johannes 2011/5/30 Brett L. Trotter : > On 05/30/2011

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-31 Thread Johannes Schmitz
> Is it conceivable that this particular problem is specific to a particular > type of USB host controller, since various folks > have reported "I can't make it break", whereas a couple of folks (Johannes > and Brett) are able to make it break. We tried with two different PCs and two IBM Notebook

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-31 Thread Johannes Schmitz
Hello Thomas, > I'm not able to reproduce this error with the posted examples. Please > try compiling with the --fusb-tech=libusb1 option and post any error > output. It may not solve the problem, but debugging with libusb is > simpler than debugging through the kernel. Which distribution are you

Re: [Discuss-gnuradio] how to trigger dynamic reconfiguration with lock/disconnect

2011-05-31 Thread Johannes Schmitz
Hello Yang, Do you have any specific questions? Better you write some example programs first, then come back with your exact questions I think. Johannes ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/di

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-31 Thread Johannes Schmitz
> You gotta be more specific. "IBM Notebooks" doesn't tell us what USB > controller it is. At least give us the output of "lspci". Actually our two Lab PC seem to have the same USB Controller: "00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller" But I tried on a

Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory

2011-05-31 Thread Johannes Schmitz
I found that our gnuradio is based on a version from git from "Thu Feb 11 08:18:46 2010" But there are some patches and changes from our side so it is not so easy for us to just jump to the newest version Today I compiled the newest version from git to see what happens with the example code and I d

[Discuss-gnuradio] how to remove/suppress gr_buffer::allocate_buffer: warning:

2011-06-17 Thread Johannes Schmitz
I am getting the following warning when running my script: gr_buffer::allocate_buffer: warning: tried to allocate 4 items of size 88192. Due to alignment requirements 32 were allocated. If this isn't OK, consider padding your structure to a power-of-two bytes. On this platform, our al

Re: [Discuss-gnuradio] how to remove/suppress gr_buffer::allocate_buffer: warning:

2011-06-17 Thread Johannes Schmitz
Hello Martin, I will check my code to find out why it is so big. Is there an easy way to somehow suppress this warning in case I am willing to ignore it? Johannes 2011/6/17 Martin Braun : > On Fri, Jun 17, 2011 at 03:42:07PM +0200, Johannes Schmitz wrote: >> I am getting the followin

[Discuss-gnuradio] solving u0u0 problems

2011-07-05 Thread Johannes Schmitz
Based on different fft-sizes I am getting u0u0u0u0 output. The strange thing is an "unregular" fft-size of 1088 doesnt produce the error but fft-size 1024 does also a smaller fft-size of 544 does produce the error. So what is causing this kind of error and which approaches can I use to debug this?

Re: [Discuss-gnuradio] solving u0u0 problems

2011-07-06 Thread Johannes Schmitz
Hi Marcus, > What type of sample rates?  What compute platform? We are running on Ubuntu 10.10 64bit. What do you mean with type of sample rates? Maybe USRP decimation rate? I am changing fft-size based on this. So for 4MHz i am using 1088 fft-size and for 2MHz i am using 544MHz and I am getting th

[Discuss-gnuradio] solving u0u0 problems

2011-07-06 Thread Johannes Schmitz
> I mean what sample rates--it sounds like 2Msps and 4Msps. You are right. > If you haven't touched it, then you're using TPB (Thread Per Block) > scheduling. What other schedulers are available? Where can I find information about this? > uO means USRP overrun--the USRP is delivering data at a ra

Re: [Discuss-gnuradio] solving u0u0 problems

2011-07-06 Thread Johannes Schmitz
Hey Marcus, I used oprofile to get a better idea where the problem is located. I found that it is indeed a problem with libfftw3. Besides the gnuradio fft block I am calculating a crosscorrelation using the fft. That means fft-size will be 2*N-1 with vectorlength N. So for 1024 vectorlength I will

Re: [Discuss-gnuradio] solving u0u0 problems

2011-07-06 Thread Johannes Schmitz
> Having the FFT size being 2**N will certainly help, but given your > relatively low data rate, it shouldn't be a problem >  anyway.  Are you calculating the cross-correlation in Python code, or C++ > code?  That will make a large difference. I am calculating it in C++. I couldn't find a gnuradio

Re: [Discuss-gnuradio] USRP2 General I/O

2011-07-06 Thread Johannes Schmitz
> I guess there's a search function for a reason; I have found a similar > question in the archives and I believe I have found a suitable answer. Sorry > for the waste of time. Then why dont you post the link to the answer in here? ___ Discuss-gnuradio

Re: [Discuss-gnuradio] solving u0u0 problems

2011-07-06 Thread Johannes Schmitz
Hi Marcus, > Tom Rondeau, on the mailing list, is the guy to talk to about adding new > blocks.  There is a correlator block already. Ok, maybe I will contact Tom. Which block do you mean exactly? I am looking for a block that acts like xcorr() in matlab. There is no such block. > I refer to samp

[Discuss-gnuradio] c++ probe block concurrency, locking necessary?

2011-07-08 Thread Johannes Schmitz
Hey guys, I am implementing a probe block that stores several values to a member struct so they can be read from pyhton via accessor method (get_probe_values() const {return probe_struct;}). Now my question is: Is it necessary to use some kind of thread locking mechanism to prevent gnuradio from ch

Re: [Discuss-gnuradio] c++ probe block concurrency, locking necessary?

2011-07-08 Thread Johannes Schmitz
Thanks for your answer. > Yes, this is not only possible but likely to happen.  You will need to > acquire a mutex in your work function just prior to updating the probe data, > and release it afterward.  The accessor function also needs to do the same, > copy the probe data locally, then release

Re: [Discuss-gnuradio] c++ probe block concurrency, locking necessary?

2011-07-08 Thread Johannes Schmitz
: metric get_metric () { d_metric_mutex.lock(); return d_metric; d_metric_mutex.unlock(); } 2011/7/8 Johannes Schmitz : > Thanks for your answer. > >> Yes, this is not only possible but likely to happen.  You will need to >> acquire a mutex in your work function just pri

Re: [Discuss-gnuradio] c++ probe block concurrency, locking necessary?

2011-07-11 Thread Johannes Schmitz
Hi Johnathan, can you give me some hint how to use the mutex? Why is it not possible just to use lock and unlock? Regards, Johannes 2011/7/8 Johannes Schmitz : > I changed my code to use boost::mutex now. Therefore I included > #include > > Then I did something like this, which mad

[Discuss-gnuradio] USRP transient peak from lock, unlock, set decim/freq

2011-07-12 Thread Johannes Schmitz
I am getting some kind of very strong transient peak when using lock unlock and changing usrp decimation rate and frequency and in the beginning. Is this a normal behaviour? So each time I reconfigure my system I have to throw away some samples to avoid this peak or am I doing something wrong? I m

Re: [Discuss-gnuradio] USRP transient peak from lock, unlock, set decim/freq

2011-07-19 Thread Johannes Schmitz
> Also, there's no reason to lock the flow-graph for frequency changes or gain > changes (or a bunch of other parametric changes > within the flow-graph). I've never had to use lock()/unlock()--I > understand that they're used during flow-graph topology changes. > But parametric changes don't re

[Discuss-gnuradio] USRP 1 and 2 Fuse replacement

2011-11-15 Thread Johannes Schmitz
Hi guys, we need to replace a Fuse in two USRP 1 and one USRP2 box. Can anybody tell me exactly which fuses we have to order? Regards Johannes Schmitz ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo

Re: [Discuss-gnuradio] USRP 1 and 2 Fuse replacement

2011-11-15 Thread Johannes Schmitz
We are located in Germany. Here in Farnell I can only find PANASONIC ERBRE4R00V would it be ok as well? For USRP2 I can find COOPER BUSSMANN - TR/3216FF4-R - FUSE, SMD, 4A, 1206, FAST ACTING so this should be fine. They broke over a longer period of time, mostly due to broken power supplies. But

Re: [Discuss-gnuradio] USRP 1 and 2 Fuse replacement

2011-11-15 Thread Johannes Schmitz
Ok I just saw that in Germany I can only order COOPER BUSSMANN 3216FF4-R and not the version with TR otherwise I have to pay 20 Dollars additional to the normal shipping for the shipping from USA to ship some parts for 2-3 Dollars. So would that fuse be ok as well? 2011/11/15 Johannes Schmitz

Re: [Discuss-gnuradio] USRP 1 and 2 Fuse replacement

2011-11-15 Thread Johannes Schmitz
Ok we just decided to order from DigiKey and take the parts that you have mentioned. >>> For the USRP1, the fuse is: >>> >>> ERB-SE4R00U >>> >>> Available at digikey >>> >>> And for USRP2: >>> >>> TR/3216FF4-R >>> >>> >>> Both available at DigiKey ___ D