3
Fork 0

Fixed README

This commit is contained in:
Artem Prilutskiy 2017-12-23 09:35:43 +03:00
parent 68c0249865
commit 3a1c896fe4

View file

@ -1,45 +1,87 @@
SVXLink patch to bridge with BrandMeister
Copyright 2015 by Artem Prilutskiy
-----------------------------------------
# SVXLink patch to bridge with BrandMeister
Copyright 2015-2018 by Artem Prilutskiy
The main purpose for this patch is to pass a callsign and talker alias between echolink and DMR.
## How to install:
Put PatchCord.* and BrandMeisterBridge.* into src/modules/echolink
Add following lines to CMakeLists.txt after "set(MODSRC QsoImpl.cpp)":
```
pkg_check_modules(DBUS dbus-1)
include_directories(${DBUS_INCLUDE_DIRS})
set(LIBS ${LIBS} ${DBUS_LIBRARIES})
set(MODSRC ${MODSRC} PatchCord.cpp BrandMeisterBridge.cpp)
```
Add following lines to ModuleEchoLink.h:
### Add following lines to ModuleEchoLink.h:
[#include "BrandMeisterBridge.h"]
after
[#include "version/SVXLINK.h"]
Find this:
```#include "version/SVXLINK.h"```
and add ***ADFTER***:
```include "BrandMeisterBridge.h"```
[BrandMeisterBridge bridge;]
after
[private:]
Find this:
```private:```
and add ***ADFTER***:
```BrandMeisterBridge bridge;```
### Add following lines to ModuleEchoLink.cpp:
Find this (*bool ModuleEchoLink::initialize(void)*):
```
IpAddress bind_addr;
if (cfg().getValue(cfgName(), "BIND_ADDR", bind_addr) && bind_addr.isEmpty())
{
cerr << "*** ERROR: Invalid configuration value for " << cfgName()
<< "/BIND_ADDR specified.\n";
moduleCleanup();
return false;
}
```
And put next lines:
```
if (cfg().getValue(cfgName(), "BRIDGE_DEFAULT", value))
{
bridge.setDefaultConfiguration(value.c_str());
}
if (cfg().getValue(cfgName(), "BRIDGE_PROXY", value))
{
bridge.setProxyConfiguration(value.c_str());
}
```
Find this text (*void ModuleEchoLink::onChatMsgReceived(QsoImpl *qso, const string& msg)*):
```
processEvent(ss.str());
```
And add ***BEFORE***:
```bridge.handleChatMessage(escaped.c_str());```
Add following lines to method "ModuleEchoLink::broadcastTalkerStatus" of ModuleEchoLink.cpp:
[const char* sysop_name = bridge.getTalker();]
before
[msg << "> " << mycall << " " << sysop_name << "\n\n";]
[bridge.setTalker(talker->remoteCallsign().c_str(), talker->remoteName().c_str());]
before
[msg << "> " << talker->remoteCallsign() << " " << talker->remoteName() << "\n\n";]
Find this text (*void ModuleEchoLink::broadcastTalkerStatus(void)*):
```
msg << "> " << mycall << " " << sysop_name << "\n\n";
```
And add ***BEFORE***:
```const char* sysop_name = bridge.getTalker();```
Add following lines to method "ModuleEchoLink::onChatMsgReceived" of ModuleEchoLink.cpp:
[bridge.handleChatMessage(escaped.c_str());]
before
[processEvent(ss.str());]
Find this text (*void ModuleEchoLink::broadcastTalkerStatus(void)*):
```msg << "> " << talker->remoteCallsign() << " " << talker->remoteName() << "\n\n";```
And add ***AFTER***:
```bridge.setTalker(talker->remoteCallsign().c_str(), talker->remoteName().c_str());```
Configuration of bridge are hand-coded inside BrandMeisterBridge.cpp:
## How to configure:
Add folowing lines to your *ModuleEchoLink.conf*
BRIDGE_DEFAULT=9504
BRIDGE_PROXY=2501:10
Where BRIDGE_DEFAULT is a default ID of callee that will be passed when ID cannot be resolved by callsign (most possible this callsign has not been registred in DMR database)
BRIDGE_PROXY should correspond to Network ID of BrandMeister Server and Cord ID connected to.
Please configure PatchCord to number 10 in BrandMeister.conf
Configuration of MySQL connection should be placed in /opt/BrandMeister/Registry.cnf