RE: Realise a bandwidth segmentizer

2022-03-16 Thread e heuchamps
Hello Jeff Long,
Thank you for your answer.
I am really new to GNU Radio and DSP, so I am not sure to have understood what 
you said: do you suggest to get rid of the "stram to vector" blocks ?
I also do not know what a single pole IIR filter is, I will document myself and 
try to implement that solution once I got my head around the concept.


Anyway, thank you for your answer, have a nice day,
Alex

P. S.: could you give me possible pointers to good references to learn the 
concepts quicker ? I already
stumbled across the wonderful PySDR blog, and was wondering 
if there were other similar/complementary online ressources ?


De : Discuss-gnuradio  
de la part de Jeff Long 
Envoyé : mardi 15 mars 2022 15:43
À : discuss-gnuradio@gnu.org 
Objet : Re: Realise a bandwidth segmentizer

The Complex To Mag^2 block can operate on a vector, so that part you can get 
for free. If you don't actually need the mean, it could be sufficient to use a 
Single Pole IIR filter (also takes vectors) as a smoothing function.

On Tue, Mar 15, 2022 at 9:39 AM e heuchamps 
mailto:alex-...@hotmail.com>> wrote:
Hello everyone,

I am trying to implement a bandwidth segmentizer (cutting a given bandwidth 
into smaller channels) and energy detector using GNU Radio, as schematically 
shown here below, but I am experiencing some trouble.[cid:17f8e044bb1cb971f161]
More precisely, to achieve the desired result, I have tried to implement two 
python blocks, given in the attached archive, in files 
"compute_average_power.py" and "custom_thres.py".
The goal of those blocks is to compute the average power contained in all the 
channels (compute_average_power.py), and feed that computed value to a 
self-made threshold block (custom_thres.py).
So far, the implementation does not work.
I have already learned in this 
post
 thanks to Markus Müller that using np.mean (where np is short for numpy) is 
bad because it depends on the length of input_items.
I have however not been able to reach the desired result. Can someone help me 
out ?

Thank you, have a nice day,
Alex


P. S. : the whole, complete, code is given in the attached archive, in the 
"bw_segmentizer.py" file.


Re: Gnuradio-companion as a network relay

2022-03-16 Thread Anish Mangal
Thanks, I tried a very basic example and was trying to monitor data rate
using nethogs with a different sample rate.

At a signal sample rate of 9.6MSPS, nethogs sees about 59MB/s of data. I
wonder if that could be improved in anyway, or whether the sample rate of
an actual wired lan connection might be better?

I vaguely remember that the USB data transfer rate at 6.4MSPS was about
15MB/s.


On Wed, Mar 16, 2022 at 11:51 AM jmfriedt 
wrote:

> > I am wondering if it is possible to reliably make another gnuradio
> > instance on a low powered computer (like a intel minipc or raspberry
> > pi) to interface with the SDR and be connected to the high end cpu
> > laptop via a lan cable. This would allow the laptop to be placed far
> > away easing physical constraints and also allow easier management.
> >
> > Could someone point me at flowgraphs that would allow this?
>
> I try to show at https://www.youtube.com/watch?v=M8dqgqO4TuI starting
> at 9:30 how to stream data from GNU Radio using ZeroMQ
> publish/subscribe, in my case to external Python software which could
> very well be remote if the IP address is not 127.0.0.1, but will be
> even easier to implement if the client is another GNU Radio flowchart.
> I am currently doing exactly that: recording on a Raspberry Pi and
> streaming to a more powerful computer for processing (again from a
> dedicated Python script rather than another GNU Radio instance, e.g
> around 45 min of that video).
>
> Best, JM
>
> --
> JM Friedt, FEMTO-ST Time & Frequency, 26 rue de l'Epitaphe, 25000
> Besancon, France
>


-- 
Anish


Re: Gnuradio-companion as a network relay

2022-03-16 Thread Marcus Müller

Hi Anish, quick remark:

20 MB/s = 160 Mbit/s -> won't fit through 100 Mb/s Ethernet.

Best regards,
Marcus

On 16.03.22 02:22, Anish Mangal wrote:

Hi,

