Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

FlexLib Under Linux/Mono?

Peter K1PGV
Peter K1PGV Member ✭✭✭
edited June 2020 in SmartSDR API
Does anybody know if FlexLib can build/run/work under Mono on Linux?

I apologize in advance if this is a naive question... I'm a Windows guy, and know next to nothing about Linux.  But I have a need that could be nicely filled with a PI2 running FlexLib... and I don't want to wait until Windows 10 is available on the PI2 to start this project.

Thanks,

Peter
K1PGV

Answers

  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    It should. I have most everything compiling cleanly under monodeveloper. The stuff that prevents linking and resolving certain packages is likely an assembly issue. That is just the Flexlib itself. Mono does not support WPF so whatever GUI you do would be not WPF. It does have a clone of WinForms though. I am doing a portable version that will run on Linux, Mac, Raspberry Pi and, of course, Windows.
  • Peter K1PGV
    Peter K1PGV Member ✭✭✭
    edited June 2020

    Thanks Walt.

    I assume you mean "MonoDevelop"... That's good news, thanks.  I *was* hoping it was just a matter of opening the projects and building them... but you've had to fool with it??  That's a bit concerning.  Can you say a bit more?

    In terms of a GUI, I don't care.  This would be for the PI2, and would be a control application (output onto a 2-line LCD, user interaction via up/down/left/right select keypad).  Adafruit has a nice simple example of this type of device.  Control provided by GPIOs, of which the PI2 has plenty.

  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Yep, that would be correct Peter. As packaged the entire Flexlib will not build. I left Windows development prior to Visual Studio. I left using Visual C++. So the notion of solutions (what? is this Hunt for Red October "we have a solution")? and assemblies. I am familiar with projects but, I discovered (Hope this is true) in a multiproject environment one needs to build the solution, not the project. So, in this case, you have to build CAT not Flexlib. When I tried building it it only built the project. Even though log4n is present as a dll, MonoDevelop does not find it. Ditto with some other stuff. But it does create multiple flex dlls. I don't know if the issue is with packaging or with monodevelop. Let me know, being from a Windows background you may have better luck.

    In the Java world, all of this things would be defined in separate packages and the jars (functional equiv of dll) just have to be in the path. It also fails on Window classes which should only be relevant to CAT but cat is where the dependencies are defined. It could be me.

    Walt
  • Peter K1PGV
    Peter K1PGV Member ✭✭✭
    edited June 2020

    Thank you AGAIN Walt.  I'll play with it as soon as I get time.  And I will definitely post here my findings (good or bad).


    It's kind of surprising that nobody else has tried this!  Then again, I only DID ask this morning.  I sort of suspected the Flex folks would know.  Maybe they DO know but they won't tell ;-)

  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    I've had long conversations with Steve both here and off line about a portable SSDR and the issues with any 'derived work' version of Flexlib. It is easier to write a non C# version (of anything) that is portable and blindingly fast, than to write a C# version that is portable. But, assuming they wanted to hit the bulk of the Amateur Radio community that would be Microsoft. While there are people here that run Linux and Mac apparently not so vocal as to have FRS revisit decisions they made a very long time ago. Stu did an iPad version, I am doing a portable version plus an incredibly smart Android version. The non Android version will run on all platforms, including Windows. In both cases it needs an almost completely different flexlib replacement. I am unaware of anyone else doing anything similar to what Stu did or I am doing. The product differentiator will be the UI.
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited June 2020
    Peter I think, on here, you are Mr .NET/Windows and, I suspect, I am Mr Java/Linux. The issue with MonoDevelop isn't so much getting FlexLib to compile. The issue is what to do with it next. WPF was never and likely will never get ported to Linux. From everything I've read JavaFX is the non-Windows (non-multi-thousand dollar) GUI of choice. While WinForms, I believe, has been +/- ported, it does not compare favorably to WPF...which would make perfect sense.

    I am wrapping up the Java piece, adding last minute instrumentation. From there I will have a Linux  and Android control surface. The reason this wasn't done months ago is due to the "Groundhog Day" effect, every time Eric makes a big change I have to largely start the process over.. So while there has been a certain amount of redesign, there has been a certain amount of, 'wow, that's pretty cool" as well. Consequently, it has taken longer than I anticipated. However, in that extra time I have flushed out exactly how the UI will behave and some other features I can't get into yet. I will be taking S(er)SDR to Windows as well. Just to see what the community reaction is. I don't honestly expect much traction there as, given a choice between a vendor supplied control surface, and a 'third party' provided control surface, assuming the OS was acceptable, I'd pretty much go with vendor every time. The other motivation is I will be doing some things FRS doesn't do. So it will be interesting to see what some people's reaction will be.
  • Peter K1PGV
    Peter K1PGV Member ✭✭✭
    edited December 2016
    I will be taking S(er)SDR to Windows as well. Just to see what the community reaction is. I don't honestly expect much traction there as, given a choice between a vendor supplied control surface, and a 'third party' provided control surface, assuming the OS was acceptable, I'd pretty much go with vendor every time.

    Oh, I don't know about that. Its about value-add and perceived advantage.  If there's sufficient perceived advantage to using a third-party control surface, then the vendor-supplied one can rapidly become a non-factor.

    Peter
    K1PGV

  • James Whiteway
    edited May 2015
    Walt, are you far enough along in development that you can post a youtube video demo'ing some of your S(er)SDR in action? That could help generate some interest. And maybe, some detailed insight as to the benifits of your version of Flexlib to 3rd party developers would help you gauge interest as well. I know I'm interested in both products. james WD5GWY
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Not quite James. Soon, that's what I meant by you will, likely, see it, before summer. It will look way different than Williams. William definitely took the faster path but one of the goals I set mandated I do it as I have. There is nothing I am doing, FRS can't do...well, +/- but either way, they haven't. There will be some very very neat stuff. But, at least at this point, if it requires DAX, it won't exist. Things that require DAX also require a fair amount of real estate, so it doesn't really make sense on a tablet. The main motivation for me doing this at all is I don't have Windows as my preferred anything. I don't believe Windows should be a requirement for enjoying a Flex 6000 series radio. The motivation for the Android is because it presented some interesting opportunities and ..... because I can. Now that I am (semi) retired I have time to do things I didn't have time for before. Also, keeping your brain intellectually challenged is a good way to ward off bad things that could happen to folks  at this point.
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited June 2020
    I've invested a few minutes today, to see how well 1.5.1 works on mono/linux. A few small adjustements and it looks fine so far. I was able to do all cat  stuff etc {cat fun: https://twitter.com/HB9FXQ/status/684733167434100736  } ... Just started to get into the more advanced stuff and it looks very promising so far.

    Lot of threads seem to discuss Linux stuff/questions... so my goal was to find out myself, how things do work in detail.  It depends on one's needs, but going through the API, the code looks very portable to almost any language. No secret *.bin and *.dat files loaded -hi  ;) 


    image

    Just for proof of concept, my other experiment was to handle WaterfallTile objects with mono, pushing uint[] data into a bitmap /// sorry about the BW:

    image

    Just taking the .Net FlexLib off the shelf and put it on MONO is a way to get started without reinventing the wheel. Also fine on RaspberryPI projects, as long as not too mutch data to process. 

    I'm very impressed about the open design of how the radio can be interfaced that way. By comparing it to some other radios where it's hard to sniff the CAT commands by  eg. reverse engineering with a lot of Wireshark forensics.

    Thumbs up!
    73 Frank

  • Peter K1PGV
    Peter K1PGV Member ✭✭✭
    edited December 2016
    THANKS Frank!

    While I didn't do the project on Linux using the PI 2 (and Win10 for PI 2 has long been released and updated), I'm still pleased to hear that FlexLib will build using Mono.

    Would you be nice enough to post those "few small adjustments", Frank?  Because... wouldn't it be cool if the Flex devs could actually take these into account and (without guarantees about anything going forward) incorporate them into the distributed FlexLib code, so that it would be super-simple for people to use for Linux implementations?

    Nice work, and thanks for posting!

    Peter
    K1PGV
  • James Whiteway
    edited January 2016
    Very interesting! I'll be tickled if I can get my project's waterfall working that well! Right now, it eats Windows resources! Good work. James WD5GWY
  • James Whiteway
    edited March 2017
    By the way, which Linux distro are you using? I think I have Mint on a system still packed away. Guess I will have to drag that pc out and install Mono on it! Again, thanks for posting.
    James
    WD5GWY
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited November 2016
    Nothing special, for desktops I mostly use Ubuntu or Mint. The virtualbox on the screenshot is a Mint box. Just make sure to use a recent mono version: http://www.mono-project.com/download/#download-lin 

    Frank, HB9FXQ


  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited November 2016
    Actually never tried Win10 a RPI2, but a nice idea.... I fear It'll disappear anyway since the user base seams to be a bit thin.

    Regarding the "few small adjustments":
    Just remove the  ' WindowPlacement ' class and  replace the  [DllImport("Kernel32.dll")] related things in HiPerfTimer  with a stopwatch. Keep this in mind: http://stackoverflow.com/questions/394020/how-accurate-is-system-diagnostics-stopwatch + the  fact, that the mono implementation of System.Diagnostics.Stopwatch might diverge from the Microsoft .Net one.
     .....(without guarantees about anything going forward) incorporate them into the distributed FlexLib code.....
    I've asked about starting an official public repo: https://community.flexradio.com/flexradio/topics/official-github-repo-for-the-flexlibtm Would be nice to have a Mono branch then. 

    Thanks for the Inputs

    Frank, HB9FXQ

     

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.