myriadrf / gr-limesdr

gr-limesdr Plugin for GNURadio
Other
142 stars 77 forks source link

Support for GNURadio 3.9.x #75

Open eggelene opened 3 years ago

eggelene commented 3 years ago

I tried to use the latest LimeSDR ( from ppa:myriadrf/gnuradio) sink in GNURadio 3.9.1.0. But it seems that the sink is not compatible with latest GNURadio release.

Is there any plan to add LimeSDR support for GNURadio 3.9.1.0 ? Preferable installable through the ppa:myriadrf/gnuradio.

Generating: '/home/xxx/playSDR.py'

Executing: /usr/bin/python3 -u /home/xxx/playSDR.py

---------------------------------------------------------------
LimeSuite Sink (TX) info

##################
Connecting to device
##################
LimeSuite version: 20.10.0-myriadrf2~focal
gr-limesdr version: 3.1.5.0
##################
Device list:
Nr.:0 device:LimeSDR-USB, media=USB 3.0, module=FX3, addr=1d50:6108, serial=0009070602502xxx
Nr.:1 device:LimeSDR-USB, media=USB 3.0, module=FX3, addr=1d50:6108, serial=00090706024D1xxx
##################
Reference clock 30,72 MHz
Using device: LimeSDR-USB(00090706024D1xxx) GW: 2.23 FW: 4
##################

INFO: device_handler::enable_channels(): SISO CH0 set for device number 1.
INFO: device_handler::set_samp_rate(): set sampling rate: 20 MS/s.
INFO: device_handler::set_rf_freq(): RF frequency set [TX]: 190 MHz.
INFO: device_handler::set_analog_filter(): Filter calibrated. Filter order-4th, filter bandwidth set to 20 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
TX LPF configured
INFO: device_handler::set_digital_filter(): GFIR LPF cannot be set to the requested bandwidth
digital filter CH0 [TX]: 20 MHz.
INFO: device_handler::set_gain(): set gain [TX] CH0: 60 dB.
INFO: device_handler::set_antenna(): CH0 antenna set [TX]: BAND1.
INFO: device_handler::calibrate(): Tx calibration finished
Traceback (most recent call last):
  File "/home/xxx/playSDR.py", line 210, in <module>
    main()
  File "/home/xxx/playSDR.py", line 188, in main
    tb = top_block_cls()
  File "/home/xxx/playSDR.py", line 157, in __init__
    self.connect((self.blocks_multiply_const_vxx_0, 0), (self.limesdr_sink_0, 0))
  File "/usr/lib/python3/dist-packages/gnuradio/gr/hier_block2.py", line 37, in wrapped
    func(self, src, src_port, dst, dst_port)
  File "/usr/lib/python3/dist-packages/gnuradio/gr/hier_block2.py", line 100, in connect
    self.primitive_connect(*args)
TypeError: primitive_connect(): incompatible function arguments. The following argument types are supported:
    1. (self: gnuradio.gr.gr_python.hier_block2_pb, block: gnuradio.gr.gr_python.basic_block) -> None
    2. (self: gnuradio.gr.gr_python.hier_block2_pb, src: gnuradio.gr.gr_python.basic_block, src_port: int, dst: gnuradio.gr.gr_python.basic_block, dst_port: int) -> None

Invoked with: <gnuradio.gr.gr_python.top_block_pb object at 0x7f4c8bbf8970>, <gnuradio.gr.gr_python.basic_block object at 0x7f4c8b3f4bb0>, 0, <Swig Object of type 'gr::basic_block_sptr *' at 0x7f4c8b3ead20>, 0
swig/python detected a memory leak of type 'gr::basic_block_sptr *', no destructor found.
libusb: warning [libusb_exit] application left some devices open

>>> Done (return code 1)
Phil67ago commented 3 years ago

I have the same question. gr-3.9 has replaced SWIG with Pybind11. I made some efforts following this guid but I'm kind of lost when it comes to adding binding at step 4. Call gr_modtool bind for each block in your OOT. https://wiki.gnuradio.org/index.php/GNU_Radio_3.9_OOT_Module_Porting_Guide

It would be nice if someone created a branch gr-3.9 and made the basic porting steps and CMake stuff as a starting point.

chrisjohgorman commented 3 years ago

I have tried to migrate this module to gnuradio 3.9. My attempt can be found at https://github.com/chrisjohgorman/gr-limesdr.git . I don't currently own a limesdr to test my modifications out on, but it builds on my system and installs. I can import the module from python. If you find bugs, and I'm sure there are some (rfe boards may not be properly supported.) Please email me and I will try to hunt them down.

Phil67ago commented 3 years ago

Ok Fine! I will give it a try. It may take me a couple of weeks before I can dig into it...

chrisjohgorman commented 3 years ago

@Phil67ago please re download gr-limesdr.git from my repository. I forgot to do a git add to add the new files and as a result my github code was incomplete. I have tested it and it should work now. Sorry for the omission.

NZSmartie commented 3 years ago

Hey @chrisjohgorman I gave your fork a go, I fixed a few things and created the needed python bindings. See https://github.com/chrisjohgorman/gr-limesdr/pull/1 I can confirm that my LimeSDR-mini now works with the source module in GNU Radio 3.9, however I have not tested the sink, yet. As I don't have a project ready to go.

dsgibbons commented 2 years ago

I tested @chrisjohgorman fork - seems to work well for LimeSDR-USB. Thanks for doing this.

wkazubski commented 2 years ago

Please bump the library version declared in CmakeFile.txt. Last release for GR-3.7 was anounced as 2.0, last snapshot in 3.8 branch has library version 3.1.5, so version for GR-3.9 should be 3.2.0 or even 4.0.0 to avoid confusion during upgrade.

chrisjohgorman commented 2 years ago

Hi Wojciech,

If I understand you, I need to update the VERSION_MAJOR, VERSION_API and VERSION_ABI to something greater than 3.1.5. I believe it should be 3.2.0, but I don't know what lime microsystems would prefer. I'm on my way to change it and will set it to 3.2.0. I hope this helps.

Take care.

Chris

wkazubski commented 2 years ago

Yes. . If there is no major changes, version 3.2.0 is OK. I suppose that version 1.0.0 is a default setting in Cmake. Leaving it nay make some confusion for package managers in various Linux distributions. For example openSUSE / SUSE Linux package libries separatedly and require library package to have the same version as the library executable inside.

Wojciech

chrisjohgorman commented 2 years ago

Yes. 1.0.0 is the default setting of gr_modtool which is used to make the module. Good to hear that 3.2.0 is OK. Take care.

Chris

On Sun, Mar 6, 2022 at 7:42 AM Wojciech Kazubski @.***> wrote:

Yes. . If there is no major changes, version 3.2.0 is OK. I suppose that version 1.0.0 is a default setting in Cmake. Leaving it nay make some confusion for package managers in various Linux distributions. For example openSUSE / SUSE Linux package libries separatedly and require library package to have the same version as the library executable inside.

Wojciech

— Reply to this email directly, view it on GitHub https://github.com/myriadrf/gr-limesdr/issues/75#issuecomment-1059955989, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG76X4YPL73IRLFVLJ2TXA3U6SR3PANCNFSM45LAV2PQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>