Re: [Discuss-gnuradio] HELP with "packet header parser"

2019-01-08 Thread Cinaed Simson
I'm assuming the reason you're not looking at the rx_ofdm.py code is
because you don't have the rx_ofdm.py code.

You can use

  grcc -d . rx_ofdm.grc

to generate the python code.

-- Cinaed


On 1/6/19 2:10 AM, Alban Meffre wrote:
> hi
> i does not work because the packet header parser expect an
> "packet_header_default" object instead of a "header_format_base" object
> bob
> 
> Le dim. 6 janv. 2019 à 02:50, Cinaed Simson  > a écrit :
> 
> On 1/5/19 2:26 PM, Alban Meffre wrote:
> > ok sorry my mistake i got "packet_header_default" and
> > "header_format_default" mixed up
> > bob
> 
> The error message at the bottom indicates the wrong number arguments.
> 
>   digital.header_format_default('1101001110010001', 0)
> 
> Try
> 
>   digital.header_format_default('1101001110010001', 0, bps)
> 
> where bps is the number of bits per symbol for your problem.
> 
> See
> 
>    Default Header Format Obj.
> 
> in the grc.
> 
> -- Cinaed
> 
> 
> 
> 
> >
> > Le sam. 5 janv. 2019 à 22:13, Alban Meffre  
> > >> a écrit :
> >
> >     hi all
> >
> >     i try to figure out how to use the "packet header parser" block
> >     as a formatter i use
> >     "digital.header_format_default('1101001110010001', 0)"
> >
> >     when i launch i get the error
> >     "
> >     Traceback (most recent call last):
> >       File "/Users/alban/gnuradio/top_block.py", line 146, in 
> >     main()
> >       File "/Users/alban/gnuradio/top_block.py", line 134, in main
> >     tb = top_block_cls()
> >       File "/Users/alban/gnuradio/top_block.py", line 71, in __init__
> >     self.digital_packet_headerparser_b_0 =
> >     digital.packet_headerparser_b(hdr_format_dec_0)
> >       File
> >   
>  
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/digital/digital_swig2.py",
> >     line 2651, in make
> >     return _digital_swig2.packet_headerparser_b_make(*args)
> >     NotImplementedError: Wrong number or type of arguments for
> >     overloaded function 'packet_headerparser_b_make'.
> >       Possible C/C++ prototypes are:
> >    
> >   
>  
> gr::digital::packet_headerparser_b::make(gr::digital::packet_header_default::sptr
> >     const &)
> >     gr::digital::packet_headerparser_b::make(long,std::string
> const &)
> >     "
> >
> >
> >     in the "rx_ofdm" example supplied with gnuradio, the  "packet
> header
> >     parser" use the formatter  "header_formatter.base()"
> >
> >     i do not find any documentation about the base() method
> >     as you can see the doxygen is empty
> >   
>  
> https://www.gnuradio.org/doc/doxygen/classgr_1_1digital_1_1header__format__base.html#a5a7b2939707146f2b28d7e91e04103c2
> >
> >     if i add ".base()" to the formatter in my top_block i get an
> error too
> >
> >     please someone can explain me hox to use this block ?
> >     thank you all
> >     --
> >     Alban MEFFRE F4GSW
> >
> >
> >
> >
> > --
> > Alban MEFFRE F4GSW
> >
> >
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org 
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
> 
> 
> 
> -- 
> Alban MEFFRE F4GSW
> 
> 
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
##
# GNU Radio Python Flow Graph
# Title: OFDM Rx
# Description: Example of an OFDM receiver
# Generated: Mon Jan  7 17:56:51 2019
##

from gnuradio import analog
from gnuradio import blocks
from gnuradio import channels
from gnuradio import digital
from gnuradio import eng_notation
from gnuradio import fft
from gnuradio import gr
from gnuradio.digital.utils import tagged_streams
from gnuradio.eng_option import eng_option
from gnuradio.fft import window
from gnuradio.filter import firdes
from optparse import OptionParser
import numpy


class rx_ofdm(gr.top_block):

def __init__(self):
gr.top_block.__init__(self, "OFDM Rx")

