Compare commits

..

5 Commits

6 changed files with 142 additions and 122 deletions

View File

@ -1,54 +0,0 @@
SvxLink
=======
image:https://travis-ci.org/sm0svx/svxlink.svg?branch=master["Build Status", link="https://travis-ci.org/sm0svx/svxlink"]
image:https://badges.gitter.im/Join%20Chat.svg[link="https://gitter.im/sm0svx/svxlink?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
SvxLink is a project that develops software targeting the ham radio community.
It started out as an EchoLink application for Linux back in 2003 but has now
evolved to be something much more advanced.
== SvxLink Server ==
The SvxLink Server is a general purpose voice services system, which when
connected to a transceiver, can act as both an advanced repeater system and can
also operate on a simplex channel. One could call it a radio operating system.
SvxLink is very extensible and modular. Voice services are implemented as
modules which are isolated from each other. Modules can be implemented in
either C++ or TCL. Examples of modules are:
* *Help* -- A help system
* *Parrot* -- Play back everything that is received
* *EchoLink* -- Connect to other EchoLink stations
* *DtmfRepeater* -- Repeater received DTMF digits
* *TclVoiceMail* -- Send voice mail to other local users
* *PropagationMonitor* -- Announce propagation warnings from dxmaps.com
* *SelCall* -- Send selective calling sequences by entering DTMF codes
* *MetarInformation* -- Play airport weather information
* *Frn* -- Connect to Free Radio Network (FRN) servers
== Qtel ==
Qtel, the Qt EchoLink client, is a graphical application used to access the
EchoLink network.
== Resources ==
These are some of the resources connected to SvxLink:
:gh_pages: http://svxlink.org/
:gh_wiki: https://github.com/sm0svx/svxlink/wiki
:gh_issues: https://github.com/sm0svx/svxlink/issues
:gh_releases: https://github.com/sm0svx/svxlink/releases
:gh_sndclips: https://github.com/sm0svx/svxlink-sounds-en_US-heather/releases
:sf_lists: http://sourceforge.net/p/svxlink/mailman
:gh_main: https://github.com/sm0svx/svxlink
:sf_summary: https://sourceforge.net/projects/svxlink
* {gh_pages}[Project Home Page] -- The main project page
* {gh_wiki}[Wiki Pages] -- Main documentation
* {gh_issues}[Issue Tracker] -- Report bugs and feature requests
* {gh_releases}[Download Releases] -- Download source code releases here
* {gh_sndclips}[Download Sound Clips] -- Download English sound clip files for
SvxLink Server from here
* {sf_lists}[Mailing Lists] -- Communicate with other SvxLink users
* {gh_main}[GitHub Main Page] -- The project site on GitHub
* {sf_summary}[The SvxLink SourcForge Site] -- Old project site

141
README.md Normal file
View File