I currently have a gnuradio flowgraph that requires high compute resources and is running 
on a laptop with a high-end cpu which is connected to a LimeSDR.


That LimeSDR is eventually connected to a RF PA and an antenna for broadcast.

The limitation in this setup is that the laptop needs to be part of the physical setup 
where the sdr and R.F. PA are placed.


I am wondering if it is possible to reliably make another gnuradio instance on a low 
powered computer (like a intel minipc or raspberry pi) to interface with the SDR and be 
connected to the high end cpu laptop via a lan cable. This would allow the laptop to be 
placed far away easing physical constraints and also allow easier management.


Could someone point me at flowgraphs that would allow this?

The USB3 data rate between the GNURadio and LimeSDR is about 20MB/s, so it is well within 
the data rates of 100M/1G lan connection.


Thank you.
Anish

--
Anish







Re: Realise a bandwidth segmentizer

2022-03-16 Thread Chris Vine
On Wed, 16 Mar 2022 08:34:55 +
e heuchamps  wrote:
[snip]
> P. S.: could you give me possible pointers to good references to
> learn the concepts quicker ? I already stumbled across the wonderful
> PySDR blog, and was wondering if there were
> other similar/complementary online ressources ?

For really basic stuff, the videos here are pretty good:
https://greatscottgadgets.com/sdr/ .  Although centred on the HackRF
One, you can follow the principles with pretty much any SDR device
(note though that many consumer-level devices have a lower maximum
sampling rate than does the HackRF One).



Re: How to fill out the data type for parameter which is an array to a C++ OOT block?

2022-03-16 Thread George Edwards
Hi Mobi,

Thanks for your response.

Actually, while waiting for an answer yesterday, I did exactly as
you suggested as a trial and it worked beautifully.

I was coming back online just now to let Gnuradio Community know I had
solved my problem when I saw your response.

Thank you very much!

Regards,
George

On Wed, Mar 16, 2022 at 12:01 AM Mobi Zaman  wrote:

>
> Hi, George,
>
> Let me refer you to existing code that uses vector inputs. I haven't done
> this myself before but I think this can help you.
>
> 1. There is a Chunks to Symbols
>  block in GNU
> Radio that has a complex vector input for the paramter of Symbol Table. If
> you check its c++ source code
> ,
> you can clearly see the format in which it handles that parameter. So based
> on that, you could use this for declaring the parameter:
>
> std::vector& coeffs
>
>
> 2. As for the yml file, here
> 
> is the corresponding yml file of Chunks to Symbols, Based on that, you
> could use the following in the yml file:
>
> dtype: float_vector
>
>
> I hope that this helps.
>
> Regards,
> Mubashira Zaman
>
>
>
>
>
>
>
>
>
>
>
> On Tuesday, March 15, 2022, 08:50:50 PM GMT+5, George Edwards <
> gedwards@gmail.com> wrote:
>
>
> Hello GNURadio Community,
>
> I am making a Gnuradio C++ OOT block using the gr_modtool. At the start
> of a design gr_modtool provides a template for the user to fill out. One
> of the items to fill out is parameters used. I have a parameter (let's
> call if coeffs) that is not a single floating point value, but is an array
> of floating point values. My questions in filling out this template is:
>
> Q1. Should I declare the parameter as std::vector  coeffs or
> simply float coeffs?
>
> Q2. In the yml file where one fills in parameters (the suggestion
> parameter data types are: int, float, complex, xxx_vector, etc.) should I
> fill in data type as: float_vector (replace the xxx before vector with
> the prefix float)?
>
> Thanks very much for your answer.
>
> George
>


The firdes.low_pass_2(...) function in my GRC has stopped working

2022-03-16 Thread George Edwards
Hello GNURadio Community,

I have used the firdes.low_pass_2(...) function in many of my Gnuradio
blocks in the past to pass filter coefficients to my blocks and it has
always worked.

Yesterday I opened one of my GRC that uses his filter function and it
showed an error. The specific usage was:
firdes.low_pass_2(1,samp_rate1, fcut, ftrans,attenuation_dB=100,
window=filter.firdes.WIN_BLACKMAN_HARRIS)
Error message: There is no attribute WIN_BLACKMAN_HARRIS

