How do I extract individual values from pmt list and dict

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

Let's assume the following pmt definitions for a list and and dictionary in
an OOT block:
P_list = pmt.to_pmt([1, 2, 3.45, 'eggs'])
P_dict = pmt.to_pmt({'spam': 20, 'eggs': 40})

How do I explicitly extract the first element in P_list and the value for
'spam' from P_dict?

Thank you!

George


Re: How do I extract individual values from pmt list and dict

2022-08-03 Thread Marcus Müller

Hi George,

first_element = pmt.vector_ref(P_list, 0)

and

spam_element = pmt.dict_ref(P_dict, pmt.to_pmt('spam'), pmt.PMT_NIL)

respectively.

Note that you must not put "payload" data into strings that you put into PMT. 
`pmt.to_pmt(str)` generates a PMT symbol, and these are saved for evermore in a global table.


Best regards,
Marcus

On 03.08.22 13:19, George Edwards wrote:

Hello GNURadio Community,

Let's assume the following pmt definitions for a list and and dictionary in an 
OOT block:
P_list = pmt.to_pmt([1, 2, 3.45, 'eggs'])
P_dict = pmt.to_pmt({'spam': 20, 'eggs': 40})

How do I explicitly extract the first element in P_list and the value for 
'spam' from P_dict?

Thank you!

George




Ubuntu 20.04 cannot find the Hackrf board?

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

I built a grc flowgraph in Gnuradio 3.9.5 on Ubuntu 20.04 inside Microsoft
VirtualBox. I have a HackRF One radio hardware. I installed the hackrf
drivers in Ubuntu with command: sudo apt-get install -y hackrf
and confirmed the installation. I connected the HackRF One board to my
computer and in the Terminal prompt entered the command hackrf_info and
received the response that it does not see the Hackrf board.

And true to form when I ran the flowgraph, I get the following error
message:
RuntimeError: no hackrf device matches

Why is Ubuntu 20.04 running inside MS VirtualBox not seeing the HackRf
board with the HackRf drivers installed. And, how do I resolve this issue?

Will appreciate any help to resolve this issue.

George


Re: Ubuntu 20.04 cannot find the Hackrf board?

2022-08-03 Thread Marcus Müller

Hi George,

you'll have to do a bit more investigation on your end, I'm afraid. We don't know how you 
set up your VM, or how you're passing through the USB driver. Generally, USB passthrough 
comes at a high overhead, and sometimes that's prohibitively slow, as well. Also, why do 
VirtualBox (and that's not a Microsoft product, so I'm really confused by what you're 
referring to), if you can have WSL2?


Best regards,
Marcus

On 03.08.22 14:15, George Edwards wrote:

Hello GNURadio Community,

I built a grc flowgraph in Gnuradio 3.9.5 on Ubuntu 20.04 inside Microsoft VirtualBox. I 
have a HackRF One radio hardware. I installed the hackrf drivers in Ubuntu with command: 
sudo apt-get install -y hackrf
and confirmed the installation. I connected the HackRF One board to my computer and in the 
Terminal prompt entered the command hackrf_info and received the response that it does not 
see the Hackrf board.


And true to form when I ran the flowgraph, I get the following error message:
RuntimeError: no hackrf device matches

Why is Ubuntu 20.04 running inside MS VirtualBox not seeing the HackRf board with the 
HackRf drivers installed. And, how do I resolve this issue?


Will appreciate any help to resolve this issue.

George





Re: How do I extract individual values from pmt list and dict

