LinkWithLocalMicAndSpeaker - sm0svx/svxlink GitHub Wiki
So, you have setup a shiny new SvxLink node on a simplex frequency and everything is working fine. What if you want to have a local QSO? The transceiver is connected to the node. What to do? You could just pick up the rig mike, if it even have one, and use it like that. The problem with this is that SvxLink is not aware that you are using the transceiver so it may interfere with your QSO. You could turn the software off or pull the interface cable whenever having a local QSO but that’s annoying and also disables the link.
An even bigger problem arises if you want to simultaneously have a QSO with a local station and a connected EchoLink station at the same time. If speaking directly into the rig mike all local stations will hear you but stations connected through EchoLink will not. If using a hand held to send into your link you will be heard on EchoLink but all local stations will probably not hear you.
The solution is to configure two logics. One for the normal link and one for your personal use. Connect a speaker and a mike to the audio channels not used by the transceiver. You could use a separate sound card or the unused left or right channel of the existing sound card. The PTT switch can for example be connected between the DCD and GND pins in the serial port.
Now for the configuration. I assume you already have a SimplexLogic link setup and working so I’ll only show what’s needed to be added. To start with, you need two logics to be loaded. If you are running SvxLink in a console and want to activate the link from there, make sure the MicSpkrLogic is the first one listed.
[GLOBAL] LOGICS=MicSpkrLogic,SimplexLogic LINKS=MicSpkrLink
Now for the actual logic configuration. We want as few features as possible enabled here. Especially identification is annoying to have enabled. We don’t need any modules either.
[MicSpkrLogic] TYPE=Simplex RX=RxMike TX=TxSpkr CALLSIGN=SM0SVX EVENT_HANDLER=/usr/share/svxlink/events.tcl
A section is needed to define the link between the two logics:
[MicSpkrLink] CONNECT_LOGICS=SimplexLogic,MicSpkrLogic:99 DEFAULT_ACTIVE=1
Now for the "RX" definition. We use serial "squelch" here since we connected the PTT switch to the DCD line.
[RxMike] TYPE=Local AUDIO_DEV=alsa:plughw:0 AUDIO_CHANNEL=1 SQL_DET=SERIAL SERIAL_PORT=/dev/ttyS0 SERIAL_PIN=DCD:SET PEAK_METER=1
The "TX" is even more simple to configure:
[TxSpkr] TYPE=Local AUDIO_DEV=/dev/dsp AUDIO_CHANNEL=1 PTT_TYPE=NONE
Since you have defined a new logic core, a corresponding TCL event handler need
to be added as well. In the default installation the event handler files are
located in /usr/share/svxlink/events.d/
. Modifications should not be done
directly in this directory though but instead should a directory called "local"
be created under the events.d directory. Copy SimplexLogic.tcl
to
local/MicSpkrLogic.tcl
. Edit MicSpkrLogic.tcl
and change "namespace eval
SimplexLogic" to "namespace eval MicSpkrLogic".
After restarting SvxLink, the link between the logics should activate automatically. Deactivate the link in a console by typing "990#". Activate it again using "991#".