jhonnybonny / CleverJAM

Smart jammer based on SDR with frequency hopping 🐇
MIT License
168 stars 22 forks source link

Running jam.py gives AttributeError #1

Closed helmet21 closed 1 year ago

helmet21 commented 2 years ago

Getting this error on a fresh clone from the repository. Using a LimeSDR on Ubuntu 22.04. I changed the .grc file to run it with a LimeSDR sink but the error happened before that.

user@computer:~/CleverJAM-main$ python jam.py 
/home/user/CleverJAM-main/jam.py:11: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.version import StrictVersion
Traceback (most recent call last):
  File "/home/helmet/repos/CleverJAM-main/jam.py", line 280, in <module>
    main()
  File "/home/helmet/repos/CleverJAM-main/jam.py", line 258, in main
    tb = top_block_cls()
  File "/home/helmet/repos/CleverJAM-main/jam.py", line 121, in __init__
    firdes.WIN_BLACKMAN_HARRIS, #wintype
AttributeError: type object 'gnuradio.filter.filter_python.firdes' has no attribute 'WIN_BLACKMAN_hARRIS'

I fixed it by regenerating the py code using the sources/jam.grc file and placing the new py file "jamming_gen.py" (and renaming it to jam.py) in the "CleverJAM-main" folder. But that doesn't really fix the original issue.

alphafox02 commented 2 years ago

The grc files were created on/for Gnuradio 3.8, you’d have to adjust them like you’re seeing for 22.04 which is Gnuradio 3.10.

Maybe a 3.8/3.10 branch would be good. Also it’s good to open the osmocom block (is using it) and specify for example hackrf=0 in the device arguments. Not really applicable I don’t think to the lime as I assume you’re using a different block.

jhonnybonny commented 2 years ago

Hi , You're right ! I will soon add the ability to specify the sdr device in the CLI

jhonnybonny commented 1 year ago

We added 3.10 branch 😎