Re: How to debug GNU Radio's C++ program from source code?
Step 1: Open the source tree in VScode. What does the source tree here refer to? A directory? I am using GNUradio built from source installation. Which directory should I open? Is it the one before or after the installation? Where is the source tree after installation? -- source tree referring to the level of code where you clone it from github - https://github.com/gnuradio/gnuradio/ <-- at that level -- the source tree is the same before and after installation, you just compile into a build/ directory and install the compiled libraries somewhere in /usr or a custom prefix. But the source stays where it is Step 2: Is the setting of "args" the absolute path of the Python program I want to debug? -- Yes Whether it can exist anywhere on the computer, but after I entered the path, the font turned red. Obviously, something went wrong. -- be sure to enclose in double quotes for this json file One last question: If I want to modify the function of an existing module, do I create a new OOT module and then copy the content of the original module to modify it? -- that is one way to do it. if it something that you are fixing within gnuradio and plan to push back to the main repo, then you can change things directly in the gnuradio source, but if it is just for experimentation or adding some non-standard functionality, OOT will save you some compile time and make it easier to debug. Josh On Tue, Aug 3, 2021 at 10:23 PM 能书能言 <2127629...@qq.com> wrote: > Hi, > Thank you very much for your suggestions, this is exactly what I want, I > am a novice, do not have a lot of experience in program debugging, and > there are some details I haven't figured out. > > Step 1: Open the source tree in VScode. What does the source tree here > refer to? A directory? I am using GNUradio built from source installation. > Which directory should I open? Is it the one before or after the > installation? Where is the source tree after installation? > > Step 2: Is the setting of "args" the absolute path of the Python program I > want to debug? Whether it can exist anywhere on the computer, but after I > entered the path, the font turned red. Obviously, something went wrong. > > One last question: If I want to modify the function of an existing module, > do I create a new OOT module and then copy the content of the original > module to modify it? > Sincerely > > > -- 原始邮件 -- > *发件人:* "Josh Morman" ; > *发送时间:* 2021年8月3日(星期二) 晚上9:48 > *收件人:* "能书能言"<2127629...@qq.com>; > *抄送:* "discuss-gnuradio"; > *主题:* Re: How to debug GNU Radio's C++ program from source code? > > Hello! > > Even though GNU Radio has python bindings with swig or pybind11, the > underlying code c++ symbols are still accessible with GDB. Using Visual > Studio Code and GNU Radio compiled from source with Debug Symbols this is > pretty straightforward: > 1) Open up the source tree of gnuradio in visual studio code > 2) edit the launch.json and add a C++/GDB configuration where program is > python and args is the output of the GRC rendering > { > "name": "(gdb) Launch", > "type": "cppdbg", > "request": "launch", > "program": "/usr/bin/python3", > "args": ["/path/to/grc_output.py"], > "stopAtEntry": false, > "cwd": "${workspaceFolder}", > "environment": [], > "externalConsole": false, > "MIMode": "gdb", > "setupCommands": [ > { > "description": "Enable pretty-printing for gdb", > "text": "-enable-pretty-printing", > "ignoreFailures": true > } > ] > }, > 3) put the breakpoint where you want to hit - note that GR will have been > compiled with optimizations, so the breakpoints might be a bit funky > 4) F5 to run the application > > If you are debugging your own OOT, this makes it even simpler because you > can compile as "-DCMAKE_BUILD_TYPE=Debug" and then your breakpoints will be > very predictable - in this case you just open up VS code from the root of > your project and follow the same steps. > > Hope this helps. > > Josh > > > > On Tue, Aug 3, 2021 at 8:41 AM 能书能言 <2127629...@qq.com> wrote: > >> Hi guys! >> I want to know how to debug c++ code in gnuradio. As far as I know, after >> we run GRC, a Python file will be generated. The Python file connects >> various blocks, but if I debug this Python file directly, I cannot observe >> the internal operations of the C++ block. I want to know if there is any >> way to let me Can I see the contents of the c++work function when I run the >> python file? It's like executing a pure Python or pure C++ program. >> If this is not possible because of the swig connection method, how can I >> observe the work of a C++ block's work function? If I look at the code >> directly, it is definitely not accurate enough. Can I write a demo by >> myself? Or other ways. >
Switching between RX and TX - N210
Hello everyone, I’m currently using an N210 with the Basic RX/TX cards and trying to send and receive FT8 messages using gnuradio and wsjt-x. I have successfully completed this but have noticed some issues that I haven’t been able to figure out. First, I’m having trouble figuring out how to use the SDR in half-duplex mode. Currently both the usrp sink/source blocks are set to TX/RX mode in gnuradio, however when I switch from receiving to transmitting I have verified that the SDR is still receiving signals and in fact I’m receiving the signal I’m putting out. What I’m trying to accomplish is that when I go to transmit, the receiver turns off and no data comes through on the RX side. Second, I’m having some issues with the timing of the audio being sent from wsjt-x to my SDR through gnuradio. I have found that when using rational resamplers and selector blocks in my GRC set up that the audio will be delayed and cut off when sending it from wsjt-x to the SDR. Additionally after successfully transmitting for some time and then turning off the transmit option and waiting a while, when I try to transmit again the audio is delayed and cut off in getting to the SDR. Thanks in advance.
Re: Working Narrowband FM examples?
Hi Mike, That's exactly what I was looking for, thanks. However: I swapped out the USRP source for an osmocom source, and it seems to be "mostly working" but the audio comes through like the adults from the old Charlie Brown show from when I was a kid. Instead of clearly-intelligible speech like I can hear through GQRX, using gnuradio I can only get speech that sounds like "mwah mwah mwah mwah" Attached is a .png of my flowgraph, hope it's not too large for the list (about 100kB). Appreciate any advice anyone might have. Nathan On 8/3/21 3:47 AM, Mike Markowski wrote: Nathan, When I was refreshing my gnuradio awareness - I hesitate to use the word "skills" :-) - I ran through the official tutorials and modified them as needed to work with a usrp b210. On the page https://udel.edu/~mm/gr/ about halfway down is the title "Gnuradio Official Tutorials" with the link "Here are my versions" where you'll find nbfm.grc. It's very simple, using filter/squelch/NBFM Receive block and runs here on grc 3.8.2.0, a promising sign. Hope it's useful, Mike On 8/3/21 2:40 AM, Nathan Van Ymeren wrote: Hello, I am seeking a working NBFM receiver example, as the one on the wiki[0] produces unintelligible output. I am confident that my hardware is functioning properly because if I tune to the same frequency (162.525 MHz ) in gqrx, I can hear the weather radio broadcasts clearly. I am on OpenSUSE Tumbleweed, running gnuradio 3.8.x with a HackRF One and a standard telescopic antenna. I have reproduced [0] verbatim except with the following change: Instead of a ZeroMQ source, I am using an osmocom source for my hackrf. I’ve also tried adapting the flowgraph from the “SDR with HackRF” tutorial[1], which implements a wideband FM receiver in gnuradio, but I wasn’t able to make it produce anything resembling speech when I changed it to narrowband FM. Additionally, I’ve tried a few NOAA weather radio flowgraphs found online but most of what I’ve found either didn’t work or else was for an older version of gnuradio and thus had errors that I wasn’t able to work around since I am a gnuradio novice. Can anyone recommend a working flowgraph for narrowband FM, ideally something simple and working in gnuradio 3.8+? Thanks, Nathan [0] https://wiki.gnuradio.org/index.php/Simulation_example:_Narrowband_FM_transceiver#NBFM_receiver [1] https://greatscottgadgets.com/sdr/1/
Re: Logging GR 3.9
Hi Boris, I honestly thought, up to last week, the same as you. So, this is not intended, and we'll fix it, but sadly probably not on 3.9. Best regards, Marcus On 29.07.21 07:39, Boris Marjanovic wrote: > Hi, > > I've been profiling the flowgraph I've been working on and discovered that > there is a lot > of time spent in logging infrastructure even when logging levels were not > enabled. > The logging statements are not simple strings but a call to the formatting > library in my > case. I used the fmt library. So the statement looks something like : > GR_LOG_DEBUG(this->d_logger, fmt::format("a = {} b = {}", a, b)); > (equivalent for any other formatting lib) > So even when the logging level is at INFO, the formatting statement will > evaluate to > create a string that could/should be logged. > > This did not make sense to me. If the logging level is set to INFO, I would > not expect the > system to evaluate the above formatting statement. But it does due to the way > macros are > done and log4cpp manages logging statements and priority levels. > > I'm curious if this is desired/expected behaviour? > > I worked around this by defining a set of macros that check logger's logging > level before > attempting to stream a log line to the logger object. > > Regards > Boris
Regarding installation of gnuradio 3.7.10
Hello Everyone, I am a beginner to this community and currently started working on a project of gnuradio named 'Implementation of a packet encoder/decoder pair in the GNU radio framework'. I am using Ubuntu version 16.04 currently. I am facing an issue installing a particular version (3.7.10) of gnu radio. Although I tried to follow the command for installing gnuradio 3.7, I always get installed the 3.7.9 version of it. But I want version 3.7.10 or greater for the gnuradio 3.7. Hence, I am really stuck here. I will be thankful for any leads. Thanks in advance. -* Regards* *Yash Agrawal* *Electrical Engineering and Computer Sciences Department* *18410*
Gnuradio Warning
Hi to the list, I have a warning in the gnuradio when I run any grc file that says: << Welcome to GNU Radio Companion 3.8.2.0 >>> Block paths: /usr/share/gnuradio/grc/blocks /usr/local/share/gnuradio/grc/blocks Loading: "/media/enzo/B038BD3C38BD0280/GRC/Sat_JAIsat-1_IK8OZV.grc" >>> Done Generating: '/media/enzo/B038BD3C38BD0280/GRC/JAISAT_1.py' Executing: /usr/bin/python3 -u /media/enzo/B038BD3C38BD0280/GRC/JAISAT_1.py Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. >>> Done Please any help to avoid it? Thanks 73 de Enzo IK8OZV EasyLog 5 BetaTester EasyLog PDA BetaTester WinBollet BetaTester D.C.I. CheckPoint Regione Campania Skype: ik8ozv8520 * ** GSM +39 328 7110193 ** * SMS +39 328 7110193* *
Re: Regarding installation of gnuradio 3.7.10
Hi Yash, warning: the packet encoder and decoder in GNU Radio 3.7 were broken for half a decade, and we couldn't figure out how to fix them (I personally really tried, but couldn't). We then threw them out with 3.8 – because sometimes, having something that is broken is worse than not having it. So, for your specific topic, GNU Radio 3.7 seems to be a very bad start. Anyway, you should be able to build GNU Radio 3.7.14.0 on Ubuntu 16.04 without issue. Of course you would have to make very sure not to install the positively ancient GNU Radio supplied by Ubuntu accidentally. Best regards, Marcus On 04.08.21 20:12, Yash Agrawal 18410 via GNU Radio, the Free & Open-Source Toolkit for Software Radio wrote: > Hello Everyone, > I am a beginner to this community and currently started working on a project > of > gnuradio named 'Implementation of a packet encoder/decoder pair in the GNU > radio > framework'. I am using Ubuntu version 16.04 currently. I am facing an issue > installing a > particular version (3.7.10) of gnu radio. Although I tried to follow the > command for > installing gnuradio 3.7, I always get installed the 3.7.9 version of it. But > I want > version 3.7.10 or greater for the gnuradio 3.7. Hence, I am really stuck > here. I will be > thankful for any leads. > > Thanks in advance. > -/Regards/ > /Yash Agrawal/ > /Electrical Engineering and Computer Sciences Department > / > /18410/ >
Re: Gnuradio Warning
If you're not tied to Wayland, you can go back to X.org in the boot screen (click the "cog" in the lower right hand corner). Ron On 8/4/21 1:09 PM, Vincenzo Mone wrote: Hi to the list, I have a warning in the gnuradio when I run any grc file that says: << Welcome to GNU Radio Companion 3.8.2.0 >>> Block paths: /usr/share/gnuradio/grc/blocks /usr/local/share/gnuradio/grc/blocks Loading: "/media/enzo/B038BD3C38BD0280/GRC/Sat_JAIsat-1_IK8OZV.grc" >>> Done Generating: '/media/enzo/B038BD3C38BD0280/GRC/JAISAT_1.py' Executing: /usr/bin/python3 -u /media/enzo/B038BD3C38BD0280/GRC/JAISAT_1.py Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. >>> Done Please any help to avoid it? Thanks 73 de Enzo IK8OZV EasyLog 5 BetaTester EasyLog PDA BetaTester WinBollet BetaTester D.C.I. CheckPoint Regione Campania Skype: ik8ozv8520 * ** GSM +39 328 7110193 ** * SMS +39 328 7110193 * *