##
# Variables
##
self.pilot_symbols = pilot_symbols = ((1, 1, 1, -1,),)
self.pilot_carriers = pilot_carriers = ((-21, -7, 7, 21,),)
self.payload_mod = payload_mod = digital.constellation_qpsk()
self.packet_length_tag_key = 

Re: [Discuss-gnuradio] HELP with "packet header parser"

2019-01-07 Thread Cinaed Simson
Okay, well you'll have to post your flowgraph and I'll try to help you.

Or post your python code and maybe someone on the list may be able to
help you.

-- Cinaed


On 1/6/19 2:10 AM, Alban Meffre wrote:
> hi
> i does not work because the packet header parser expect an
> "packet_header_default" object instead of a "header_format_base" object
> bob
> 
> Le dim. 6 janv. 2019 à 02:50, Cinaed Simson  > a écrit :
> 
> On 1/5/19 2:26 PM, Alban Meffre wrote:
> > ok sorry my mistake i got "packet_header_default" and
> > "header_format_default" mixed up
> > bob
> 
> The error message at the bottom indicates the wrong number arguments.
> 
>   digital.header_format_default('1101001110010001', 0)
> 
> Try
> 
>   digital.header_format_default('1101001110010001', 0, bps)
> 
> where bps is the number of bits per symbol for your problem.
> 
> See
> 
>    Default Header Format Obj.
> 
> in the grc.
> 
> -- Cinaed
> 
> 
> 
> 
> >
> > Le sam. 5 janv. 2019 à 22:13, Alban Meffre  
> > >> a écrit :
> >
> >     hi all
> >
> >     i try to figure out how to use the "packet header parser" block
> >     as a formatter i use
> >     "digital.header_format_default('1101001110010001', 0)"
> >
> >     when i launch i get the error
> >     "
> >     Traceback (most recent call last):
> >       File "/Users/alban/gnuradio/top_block.py", line 146, in 
> >     main()
> >       File "/Users/alban/gnuradio/top_block.py", line 134, in main
> >     tb = top_block_cls()
> >       File "/Users/alban/gnuradio/top_block.py", line 71, in __init__
> >     self.digital_packet_headerparser_b_0 =
> >     digital.packet_headerparser_b(hdr_format_dec_0)
> >       File
> >   
>  
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/digital/digital_swig2.py",
> >     line 2651, in make
> >     return _digital_swig2.packet_headerparser_b_make(*args)
> >     NotImplementedError: Wrong number or type of arguments for
> >     overloaded function 'packet_headerparser_b_make'.
> >       Possible C/C++ prototypes are:
> >    
> >   
>  
> gr::digital::packet_headerparser_b::make(gr::digital::packet_header_default::sptr
> >     const &)
> >     gr::digital::packet_headerparser_b::make(long,std::string
> const &)
> >     "
> >
> >
> >     in the "rx_ofdm" example supplied with gnuradio, the  "packet
> header
> >     parser" use the formatter  "header_formatter.base()"
> >
> >     i do not find any documentation about the base() method
> >     as you can see the doxygen is empty
> >   
>  
> https://www.gnuradio.org/doc/doxygen/classgr_1_1digital_1_1header__format__base.html#a5a7b2939707146f2b28d7e91e04103c2
> >
> >     if i add ".base()" to the formatter in my top_block i get an
> error too
> >
> >     please someone can explain me hox to use this block ?
> >     thank you all
> >     --
> >     Alban MEFFRE F4GSW
> >
> >
> >
> >
> > --
> > Alban MEFFRE F4GSW
> >
> >
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org 
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
> 
> 
> 
> -- 
> Alban MEFFRE F4GSW
> 
> 
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] HELP with "packet header parser"

2019-01-06 Thread Alban Meffre
hi
i does not work because the packet header parser expect an
"packet_header_default" object instead of a "header_format_base" object
bob

Le dim. 6 janv. 2019 à 02:50, Cinaed Simson  a
écrit :

