Re: Index Error: output_index < noutputs

2023-09-27 Thread Jeff Long
In the previous GRC you posted, there is a "Wave Select" Python block with
no inputs or outputs. I don't think we have enough info to figure out what
you are doing. As Paul Atreides mentioned, posting a full GRC would help.

On Tue, Sep 26, 2023 at 10:36 PM Elmore Family  wrote:

> Paul,
>
> Thanks for answering. The following is what I hope is a simplified
> presentation of my code that is pertinent to the issue. The top flowgraph
> is complex. The FT8_Receive hier block is simple. The connections section
> below should be sufficient for explaining it.
>
> I am using a gnu radio flowgraph to attempt to select the appropriate
> Selector Block output as explained below. The following error occurs when I
> run the flowgraph: Index Error: output_index must be < noutputs.
>
> Obviously the chosen index of 1 is less than the number of outputs 2. What
> is wrong?
>
> The following code is in an FT8_Receive hier block. It shows only the code
> pertinent to the issue I am experiencing. The connections section shows the
> Selector Block with 2 outputs connected to 2 Wave File Sinks. I am
> attempting to select the appropriate output by using wave_select in the
> output index as shown in def set_wave_select().
>
>  class FT8_Receive(gr.hier_block2):
> def __init__(self, wave_select=0):
> gr.hier_block2.__init__(
> self, "FT8_Receive",
> gr.io_signature(1, 1, gr.sizeof_float*1),
> gr.io_signature(0, 0, 0),
> )
>
> ##
> # Parameters
> ##
> self.wave_select = wave_select
>
> ##
> # Connections
> ##
> self.connect((self.blocks_selector_0, 1), (self.blocks_wavfile_sink_0_0, 
> 0))
> self.connect((self.blocks_selector_0, 0), 
> (self.blocks_wavfile_sink_0_0_0, 0))
> self.connect((self, 0), (self.rational_resampler_xxx_0, 0))
> self.connect((self.rational_resampler_xxx_0, 0), (self.blocks_selector_0, 
> 0))
>
> .
>
> def get_wave_select(self):
> return self.wave_select
>
> def set_wave_select(self, wave_select):
> self.wave_select = wave_select
> self.blocks_selector_0.set_output_index(self.wave_select)
>
> The following code is from the .py file that is an OOT in the top block of
> the flowgraph. This is where I am calling set_wave_select.
>
> from FT8_Receive import FT8_Receive
>
> RCV = FT8_Receive()
> wave_select = 1
> RCV.set_wave_select(wave_select)
>
>
> *From:* Paul Atreides
> *Sent:* Tuesday, September 26, 2023 6:40 PM
> *To:* Elmore's
> *Cc:* discuss-gnuradio@gnu.org
> *Subject:* Re: Index Error: output_index < noutputs
>
> Jim, can you please re-post your flowgraph?
> I’ll try to take another look at it.
> Also, what version of GNURadio are you using?
>
> 
>
> On Sep 26, 2023, at 11:48, Elmore's  wrote:
>
> 
> I have submitted this issue previously and received a response which
> resulted in my trying several things which didn’t work.
>
> I then submitted the issue to Stackoverflow and received no answers.
>
> I get this error when I try to use a Selector to select one of 2 outputs
> with my selection obviously being smaller than the number of outputs. I can
> successfully use a Selector if I use a number for the output index or a
> variable whose value is selected by a Toggle Button but not if I try to set
> the variable programmatically in Python.
>
> In general, why do you get such an error?  I am asking the question in
> this manner because my specific questions relating to my code and flowgraph
> have not resulted in any concrete answers (or any answers at all).
>
> Thanks again for any help. I have been struggling with this for several
> weeks.
>
> Jim
>
>
> 
> Virus-free.www.avg.com
> 
>
>


Help in identying a jamming signal

2023-09-27 Thread veso266

Hello there all, I hope someone can help me 

I am trying to watch some television on CH47 (679.25Mhz) 

I am in Slovenia and I am trying to receive and watch Federalna Televizija 
transmitting from Bosnia and Herzegovina (BiH) 

But there is very anoying signal bothering me, you can see the problem here: 
https://youtu.be/wt4vEfu7yEI?si=XDQ8wQ-rK-lb8LMW 

