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