@ -0,0 +1,141 @@
# Установка (svxlink-usrp)
```
cd ~
sudo apt update
sudo apt upgrade -y
sudo apt install g++ cmake make libsigc++-2.0-dev libgsm1-dev libpopt-dev tcl-dev libgcrypt20-dev
sudo apt install libspeex-dev libasound2-dev libopus-dev librtlsdr-dev doxygen groff alsa-utils
sudo apt install vorbis-tools curl libcurl4-openssl-dev git rtl-sdr libcurl4-openssl-dev libjsoncpp-dev
```
Создаём пользователя svxlink с нужными свойствами
```
sudo useradd -rG audio,plugdev,gpio,dialout svxlink
sudo gpasswd -a svxlink gpio
```
Далее
```
git clone https://github.com/dl1hrc/svxlink.git
cd svxlink
git checkout svxlink-usrp
cd src
mkdir build
cd build
```
Компилируем и устанавливаем (внимательно смотрим на ошибки). Время компиляции зависит от типа платы и длится примерно 10-30 минут
```
cmake -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc -DLOCAL_STATE_DIR=/var -DWITH_SYSTEMD=ON ..
make -j4
make doc
sudo make install
sudo ldconfig
```
Устанавливаем русскоязычные звуковые файлы (спасибо ua6hjq):
```
wget http://ua6hjq.qrz.ru/files/rus-16k.tgz
sudo tar xvf rus-16k.tgz -C /
sudo chown -R svxlink:svxlink /usr/share/svxlink/sounds
```
# Настройка
Итак. У нас есть собранный из свежих исходников svxlink, который нужно предварительно настроить, как описано в статьях, в конце этой странички. Для этого (в первую очередь) редактируем эти файлы конфигурации
```
sudo nano /etc/svxlink/svxlink.conf
sudo nano /etc/svxlink/gpio.conf
```
# Запуск
Правильно будет запустить svxlink в режиме демона и включить автозапуск, чтобы он стартовал самостоятельно, при перезагрузки системы. Делается это так:
```
sudo systemctl enable --now svxlink
```
Запуск, остановка и перезапуск в режиме демона. Если вы изменили любой конфигурационный файл, нужно обязательно перезапустить svxlink
```
sudo systemctl start svxlink
sudo systemctl stop svxlink
sudo systemctl restart svxlink
```
Увидеть что делает svxlink, в реальном времени, посмотреть ошибки, можно приведённой ниже командой , для выхода нажмите Ctrl+C
```
tail -f /var/log/svxlink
```
# Обновление
Чтобы иметь всегда свежую версию svxlink, обновите исходный код, делаем это так:
```
sudo systemctl stop svxlink
cd ~
cd svxlink
git pull
cd src/build
make clean
......
```
и повторяем компиляцию (как описано выше) начиная от строки cmake .... ваша рабочая конфигурация в /etc/svxlink/ останется не тронутой, сразу после обновления, вы можете запускать svxlink и работать как раньше.
SvxLink
=======
image:https://travis-ci.org/sm0svx/svxlink.svg?branch=master["Build Status", link="https://travis-ci.org/sm0svx/svxlink"]
image:https://badges.gitter.im/Join%20Chat.svg[link="https://gitter.im/sm0svx/svxlink?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
SvxLink is a project that develops software targeting the ham radio community.
It started out as an EchoLink application for Linux back in 2003 but has now
evolved to be something much more advanced.
== SvxLink Server ==
The SvxLink Server is a general purpose voice services system, which when
connected to a transceiver, can act as both an advanced repeater system and can
also operate on a simplex channel. One could call it a radio operating system.
SvxLink is very extensible and modular. Voice services are implemented as
modules which are isolated from each other. Modules can be implemented in
either C++ or TCL. Examples of modules are:
* *Help* -- A help system
* *Parrot* -- Play back everything that is received
* *EchoLink* -- Connect to other EchoLink stations
* *DtmfRepeater* -- Repeater received DTMF digits
* *TclVoiceMail* -- Send voice mail to other local users
* *PropagationMonitor* -- Announce propagation warnings from dxmaps.com
* *SelCall* -- Send selective calling sequences by entering DTMF codes
* *MetarInformation* -- Play airport weather information
* *Frn* -- Connect to Free Radio Network (FRN) servers
== Qtel ==
Qtel, the Qt EchoLink client, is a graphical application used to access the
EchoLink network.
== Resources ==
These are some of the resources connected to SvxLink:
:gh_pages: http://svxlink.org/
:gh_wiki: https://github.com/sm0svx/svxlink/wiki
:gh_issues: https://github.com/sm0svx/svxlink/issues
:gh_releases: https://github.com/sm0svx/svxlink/releases
:gh_sndclips: https://github.com/sm0svx/svxlink-sounds-en_US-heather/releases
:sf_lists: http://sourceforge.net/p/svxlink/mailman
:gh_main: https://github.com/sm0svx/svxlink
:sf_summary: https://sourceforge.net/projects/svxlink
* {gh_pages}[Project Home Page] -- The main project page
* {gh_wiki}[Wiki Pages] -- Main documentation
* {gh_issues}[Issue Tracker] -- Report bugs and feature requests
* {gh_releases}[Download Releases] -- Download source code releases here
* {gh_sndclips}[Download Sound Clips] -- Download English sound clip files for
SvxLink Server from here
* {sf_lists}[Mailing Lists] -- Communicate with other SvxLink users
* {gh_main}[GitHub Main Page] -- The project site on GitHub
* {sf_summary}[The SvxLink SourcForge Site] -- Old project site

View File

@ -140,19 +140,6 @@ the risk of some client overwhelming the reflector with requests causing
disturbances in the reflector operation.
Example: HTTP_SRV_PORT=8080
.TP
.B CTRL_PTY
Define a path for a pseudo tty device to change parameters of the svxreflector
on runtime. The idea behind is that e.g. SQL_TIMEOUT can be changed from 300 to
1200 seconds if a broadcast (qst) is sent without restarting the svxreflector.
The device may be defined as CTRL_PTY=/tmp/ctrl_pty
To change the value you may send a command to the device like this:
echo "SQL_TIMEOUT_BLOCKTIME" > /tmp/ctrl_pty
You can change this parameters where xxx stands for the time in seconds.
SQL_TIMEOUT_BLOCKTIME=xxx
or
SQL_TIMEOUT=xxx
.
.SS USERS and PASSWORDS sections
.

