jcrona / gr-nfc

GNURadio blocks allowing decode NFC transactions
GNU General Public License v3.0
38 stars 16 forks source link

No version for GNU Radio 3.8 #4

Open Laykel opened 4 years ago

Laykel commented 4 years ago

The module doesn't currently support GR 3.8.

If I find the time, I might try to propose a port with the help of this guide, but if someone more experienced or with more time wants to do it, please go ahead.

I will keep you posted on whether I get the time.

Best regards.

Joecorleone commented 4 years ago

While the issue is quite old, there still appeared to be no support for gr 3.8

I tried to fix it by myself. Compilation completes successfully. Block appears in Gnuradio and can be added to the flow. However, when executing the flow graph, I get the following error:

Traceback (most recent call last):
  File "/home/reim/sdr/a1.py", line 304, in <module>
    main()
  File "/home/reim/sdr/a1.py", line 280, in main
    tb = top_block_cls()
  File "/home/reim/sdr/a1.py", line 210, in __init__
    self.nfc_modified_miller_decoder_cc_0 = nfc.modified_miller_decoder_cc(samp_rate)
AttributeError: module 'nfc' has no attribute 'modified_miller_decoder_cc'

Using "print(dir(nfc))" I checked and the nfc module has only the folliwng attributes: 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec'

I am new to building OOT modules. So I guess, I missed something. Any pointers would be very much appreciated.

Joecorleone commented 4 years ago

found the issue myself. It was a problem with how modules are imported in python2.7 and python3. Thanks

jcrona commented 3 years ago

Thx all, and sorry for the delay !

catalinalb commented 3 years ago

Can it run on GNU Radio 3.8 ? I am running Dragon OS and I cannot cmake-it. Thank you

KimlongSeng commented 3 years ago

Hey @Joecorleone how did you fix that issue?

KimlongSeng commented 3 years ago

Can it run on GNU Radio 3.8 ? I am running Dragon OS and I cannot cmake-it. Thank you

I believe it can, I have seen people get it to work, I am trying to get it to work on 3.8 and linux 20.04. I am currently have it recognize the miller_decoder but when I run it I get what @Joecorleone issue "AttributeError: module 'nfc' has no attribute 'modified_miller_decoder_cc'". if I get it to work I will put out a guide on how I get it to work.

Joecorleone commented 3 years ago

Hei, sorry for my slow response. It has been a while, that I have been working on this. I was running Ubuntu 20.04 I believe. Going through the forks of this library I found that there are 2 stating that it runs on gr3.8: https://github.com/t812206236/gr-nfc https://github.com/Jorgey7/gr-nfc I have not tried either, but they certainly look more elaborate, than what I did. Can you give these a try? If not I will create a fork, based on my changes.

KimlongSeng commented 3 years ago

Tired Both it doesn't recognize the modified miller decoder block. The way I get it to recognize is to go to the pull request that t81220626 make :https://github.com/t812206236/gr-nfc/tree/769bfd816f20267a89bb2a0c1aeabd2099ca308c

and download the zip file and install it. but it will who the AttributeError: module 'nfc' has no attribute 'modified_miller_decoder_cc'.

Thank you for responding :)

it was having the issue you talked about @Joecorleone

:~/Desktop$ python3 Python 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import sys print(dir(nfc)) Traceback (most recent call last): File "", line 1, in NameError: name 'nfc' is not defined import nfc print(dir(nfc)) ['doc', 'file', 'loader', 'name', 'package', 'path', 'spec']