How to add a new block

[email protected]:~/gr-howto$ gr_modtool makexml square_ff
GNU Radio module name identified: howto
Warning: This is an experimental feature. Don’t expect any magic.
Searching for matching files in lib/:
Making GRC bindings for lib/square_ff_impl.cc…
Traceback (most recent call last):
File “/usr/local/bin/gr_modtool”, line 47, in
main()
File “/usr/local/bin/gr_modtool”, line 39, in main
modtool.run()
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py”,
line 66, in run
(params, iosig, blockname) = self._parse_cc_h(f)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py”,
line 165, in _parse_cc_h
return (parser.read_params(), parser.read_io_signature(), blockname)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/parser_cc_block.py”,
line 81, in read_io_signature
iosig[‘in’] =
_figure_out_iotype_and_vlen(iosig_match.group(‘incall’),
AttributeError: ‘NoneType’ object has no attribute ‘group’

Hi Bala,

are you using an old gr_modtool that you found somewhere online?
You should never do that. When you install GNU Radio, it will install a
version of gr_modtool that works with your GNU Radio version.

Best regards,
Marcus

On 03.09.2015 08:00, Marcus M. wrote:

are you using an old gr_modtool that you found somewhere online?
You should never do that. When you install GNU Radio, it will install a
version of gr_modtool that works with your GNU Radio version.

Also, you’re just posting output without any question or additional
information. Please read
http://gnuradio.org/redmine/projects/gnuradio/wiki/ReportingErrors,
it’ll help you get feedback.

M

Hi,

I have used bootable pendrive for GNURadio and UHD, and while creating a
new square block following the instructions given in gnuradio wiki. I
get the following error given below, for the last command “gr_modtool
makexml square_ff”.

Error:
[email protected]:~/gr-howto$ gr_modtool makexml square_ff
GNU Radio module name identified: howto
Warning: This is an experimental feature. Don’t expect any magic.
Searching for matching files in lib/:
Making GRC bindings for lib/square_ff_impl.cc…
Traceback (most recent call last):
File “/usr/local/bin/gr_modtool”, line 47, in
main()
File “/usr/local/bin/gr_modtool”, line 39, in main
modtool.run()
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py”,
line 66, in run
(params, iosig, blockname) = self._parse_cc_h(f)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py”,
line 165, in _parse_cc_h
return (parser.read_params(), parser.read_io_signature(), blockname)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/parser_cc_block.py”,
line 81, in read_io_signature
iosig[‘in’] =
_figure_out_iotype_and_vlen(iosig_match.group(‘incall’),
AttributeError: ‘NoneType’ object has no attribute ‘group’

Thank you

Hi,
Can you please help me? I am facing one problem. I am using the below
version.

[email protected]:~/gr-howto$ gnuradio-companion --version
GNU Radio Companion 3.7.9git-171-g77083c5d

This program is part of GNU Radio
GRC comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it.

I was adding the very first simple block (given on the gnuradio site)
in that in very first case I didn’t got any failed test case.

[email protected]:~/gr-howto/build$ ctest -V -R square
UpdateCTestConfiguration from
:/home/mayank/gr-howto/build/DartConfiguration.tcl
UpdateCTestConfiguration from
:/home/mayank/gr-howto/build/DartConfiguration.tcl
Test project /home/mayank/gr-howto/build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph…
Checking test dependency graph end
test 2
Start 2: qa_square_ff

2: Test command: /bin/sh
“/home/mayank/gr-howto/build/python/qa_square_ff_test.sh”
2: Test timeout computed to be: 9.99988e+06
2: .
2:

2: Ran 1 test in 0.002s
2:
2: OK
1/1 Test #2: qa_square_ff … Passed 0.31 sec

The following tests passed:
qa_square_ff

100% tests passed, 0 tests failed out of 1

Total Test time (real) = 0.31 sec

So I preceded to add xml.
[email protected]:~/gr-howto$ gr_modtool makexml square_ff

but the error is coming as per follwing:
[email protected]:~/gr-howto$ gr_modtool makexml square_ff
GNU Radio module name identified: howto
Warning: This is an experimental feature. Don’t expect any magic.
Searching for matching files in lib/:
Making GRC bindings for lib/square_ff_impl.cc…
Traceback (most recent call last):
File “/usr/local/bin/gr_modtool”, line 46, in
main()
File “/usr/local/bin/gr_modtool”, line 38, in main
modtool.run()
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py”,
line 75, in run
(params, iosig, blockname) = self._parse_cc_h(f)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py”,
line 174, in _parse_cc_h
return (parser.read_params(), parser.read_io_signature(), blockname)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/parser_cc_block.py”,
line 81, in read_io_signature
iosig[‘in’] =
_figure_out_iotype_and_vlen(iosig_match.group(‘incall’),
AttributeError: ‘NoneType’ object has no attribute ‘group’

Please help me solving this error.

Thanks in advance.

Bala vishnu Jagadeesh wrote in post #1178885:

Hi,

I have used bootable pendrive for GNURadio and UHD, and while creating a
new square block following the instructions given in gnuradio wiki. I
get the following error given below, for the last command “gr_modtool
makexml square_ff”.

Error:
[email protected]:~/gr-howto$ gr_modtool makexml square_ff
GNU Radio module name identified: howto
Warning: This is an experimental feature. Don’t expect any magic.
Searching for matching files in lib/:
Making GRC bindings for lib/square_ff_impl.cc…
Traceback (most recent call last):
File “/usr/local/bin/gr_modtool”, line 47, in
main()
File “/usr/local/bin/gr_modtool”, line 39, in main
modtool.run()
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py”,
line 66, in run
(params, iosig, blockname) = self._parse_cc_h(f)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/modtool_makexml.py”,
line 165, in _parse_cc_h
return (parser.read_params(), parser.read_io_signature(), blockname)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/modtool/parser_cc_block.py”,
line 81, in read_io_signature
iosig[‘in’] =
_figure_out_iotype_and_vlen(iosig_match.group(‘incall’),
AttributeError: ‘NoneType’ object has no attribute ‘group’

Thank you

Dear Bala,

I don’t know what’s wrong with makexml utility but you can try the steps
below:
go to your gr-howto folder
then go to grc folder
open the howto_square_ff.xml

edit like following

<?xml version="1.0"?> Square ff howto_square_ff HOWTO import howto howto.square_ff() in float out float

then run the following command
cd build/
sudo make install
sudo ldconfig

if it doesn’t work let me know.