View File

@ -44,7 +44,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <AsyncTcpServer.h>
#include <AsyncUdpSocket.h>
#include <AsyncApplication.h>
#include <AsyncPty.h>
#include <common.h>
@ -124,7 +123,7 @@ namespace {
Reflector::Reflector(void)
: m_srv(0), m_udp_sock(0), m_tg_for_v1_clients(1), m_random_qsy_lo(0),
m_random_qsy_hi(0), m_random_qsy_tg(0), m_http_server(0), ctrl_pty(0)
m_random_qsy_hi(0), m_random_qsy_tg(0), m_http_server(0)
{
TGHandler::instance()->talkerUpdated.connect(
mem_fun(*this, &Reflector::onTalkerUpdated));
@ -144,8 +143,6 @@ Reflector::~Reflector(void)
m_client_con_map.clear();
ReflectorClient::cleanup();
delete TGHandler::instance();
delete ctrl_pty;
ctrl_pty = 0;
} /* Reflector::~Reflector */
@ -229,23 +226,6 @@ bool Reflector::initialize(Async::Config &cfg)
sigc::mem_fun(*this, &Reflector::httpClientDisconnected));
}
// the pty path: change params by pty commands
string pty_path;
m_cfg->getValue("GLOBAL", "CTRL_PTY", pty_path);
if (!pty_path.empty())
{
ctrl_pty = new Pty(pty_path);
if (!ctrl_pty->open())
{
cerr << "*** ERROR: Could not open ctrl PTY "
<< pty_path << " as specified in configuration variable "
<< "GLOBAL/" << "CTRL_PTY" << endl;
return false;
}
ctrl_pty->dataReceived.connect(
mem_fun(*this, &Reflector::ctrlPtyReceived));
}
return true;
} /* Reflector::initialize */
@ -803,36 +783,6 @@ uint32_t Reflector::nextRandomQsyTg(void)
} /* Reflector::nextRandomQsyTg */
void Reflector::ctrlPtyReceived(const void *buf, size_t count)
{
const char *buffer = reinterpret_cast<const char*>(buf);
std::string injmessage = "";
int t;
for (size_t i=0; i<count-1; i++)
{
injmessage += *buffer++;
}
size_t f = injmessage.find("SQL_TIMEOUT_BLOCKTIME=");
if (f != std::string::npos)
{
t = atoi(injmessage.erase(f,22+f).c_str());
TGHandler::instance()->setSqlTimeoutBlocktime(t);
cout << "+++ new value for SQL_TIMEOUT_BLOCKTIME="
<< t << endl;
return;
}
f = injmessage.find("SQL_TIMEOUT=");
if (f != std::string::npos)
{
t = atoi(injmessage.erase(f,12+f).c_str());
TGHandler::instance()->setSqlTimeout(t);
cout << "+++ new value for SQL_TIMEOUT=" << t << endl;
}
} /* Reflector::ctrlPtyReceived */
/*
* This file has not been truncated
*/

View File

@ -72,7 +72,6 @@ namespace Async
{
class UdpSocket;
class Config;
class Pty;
};
class ReflectorMsg;
@ -196,7 +195,6 @@ class Reflector : public sigc::trackable
uint32_t m_random_qsy_hi;
uint32_t m_random_qsy_tg;
Async::TcpServer<Async::HttpServerConnection>* m_http_server;
Async::Pty *ctrl_pty;
Reflector(const Reflector&);
Reflector& operator=(const Reflector&);
@ -214,7 +212,6 @@ class Reflector : public sigc::trackable
Async::HttpServerConnection::DisconnectReason reason);
void onRequestAutoQsy(uint32_t from_tg);
uint32_t nextRandomQsyTg(void);
void ctrlPtyReceived(const void *buf, size_t count);
}; /* class Reflector */

View File

@ -14,7 +14,6 @@ LISTEN_PORT=5300
TG_FOR_V1_CLIENTS=999
#RANDOM_QSY_RANGE=12399:100
#HTTP_SRV_PORT=8080
CTRL_PTY=/tmp/ctrl_pty
[USERS]
#SM0ABC-1=MyNodes