Instead of seing PAL and hearing sound, I see this anoying lines and hear 
digital data :( 

So I decided to bring my Airspy R2 to visually see and record some IQ data on 
whats going on 

So this is what I recorded: 
https://transfer.sh/dMhDtqnodK/baseband_67925Hz_14-23-42_26-09-2023.wav 

Center frequency was 679.25Mhz but sadly I was only able to record about 2.5Mhz 
of Bandwith, because my phone could not handle full 10Mhz 

As you can see PAL was bearly able to get through this jamming signal 

At first I thought it could be 600Mhz 5G NR which is sadly right where I want 
to receive  (663 – 698 Uplink, 617 – 652 Downlink), but thats only for US, not 
Europe 

The next suspect could be 5G Extended Lower SMH (which has downlink from 698 – 
716) but its 20Mhz above my signal, PAL only needs about 6-8Mhz so this should 
not be a problem 

Then I thought maybe LTE Lower SMH on 700MHz could be the culprit, which again 
doesnt make any sense (Downlink on 699 – 716Mhz) 

I hope something could be done 

At least to figure out what signal that is so I can complain to relevant local 
authorities 

I am there for a 3 more days, so if needed I can do more messurments 

Sadly I only brought Airspy HF+, and Airspy R2 with me nothing more capable 
bandwith vise 

I also have Samsung Galaxy S10+ if it can maybe help in messuring LTE signals 
somehow


Thanks to everyone for anwsering
--
Sent from myMail for Android

Re: Index Error: output_index < noutputs

2023-09-27 Thread Elmore Family

Marcus,

I forgot to include the version: 3.9.4.0.

Jeff

Ignore the previous GRC with the Python block. I did things differently this 
time as you can see in the connections. I also attached the FT8_Receive.grc 
file.


Jim

-Original Message- 
From: Marcus Müller

Sent: Wednesday, September 27, 2023 6:00 AM
To: discuss-gnuradio@gnu.org ; Elmore Family
Subject: Re: Index Error: output_index < noutputs

Hi Jim,

since we've worked on Selector recently, it would **really** be important to 
know the

version of GNU Radio you're dealing with!

Best regards,
Marcus

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com 


FT8_Receive.grc
Description: Binary data


Re: Index Error: output_index < noutputs

2023-09-27 Thread Jeff Long
I replaced the Transmit_CESSB block with a Noise Source and Throttle to
make a valid flowgraph. Did you mean to send freq.grc instead of freq.py?
Disabled that block in the top level flowgraph. In any case, no errors when
running the flowgraph. When I hit PTT, I see noise, and otherwise nothing
(no audio being played). The wave_select code seems to be right. It's set
to a static "0" at the top level and that carries through to the hier block.

This is on the latest maint-3.10 code. I don't have a 3.9 installation
sitting around. There was a recent behavior change in this block, but
nothing that should cause the error message you are seeing.

I did replace the Wav File Sink blocks in FT8 Receive with Null Sinks for
testing, so you might want to do that just to check.

On Wed, Sep 27, 2023 at 2:09 PM Elmore Family  wrote:

> Jeff,
>
> I have attached the top level GRC (softrock_QT.grc), the Receive.grc hier
> block (feeds the stream to the FT8_Receive block) and freq.py (the OOT
> module containing the code that I am questioning).
>
> The Transmit hier block is not pertinent to this discussion.
>
> Note that this is a fully functioning SSB transceiver that I have had on
> the air. I am attempting to add the digital mode FT8 to it using the
> FT8_Receive block along with some additional code in the freq.py file.
>
> Jim
>
> *From:* Jeff Long
> *Sent:* Wednesday, September 27, 2023 12:18 PM
> *To:* GNURadio Discussion List
> *Subject:* Re: Index Error: output_index < noutputs
>
> Sorry, it takes too much time to make guesses from fragments of a project.
> Could you post a grc file that is runnable and shows the error?
>
> On Wed, Sep 27, 2023 at 11:14 AM Elmore Family  wrote:
>
>> Marcus,
>>
>> I forgot to include the version: 3.9.4.0.
>>
>> Jeff
>>
>> Ignore the previous GRC with the Python block. I did things differently
>> this
>> time as you can see in the connections. I also attached the
>> FT8_Receive.grc
>> file.
>>
>> Jim
>>
>> -Original Message-
>> From: Marcus Müller
>> Sent: Wednesday, September 27, 2023 6:00 AM
>> To: discuss-gnuradio@gnu.org ; Elmore Family
>> Subject: Re: Index Error: output_index < noutputs
>>
>> Hi Jim,
>>
>> since we've worked on Selector recently, it would **really** be important
>> to
>> know the
>> version of GNU Radio you're dealing with!
>>
>> Best regards,
>> Marcus
>>
>> --
>> This email has been checked for viruses by AVG antivirus software.
>> www.avg.com
>>
>
>
> 
> Virus-free.www.avg.com
> 
>


Re: Index Error: output_index < noutputs

2023-09-27 Thread Marcus Müller

Hi Jim,

since we've worked on Selector recently, it would **really** be important to know the 
version of GNU Radio you're dealing with!


Best regards,
Marcus



Re: Index Error: output_index < noutputs

2023-09-27 Thread Jeff Long
Sorry, it takes too much time to make guesses from fragments of a project.
Could you post a grc file that is runnable and shows the error?

On Wed, Sep 27, 2023 at 11:14 AM Elmore Family  wrote:

> Marcus,
>
> I forgot to include the version: 3.9.4.0.
>
> Jeff
>
> Ignore the previous GRC with the Python block. I did things differently
> this
> time as you can see in the connections. I also attached the
> FT8_Receive.grc
> file.
>
> Jim
>
> -Original Message-
> From: Marcus Müller
> Sent: Wednesday, September 27, 2023 6:00 AM
> To: discuss-gnuradio@gnu.org ; Elmore Family
> Subject: Re: Index Error: output_index < noutputs
>
> Hi Jim,
>
> since we've worked on Selector recently, it would **really** be important
> to
> know the
> version of GNU Radio you're dealing with!
>
> Best regards,
> Marcus
>
> --
> This email has been checked for viruses by AVG antivirus software.
> www.avg.com
>


Re: Index Error: output_index < noutputs

2023-09-27 Thread Elmore Family
Jeff,

I have attached the top level GRC (softrock_QT.grc), the Receive.grc hier block 
(feeds the stream to the FT8_Receive block) and freq.py (the OOT module 
containing the code that I am questioning).

The Transmit hier block is not pertinent to this discussion.

Note that this is a fully functioning SSB transceiver that I have had on the 
air. I am attempting to add the digital mode FT8 to it using the FT8_Receive 
block along with some additional code in the freq.py file.

Jim 

From: Jeff Long 
Sent: Wednesday, September 27, 2023 12:18 PM
To: GNURadio Discussion List 
Subject: Re: Index Error: output_index < noutputs

Sorry, it takes too much time to make guesses from fragments of a project. 
Could you post a grc file that is runnable and shows the error?

On Wed, Sep 27, 2023 at 11:14 AM Elmore Family  wrote:

  Marcus,

  I forgot to include the version: 3.9.4.0.

  Jeff

  Ignore the previous GRC with the Python block. I did things differently this 
  time as you can see in the connections. I also attached the FT8_Receive.grc 
  file.

  Jim

  -Original Message- 
  From: Marcus Müller
  Sent: Wednesday, September 27, 2023 6:00 AM
  To: discuss-gnuradio@gnu.org ; Elmore Family
  Subject: Re: Index Error: output_index < noutputs

  Hi Jim,

  since we've worked on Selector recently, it would **really** be important to 
  know the
  version of GNU Radio you're dealing with!

  Best regards,
  Marcus

  -- 
  This email has been checked for viruses by AVG antivirus software.
  www.avg.com 


 Virus-free.www.avg.com 


freq.py
Description: Binary data


softrock_QT.grc
Description: Binary data


Receive.grc
Description: Binary data


Re: Index Error: output_index < noutputs

2023-09-27 Thread Vasil Velichkov
Hi Elmore,

On 27/09/2023 03.17, Elmore Family wrote:
> I am using a gnu radio flowgraph to attempt to select the appropriate 
> Selector Block output as explained below. The following error occurs when I 
> run the flowgraph: Index Error: output_index must be < noutputs.

> I forgot to include the version: 3.9.4.0. 

Lets try analyzing the source code where this error is thrown. 

$ git checkout v3.9.4.0

$ grep "output_index must be < noutputs" . -R
./gr-blocks/lib/selector_impl.cc:throw std::out_of_range("output_index 
must be < noutputs");

https://github.com/gnuradio/gnuradio/blob/v3.9.4.0/gr-blocks/lib/selector_impl.cc#L66-L73

 66 void selector_impl::set_output_index(unsigned int output_index)
 67 {
 68 gr::thread::scoped_lock l(d_mutex);
 69 if (output_index < d_num_outputs)
 70 d_output_index = output_index;
 71 else
 72 throw std::out_of_range("output_index must be < noutputs");
 73 }

The code is pretty simple, the only possible case is the value of output_index 
variable to be greater or equal to d_num_outputs variable. You are calling 
set_output_index with 1 so d_num_outputs must be either 0 or 1.

Now let's check where d_num_outputs gets its value.

$ grep -n d_num_outputs ./gr-blocks/lib/selector_impl.cc
40:  d_num_outputs(0)
69:if (output_index < d_num_outputs)
100:if (new_port < d_num_outputs)
138:d_num_outputs = (unsigned int)noutputs;

It is initialized to 0 in the constructor on line 40 and get assigned in 
selector_impl::check_topology function on line 138.

https://github.com/gnuradio/gnuradio/blob/v3.9.4.0/gr-blocks/lib/selector_impl.cc#L134-L145

So it looks that you are calling set set_output_index(1) before 
check_topology() has been called, before the flowgraph is started. 

Looks like you need to start the flowgraph first and then call 
set_output_index(1)

Hope this helps.

Regards,
Vasil



Re: Help in identying a jamming signal

2023-09-27 Thread Daniel Estévez

Hello,

Taking a quick look at your recording, I see some kind of pulsed signal 
that follows a regular pattern. The signal is on for a period of ~548 
usec, then off for two periods of this duration (~548 usec per period), 
and then the same repeats forever (one period on, two periods off). This 
doesn't look like anything that would remind me of LTE or 5G.


A wider recording might give more clues, since, since this pulsed signal 
appears to be much wider than 2.5 MHz. If you have access to an ADALM 
Pluto, you could use Maia SDR (https://maia-sdr.org/) to record. This is 
exactly one of the use cases I had in mind when I started the project.


Best,
Daniel.

On 27/09/2023 13:21, veso...@gmail.com wrote:


Hello there all, I hope someone can help me

I am trying to watch some television on CH47 (679.25Mhz)

I am in Slovenia and I am trying to receive and watch Federalna 
Televizija transmitting from Bosnia and Herzegovina (BiH)


But there is very anoying signal bothering me, you can see the problem 
here: https://youtu.be/wt4vEfu7yEI?si=XDQ8wQ-rK-lb8LMW


Instead of seing PAL and hearing sound, I see this anoying lines and 
hear digital data :(


So I decided to bring my Airspy R2 to visually see and record some IQ 
data on whats going on


So this is what I recorded: 
https://transfer.sh/dMhDtqnodK/baseband_67925Hz_14-23-42_26-09-2023.wav


Center frequency was 679.25Mhz but sadly I was only able to record about 
2.5Mhz of Bandwith, because my phone could not handle full 10Mhz


As you can see PAL was bearly able to get through this jamming signal

At first I thought it could be 600Mhz 5G NR which is sadly right where I 
want to receive  (663 – 698 Uplink, 617 – 652 Downlink), but thats only 
for US, not Europe


The next suspect could be 5G Extended Lower SMH (which has downlink from 
698 – 716) but its 20Mhz above my signal, PAL only needs about 6-8Mhz so 
this should not be a problem


Then I thought maybe LTE Lower SMH on 700MHz could be the culprit, which 
again doesnt make any sense (Downlink on 699 – 716Mhz)


I hope something could be done

At least to figure out what signal that is so I can complain to relevant 
local authorities


I am there for a 3 more days, so if needed I can do more messurments

Sadly I only brought Airspy HF+, and Airspy R2 with me nothing more 
capable bandwith vise


I also have Samsung Galaxy S10+ if it can maybe help in messuring LTE 
signals somehow


Thanks to everyone for anwsering
--
Sent from myMail for Android





OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Index Error: output_index < noutputs

2023-09-27 Thread Elmore Family
I moved the Selector code (i.e. set_wave_select(wave_select)) into the 
portion of my code which runs after the flowgraph is running. I still get 
the same error.


Jim

-Original Message- 
From: Vasil Velichkov

Sent: Wednesday, September 27, 2023 1:55 PM
To: Elmore Family
Cc: discuss-gnuradio@gnu.org
Subject: Re: Index Error: output_index < noutputs

Hi Elmore,

On 27/09/2023 03.17, Elmore Family wrote:
I am using a gnu radio flowgraph to attempt to select the appropriate 
Selector Block output as explained below. The following error occurs when 
I run the flowgraph: Index Error: output_index must be < noutputs.



I forgot to include the version: 3.9.4.0.


Lets try analyzing the source code where this error is thrown.

$ git checkout v3.9.4.0

$ grep "output_index must be < noutputs" . -R
./gr-blocks/lib/selector_impl.cc:throw 
std::out_of_range("output_index must be < noutputs");


https://github.com/gnuradio/gnuradio/blob/v3.9.4.0/gr-blocks/lib/selector_impl.cc#L66-L73

66 void selector_impl::set_output_index(unsigned int output_index)
67 {
68 gr::thread::scoped_lock l(d_mutex);
69 if (output_index < d_num_outputs)
70 d_output_index = output_index;
71 else
72 throw std::out_of_range("output_index must be < noutputs");
73 }

The code is pretty simple, the only possible case is the value of 
output_index variable to be greater or equal to d_num_outputs variable. You 
are calling set_output_index with 1 so d_num_outputs must be either 0 or 1.


Now let's check where d_num_outputs gets its value.

$ grep -n d_num_outputs ./gr-blocks/lib/selector_impl.cc
40:  d_num_outputs(0)
69:if (output_index < d_num_outputs)
100:if (new_port < d_num_outputs)
138:d_num_outputs = (unsigned int)noutputs;

It is initialized to 0 in the constructor on line 40 and get assigned in 
selector_impl::check_topology function on line 138.


https://github.com/gnuradio/gnuradio/blob/v3.9.4.0/gr-blocks/lib/selector_impl.cc#L134-L145

So it looks that you are calling set set_output_index(1) before 
check_topology() has been called, before the flowgraph is started.


Looks like you need to start the flowgraph first and then call 
set_output_index(1)


Hope this helps.

Regards,
Vasil

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com 





Re: Index Error: output_index < noutputs

2023-09-27 Thread Elmore Family
Jeff,

The freq block is an OOT module. I didn’t think they had a GRC file.

Jim

From: Jeff Long 
Sent: Wednesday, September 27, 2023 4:13 PM
To: GNURadio Discussion List 
Subject: Re: Index Error: output_index < noutputs

I replaced the Transmit_CESSB block with a Noise Source and Throttle to make a 
valid flowgraph. Did you mean to send freq.grc instead of freq.py? Disabled 
that block in the top level flowgraph. In any case, no errors when running the 
flowgraph. When I hit PTT, I see noise, and otherwise nothing (no audio being 
played). The wave_select code seems to be right. It's set to a static "0" at 
the top level and that carries through to the hier block. 

This is on the latest maint-3.10 code. I don't have a 3.9 installation sitting 
around. There was a recent behavior change in this block, but nothing that 
should cause the error message you are seeing.

I did replace the Wav File Sink blocks in FT8 Receive with Null Sinks for 
testing, so you might want to do that just to check.

On Wed, Sep 27, 2023 at 2:09 PM Elmore Family  wrote:

  Jeff,

  I have attached the top level GRC (softrock_QT.grc), the Receive.grc hier 
block (feeds the stream to the FT8_Receive block) and freq.py (the OOT module 
containing the code that I am questioning).

  The Transmit hier block is not pertinent to this discussion.

  Note that this is a fully functioning SSB transceiver that I have had on the 
air. I am attempting to add the digital mode FT8 to it using the FT8_Receive 
block along with some additional code in the freq.py file.

  Jim 

  From: Jeff Long 
  Sent: Wednesday, September 27, 2023 12:18 PM
  To: GNURadio Discussion List 
  Subject: Re: Index Error: output_index < noutputs

  Sorry, it takes too much time to make guesses from fragments of a project. 
Could you post a grc file that is runnable and shows the error?

  On Wed, Sep 27, 2023 at 11:14 AM Elmore Family  wrote:

Marcus,

I forgot to include the version: 3.9.4.0.

Jeff

Ignore the previous GRC with the Python block. I did things differently 
this 
time as you can see in the connections. I also attached the FT8_Receive.grc 
file.

Jim

-Original Message- 
From: Marcus Müller
Sent: Wednesday, September 27, 2023 6:00 AM
To: discuss-gnuradio@gnu.org ; Elmore Family
Subject: Re: Index Error: output_index < noutputs

Hi Jim,

since we've worked on Selector recently, it would **really** be important 
to 
know the
version of GNU Radio you're dealing with!

Best regards,
Marcus

-- 
This email has been checked for viruses by AVG antivirus software.
www.avg.com 


   Virus-free.www.avg.com