Hi Christophe and all, It works now! I guess it's like you and Marcus said I might have a mix of 3.8 and 3.9. I installed the GNU Radio from the binary package before. Today I removed it and reinstalled the GNU Radio from the source code (maint-3.9 branch). Then the fm_rx/tx examples work as expected.
Thank you Christophe, Marcus and Jay so much for the help! Have a good weekend! Best regards, Clark On Sun, Apr 11, 2021 at 3:45 AM Christophe Seguinot < christophe.segui...@orange.fr> wrote: > Hi > > - if fm_rx works with firdes.WIN_KAISER, it indicates that your > flowgraph use som GR3.8 codes. 3.9 should use window.WIN_KAISER > - the output of python3 fm_rx3.py also clearly indicates that the > window class is not the same in your install and in mine. yours is missing: > - 'WIN_BARTLETT', 'WIN_BLACKMAN', 'WIN_BLACKMAN_HARRIS', > 'WIN_BLACKMAN_hARRIS', 'WIN_FLATTOP', 'WIN_HAMMING', 'WIN_HANN', > 'WIN_KAISER', 'WIN_RECTANGULAR > > Did you install 3.8 before 3.9, may be you've got a mix of 3.8 and 3.9 ? > This can happen if your install from ppa on one side and for compiled > source for the other version. > > If this is the case all 3.8 code should be completely removed before > installing 3.9 > > We are close to a solution to your problem ! > > > On 11/04/2021 04:55, Clark Chiu wrote: > > Hi Christophe, > > I think I got the same result as you mentioned. > > $ locate fft_python: (it's more or less the same, the difference is the > version of python3) > > /usr/lib/python3/dist-packages/gnuradio/fft/ > fft_python.cpython-36m-x86_64-linux-gnu.so > > > $ python3 fm_rx3.py > > ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', > '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', > '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', > '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', > '__str__', '__subclasshook__', 'bartlett', 'blackman', 'blackman2', > 'blackman3', 'blackman4', 'blackman_harris', 'blackman_nuttal', > 'blackman_nuttall', 'blackmanharris', 'build', 'coswindow', 'exponential', > 'flattop', 'hamming', 'hann', 'hanning', 'kaiser', 'max_attenuation', > 'nuttal', 'nuttal_cfd', 'nuttall', 'nuttall_cfd', 'parzen', 'rectangular', > 'riemann', 'welch'] > > > pybind11_builtins.pybind11_type > > > window.__init_subclass__= <built-in method __init_subclass__ of > pybind11_type object at 0x27be6f8> > > > window.__init__= <slot wrapper '__init__' of > 'gnuradio.fft.fft_python.window' objects> > > > > I got a suggestion from Jay, which is to change the last argument of Taps > from "window.WIN_KAISER" to "firdes.WIN_KAISER". > This works for the fm_rx! It can run with the dummy.dat you sent earlier. > However, for fm_tx, it is supposed to generate dummy.dat, it generates an > empty file instead... > > > Best regards, > Clark > > On Sat, Apr 10, 2021 at 8:40 AM Christophe Seguinot < > christophe.segui...@orange.fr> wrote: > >> I'm not used to Python bindings and don't really konws how to debug this. >> It look like your install is nor importing the right "window" class. >> >> Can you please run this python code and the linux command: >> >> - locate fft_python (available if you installed locate package with *sudo >> apt-get install locate*, answer below >> - /usr/lib/python3/dist-packages/gnuradio/fft/ >> fft_python.cpython-38-x86_64-linux-gnu.so >> >> >> - python3 fm_rx3.py (only import window class and list its attributes >> >> you should get for the python code, something like this >> >> ['WIN_BARTLETT', 'WIN_BLACKMAN', 'WIN_BLACKMAN_HARRIS', >> 'WIN_BLACKMAN_hARRIS', 'WIN_FLATTOP', 'WIN_HAMMING', 'WIN_HANN', >> 'WIN_KAISER', 'WIN_RECTANGULAR', '__class__', '__delattr__', '__dir__', >> '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', >> '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', >> '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', >> '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', >> 'bartlett', 'blackman', 'blackman2', 'blackman3', 'blackman4', >> 'blackman_harris', 'blackman_nuttal', 'blackman_nuttall', 'blackmanharris', >> 'build', 'coswindow', 'exponential', 'flattop', 'hamming', 'hann', >> 'hanning', 'kaiser', 'max_attenuation', 'nuttal', 'nuttal_cfd', 'nuttall', >> 'nuttall_cfd', 'parzen', 'rectangular', 'riemann', 'welch', 'win_type'] >> >> pybind11_builtins.pybind11_type >> >> window.__init_subclass__= <built-in method __init_subclass__ of >> pybind11_type object at 0x1753260> >> >> window.__init__= <slot wrapper '__init__' of >> 'gnuradio.fft.fft_python.window' objects> >> >> >> Regards >> >> On 09/04/2021 22:17, Clark Chiu wrote: >> >> Hi Christophe, >> >> After I run "python3 fm_rx.py", I got this message: >> ========== >> Traceback (most recent call last): >> File "fm_rx.py", line 508, in <module> >> main() >> File "fm_rx.py", line 486, in main >> tb = top_block_cls() >> File "fm_rx.py", line 252, in __init__ >> window.WIN_BLACKMAN_hARRIS, #wintype >> AttributeError: type object 'gnuradio.fft.fft_python.window' has no >> attribute 'WIN_BLACKMAN_hARRIS' >> ========== >> >> Seems like it couldn't find the correct window type...? >> >> >> Best regards, >> Clark >> >> >> On Fri, Apr 9, 2021 at 12:50 PM Christophe Seguinot < >> christophe.segui...@orange.fr> wrote: >> >>> Could you please copy these files for som folder: >>> >>> - dummy.dat is generated by fm_tx.grc >>> - fm_rx.py is generated from frm;_rx.grc flowgraph >>> >>> and try to run the .py file: >>> >>> - python3 fm_rx.py >>> >>> may be you could get a more explicit error for line with >>> firdes.low_pass_2(self.volume...) >>> >>> >>> On 09/04/2021 18:11, Clark Chiu wrote: >>> >>> Hi Christophe and Marcus, >>> >>> Thank you for the reply. I tried the fm_tx_2.grc and it has the same >>> error message as below. >>> ======= >>> Block: pfb_arb_resampler_xxx_0 >>> Aspect: Param 'Taps' >>> Message: Expression None is invalid for type'real_vector'. >>> ======= >>> Also the files between master and maint-3.9 are identical. >>> "git diff maint-3.9 master gr-analog/examples/fm_?x.grc" >>> >>> I don't think I had a previous version of GNU Radio before. I installed >>> GNU Radio from the binary package. I tried to delete the cache file and the >>> cache folder then restart GRC but it is the same. >>> >>> Any other suggestions? >>> >>> >>> Best regards, >>> Clark >>> >>> >>> On Fri, Apr 9, 2021 at 9:19 AM Christophe Seguinot < >>> christophe.segui...@orange.fr> wrote: >>> >>>> Hi Clark >>>> >>>> I'm running under Ubuntu 20.04 and GNURadio 3.9 fresh install (my >>>> Computer and HDD were out for several days an I had to reinstall Linux) >>>> >>>> I downloaded maint-3.8 fm_tx.grc and fm_rx.grc. They worked at the >>>> first run without any problem. (I only had to remove >>>> ~/.cache/grc_gnuradio/cache.json cahce file because I previously used >>>> another version of GR on this computer) >>>> >>>> I attached my fm_tx_2.grc file (the downloaded one, renamed and >>>> runned/saved under GR3.9) >>>> >>>> 1. try to run this .grc file. >>>> 2. if it run, can you send your file to see where the issue come >>>> from? >>>> 3. if it doesn't run .. ?? >>>> >>>> Regards Christophe >>>> On 08/04/2021 21:24, Clark Chiu wrote: >>>> >>>> Btw, I am using Ubuntu 18.04 >>>> >>>> On Wed, Apr 7, 2021 at 11:39 PM Clark Chiu <clark...@gmail.com> wrote: >>>> >>>>> Hi Marcus, >>>>> >>>>> I am using 3.9 for the GNU Radio. I ran the example from the latest >>>>> master branch of github. I see from the CHANGELOG.md it should be the same >>>>> 3.9 right? >>>>> Thanks. >>>>> >>>>> Best regards, >>>>> Kuan-lin >>>>> >>>>> On Wed, Apr 7, 2021 at 7:12 PM Marcus Müller <muel...@kit.edu> wrote: >>>>> >>>>>> Hi Clark, >>>>>> >>>>>> which version of GNU Radio are you using, and is the folder from >>>>>> which you're taking these >>>>>> examples from the same version? >>>>>> >>>>>> Thank you for your answer! >>>>>> Marcus >>>>>> >>>>>> On 07.04.21 23:35, Clark Chiu wrote: >>>>>> > Hello, >>>>>> > >>>>>> > I am new to GNU Radio and I am trying to understand more by >>>>>> checking the fm_rx and fm_tx >>>>>> > examples in the gnuradio/gr-analog/examples folder. I open these >>>>>> two grc files from the >>>>>> > GNU Radio Companion. Out of box, there is an error message in >>>>>> Polyphase Arbitrary >>>>>> > Resampler saying Expression None is invalid for type `real_vector` >>>>>> of parameter `Taps`. I >>>>>> > tried to google around the forum and the internet but I couldn't >>>>>> find anything useful to >>>>>> > fix this. I doubt it has something to do with the last parameter >>>>>> "window.WIN_KAISER" but I >>>>>> > am not sure. >>>>>> > >>>>>> > Could anyone give me some pointers? >>>>>> > Thank you in advance. >>>>>> > >>>>>> > >>>>>> > Best regards, >>>>>> > Clark >>>>>> >>>>>>