I then opened several previously created GRCs blocks with this function and
all showed the same error. I then opened some radio blocks which required a
user to set the window and noticed that what used to be set as WIN_BLACKMAN was
now Blackman.

I searched the Gnuradio literature, but could not find anything to help me.
I made the changes below to the function, but all failed:
window=filter.firdes.Win_blackman_harris, window=Blackman_harris then, I
would leave out the word window, also in calling the function, I tried
low_pass_2 instead of firdes.low_pass_2.

I would appreciate getting some suggestions from someone who has worked
recently with this filter function.

Thank you!

Regards,
George


Re: The firdes.low_pass_2(...) function in my GRC has stopped working

2022-03-16 Thread Marcus D. Leech

On 2022-03-16 11:17, George Edwards wrote:

Hello GNURadio Community,

I have used the firdes.low_pass_2(...) function in many of my Gnuradio 
blocks in the past to pass filter coefficients to my blocks and it has 
always worked.


Yesterday I opened one of my GRC that uses his filter function and it 
showed an error. The specific usage was:
firdes.low_pass_2(1,samp_rate1, fcut, ftrans,attenuation_dB=100, 
window=filter.firdes.WIN_BLACKMAN_HARRIS)

Error message: There is no attribute WIN_BLACKMAN_HARRIS

I then opened several previously created GRCs blocks with this 
function and all showed the same error. I then opened some radio 
blocks which required a user to set thewindow and noticed that what 
used to be set as WIN_BLACKMAN was now Blackman.


I searched the Gnuradio literature, but could not find anything to 
help me. I made the changes below to the function, but all failed: 
window=filter.firdes.Win_blackman_harris, window=Blackman_harris then, 
I would leave out the word window, also in calling the function, I 
tried low_pass_2 instead of firdes.low_pass_2.


I would appreciate getting some suggestions from someone who has 
worked recently with this filter function.


Thank you!

Regards,
George
I suspect that you're dealing with differences between GR 3.7 and 
GR3.8/3.9/3.10


See:

https://github.com/gnuradio/gnuradio/issues/4510



Re: The firdes.low_pass_2(...) function in my GRC has stopped working

2022-03-16 Thread George Edwards
Hi Marcus,

Thank you!

I will look into the link you sent!

George

On Wed, Mar 16, 2022 at 11:26 AM Marcus D. Leech 
wrote:

> On 2022-03-16 11:17, George Edwards wrote:
>
> Hello GNURadio Community,
>
> I have used the firdes.low_pass_2(...) function in many of my Gnuradio
> blocks in the past to pass filter coefficients to my blocks and it has
> always worked.
>
> Yesterday I opened one of my GRC that uses his filter function and it
> showed an error. The specific usage was:
> firdes.low_pass_2(1,samp_rate1, fcut, ftrans,attenuation_dB=100,
> window=filter.firdes.WIN_BLACKMAN_HARRIS)
> Error message: There is no attribute WIN_BLACKMAN_HARRIS
>
> I then opened several previously created GRCs blocks with this function
> and all showed the same error. I then opened some radio blocks which
> required a user to set the window and noticed that what used to be set as
> WIN_BLACKMAN was now Blackman.
>
> I searched the Gnuradio literature, but could not find anything to help
> me. I made the changes below to the function, but all failed:
> window=filter.firdes.Win_blackman_harris, window=Blackman_harris then, I
> would leave out the word window, also in calling the function, I tried
> low_pass_2 instead of firdes.low_pass_2.
>
> I would appreciate getting some suggestions from someone who has worked
> recently with this filter function.
>
> Thank you!
>
> Regards,
> George
>
> I suspect that you're dealing with differences between GR 3.7 and
> GR3.8/3.9/3.10
>
> See:
>
> https://github.com/gnuradio/gnuradio/issues/4510
>
>
>


Re: Confusion about 'ports'

2022-03-16 Thread Marcus D. Leech

On 2022-03-16 17:31, Chad Spooner wrote:


Marcus:

Yes, I did miss that reply! *Very sorry about that.* Let me try to 
answer your questions:


