4
Fork 0
AutoPatch/SVXLink/README.md
Artem Prilutskiy 99da7f3ddb Fixed README
2017-12-23 09:44:55 +03:00

106 lines
2.5 KiB
Markdown

# 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:
Find this:
```
#include "version/SVXLINK.h"
```
and add this ***AFTER***:
```
include "BrandMeisterBridge.h"
```
Find this:
```
private:
```
and add this ***AFTER***:
```
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 then 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 (*void ModuleEchoLink::onChatMsgReceived(QsoImpl *qso, const string& msg)*):
```
processEvent(ss.str());
```
And add this ***BEFORE***:
```
bridge.handleChatMessage(escaped.c_str());
```
Find this line (*void ModuleEchoLink::broadcastTalkerStatus(void)*):
```
msg << "> " << mycall << " " << sysop_name << "\n\n";
```
And add this ***BEFORE***:
```
const char* sysop_name = bridge.getTalker();
```
Find this text (*void ModuleEchoLink::broadcastTalkerStatus(void)*):
```
msg << "> " << talker->remoteCallsign() << " " << talker->remoteName() << "\n\n";
```
And add this ***AFTER***:
```
bridge.setTalker(talker->remoteCallsign().c_str(), talker->remoteName().c_str());
```
## 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.