Добро пожаловать, Гость
Логин: Пароль: Запомнить меня

ТЕМА: FT8 on Linux Ubuntu

Linux Ubuntu VAC 18 Дек 2019 19:59 #1

  • OK1CIG
  • OK1CIG аватар
  • Вне сайта
  • Сообщений: 4
Hi, I'm a beginner. I have SunSDR2 DX and Linux Ubuntu. I would like to use FT8 ..... I don't know how to create VAC? Can anyone advise?
73!
Администратор запретил публиковать записи гостям.

Linux Ubuntu VAC 19 Дек 2019 13:52 #2

  • Rome
  • Rome аватар
  • Вне сайта
  • Quod Licet Jovi Non Licet Bovi
  • Сообщений: 286
  • Спасибо получено: 139
Hi,
There are several FT8 applications in Linux: JTDX, WSJT-X.
To work in FT8 via the above-mentioned applications you'll need to create virtual COM-pair, to do that you'll have to download and install a tty0tty driver - github.com/freemed/tty0tty. You'll find all the necessary information in this link.
For audio exchange, you'll need to create virtual audio cable VAC pairs. You don't have to install additional SW for that, just configure native ALSA driver.

Instruction:
Create a file:
/etc/modprobe.d/sound.conf

> sudo gedit /etc/modprobe.d/sound.conf

and enter 2 lines

alias snd-card-0 snd-aloop
options snd-aloop enable=1,1,1,1,1 index=10,11,12,13,14


Reboot the system and execute commands (repeat after each reboot):

> sudo modprobe snd-aloop
> sudo plughw:CARD=Loopback,DEV=0
> sudo plughw:CARD=Loopback,DEV=1


These three steps should be executed after each reboot of the system.
After that, you'll see 5 audio devices, called Loopback, in the system
Devices with 0 at the end of the name - recording devices, with 1 - playback devices.

Loopback: PCM (hw:10,0) - recording device
Loopback: PCM (hw:10,1) - playback device

Loopback: PCM (hw:11,0) - recording device
Loopback: PCM (hw:11,1) - playback device


Using this method you can create any amount of virtual audio devices, indicating required parameter in the file /etc/modprobe.d/sound.conf

After you've created all required virtual devices you need to lower their privileges, so you can use them via ESDR2 and FT8 applications.
For example, for virtual COM-ports use this command:

> sudo chmod 666 /dev/tnt*

You don't have to do it for virtual audio devices.
Then indicate a certain COM-port/audio device in ESDR2 and FT8 application.
As an example: virtual COM-port pairs are called 1st pair /dev/tnt0 and /dev/tnt1.
Thus in ESDR2 you indicate /dev/tnt0 and in FT8 you indicate /dev/tnt1 or vice versa.

For VAC ESDR2
input: Loopback: PCM (hw:10,0)
output: Loopback: PCM (hw:10,1)

For VAC FT8 app
input: Loopback: PCM (hw:11,0)
output: Loopback: PCM (hw:11,1)

Names of the virtual devices may differ, but the whole concept is the same.
If there are Linux gurus around here, please correct us or add something useful.
Роман, Roman
Expert Electronics
Администратор запретил публиковать записи гостям.
Спасибо сказали: S58WW

Linux Ubuntu VAC 19 Дек 2019 14:29 #3

  • OK1CIG
  • OK1CIG аватар
  • Вне сайта
  • Сообщений: 4
Hello,
Thank you for the information. I'll try to make everything work. So far, only the audio output from the PC motherboard works ... the HDMI output to the monitor speakers is functional but intermittent. But I do not necessarily need it ... I want to use the device exclusively on digi and SSTV.
Администратор запретил публиковать записи гостям.

Linux Ubuntu VAC 04 Авг 2020 15:11 #4

  • SP2L
  • SP2L аватар
  • Вне сайта
  • HamRadio & Linux addicted...
  • Сообщений: 3
  • Спасибо получено: 9
Greetings Roman et al.


First of all, I am definitely not a Linux guru, Hi!
But wholeheartedly I am Linux fan, well versed with its various flavours.

Your "recipe" is inaccurate, unfortunately.
Therefore I made my own, 100% working solution.

Let me briefly describe principles of setup we are going to make.

Generally, every loopback has got two exactly equal ends
IN and OUT, but keep in mind, that any of these two ends
may be input or output, depends on our fantasy.

For example, we have:

- two loopbacks (our VAC's)

IN1=========OUT1
IN2=========OUT2

- our beloved TXCVR SunSDR2Pro
- and another masterpiece, JTDX-2.2.0rc152_1

We need to make two connections between TXCVR and JTDX:

SunSDR2Pro ====================== JTDX

RX: ALSA: Loopback: PCM (hw:10,0)====Input: plughw:CARD=Loopback,DEV=1
TX: ALSA: Loopback: PCM (hw:11,0)====Output: plughw:CARD=Loopback1,DEV=1

Or alternatively, like I mentioned above:

A)
SunSDR2Pro ====================== JTDX

RX: ALSA: Loopback: PCM (hw:10,1)====Input: plughw:CARD=Loopback,DEV=0
TX: ALSA: Loopback: PCM (hw:11,0)====Output: plughw:CARD=Loopback1,DEV=1

B)
SunSDR2Pro ====================== JTDX