First, I did try to use a single Source block with two channels on the 
advice of a colleague. I've been unable to get that to work either. 
(More on that below, after I answer your questions.)


The x310 has WBX (A) and UBX (B) daughtercards.

The x310's UBX RX2 input is coming from the TX/RX output of an N210 
with a WBX daughtercard. The N210 is generating a DSSS signal and 
transmitting it on TX/RX.


The x310's WBX RX2 input is coming from a passive antenna (Ettus 
WA5JVB Log Periodic 850 MHz to 6500 MHz).


The x310's UBX TX/RX transmits the sum of the UBX RX2 and WBX RX2 signals.

A third SDR (x300) receives the x310's UBX TX/RX signal and that is 
the USRP I fetch data from using uhd_rx_cfile.





You need to specify a subdev spec of:

A:0 B:0

Right now, you just have B:0, so it's trying to produce two channels 
from a single sub-device ,and, obviously, failing.




Re: Confusion about 'ports'

2022-03-16 Thread Chad Spooner

Marcus:

That did it! Thanks much.

I was definitely confused about being able to use both TX/RX and RX2 on 
subdev B to receive two signals. When I was doing that, I was thinking 
'B:0' was sufficient--same device. But switching the antenna back to A, 
RX2 (as in the original two-block configuration) and using 'A:0 B:0' 
worked, so then I switched back and tried 'B:0 B:0' but that doesn't work.


Now I also understand (a little bit better anyway) the documentation

   https://files.ettus.com/manual/page_configuration.html

I appreciate your patience and skill Marcus,

C

On 3/16/22 2:42 PM, Marcus D. Leech wrote:

On 2022-03-16 17:31, Chad Spooner wrote:


Marcus:

Yes, I did miss that reply! *Very sorry about that.* Let me try to 
answer your questions:


First, I did try to use a single Source block with two channels on 
the advice of a colleague. I've been unable to get that to work 
either. (More on that below, after I answer your questions.)


The x310 has WBX (A) and UBX (B) daughtercards.

The x310's UBX RX2 input is coming from the TX/RX output of an N210 
with a WBX daughtercard. The N210 is generating a DSSS signal and 
transmitting it on TX/RX.


The x310's WBX RX2 input is coming from a passive antenna (Ettus 
WA5JVB Log Periodic 850 MHz to 6500 MHz).


The x310's UBX TX/RX transmits the sum of the UBX RX2 and WBX RX2 
signals.


A third SDR (x300) receives the x310's UBX TX/RX signal and that is 
the USRP I fetch data from using uhd_rx_cfile.





You need to specify a subdev spec of:

A:0 B:0

Right now, you just have B:0, so it's trying to produce two channels 
from a single sub-device ,and, obviously, failing.




--
Chad M. Spooner, PhD
NorthWest Research Associates
301 Webster Street
Monterey, CA 93940
cmspoo...@nwra.com
831 582 4904
cyclostationary.blog


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Confusion about 'ports'

2022-03-16 Thread Marcus D. Leech

On 2022-03-16 18:17, Chad Spooner wrote:


Marcus:

That did it! Thanks much.

I was definitely confused about being able to use both TX/RX and RX2 
on subdev B to receive two signals. When I was doing that, I was 
thinking 'B:0' was sufficient--same device. But switching the antenna 
back to A, RX2 (as in the original two-block configuration) and using 
'A:0 B:0' worked, so then I switched back and tried 'B:0 B:0' but that 
doesn't work.


Now I also understand (a little bit better anyway) the documentation

https://files.ettus.com/manual/page_configuration.html

I appreciate your patience and skill Marcus,

C

A card like WBX or UBX has a *SINGLE* receive chain, and *THAT CHAIN* 
can be switched to either "look" at RX2 or the TX/RX port. In 
half-duplex configurations, it's
  common to have a single antenna that is dynamically either connected 
to the receiver (RX) or transmitter (TX), but there are also 
configurations where the receiver
  (RX) needs to be completely isolated (on a different physical antenna 
port) from the transmitter (TX).


Sub-device specs are of the general form:

:

For X310, that's "A" and "B" for "which-side", and the "" 
component depends on the daughtercard that is installed there.





