Hi Jim,
1) Have you done
https://wiki.gnuradio.org/index.php/TutorialPythonFunctions with the
changes I suggested? Did it work?
2) Did you create ~/gr-softrock in the same manner as that tutorial?
3) What is your module going to do? Is it just an audio input from a USB
dongle such as the 'Plugable USB Audio Adapter' I use on my rPi? If so,
you can use the Audio Source block with the appropriate device name for
the USB device. Look at
https://wiki.gnuradio.org/index.php/Simulation_example:_AM_transmitter_and_receiver#AM_transmitter
for an example.
4) Otherwise, it would probably be a lot simpler to use an Embedded
Python Block (https://wiki.gnuradio.org/index.php/Embedded_Python_Block)
for your softrock_usb.py program.
Keep me posted.
P.S. If you 'reply all' it will get included in the Discuss Gnuradio thread.
---
Barry Duggan KV4FV
https://github.com/duggabe
On 11/10/20 9:46 PM, Elmore Family wrote:
> Barry,
>
> Nice to be in touch with a fellow ham.
>
> I am using 3.7.5 loaded using apt-get install.
>
> I have been through the OOT tutorial, built the module in the tutorial
> as a test. Also, added some code to it to communicate with the Softrock
> via USB.
>
> However, I can't accomplish much more. Using a noblock module I think
> will solve my problem.
>
> But back to the basic question - how is import softrock bad syntax?
>
> 73,
> Jim WA4YWM
>
> -----Original Message----- From: Barry Duggan
> Sent: Tuesday, November 10, 2020 10:22 PM
> To: wa4ywm@comcast.net
> Cc: Discuss Gnuradio
> Subject: Re: Import Block "bad import syntax"
>
> Hi Jim,
>
> The tutorial you cited has been deprecated in GR 3.8. Also, it doesn't
> work as written! At this point we have chosen not to update or correct
> it. The recommended tutorial is
> https://wiki.gnuradio.org/index.php/OutOfTreeModules
>
> What version of GR do you have on your rPi, and how did you load it?
>
> For the tutorial you referenced, your Import should be for testpy and
> not squareme. Also, for the Variable test_var, the value should be
> squareme(12) without the "testpy." in front of it.
>
> 73,
> ---
> Barry Duggan KV4FV
> https://github.com/duggabe
>
> ---
> On Mon, 9 Nov 2020 10:13:53 -0500, Elmore's wrote:
>
> I have a problem as indicated in the subject line that has me totally
> baffled.
>
> I have created a noblock module with gr_modtool called softrock. This
> module has been successfully created and lives in
> /usr/local/lib/python2.7/dist-packages/softrock. It contains a file
> softrock_usb.py.
>
> I have an existing flowgraph in which I select an Import block. In the
> Import line in Properties I type "import softrock" (without quotes). I
> get the error "bad import syntax".
>
> I used the document TutorialPythonFunctions from the gnuradio wiki as
> guidance for this task.
>
> I have performed extensive searching for this issue but everything
> points back to simply adding the word "import" in front of the module name.
>
> I have tried completely clearing the text box thinking that there might
> be extraneous characters present.
>
> This seems so simple that I am baffled why it isn't working.
>
> My platform is a Raspberry Pi 3 with Raspbian Jessie.
>
> Thanks for any help you might give me.
>
> Jim
>
>
No comments:
Post a Comment