RX: ALSA: Loopback: PCM (hw:10,0)====Input: plughw:CARD=Loopback,DEV=1
TX: ALSA: Loopback: PCM (hw:11,1)====Output: plughw:CARD=Loopback1,DEV=0

C)
SunSDR2Pro ====================== JTDX

RX: ALSA: Loopback: PCM (hw:10,1)====Input: plughw:CARD=Loopback,DEV=0
TX: ALSA: Loopback: PCM (hw:11,1)====Output: plughw:CARD=Loopback1,DEV=0


Similar setup, but with loopbacks 12 & 13,
will apply to second receiver of SunSDR2Pro and second instance of JTDX.

Please note:
on JTDX side we need loopbacks which names start with: "plughw:CARD".
Everything else is beyond our concern.


So, let's go for it!

Download tty-master.zip from:

github.com/freemed/tty0tty

Next step is compilation of tty0tty.ko module.

To be able to do this it is necessary to install
linux-headers-<kernel_version>-<architecture>

This package provides the architecture-specific
kernel header files for Linux kernel,
generally used for building out-of-tree kernel modules.

Compilation itself is very easy, just execute "make"
inside folder where source of this package is located.

We have choice to use module or pts.
In my example I used module, tty0tty.ko file
placed in location that is shown below.

One may ask: why there?
For one simple reason: is is better to use
for this module "non-publicly-accessible" location.

Though, tty0tty.ko module is out-of-tree module,
I decided to keep it exactly in this location.

Besides, "/tty/" folder name nicely connote
with name of our module tty0tty.ko, I think so, Hi!

Create rc.local file with content and location shown below:

#!/bin/sh
#
# /etc/rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution bits.
# DON'T forget to change atributes of this file to 755
# By default this script does nothing.
#

sudo modprobe snd-aloop
# sudo insmod /lib/modules/<kernel_version>-<architecture>/kernel/drivers/tty/tty0tty.ko
sudo insmod /lib/modules/4.19.0-10-amd64/kernel/drivers/tty/tty0tty.ko
sudo chmod 666 /dev/tnt*
sudo chown root:dialout /dev/tnt*

exit 0


Create next necessary file sound.conf with content and location shown below:

# /etc/modprobe.d/sound.conf
#
alias snd-card-0 snd-aloop
options snd-aloop enable=1,1,1,1,1 index=10,11,12,13,14
#


Actually, above file may have verbatim ANY name,
as long as it will have so called extension file name ".conf"
and will look similarly: <file_name>.conf

These two files, rc.local and sound.conf will load and start necessary modules.
Moreover, such approach allow our setup to be permanent,
meaning there will be no need to perform these tasks on every machine reboot!!!

Now, in order for changes to take effect please reboot PC!!!

Attached six pictures depict my REALLY working setup!
I checked this routine on my Debian 10.5
but also on Ubuntu 18.04 and 20.04
with exactly the same, very positive results.

Should you need some more info,
do not hesitate to drop me a line.


Enjoy!

Best regards.
Tom SP2L

SP2L<at>wp.pl
www.sp2l.ampr.org
Администратор запретил публиковать записи гостям.
Спасибо сказали: S58WW, Rome, iw7dmh, tomas

Linux Ubuntu VAC 04 Сен 2020 02:58 #5

  • SP2L
  • SP2L аватар
  • Вне сайта
  • HamRadio & Linux addicted...
  • Сообщений: 3
  • Спасибо получено: 9
Greetings.


It is follow up to my previous post.

On modern Linux systems that employ systemd instead of init V
old fashion rc.local file doesn't exist at all
or it's execution needs to be tweaked a little bit.
Otherwise system will complain silently,
showing messages on the screen during computer boot up
and writing the same into system log files.

It is not difficult as all what we need is in the system, ready to use.
Functionality named "rc.local Compatibility" is to be activated.

The rc-local.service already exists in systemd and the service file suggests that the rc.local,
if it exists and is executable, gets pulled automatically into multi-user.target
So, no need to recreate or force something that is just done
in another way by the systemd-rc-local-generator

Many different "recipes" can be found on Internet.

Let's use below one, shortened as much as necessary.

If /etc/rc.local file is _NOT_ present, in a terminal do:
printf '%s\n' '#!/bin/bash' 'exit 0' | sudo tee -a /etc/rc.local
sudo chmod +x /etc/rc.local

Next, we need to activate service and prepare to start on every system boot:
systemctl enable rc-local.service
systemctl start rc-local.service

After that the rc.local will be called upon system startup.
Insert into file what you like.

Additional very important change is needed for Fedora systems.
Without it, previously created loopback's are not visible in

JTDX Settings -> Audio Tab.


Under directory /usr/share/alsa
there is well known configuration file alsa.conf

Excerpt (before changes!) from alsa.conf file:

#
# defaults
#

# show all name hints also for definitions without hint {} section
defaults.namehint.showall off
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended off
#
defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.compat 0
defaults.pcm.minperiodtime 5000 # in us
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_perm 0600

We need to change:
defaults.namehint.extended off
to
defaults.namehint.extended on

Additionally I also changed:
defaults.pcm.ipc_perm 0600
to
defaults.pcm.ipc_perm 0660


Enjoy!

Best regards.
Tom - SP2L

SP2L<at>wp.pl
www.sp2l.ampr.org
Администратор запретил публиковать записи гостям.
Спасибо сказали: S58WW, Rome
Время создания страницы: 0.132 секунд