> On 1/5/19 2:26 PM, Alban Meffre wrote:
> > ok sorry my mistake i got "packet_header_default" and
> > "header_format_default" mixed up
> > bob
>
> The error message at the bottom indicates the wrong number arguments.
>
>   digital.header_format_default('1101001110010001', 0)
>
> Try
>
>   digital.header_format_default('1101001110010001', 0, bps)
>
> where bps is the number of bits per symbol for your problem.
>
> See
>
>Default Header Format Obj.
>
> in the grc.
>
> -- Cinaed
>
>
>
>
> >
> > Le sam. 5 janv. 2019 à 22:13, Alban Meffre  > > a écrit :
> >
> > hi all
> >
> > i try to figure out how to use the "packet header parser" block
> > as a formatter i use
> > "digital.header_format_default('1101001110010001', 0)"
> >
> > when i launch i get the error
> > "
> > Traceback (most recent call last):
> >   File "/Users/alban/gnuradio/top_block.py", line 146, in 
> > main()
> >   File "/Users/alban/gnuradio/top_block.py", line 134, in main
> > tb = top_block_cls()
> >   File "/Users/alban/gnuradio/top_block.py", line 71, in __init__
> > self.digital_packet_headerparser_b_0 =
> > digital.packet_headerparser_b(hdr_format_dec_0)
> >   File
> >
>  
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/digital/digital_swig2.py",
> > line 2651, in make
> > return _digital_swig2.packet_headerparser_b_make(*args)
> > NotImplementedError: Wrong number or type of arguments for
> > overloaded function 'packet_headerparser_b_make'.
> >   Possible C/C++ prototypes are:
> >
> >
>  
> gr::digital::packet_headerparser_b::make(gr::digital::packet_header_default::sptr
> > const &)
> > gr::digital::packet_headerparser_b::make(long,std::string const
> &)
> > "
> >
> >
> > in the "rx_ofdm" example supplied with gnuradio, the  "packet header
> > parser" use the formatter  "header_formatter.base()"
> >
> > i do not find any documentation about the base() method
> > as you can see the doxygen is empty
> >
> https://www.gnuradio.org/doc/doxygen/classgr_1_1digital_1_1header__format__base.html#a5a7b2939707146f2b28d7e91e04103c2
> >
> > if i add ".base()" to the formatter in my top_block i get an error
> too
> >
> > please someone can explain me hox to use this block ?
> > thank you all
> > --
> > Alban MEFFRE F4GSW
> >
> >
> >
> >
> > --
> > Alban MEFFRE F4GSW
> >
> >
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
>
>

-- 
Alban MEFFRE F4GSW
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] HELP with "packet header parser"

2019-01-05 Thread Cinaed Simson
On 1/5/19 2:26 PM, Alban Meffre wrote:
> ok sorry my mistake i got "packet_header_default" and
> "header_format_default" mixed up
> bob

The error message at the bottom indicates the wrong number arguments.

  digital.header_format_default('1101001110010001', 0)

Try

  digital.header_format_default('1101001110010001', 0, bps)

where bps is the number of bits per symbol for your problem.

See

   Default Header Format Obj.

in the grc.

-- Cinaed




> 
> Le sam. 5 janv. 2019 à 22:13, Alban Meffre  > a écrit :
> 
> hi all
> 
> i try to figure out how to use the "packet header parser" block
> as a formatter i use
> "digital.header_format_default('1101001110010001', 0)"
> 
> when i launch i get the error
> "
> Traceback (most recent call last):
>   File "/Users/alban/gnuradio/top_block.py", line 146, in 
>     main()
>   File "/Users/alban/gnuradio/top_block.py", line 134, in main
>     tb = top_block_cls()
>   File "/Users/alban/gnuradio/top_block.py", line 71, in __init__
>     self.digital_packet_headerparser_b_0 =
> digital.packet_headerparser_b(hdr_format_dec_0)
>   File
> 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/digital/digital_swig2.py",
> line 2651, in make
>     return _digital_swig2.packet_headerparser_b_make(*args)
> NotImplementedError: Wrong number or type of arguments for
> overloaded function 'packet_headerparser_b_make'.
>   Possible C/C++ prototypes are:
>    
> 
> gr::digital::packet_headerparser_b::make(gr::digital::packet_header_default::sptr
> const &)
>     gr::digital::packet_headerparser_b::make(long,std::string const &)
> "
> 
> 
> in the "rx_ofdm" example supplied with gnuradio, the  "packet header
> parser" use the formatter  "header_formatter.base()"
> 
> i do not find any documentation about the base() method
> as you can see the doxygen is empty
> 
> https://www.gnuradio.org/doc/doxygen/classgr_1_1digital_1_1header__format__base.html#a5a7b2939707146f2b28d7e91e04103c2
> 
> if i add ".base()" to the formatter in my top_block i get an error too
> 
> please someone can explain me hox to use this block ?
> thank you all
> -- 
> Alban MEFFRE F4GSW
> 
> 
> 
> 
> -- 
> Alban MEFFRE F4GSW
> 
> 
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] HELP with "packet header parser"

