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.

Announce: experimental CAT/DAX clients for Linux

135

Comments

  • Chris WX7V
    Chris WX7V Member ✭✭

    I’ve been running nCAT and nDAX on KUBUNTU 20.04 for since September with no issues, and I’ve made more than 700 confirmed contacts with FT8.

    I’ve successfully got cat control working on fldigi with the set up with Hamlib NET rigctl using similar config to WJSTX.

    I’ve not figured out the soured card config tho- I’ve tried PortAudio but don’t see flexdax.rx or flexdax.tx in the capture/playback option drop down like I have in WSJTX. I’ve searched google for PulseAudio - if that is the correct option not sure what to put in the parameter box.

    Thanks for any help!

    73, Chris - WX7V

  • Chris WX7V
    Chris WX7V Member ✭✭
    edited February 2021

    Removing duplicate post- I hit submit twice.

  • arodland
    arodland Member ✭✭

    @Chris WX7V for fldigi, select PulseAudio, leave the "server string" box blank, and hit okay. Then use a mixer app (pavucontrol is one, but you might already have a suitable one hiding behind the volume control button on your taskbar) to set fldigi's playback stream to flexdax.tx and its capture stream to flexdax.rx. PulseAudio should remember the setting so that in the future fldigi will get those devices by default (as long as you start it while nDAX is running).

    This is fldigi's issue for not having a UI to select PulseAudio devices, but fortunately it's an easy enough one to work around.

    Very glad to hear about your success with wsjtx.

  • Chris WX7V
    Chris WX7V Member ✭✭

    Thank you - that was easy enough. nCAT and nDAX are solid- the learning curve now is with fldigi and these digital modes.

  • I am using a Flex 6700 along with a Raspberry PI 4+

    I’m having issues with nDAX TX output to the Flex. At times, it works and I see output in the P/CW level window, just as shown in the windows screenshot. I do see output from the playback audio, I think wsjtx is outputting audio, and PulseAudio is processing it, but the Flex is not seeing it. 

    I would appreciate any help.

    Thanks in advance,

     

    Nick Cloyes – N4CL

    PS – I send my compliments to arodland for these fine, stable apps. I’ve had lots of fun using them!

     

    Below is the nDAX startup along with screenshots of wsjtx running in windows and Raspberry PI.

     

    cloyesjn@ubuntu-desktop:~/sambashare$ ./nDAX

    9:08PM INF Waiting for station station=Flex

    9:08PM WRN Couldn't get realtime error="MakeThreadRealtime: Operation not permitted" thread="udp thread"

    9:08PM INF Found Client id=0x6B9D2835 uuid=63762A21-B56D-42CF-A6C4-832706ED0018

    9:08PM INF Looking for slice slice_id=A

    9:08PM INF Found slice slice_idx=1

    9:08PM INF Enabled RX DAX stream stream_id=4000008

    9:08PM INF Enabled TX DAX stream stream_id=84000000

    9:08PM WRN Couldn't get realtime error="MakeThreadRealtime: Operation not permitted" thread="rx thread"

    9:08PM WRN Couldn't get realtime error="MakeThreadRealtime: Operation not permitted" thread="tx thread"

    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    pacmd list-sinks

    1 sink(s) available.

     * index: 0

           name: <auto_null>

           driver: <module-null-sink.c>

           flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY

           state: IDLE

           suspend cause: (none)

           priority: 1000

           volume: front-left: 65536 / 100% / 0.00 dB,  front-right: 65536 / 100% / 0.00 dB

                   balance 0.00

           base volume: 65536 / 100% / 0.00 dB

           volume steps: 65537

           muted: no

           current latency: 1399.48 ms

           max request: 344 KiB

           max rewind: 344 KiB

           monitor source: 0

           sample spec: s16le 2ch 44100Hz

           channel map: front-left,front-right

                        Stereo

           used by: 0

           linked by: 0

           configured latency: 2000.00 ms; range is 0.50 .. 2000.00 ms

           module: 2

           properties:

                   device.description = "Dummy Output"

                   device.class = "abstract"

                   device.icon_name = "audio-card"

    pacmd list-sink-inputs

    1 sink input(s) available.

       index: 1

           driver: <protocol-native.c>

           flags:

           state: RUNNING

           sink: 1 <flexdax.tx>

           volume: mono: 65536 / 100% / 0.00 dB

                   balance 0.00

           muted: no

           current latency: 200.00 ms

           requested latency: 21.33 ms

           sample spec: s16le 1ch 48000Hz

           channel map: mono

                        Mono

           resample method: copy

           module: 3

           client: 3 <QtPulseAudio:777320>

           properties:

                   media.role = "production"

                   media.name = "QtmPulseStream-777320-281472225262528"

                   application.name = "QtPulseAudio:777320"

                   native-protocol.peer = "UNIX socket client"

                   native-protocol.version = "34"

                   application.process.id = "777320"

                   application.process.user = "cloyesjn"

                   application.process.host = "ubuntu-desktop"

                   application.process.binary = "wsjtx"

                   application.language = "en_US.UTF-8"

                   window.x11.display = ":10.0"

                   application.process.machine_id = "f0bd04b5fe0d457badf0188180f8c9cb"

                   application.icon_name = "wsjtx_icon"



    Windows

    Raspberry PI


  • arodland
    arodland Member ✭✭

    @Nick Cloyes, N4CL next time you run into the problem, try exiting wsjtx, exiting nDAX (^C), restarting nDAX, and restarting wsjtx, without touching any controls in SmartSDR, and see if it works after that. I'm not quite sure what is going on, but possibly something is trying to "steal" nDAX's DAX channel.

    You might also try running nDAX with "-daxch 2" and see if that prevents the problem entirely.

  • arodland
    arodland Member ✭✭

    @Nick Cloyes, N4CL another thought, since I see you're using remote desktop — make sure to disable any option in the remote desktop app for forwarding the Pi's audio to your Windows machine, as that might interfere.

  • I believe I have found it

    I checked mode =Data/Pkt and it started working. Does that make sense? It seems to work like a charm now.

  • Chris WX7V
    Chris WX7V Member ✭✭

    All, Confirming nCAT and nDAX work with the recent Flexradio upgrade V.3.2.31. The only issue I had was with the upgrade itself - the radio got stuck and I had to remove the DC power source per instructions in the release notes.


    1) From Page 4 of the Release Notes for V.3.2.31: "What to do if the firmware updates do not finish after 5 minutes?

     On rare occasions, an update may not signal the completion of a firmware update. If five (5) minutes have elapsed without the radio restarting and completing the upgrade, power off the radio by pressing the power button. The radio should restart, and the firmware update should complete normally. Note: It would be rare that a single press on the power button does not shut down the radio. However, if this occurs, remove the DC power cable from the radio to force a hard reset. Wait about 1 minute, restore DC power, wait 2 minutes and depress the power button. The radio will restart and the firmware update should complete successfully"

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited April 2021

    I know this is a permissions issue

    I'm just not sure where to look next.

    Any guidance would be appreciated.

    73

    pi@SoftEther:~/flex $ ./nDAX

    5:11PM FTL pulse.NewClient failed error="dial unix /run/user/1000/pulse/native: connect: connection refused"

    Looking deeper


    pi@SoftEther:/run/user/1000/pulse $ ls -l

    total 4

    srw-rw-rw- 1 pi pi 0 Apr 27 17:07 native

    -rw------- 1 pi pi 5 Apr 27 17:10 pid

    pi@SoftEther:/run/user/1000/pulse $


    ---------------------------------------

    this might have solved it. Still working on it


    mv ~/.config/pulse ~/.config/pulse.old
    pulseaudio --start
    


  • arodland
    arodland Member ✭✭

    Hi @Mike-VA3MW , that's a weird one. The permissions don't look wrong. Were you able to figure it out? If not, I would be happy to go deeper with you.

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin

    I figured the easied way was to load a HamPI image. Then, Pulse was correctly configured. :)

  • arodland
    arodland Member ✭✭

    @Mike-VA3MW alright! Sorry you ran into trouble, but glad it's behaving now.

  • SmittyHalibut
    SmittyHalibut Member ✭✭
    Hey all. Thanks for building these awesome tools! I've got nCAT working, but nDAX is giving me problems. I figured out what the problem is (see below), so I'm posting here in case anyone else is having this issue.

    Summary: I'm still running Ubuntu 16.04 on my main laptop (really need to upgrade someday), which uses PulseAudio 8.0, which is too old for nDAX. The solution will almost certainly be to upgrade my laptop to something that uses PulseAudio 12.0 or newer.

    @arodland How necessary is the `use_system_clock_for_timing=yes` option when setting up the sink? Can we make that optional?

    Details:
    The error I'm getting while trying to run nDAX is:

    > 4:24PM FTL Create TX pipe failed error="load-module module-pipe-sink: pulseaudio: module initialization failed"

    When I run it a second time, I get an additional line:
    > 4:24PM WRN source flex.sliceA.rx exists but was created by an nDAX process that no longer appears to be running. Will try to unload... module_index=26 pid=32176
    > 4:24PM FTL Create TX pipe failed error="load-module module-pipe-sink: pulseaudio: module initialization failed"

    This tells me that it's SUCCEEDING at adding the Receiver loopback interface, but is failing on the transmitter. Being a bit of a programming nerd (though I've never seen a line of Go until now), I looked at the code, and found `createPipeSource()` and `createPipeSink()` functions, to compare the two and see if any difference jumped out at me. There were a few differences, but `use_system_clock_for_timing=yes` stood out as a likely culprit.

    Testing my theory, I ran:
    > [16:32:33] mark@crossthread:~/src$ pactl load-module module-pipe-sink sink_name=bar file=bar rate=48000 format=float32be channels=1
    27
    > [16:32:40] mark@crossthread:~/src$ pactl unload-module 27

    Ok, so I can load the module by hand without `use_system_clock_for_timing=yes`, then unload the module, and repeat that process. So that's good.

    > [16:32:44] mark@crossthread:~/src$ pactl load-module module-pipe-sink sink_name=bar file=bar rate=48000 format=float32be channels=1 use_system_clock_for_timing=yes
    > Failure: Module initialization failed

    There we are, that's the failure mode. Loading and unloading modules repeatedly, I'm confident this is the parameter that's failing.

    A bit of google searching returns: https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/12.0/ which shows `use_system_clock_for_timing=yes` is a new feature in PulseAudio 12.0

    > [16:32:47] mark@crossthread:~/src$ pulseaudio --version
    > pulseaudio 8.0

    Well, ****...

    I wish I came here with a solution to this problem, but I think the solution is to upgrade to an OS that isn't 5 years old.
  • arodland
    arodland Member ✭✭

    @SmittyHalibut yup. You can also use an older nDAX (the August 17, 2020 release) which uses module-null-sink instead of module-pipe-sink, and so works with older PulseAudio... but it really doesn't work as well, there's a reason why I changed things.


    You're not the first to run into this; I'll document the version requirement, and maybe see if I can have the app detect the version of PulseAudio on startup and print a message if it's too old.

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin

    @SmittyHalibut

    I wanted to thank Smitty for jumping in on this. I will do a shameless plug for Smitty as he is also one of the personalities on the Ham Radio WorkBench every few weeks and that is where I got to meet him.

    And, he is a great Ham Radio resource too!

    73 Smitty!

  • arodland
    arodland Member ✭✭

    @Mike-VA3MW funny, I just discovered that podcast the other day :)

    I've added the version check to nDAX and I will cut a new release with the change sometime soon, which will hopefully reduce confusion.

    If anyone here is feeling ambitious, it would be possible to work with older PulseAudio by implementing the read timing in nDAX and leaving out the use_system_clock_for_timing option. On paper it's not too hard — read 256 samples every 5.333ms. The question is whether it works out alright to simply use a time.Ticker to drive the loop, or whether it's necessary to do something a little bit more complicated to maintain the right long-term average in the face of apps opening and closing the device, and maybe Pulse delivering samples in chunks of its own choosing.

    It doesn't help that I don't really know anything about how the Flex itself deals with the packets it gets, how sensitive it is to the timing, or how much of a buffer it may have (the only thing I do know is that it treats missing packets as silence without any real complaint).

  • Ray G6UJB
    Ray G6UJB Member ✭✭
    edited July 2021

    Just got WSJT-X running with Rocky Linux employing nCAT and nDAX. I had to build WSJT-X for Rocky Linux but nCAT and nDAX are working as released with no changes, thanks 🙂

    Have I missed it, but is it possible to statically define the udp port that nDAX will use ?

    I'm trying to finalise the firewall rules, but nDAX appears to be binding to a random port number each time it starts which makes setting up static firewall rules awkward.

    I can identify and set the necessary port on the fly, manually or with a script but if there is an easier way of handling this (other than disabling the firewall) it would be fantastic.

    Thoughts?

    Thanks

  • arodland
    arodland Member ✭✭

    @Ray G6UJB not currently. Would you care to file a feature request at https://github.com/kc2g-flex-tools/nDAX/issues/new?labels=enhancement ? By default it chooses a free port so that there's no chance of conflicts when running multiple copies, but I would be okay with making it overrideable.

  • Ray G6UJB
    Ray G6UJB Member ✭✭
    edited July 2021

    Thanks @arodland I have just done as you requested.

    Unfortunately the "enhancement" label does not seem to get applied when I saved the request, I think this is a github write permission thing.

    73

    Ray

  • SmittyHalibut
    SmittyHalibut Member ✭✭
    @arodland Yeah, a better error message is probably the best "feature request" for this. I really need to get 20.04 installed on this laptop, but I was one of the three people on the planet apparently that liked Unity and I've been hesitant to switch to Gnome Desktop. Having said that, work finally dropped support for 16.04 so I've been forced to upgrade on my work laptop and I've figured out a workable setup, so I really have no excuse not to upgrade on my personal laptop anymore.

    @Mike-VA3MW D'aww shucks... *kicks dirt*
  • SmittyHalibut
    SmittyHalibut Member ✭✭
    > @arodland said:
    > @Chris WX7V for fldigi, select PulseAudio, leave the "server string" box blank, and hit okay. Then use a mixer app (pavucontrol is one, but you might already have a suitable one hiding behind the volume control button on your taskbar) to set fldigi's playback stream to flexdax.tx and its capture stream to flexdax.rx. PulseAudio should remember the setting so that in the future fldigi will get those devices by default (as long as you start it while nDAX is running).
    > This is fldigi's issue for not having a UI to select PulseAudio devices, but fortunately it's an easy enough one to work around.
    > Very glad to hear about your success with wsjtx.

    Finally got my laptop upgraded to Ubuntu 20.04 today, and nDAC is loading fine now. :-)

    About the quote above, do I understand correctly that I have to select the Flex interfaces as the system defaults? As in, all my system sounds will go to/come from the Flex now?
  • SmittyHalibut
    SmittyHalibut Member ✭✭
    I got nDAX setup the way I describe above: setting the Flex audio interfaces as my default interfaces.

    But I'm still having troubles with nCAT and fldigi. In the Hamlib tab, I select "Hamlib NET rigctl (Stable)", but there's no way to configure it for a network address. It still only lists a "Device" drop down with various /dev/ttyS* interfaces. IIRC, on my 16.04 box, when you selected Hamlib NET rigctl, it replaced the serial port drop down with a text box to enter an IP and port, into which I'd put `127.0.0.1:4532` but this doesn't appear to be happening.

    To be clear: if what I describe is still the way this is SUPPOSED to work, then this is a bug in fldigi, not nCAT. I'm just trying to confirm whether _I'M_ doing anything wrong, or if this is the way it's SUPPOSED to work.

    Again, thanks for your help.
  • SmittyHalibut
    SmittyHalibut Member ✭✭
    As expected, it's working a charm in WSJT-X. I'm just having that problem with nCAT in fldigi.
  • arodland
    arodland Member ✭✭
    edited July 2021

    @SmittyHalibut

    About the quote above, do I understand correctly that I have to select the Flex interfaces as the system defaults? As in, all my system sounds will go to/come from the Flex now?

    No, you just want to select it for fldigi's input and output streams. It will remember the setting *for that app* (provided your PulseAudio has "module-stream-restore", which is default on every system I've run into). Setting them as system defaults wouldn't be that great, you'd probably end up transmitting a lot of beeps and stuff :)

    But I'm still having troubles with nCAT and fldigi. In the Hamlib tab, I select "Hamlib NET rigctl (Stable)", but there's no way to configure it for a network address. It still only lists a "Device" drop down with various /dev/ttyS* interfaces.

    In the new version of fldigi it's a "combo box", you can ignore the dropdown portion and type in your own value.

  • Ray G6UJB
    Ray G6UJB Member ✭✭

    @arodland

    I just want to say a big Thankyou very much for the modification you made to nDAX to allow for user selected VITA-49 udp port bind. This is working brilliantly and makes firewall rules super easier to setup thanks.

    Thanks also for the excellent utilities, they are working very well under Rocky Linux inside Windows 10 hosted virtual machines. 😁

    73

    Ray

  • arodland
    arodland Member ✭✭

    @Ray G6UJB Glad to help :)

  • arodland
    arodland Member ✭✭


  • Alan
    Alan Member ✭✭✭✭

    Question

    I am running Ubuntu on an NUC Intel based PC (x86-64). Which nDAX and nCAT file should I download?

    Alan. WA9WUD

  • Alan
    Alan Member ✭✭✭✭

    Update, progress, but still need help.

    I loaded the "linux AMD-64" files and both nDAX and nCAT paper to run.

    I was able to run and connect WSJT-X t the Flex Audio via nDAX. Good.

    It appears that nCAT is running, but running into problems.

    Here is a screenshot of my terminal after starting nCAT:


    And here is the Radio setting and "Text CAT" response from WSJT-X:


    What should I try next to get nCAT working?

    Alan. WA9WUD

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.