2022-08-03 Thread Marcus Müller
(also, worth noting, that it's a bit annoying that you re-posted your question out of the 
original thread. Now I have two George-asks-about-PMT threads with identical content. 
Please don't re-post questions that you've asked not 24hrs ago; that's a bit of a waste of 
everyone's time.)


On 03.08.22 15:00, Marcus Müller wrote:

Hi George,

first_element = pmt.vector_ref(P_list, 0)

and

spam_element = pmt.dict_ref(P_dict, pmt.to_pmt('spam'), pmt.PMT_NIL)

respectively.

Note that you must not put "payload" data into strings that you put into PMT. 
`pmt.to_pmt(str)` generates a PMT symbol, and these are saved for evermore in a global table.


Best regards,
Marcus

On 03.08.22 13:19, George Edwards wrote:

Hello GNURadio Community,

Let's assume the following pmt definitions for a list and and dictionary in an 
OOT block:
P_list = pmt.to_pmt([1, 2, 3.45, 'eggs'])
P_dict = pmt.to_pmt({'spam': 20, 'eggs': 40})

How do I explicitly extract the first element in P_list and the value for 'spam' from 
P_dict?


Thank you!

George




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Ubuntu 20.04 cannot find the Hackrf board?

2022-08-03 Thread James Anderson
You might want to try running hackrf_info with superuser privileges using sudo, 
i.e. "sudo hackrf_info". Many/most peripherals require this in Linux by default.

Additionally, use of a VM may limit the sample rate you can achieve since there 
is some overhead passing through the USB connection. Consider installing Linux 
directly on your machine.

> On Aug 3, 2022, at 6:12 AM, George Edwards  wrote:
> 
> 
> Hello GNURadio Community, 
> 
> I built a grc flowgraph in Gnuradio 3.9.5 on Ubuntu 20.04 inside Microsoft 
> VirtualBox. I have a HackRF One radio hardware. I installed the hackrf 
> drivers in Ubuntu with command: sudo apt-get install -y hackrf
> and confirmed the installation. I connected the HackRF One board to my 
> computer and in the Terminal prompt entered the command hackrf_info and 
> received the response that it does not see the Hackrf board.
> 
> And true to form when I ran the flowgraph, I get the following error message:
> RuntimeError: no hackrf device matches
> 
> Why is Ubuntu 20.04 running inside MS VirtualBox not seeing the HackRf board 
> with the HackRf drivers installed. And, how do I resolve this issue?
> 
> Will appreciate any help to resolve this issue.
> 
> George
> 


Re: Ubuntu 20.04 cannot find the Hackrf board?

2022-08-03 Thread Marcus D. Leech

On 2022-08-03 11:32, James Anderson wrote:
You might want to try running hackrf_info with superuser privileges 
using sudo, i.e. "sudo hackrf_info". Many/most peripherals require 
this in Linux by default.
If the udev rules were installed correctly for this device, then you 
don't need to be superuser to use it.




Additionally, use of a VM may limit the sample rate you can achieve 
since there is some overhead passing through the USB connection. 
Consider installing Linux directly on your machine.


On Aug 3, 2022, at 6:12 AM, George Edwards  
wrote:



Hello GNURadio Community,

I built a grc flowgraph in Gnuradio 3.9.5 on Ubuntu 20.04 inside 
Microsoft VirtualBox. I have a HackRF One radio hardware. I installed 
the hackrf drivers in Ubuntu with command: sudo apt-get install -y hackrf
and confirmed the installation. I connected the HackRF One board to 
my computer and in the Terminal prompt entered the command 
hackrf_info and received the response that it does not see the Hackrf 
board.


And true to form when I ran the flowgraph, I get the following error 
message:

RuntimeError: no hackrf device matches

Why is Ubuntu 20.04 running inside MS VirtualBox not seeing the 
HackRf board with the HackRf drivers installed. And, how do I 
resolve this issue?


Will appreciate any help to resolve this issue.

George



Re: How do I extract individual values from pmt list and dict

2022-08-03 Thread George Edwards
Thank very much Marcus!
George

On Wed, Aug 3, 2022, 7:05 AM Marcus Müller  wrote:

> Hi George,
>
> first_element = pmt.vector_ref(P_list, 0)
>
> and
>
> spam_element = pmt.dict_ref(P_dict, pmt.to_pmt('spam'), pmt.PMT_NIL)
>
> respectively.
>
> Note that you must not put "payload" data into strings that you put into
> PMT.
> `pmt.to_pmt(str)` generates a PMT symbol, and these are saved for evermore
> in a global table.
>
> Best regards,
> Marcus
>
> On 03.08.22 13:19, George Edwards wrote:
> > Hello GNURadio Community,
> >
> > Let's assume the following pmt definitions for a list and and dictionary
> in an OOT block:
> > P_list = pmt.to_pmt([1, 2, 3.45, 'eggs'])
> > P_dict = pmt.to_pmt({'spam': 20, 'eggs': 40})
> >
> > How do I explicitly extract the first element in P_list and the value
> for 'spam' from P_dict?
> >
> > Thank you!
> >
> > George
>
>


Re: Ubuntu 20.04 cannot find the Hackrf board?

2022-08-03 Thread George Edwards
Hi Marcus,  thanks for the response, very much appreciated!
I have a Windows PC and I believe that in order to build OOT blocks, one
needs a Linux environment. I installed VirtualBox so that I can install
Ubuntu 20.04 to get a Linux environment to install Gnuradio 3.9 in. George

On Wed, Aug 3, 2022, 8:26 AM Marcus Müller  wrote:

> Hi George,
>
> you'll have to do a bit more investigation on your end, I'm afraid. We
> don't know how you
> set up your VM, or how you're passing through the USB driver. Generally,
> USB passthrough
> comes at a high overhead, and sometimes that's prohibitively slow, as
> well. Also, why do
> VirtualBox (and that's not a Microsoft product, so I'm really confused by
> what you're
> referring to), if you can have WSL2?
>
> Best regards,
> Marcus
>
> On 03.08.22 14:15, George Edwards wrote:
> > Hello GNURadio Community,
> >
> > I built a grc flowgraph in Gnuradio 3.9.5 on Ubuntu 20.04 inside
> Microsoft VirtualBox. I
> > have a HackRF One radio hardware. I installed the hackrf drivers in
> Ubuntu with command:
> > sudo apt-get install -y hackrf
> > and confirmed the installation. I connected the HackRF One board to my
> computer and in the
> > Terminal prompt entered the command hackrf_info and received
> the response that it does not
> > see the Hackrf board.
> >
> > And true to form when I ran the flowgraph, I get the following error
> message:
> > RuntimeError: no hackrf device matches
> >
> > Why is Ubuntu 20.04 running inside MS VirtualBox not seeing the HackRf
> board with the
> > HackRf drivers installed. And, how do I resolve this issue?
> >
> > Will appreciate any help to resolve this issue.
> >
> > George
> >
>
>


Re: gr_modtool in conda failing

2022-08-03 Thread Jameson Collins
My only reason for using 3.8.2.0 was to match the version in buildroot
exactly.  But I don't think it's a big deal.  I'll stick with the newer
version.

Thanks for all your help

On Mon, Aug 1, 2022 at 3:37 PM Ryan Volz  wrote:

> On 8/1/22 2:50 PM, Jameson Collins wrote:
> > So gnuradio=3.8.3.1 worked for me, thanks.  I guess I should have tried
> > that after you suggested updating.
> >
> > I sorta lost track of the rest of the conversation.  Do you think it
> > should be possible to use 3.8.2.0?
>
> Possible, yes. It's not GNU Radio 3.8.2.0 that's broken, it's the
> existing conda packages for 3.8.2.0 that have a broken gr_modtool
> template. One would need to apply the fix that I later applied for
> 3.8.3.1+ and re-build the packages to get working 3.8.2.0 conda packages.
>
> As far as I know, though, there should be no reason to use 3.8.2.0
> specifically over 3.8.5 (latest).
>
> Cheers,
> Ryan
>


Re: Ubuntu 20.04 cannot find the Hackrf board?

2022-08-03 Thread George Edwards
Hello Gentlemen,

I installed VirtualBox extension pack and made the USB connection in
VirtualBox to the HackerRF board. However, in the Ubuntu Terminal when I
execute the command hackrf_info the info that comes up is:
hackrf_info version: unknown
libhackrf version: unknown (0.5)
Found HackRF
Index: 0
Board ID Number: 2 (HackRF One)
Firmware Version: 2014.08.1 (API:1.00)
Part ID Number: 0xa000cb3c 0x006e4756

The above shows Ubuntu is having trouble reading the top two version
information and as a result when I try to run the Gnuradio flowgraph, it
gives a message that it fails to open HackRF.

George




On Wed, Aug 3, 2022 at 10:32 AM James Anderson  wrote:

> You might want to try running hackrf_info with superuser privileges using
> sudo, i.e. "sudo hackrf_info". Many/most peripherals require this in Linux
> by default.
>
> Additionally, use of a VM may limit the sample rate you can achieve since
> there is some overhead passing through the USB connection. Consider
> installing Linux directly on your machine.
>
> On Aug 3, 2022, at 6:12 AM, George Edwards  wrote:
>
> 
> Hello GNURadio Community,
>
> I built a grc flowgraph in Gnuradio 3.9.5 on Ubuntu 20.04 inside Microsoft
> VirtualBox. I have a HackRF One radio hardware. I installed the hackrf
> drivers in Ubuntu with command: sudo apt-get install -y hackrf
> and confirmed the installation. I connected the HackRF One board to my
> computer and in the Terminal prompt entered the command hackrf_info and
> received the response that it does not see the Hackrf board.
>
> And true to form when I ran the flowgraph, I get the following error
> message:
> RuntimeError: no hackrf device matches
>
> Why is Ubuntu 20.04 running inside MS VirtualBox not seeing the HackRf
> board with the HackRf drivers installed. And, how do I resolve this issue?
>
> Will appreciate any help to resolve this issue.
>
> George
>
>


Re: Ubuntu 20.04 cannot find the Hackrf board?

2022-08-03 Thread Cinaed Simson

Hi George - the hackrf runs under ubuntu.

The latest version is

  release 2021.03.1
https://github.com/greatscottgadgets/hackrf/release
https://github.com/greatscottgadgets/hackrf/releases/download/v2021.03.1/hackrf-2021.03.1.tar.xz

The current firmware version on your hackrf is 2014.

You could try

   apt update
   apt install hackrf libhackrf-dev

which may give you the 2018 version for the hackrf utils and libhackrf-dev.

But I don't know how the firmware gets updated using apt - I've never 
used apt to install the hackrf software.


The 2014 firmware may play enough well with the 2018 software - I don't 
know. It may play well enough to indicate the hackrf works on ubuntu but 
Ideally you'd like the version of firmware to match the software.


-- Cinaed


On 8/3/22 18:28, George Edwards wrote:

Hello Gentlemen,

I installed VirtualBox extension pack and made the USB connection in 
VirtualBox to the HackerRF board. However, in the Ubuntu Terminal when 
I execute the command hackrf_info the info that comes up is:

hackrf_info version: unknown
libhackrf version: unknown (0.5)
Found HackRF
Index: 0
Board ID Number: 2 (HackRF One)
Firmware Version: 2014.08.1 (API:1.00)
Part ID Number: 0xa000cb3c 0x006e4756

The above shows Ubuntu is having trouble reading the top two version 
information and as a result when I try to run the Gnuradio flowgraph, 
it gives a message that it fails to open HackRF.


George



On Wed, Aug 3, 2022 at 10:32 AM James Anderson  wrote:

You might want to try running hackrf_info with superuser
privileges using sudo, i.e. "sudo hackrf_info". Many/most
peripherals require this in Linux by default.

Additionally, use of a VM may limit the sample rate you can
achieve since there is some overhead passing through the USB
connection. Consider installing Linux directly on your machine.


On Aug 3, 2022, at 6:12 AM, George Edwards
 wrote:


Hello GNURadio Community,

I built a grc flowgraph in Gnuradio 3.9.5 on Ubuntu 20.04 inside
Microsoft VirtualBox. I have a HackRF One radio hardware. I
installed the hackrf drivers in Ubuntu with command: sudo apt-get
install -y hackrf
and confirmed the installation. I connected the HackRF One board
to my computer and in the Terminal prompt entered the command
hackrf_info and received the response that it does not see the
Hackrf board.

And true to form when I ran the flowgraph, I get the following
error message:
RuntimeError: no hackrf device matches

Why is Ubuntu 20.04 running inside MS VirtualBox not seeing the
HackRf board with the HackRf drivers installed. And, how do I
resolve this issue?

Will appreciate any help to resolve this issue.

George