anastas / gr-cdma

a cdma physical layer for Gnuradio
84 stars 39 forks source link

How to compile cdma module with existing gnuradio ? #35

Open patel999jay opened 4 years ago

patel999jay commented 4 years ago

Hi,

I had successfully installed gr-cdma module. Just had one question about instruction in the installation which says

-- For each of the blocks listed below, open them into gnuradio-companion and compile each one (using the button in GRC that looks like a sphere and a pyramid with an arrow between them) and then reload each time (using the button that looks like a circular arrow)

"cdma_tx_hier.grc",

"chopper_correlator.grc",

"cdma_rx_hier.grc",

-- Reload all blocks in grc

-- Load the application "cdma_txrx.grc" and have fun

How can i do that. Each files opened has missing modules. I am not very sure how do integrate this. compile_error

anastas commented 4 years ago

Apparently you have not installed cdma succesfully! The Import blocks in the above figure say "Import None" which means you have not succesfully imported the cdma module.

Open python: Do:

import cdma

if this command gives you an error, it is safe to assume you have not succcesfully installed the software.

patel999jay commented 4 years ago

Hi,

Thanks for your reply. Here is what i have after doing import cdma in python.

jay@jay-MS-7885:~/gr-cdma/apps$ python
Python 2.7.17 (default, Nov  7 2019, 10:07:09) 
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cdma
CDMA PARAMETERS : for adaptive coded modulation
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/cdma/__init__.py", line 34, in <module>
    import cdma_parameters
  File "/usr/local/lib/python2.7/dist-packages/cdma/cdma_parameters.py", line 110, in <module>
    local_header_obj = cdma.packet_header2(bits_per_header,length_tag_name,num_tag_name, header_mod.bits_per_symbol(),tcm_type_selector_default, "tcm_type") 
AttributeError: 'module' object has no attribute 'packet_header2'
patel999jay commented 4 years ago

Perfect, I looked after my cmake log and find out that my SWIG module is out of date and i did updated with that and now i think its working fine. Thanks a lot for your help.

cdma

anastas commented 4 years ago

In your initial attached figure you seemed to have been using gnuradio 3.8 which required python3 and is not compatible with gr-cdma.

Now you seem to be using gnuradio 3.7

Can you confirm that indeed this was the case.

In any case, which version of gnuradio are you using?

patel999jay commented 4 years ago

Hey Anastas,

You were right. if was newer version of gnuradio 3.8 which i build using ubuntu but i looked it over and seems like your module is not on python3 so i build gnuradio from source and checkout previous version, and try to import your module and it works.

patel999jay commented 4 years ago

@anastas : Are you planning to port this to newer version of gnuradio 3.8 by any chance ?