On 3/16/22 2:42 PM, Marcus D. Leech wrote:

On 2022-03-16 17:31, Chad Spooner wrote:


Marcus:

Yes, I did miss that reply! *Very sorry about that.* Let me try to 
answer your questions:


First, I did try to use a single Source block with two channels on 
the advice of a colleague. I've been unable to get that to work 
either. (More on that below, after I answer your questions.)


The x310 has WBX (A) and UBX (B) daughtercards.

The x310's UBX RX2 input is coming from the TX/RX output of an N210 
with a WBX daughtercard. The N210 is generating a DSSS signal and 
transmitting it on TX/RX.


The x310's WBX RX2 input is coming from a passive antenna (Ettus 
WA5JVB Log Periodic 850 MHz to 6500 MHz).


The x310's UBX TX/RX transmits the sum of the UBX RX2 and WBX RX2 
signals.


A third SDR (x300) receives the x310's UBX TX/RX signal and that is 
the USRP I fetch data from using uhd_rx_cfile.





You need to specify a subdev spec of:

A:0 B:0

Right now, you just have B:0, so it's trying to produce two channels 
from a single sub-device ,and, obviously, failing.




--
Chad M. Spooner, PhD
NorthWest Research Associates
301 Webster Street
Monterey, CA 93940
cmspoo...@nwra.com
831 582 4904
cyclostationary.blog


Re: Confusion about 'ports'

2022-03-16 Thread Marcus D. Leech

On 2022-03-16 18:17, Chad Spooner wrote:


Marcus:

That did it! Thanks much.

I was definitely confused about being able to use both TX/RX and RX2 
on subdev B to receive two signals. When I was doing that, I was 
thinking 'B:0' was sufficient--same device. But switching the antenna 
back to A, RX2 (as in the original two-block configuration) and using 
'A:0 B:0' worked, so then I switched back and tried 'B:0 B:0' but that 
doesn't work.


Now I also understand (a little bit better anyway) the documentation

https://files.ettus.com/manual/page_configuration.html

I appreciate your patience and skill Marcus,

C


A side note.  NEVER wire a transmitter directly to a receiver.  Use a 
30-40dB attenuator in-line.   Because receivers that are intended for 
off-air (antenna-connected) signals are
  too delicate to tolerate the kind of power levels you'll see directly 
from a transmitter, even a very very modest transmitter. You risk 
damaging the receiver.




fresh install ubuntu-21.10, firmware images path?

2022-03-16 Thread Wayne Roberts
I had to wipe & fresh install this ubuntu.
Perhaps somebody has a better explanation of whats going on for such a
simple thing.
Its ubuntu 21.10, and repo has gnuradio-3.8.2 and uhd-3.15, thats ok the
version i need (although if somebody wants 3.9 maybe a problem with Release
file)

/usr/bin/uhd_image_loader
put the images into /usr/share/uhd/images

uhd_config_info --print-all
shows Images directory as nothing (no path)

after i set environment variable
export UHD_IMAGES_DIR=/usr/share/uhd/images
then uhd_usrp_probe downloads firmware and shows my B100 correctly, all OK
after setting this environment var.


Re: fresh install ubuntu-21.10, firmware images path?

2022-03-16 Thread Marcus D. Leech

On 2022-03-16 20:53, Wayne Roberts wrote:

I had to wipe & fresh install this ubuntu.
Perhaps somebody has a better explanation of whats going on for such a 
simple thing.
Its ubuntu 21.10, and repo has gnuradio-3.8.2 and uhd-3.15, thats ok 
the version i need (although if somebody wants 3.9 maybe a problem 
with Release file)


/usr/bin/uhd_image_loader
put the images into /usr/share/uhd/images

uhd_config_info --print-all
shows Images directory as nothing (no path)

after i set environment variable
export UHD_IMAGES_DIR=/usr/share/uhd/images
then uhd_usrp_probe downloads firmware and shows my B100 correctly, 
all OK after setting this environment var.
FOr whatever reason, they built UHD without a default images directory, 
so, you have to use the ENV variable.    This is a Ubuntu packaging 
thing, rather than

  a fault in UHD or Gnu Radio.