2019-01-05 Thread Alban Meffre
ok sorry my mistake i got "packet_header_default" and
"header_format_default" mixed up
bob

Le sam. 5 janv. 2019 à 22:13, Alban Meffre  a écrit :

> hi all
>
> i try to figure out how to use the "packet header parser" block
> as a formatter i use
> "digital.header_format_default('1101001110010001', 0)"
>
> when i launch i get the error
> "
> Traceback (most recent call last):
>   File "/Users/alban/gnuradio/top_block.py", line 146, in 
> main()
>   File "/Users/alban/gnuradio/top_block.py", line 134, in main
> tb = top_block_cls()
>   File "/Users/alban/gnuradio/top_block.py", line 71, in __init__
> self.digital_packet_headerparser_b_0 =
> digital.packet_headerparser_b(hdr_format_dec_0)
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/digital/digital_swig2.py",
> line 2651, in make
> return _digital_swig2.packet_headerparser_b_make(*args)
> NotImplementedError: Wrong number or type of arguments for overloaded
> function 'packet_headerparser_b_make'.
>   Possible C/C++ prototypes are:
>
> gr::digital::packet_headerparser_b::make(gr::digital::packet_header_default::sptr
> const &)
> gr::digital::packet_headerparser_b::make(long,std::string const &)
> "
>
>
> in the "rx_ofdm" example supplied with gnuradio, the  "packet header
> parser" use the formatter  "header_formatter.base()"
>
> i do not find any documentation about the base() method
> as you can see the doxygen is empty
>
> https://www.gnuradio.org/doc/doxygen/classgr_1_1digital_1_1header__format__base.html#a5a7b2939707146f2b28d7e91e04103c2
>
> if i add ".base()" to the formatter in my top_block i get an error too
>
> please someone can explain me hox to use this block ?
> thank you all
> --
> Alban MEFFRE F4GSW
>
>
>

-- 
Alban MEFFRE F4GSW
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] HELP with "packet header parser"

2019-01-05 Thread Alban Meffre
hi all

i try to figure out how to use the "packet header parser" block
as a formatter i use
"digital.header_format_default('1101001110010001', 0)"

when i launch i get the error
"
Traceback (most recent call last):
  File "/Users/alban/gnuradio/top_block.py", line 146, in 
main()
  File "/Users/alban/gnuradio/top_block.py", line 134, in main
tb = top_block_cls()
  File "/Users/alban/gnuradio/top_block.py", line 71, in __init__
self.digital_packet_headerparser_b_0 =
digital.packet_headerparser_b(hdr_format_dec_0)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/digital/digital_swig2.py",
line 2651, in make
return _digital_swig2.packet_headerparser_b_make(*args)
NotImplementedError: Wrong number or type of arguments for overloaded
function 'packet_headerparser_b_make'.
  Possible C/C++ prototypes are:

gr::digital::packet_headerparser_b::make(gr::digital::packet_header_default::sptr
const &)
gr::digital::packet_headerparser_b::make(long,std::string const &)
"


in the "rx_ofdm" example supplied with gnuradio, the  "packet header
parser" use the formatter  "header_formatter.base()"

i do not find any documentation about the base() method
as you can see the doxygen is empty
https://www.gnuradio.org/doc/doxygen/classgr_1_1digital_1_1header__format__base.html#a5a7b2939707146f2b28d7e91e04103c2

if i add ".base()" to the formatter in my top_block i get an error too

please someone can explain me hox to use this block ?
thank you all
-- 
Alban MEFFRE F4GSW
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio