Re: packed_to_unpacked--->chunks_to_symbols

that’d be fantastic Achilleas…!

I was just wondering how I could do all that stuff besore qpsk and
ofdm…!

I’m so thankful… :slight_smile:

I modified the way i create the array and used the endianness constant
as you said.

I’m trying to do what you suggested to check this first bit of work…
the point is that I don’t know how to set up the array of bytes that I
should write to the file for the single symbol received.

I think my problem is how to build up the “constellation_bytes” array in
the code below:

    Nfft=2048


    file_source_bytewise=gr.file_source(gr.sizeof_char,

“/mnt/root/gnuradio_datastreams/a.txt”)
file_sink=gr.file_sink(gr.sizeof_char,
“/mnt/root/gnuradio_datastreams/aa.txt”)
file_chunker=gr.packed_to_unpacked_bb(2,gr.GR_LSB_FIRST) #second
argument is endianness

    constellation=(1+1j,1-1j,-1-1j,-1+1j)
    constellation_bytes=(0x0,0x01,0x11,0x10)
    print constellation
    symbol_mapper=gr.chunks_to_symbols_bc(constellation, 1) #second

argument is dimension of the output symbol within the constllation
matrix

symbols_to_bytes=gr.constellation_decoder_cb(constellation,constellation_bytes)

    series_to_parallel=gr.stream_to_vector(8,Nfft)
    parallel_to_series=gr.vector_to_stream(8,Nfft)

    series_to_parallel_2=gr.stream_to_vector(8,Nfft)
    parallel_to_series_2=gr.vector_to_stream(8,Nfft)

    window=Numeric.ones(Nfft,Numeric.Float64)
    inverse_fft=gr.fft_vcc(Nfft,False,window )
    direct_fft=gr.fft_vcc(Nfft,True,window )

    gain=gr.multiply_const_cc(200)



    self.connect(file_source_bytewise,file_chunker,symbol_mapper)

self.connect(symbol_mapper,series_to_parallel,inverse_fft,parallel_to_series,gain)

self.connect(gain,series_to_parallel_2,direct_fft,parallel_to_series_2,symbols
_to_bytes,file_sink)

really what I don’t understand is how can I manage to write pairs of
bits instead of bytes to my file (I’m using qpsk…) do I need a
unpacked to packed block?

thanks a lot for help
vincenzo