Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | Github | OSChina 博客 | 云社区 | 云栖社区 | Facebook | Linkedin | 知乎专栏 | 视频教程 | About

3.3. 手工编译安装 MMDVM

MMDVM != Pi-Star

说起MMDVM大家就会想到Pi-Star,但是 MMDVM 不等于 Pi-Star。MMDVM是一套独立系统,Pi-Star 是一套封装好的MMDVM套件(包含了 MMDVMHost , Dashboard 等软件)。

首先你需要

事实上,我们可以单独部署 MMDVMHost,目前已知 MMDVMHost 可以运行在 Linux,Mac OS,Windows系统上。

3.3.1. 创建 MMDVM 用户

创建 mmdvm 用户,添加 mmdvm 用户到 dialout 组

		
useradd mmdvm -s /sbin/nologin
usermod mmdvm -G dialout
		
		

因为 /dev/ttyAMA0 和 /dev/ttyUSB0 设备文件,需要设置成 dialout 组的用户才能访问。

		
pi-star@netkiller(ro):~$ ls -l /dev/ttyAMA0
crw-rw---- 1 root dialout 204, 64 Nov 16 22:17 /dev/ttyAMA0
		
neo@netkiller ~ % ll /dev/ttyUSB0 
crw-rw---- 1 root dialout 188, 0 Nov 16 21:40 /dev/ttyUSB0		
		
		

如果你想使用费 dialout 用户访问,可以这样设置

		
neo@netkiller ~ % sudo chmod o+rw /dev/ttyUSB0
neo@netkiller ~ % ll /dev/ttyUSB0
crw-rw-rw- 1 root dialout 188, 0 Nov 16 21:40 /dev/ttyUSB0
		
		

3.3.2. YSFClients

因为 MMDVMHost 需要连接到 YSFGateway 才能工作。所以我们先安装 YSFGateway。

		
git clone https://github.com/g4klx/YSFClients.git		
		
		

3.3.2.1. YSFGateway

编译安装 YSFGateway

			
cd YSFClients/YSFGateway
make
sudo cp YSFGateway /srv/mmdvm/bin
sudo cp YSFGateway.ini /srv/mmdvm/etc
sudo cp FCSRooms.txt  YSFHosts.txt /srv/mmdvm/etc

sudo cp YSFHostsupdate.sh /srv/mmdvm/bin
sudo chmod +x /srv/mmdvm/bin/YSFHostsupdate.sh
			
			

查找中国反射器

			
neo@netkiller /tmp % cat /srv/mmdvm/etc/YSFHosts.txt | grep China
80337;CN China #1;W24166/TG46001;120.234.41.144;42000;044;http://ysf.sz790.com:8081/
82442;CN China #2;W24269/TG46072;116.6.107.115;42006;000;http://ufozhuzi.tpddns.cn:8081/
86319;CN China #3;C4FM;123.58.6.137;42000;002;http://123.58.6.137:8088/
08408;CN CN-China-4;P25;47.105.33.47;42003;001;http://www.bg3hbr.cn/xiuno			
			
			

YSFHosts.txt 需要定时更新,使用 YSFHostsupdate.sh 脚本,需要简单配置一下

			
sudo vim /srv/mmdvm/bin/YSFHostsupdate.sh 

# Full path to YSFHosts
YSFHOSTS=/path/to/YSFHosts.txt
改为
YSFHOSTS=/srv/mmdvm/etc/YSFHosts.txt
			
			

也可以在 crontab 中更新

			
# sudo crontab -e
*/5 * * * * wget -O /srv/mmdvm/etc/YSFHosts.txt http://register.ysfreflector.de/export_csv.php			
			
			

配置 YSFGateway

			
[General]
Callsign=BG7NYT		# 呼号
# Suffix=RPT		# 前缀 YSF 设置为 ND
Suffix=ND		
Id=1234567			# DMR ID
RptAddress=127.0.0.1
RptPort=3200
LocalAddress=127.0.0.1
LocalPort=4200
Daemon=0			# 0 前台运行, 1 后台运行

[Info]
RXFrequency=430475000	# 热点板接收频率,中继板不用配置
TXFrequency=439475000	# 热点板发射频率,如果是单工与上面配置相同即可
Power=1					# 发射功率
Latitude=0.0			# GPS 经度
Longitude=0.0			# GPS 纬度
Height=0				# GPS 海拔高度
Name=Shenzhen			# 城市
Description=China		# 国家

[Log]
# Logging levels, 0=No logging
DisplayLevel=1
FileLevel=1
FilePath=.				# 配置日志写入位置。
FileRoot=YSFGateway

[aprs.fi]
Enable=1				# 启用APRS
# Server=noam.aprs2.net
Server=asia.aprs2.net	# 服务器设置为亚洲
Port=14580
Password=9999
Description=APRS Description
Suffix=Y

[Network]
Startup=CN China #1		# 默认连接到 CN China #1 , 可以在 /srv/mmdvm/etc/YSFGateway.ini 寻找你想连接的反射器
# Startup=FCS00120
# Startup=Alabama-Link
InactivityTimeout=10
Revert=0
Debug=0

[YSF Network]
Enable=1
Port=42000
Hosts=/srv/mmdvm/etc/YSFHosts.txt
ReloadTime=60
ParrotAddress=127.0.0.1
ParrotPort=42012
YSF2DMRAddress=127.0.0.1
YSF2DMRPort=42013
YSF2NXDNAddress=127.0.0.1
YSF2NXDNPort=42014
YSF2P25Address=127.0.0.1
YSF2P25Port=42015

[FCS Network]
Enable=1
Rooms=/srv/mmdvm/etc/FCSRooms.txt
Port=42001

[Mobile GPS]
Enable=0
Address=127.0.0.1
Port=7834
			
			
			

启动 YSFGateway

			
neo@netkiller /tmp % /srv/mmdvm/bin/YSFGateway /srv/mmdvm/etc/YSFGateway.ini
M: 2018-11-16 14:40:53.953 Opening YSF network connection
I: 2018-11-16 14:40:53.953 Opening UDP port on 4200
M: 2018-11-16 14:40:53.953 Opening YSF network connection
I: 2018-11-16 14:40:53.953 Opening UDP port on 42000
M: 2018-11-16 14:40:53.953 Resolving FCS00x addresses
M: 2018-11-16 14:40:58.969 Opening FCS network connection
I: 2018-11-16 14:40:58.969 Opening UDP port on 42001
I: 2018-11-16 14:40:58.969 The ID of this repeater is 88575
I: 2018-11-16 14:40:58.970 Loaded 229 FCS room descriptions
I: 2018-11-16 14:40:58.971 Loaded 285 YSF reflectors
I: 2018-11-16 14:40:58.971 Loaded YSF parrot
I: 2018-11-16 14:40:58.971 Loaded YSF2DMR
I: 2018-11-16 14:40:58.971 Loaded YSF2NXDN
I: 2018-11-16 14:40:58.971 Loaded YSF2P25
M: 2018-11-16 14:40:58.974 Automatic (re-)connection to 80337 - "CN China #1     "
M: 2018-11-16 14:40:58.974 Starting YSFGateway-20180509
M: 2018-11-16 14:40:58.974 Starting the APRS Writer thread
M: 2018-11-16 14:40:58.974 Link successful to MMDVM
M: 2018-11-16 14:40:59.000 Linked to CN China #1     
M: 2018-11-16 14:41:00.001 Received login banner : # javAPRSSrvr 3.15b08

M: 2018-11-16 14:41:00.593 Response from APRS server: # logresp BG7NYT-N unverified, server T2SAPPORO

M: 2018-11-16 14:41:00.594 Connected to the APRS server	
			
			

3.3.2.2. YSFParrot

			
cd YSFClients/YSFParrot
make
sudo cp YSFParrot /srv/mmdvm/bin
			
			

3.3.2.3. YSFReflector

			
cd ../YSFReflector
make
sudo cp YSFReflector /srv/mmdvm/bin
sudo cp YSFReflector.ini /srv/mmdvm/etc

sudo cp YSFReflector.sh /srv/mmdvm/bin 
sudo chmod +x /srv/mmdvm/bin/YSFReflector.sh 		
			
			

3.3.3. DMRGateway

		
cd /usr/local/src
git clone https://github.com/g4klx/DMRGateway.git
cd DMRGateway
make
sudo cp DMRGateway /srv/mmdvm/bin
sudo cp DMRGateway.ini /srv/mmdvm/etc

sudo cp XLXHostsupdate.sh /srv/mmdvm/bin
sudo chmod +x /srv/mmdvm/bin/XLXHostsupdate.sh
		
		

3.3.4. MMDVMHost

3.3.4.1. 编译安装 MMDVMHost

			
neo@netkiller ~ % cd /usr/local/src 
neo@netkiller /usr/local/src % 
neo@netkiller /usr/local/src % git clone https://github.com/g4klx/MMDVMHost.git
neo@netkiller /usr/local/src % git clone https://github.com/g4klx/MMDVMCal.git
neo@netkiller /usr/local/src % cd MMDVMHost
neo@netkiller /usr/local/src/MMDVMHost % make 
			
			

启动 MMDVMHost

			
neo@netkiller ~ % MMDVMHost /srv/mmdvm/etc/MMDVM.ini			
			
			

启动前确认 YSFGateway 已经启动, YSFGateway 日志中已经输出 M: 2018-11-16 14:40:58.974 Link successful to MMDVM 表示启动成功,然后再启动MMDVMHost。

			
neo@netkiller /tmp % sudo /srv/mmdvm/bin/MMDVMHost /srv/mmdvm/etc/MMDVM.ini
I: 2018-11-16 14:49:34.729 This software is for use on amateur radio networks only,
I: 2018-11-16 14:49:34.729 it is to be used for educational purposes only. Its use on
I: 2018-11-16 14:49:34.729 commercial networks is strictly prohibited.
I: 2018-11-16 14:49:34.729 Copyright(C) 2015-2018 by Jonathan Naylor, G4KLX and others
M: 2018-11-16 14:49:34.729 MMDVMHost-20180916 is starting
M: 2018-11-16 14:49:34.729 Built 16:54:14 Nov 14 2018 (GitID #54fbacb)
I: 2018-11-16 14:49:34.729 General Parameters
I: 2018-11-16 14:49:34.729     Callsign: BG7NYT
I: 2018-11-16 14:49:34.729     Id: 123456
I: 2018-11-16 14:49:34.729     Duplex: no
I: 2018-11-16 14:49:34.729     Timeout: 180s
I: 2018-11-16 14:49:34.729     D-Star: disabled
I: 2018-11-16 14:49:34.729     DMR: disabled
I: 2018-11-16 14:49:34.729     YSF: enabled
I: 2018-11-16 14:49:34.729     P25: disabled
I: 2018-11-16 14:49:34.729     NXDN: disabled
I: 2018-11-16 14:49:34.730     POCSAG: disabled
I: 2018-11-16 14:49:34.730 Modem Parameters
I: 2018-11-16 14:49:34.730     Port: /dev/ttyUSB0
I: 2018-11-16 14:49:34.730     Protocol: uart
I: 2018-11-16 14:49:34.730     RX Invert: no
I: 2018-11-16 14:49:34.730     TX Invert: yes
I: 2018-11-16 14:49:34.730     PTT Invert: no
I: 2018-11-16 14:49:34.730     TX Delay: 100ms
I: 2018-11-16 14:49:34.730     RX Offset: 0Hz
I: 2018-11-16 14:49:34.730     TX Offset: 0Hz
I: 2018-11-16 14:49:34.730     RX DC Offset: 0
I: 2018-11-16 14:49:34.730     TX DC Offset: 0
I: 2018-11-16 14:49:34.730     RF Level: 100.0%
I: 2018-11-16 14:49:34.730     DMR Delay: 0 (0.0ms)
I: 2018-11-16 14:49:34.730     RX Level: 50.0%
I: 2018-11-16 14:49:34.730     CW Id TX Level: 50.0%
I: 2018-11-16 14:49:34.730     D-Star TX Level: 50.0%
I: 2018-11-16 14:49:34.730     DMR TX Level: 50.0%
I: 2018-11-16 14:49:34.730     YSF TX Level: 50.0%
I: 2018-11-16 14:49:34.730     P25 TX Level: 50.0%
I: 2018-11-16 14:49:34.730     NXDN TX Level: 50.0%
I: 2018-11-16 14:49:34.730     POCSAG TX Level: 50.0%
I: 2018-11-16 14:49:34.730     RX Frequency: 435000000Hz (435000000Hz)
I: 2018-11-16 14:49:34.730     TX Frequency: 435000000Hz (435000000Hz)
M: 2018-11-16 14:49:34.730 Opening the MMDVM
I: 2018-11-16 14:49:36.750 MMDVM protocol version: 1, description: MMDVM 20180723 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG) 12.2880 MHz (Build: 12:21:05 Aug 27 2018)
I: 2018-11-16 14:49:36.770 Display Parameters
I: 2018-11-16 14:49:36.770     Type: None
W: 2018-11-16 14:49:36.770 No valid display found, disabling
I: 2018-11-16 14:49:36.771 System Fusion Network Parameters
I: 2018-11-16 14:49:36.771     Local Address: 127.0.0.1
I: 2018-11-16 14:49:36.771     Local Port: 3200
I: 2018-11-16 14:49:36.771     Gateway Address: 127.0.0.1
I: 2018-11-16 14:49:36.771     Gateway Port: 4200
I: 2018-11-16 14:49:36.771     Mode Hang: 3s
M: 2018-11-16 14:49:36.771 Opening YSF network connection
I: 2018-11-16 14:49:36.771 RSSI
I: 2018-11-16 14:49:36.771     Mapping File: /srv/mmdvm/etc/RSSI.dat
I: 2018-11-16 14:49:36.771 Loaded 0 RSSI data mapping points from /srv/mmdvm/etc/RSSI.dat
I: 2018-11-16 14:49:36.771 YSF RF Parameters
I: 2018-11-16 14:49:36.771     Low Deviation: no
I: 2018-11-16 14:49:36.771     Remote Gateway: no
I: 2018-11-16 14:49:36.771     TX Hang: 4s
I: 2018-11-16 14:49:36.772     Self Only: no
I: 2018-11-16 14:49:36.772     DSQ: no
I: 2018-11-16 14:49:36.772     Mode Hang: 10s
M: 2018-11-16 14:49:36.772 MMDVMHost-20180916 is running
M: 2018-11-16 14:49:36.860 YSF, received network data from BH3APK     to ALL        at BM4601			
			
			

3.3.4.2. systemd

			
neo@netkiller ~ % sudo vim /lib/systemd/system/mmdvmhost.service
		
[Unit]
Description=MMDVM Host Service
After=syslog.target network.target

[Service]
User=root
WorkingDirectory=/srv/mmdvm/bin/MMDVMHost
ExecStart=/usr/bin/screen -S MMDVMHost -D -m /srv/mmdvm/bin/MMDVMHost /srv/mmdvm/etc/MMDVM.ini
ExecStop=/usr/bin/screen -S MMDVMHost -X quit

[Install]
WantedBy=multi-user.target
			
			

定时器单元配置

			
neo@netkiller ~ % sudo vim /lib/systemd/system/mmdvmhost.timer

[Timer]
OnStartupSec=60

[Install]
WantedBy=multi-user.target
			
			

mmdvmhost.timer 主要的功能是延迟启动,因为MMDVM主板也需要初始化时间

			
neo@netkiller ~ % sudo systemctl daemon-reload
neo@netkiller ~ % sudo systemctl enable mmdvmhost.timer
neo@netkiller ~ % sudo systemctl enable mmdvmhost
			
			

启动和停止

			
neo@netkiller ~ % systemctl enable mmdvmhost	
			
			
			
neo@netkiller ~ % systemctl start mmdvmhost
			
			
			
neo@netkiller ~ % systemctl stop mmdvmhost
			
			
			
neo@netkiller ~ % systemctl restart mmdvmhost
			
			
			
neo@netkiller ~ % systemctl status mmdvmhost			
			
			

禁用 mmdvmhost 下一次开机时将不会自动启动

			
neo@netkiller ~ % systemctl disable mmdvmhost					
			
			

3.3.4.3. 配置 MMDVMHost

通用配置 General

			
[General]
Callsign=BG7NYT	# 你的呼号
Id=123456       # DMR ID
Timeout=180		# 超时设置
Duplex=0		# 0 表示单工,1 表示双工
# ModeHang=10
RFModeHang=10
NetModeHang=3	
Display=None	# 屏幕 OLED 设置
Daemon=0		# 0 前台运行,1 守护进程(后台运行)
			
			

Info 个人信息配置

			
[Info]
RXFrequency=435000000	# 热点接收频率
TXFrequency=435000000   # 热点发射频率,如果是单工模式与上面设置相同
Power=1					# 发射功率
Latitude=0.0			# GPS 经度
Longitude=0.0			# GPS 纬度
Height=0				# GPS 海拔高度
Location=Shenzhen		# 位置
Description=Chain		# 通常设置为国家
URL=http://www.netkille.cn # 呼号连接,默认连接到 QRZ.COM			
			
			

Log 日志配置

			
[Log]
# Logging levels, 0=No logging
DisplayLevel=1
FileLevel=1
FilePath=.		# 日志目录,默认是当前目录
FileRoot=MMDVM			
			
			

CW Id 这是 DMR 配置

			
[CW Id]
Enable=0		# 设置为 0 禁用
Time=10
# Callsign=			
			
			

DMR 呼号映射表

			

[DMR Id Lookup]
File=/srv/mmdvm/etc/DMRIds.dat
Time=24
			
			

NXDN 呼号映射表

			
[NXDN Id Lookup]
File=/srv/mmdvm/etc/NXDN.csv
Time=24			
			
			

调制解调器配置

			
[Modem]
# Port=/dev/ttyACM0
# Port=/dev/ttyAMA0
# Port=\\.\COM3
Port=/dev/ttyUSB0	# 端口配置如果是 GPIO /dev/ttyACM0, 如果是 USB /dev/ttyUSB0
Protocol=uart
# Address=0x22
TXInvert=1		# YSF 设置为 1, DMR 设置为 0
RXInvert=0		# 默认是 0
PTTInvert=0		
TXDelay=100
RXOffset=0
TXOffset=0
DMRDelay=0
RXLevel=50
TXLevel=50
RXDCOffset=0
TXDCOffset=0
RFLevel=100
# CWIdTXLevel=50
# D-StarTXLevel=50
# DMRTXLevel=50
# YSFTXLevel=50
# P25TXLevel=50
# NXDNTXLevel=50
# POCSAGTXLevel=50
RSSIMappingFile=RSSI.dat
Trace=0
Debug=0
		
			
			

等我搞明白的

			
[Transparent Data]
Enable=0
RemoteAddress=127.0.0.1
RemotePort=40094
LocalPort=40095
# SendFrameType=0			
			
			

不懂

			
[UMP]
Enable=0
# Port=\\.\COM4
Port=/dev/ttyACM1			
			
			

D-Star 配置

			
[D-Star]
Enable=0 		# 0 禁用, 1 启用
Module=C
SelfOnly=0
AckReply=1
AckTime=750
AckMessage=0
ErrorReply=1
RemoteGateway=0
# ModeHang=10			
			
			

DMR 配置

			
[DMR]
Enable=0			# 0 禁用, 1 启用
Beacons=0			# 信标 0 禁用, 1 启用
BeaconInterval=60	# 延迟
BeaconDuration=3	# 持续时间
ColorCode=1			# 色码
SelfOnly=0			# 自己用,还是开放使用
EmbeddedLCOnly=1
DumpTAData=1
CallHang=3
TXHang=4
ModeHang=20			
			
			

YSF C4FM

			
[System Fusion]
Enable=1		# 0 禁用, 1 启用
LowDeviation=0
SelfOnly=0
TXHang=4
#DGID=1
RemoteGateway=0
# ModeHang=10			
			
			

P25 和 NXDN 比较少用,这里不讲

			
[P25]
Enable=0
NAC=293
SelfOnly=0
OverrideUIDCheck=0
RemoteGateway=0
# ModeHang=10

[NXDN]
Enable=0
RAN=1
SelfOnly=0
RemoteGateway=0
# ModeHang=10

[POCSAG]
Enable=0
Frequency=439987500
			
			

网络配置,需要就开启,不需要旧关闭。

			
[D-Star Network]
Enable=1		# 0 禁用, 1 启用
GatewayAddress=127.0.0.1
GatewayPort=20010
LocalPort=20011
# ModeHang=3
Debug=0

[DMR Network]
Enable=1
Address=44.131.4.1
Port=62031
Jitter=360
# Local=62032
Password=PASSWORD
# Options=
Slot1=1
Slot2=1
# ModeHang=3
Debug=0

[System Fusion Network]
Enable=1
LocalAddress=127.0.0.1
LocalPort=3200
GatewayAddress=127.0.0.1
GatewayPort=4200
# ModeHang=3
Debug=0

[P25 Network]
Enable=1
GatewayAddress=127.0.0.1
GatewayPort=42020
LocalPort=32010
# ModeHang=3
Debug=0

[NXDN Network]
Enable=1
LocalAddress=127.0.0.1
LocalPort=14021
GatewayAddress=127.0.0.1
GatewayPort=14020
# ModeHang=3
Debug=0

[POCSAG Network]
Enable=1
LocalAddress=127.0.0.1
LocalPort=3800
GatewayAddress=127.0.0.1
GatewayPort=4800
# ModeHang=3
Debug=0			
			
			

跟屏幕有关的配置

			
[TFT Serial]
# Port=modem
Port=/dev/ttyAMA0
Brightness=50

[HD44780]
Rows=2
Columns=16

# For basic HD44780 displays (4-bit connection)
# rs, strb, d0, d1, d2, d3
Pins=11,10,0,1,2,3

# Device address for I2C
I2CAddress=0x20

# PWM backlight
PWM=0
PWMPin=21
PWMBright=100
PWMDim=16

DisplayClock=1
UTC=0

[Nextion]
# Port=modem
Port=/dev/ttyAMA0
Brightness=50
DisplayClock=1
UTC=0
#Screen Layout: 0=G4KLX 2=ON7LDS
ScreenLayout=2
IdleBrightness=20

[OLED]
Type=3
Brightness=0
Invert=0
Scroll=1
Rotate=0
Cast=0

[LCDproc]
Address=localhost
Port=13666
#LocalPort=13667
DimOnIdle=0
DisplayClock=1
UTC=0

[Lock File]
Enable=0
File=/tmp/MMDVM_Active.lck			
			
			

GPS 配置

			
[Mobile GPS]
Enable=0
Address=127.0.0.1
Port=7834			
			
			

			
			
			
			

3.3.4.4. 通过 USB 接入 MMDVM

TTL 下载线定义

			
红-VCC
黑-GND
白-TXD
绿-RXD

PL2303   树莓派
--------------------
VCC     +5V
GND     Ground
TX      RXD(GPIO14)
RX      TXD(GPIO15)		
			
			

将TTL USB线插入USB口,查看 USB 设备

			
neo@netkiller ~ % lsusb 
Bus 001 Device 002: ID 0bda:0158 Realtek Semiconductor Corp. USB 2.0 multicard reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub		
			
			
			
neo@netkiller ~ % lsmod | egrep "usbserial|pl2303"
pl2303                 20480  0
usbserial              45056  1 pl2303		
			
			

查找设备

			
neo@netkiller ~ % dmesg | tail | grep pl2303
[17760.924754] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[17760.924803] pl2303 3-1:1.0: device disconnected
[17785.068831] pl2303 3-1:1.0: pl2303 converter detected
[17785.080428] usb 3-1: pl2303 converter now attached to ttyUSB0		
			
			

修改 MMDVM.ini 配置文件 Port 改为 ttyUSB0 即可,然后重启 MMDVMHost 程序。

			
[Modem]
# Port=/dev/ttyACM0
# Port=/dev/ttyAMA0
# Port=\\.\COM3
Port=/dev/ttyUSB0			
			
			

为了观察启动日志输出,关闭 Daemon=0

			
neo@netkiller /tmp % sudo /srv/mmdvm/bin/MMDVMHost /srv/mmdvm/etc/MMDVM.ini
I: 2018-11-16 14:21:09.281 This software is for use on amateur radio networks only,
I: 2018-11-16 14:21:09.281 it is to be used for educational purposes only. Its use on
I: 2018-11-16 14:21:09.281 commercial networks is strictly prohibited.
I: 2018-11-16 14:21:09.281 Copyright(C) 2015-2018 by Jonathan Naylor, G4KLX and others
M: 2018-11-16 14:21:09.281 MMDVMHost-20180916 is starting
M: 2018-11-16 14:21:09.281 Built 16:54:14 Nov 14 2018 (GitID #54fbacb)
I: 2018-11-16 14:21:09.282 General Parameters
I: 2018-11-16 14:21:09.282     Callsign: BG7NYT
I: 2018-11-16 14:21:09.282     Id: 123456
I: 2018-11-16 14:21:09.282     Duplex: no
I: 2018-11-16 14:21:09.282     Timeout: 180s
I: 2018-11-16 14:21:09.282     D-Star: disabled
I: 2018-11-16 14:21:09.282     DMR: disabled
I: 2018-11-16 14:21:09.282     YSF: enabled
I: 2018-11-16 14:21:09.282     P25: disabled
I: 2018-11-16 14:21:09.282     NXDN: disabled
I: 2018-11-16 14:21:09.282     POCSAG: disabled
I: 2018-11-16 14:21:09.282 Modem Parameters
I: 2018-11-16 14:21:09.282     Port: /dev/ttyUSB0
I: 2018-11-16 14:21:09.282     Protocol: uart
I: 2018-11-16 14:21:09.282     RX Invert: no
I: 2018-11-16 14:21:09.282     TX Invert: yes
I: 2018-11-16 14:21:09.282     PTT Invert: no
I: 2018-11-16 14:21:09.282     TX Delay: 100ms
I: 2018-11-16 14:21:09.282     RX Offset: 0Hz
I: 2018-11-16 14:21:09.282     TX Offset: 0Hz
I: 2018-11-16 14:21:09.282     RX DC Offset: 0
I: 2018-11-16 14:21:09.282     TX DC Offset: 0
I: 2018-11-16 14:21:09.282     RF Level: 100.0%
I: 2018-11-16 14:21:09.283     DMR Delay: 0 (0.0ms)
I: 2018-11-16 14:21:09.283     RX Level: 50.0%
I: 2018-11-16 14:21:09.283     CW Id TX Level: 50.0%
I: 2018-11-16 14:21:09.283     D-Star TX Level: 50.0%
I: 2018-11-16 14:21:09.283     DMR TX Level: 50.0%
I: 2018-11-16 14:21:09.283     YSF TX Level: 50.0%
I: 2018-11-16 14:21:09.283     P25 TX Level: 50.0%
I: 2018-11-16 14:21:09.283     NXDN TX Level: 50.0%
I: 2018-11-16 14:21:09.283     POCSAG TX Level: 50.0%
I: 2018-11-16 14:21:09.283     RX Frequency: 435000000Hz (435000000Hz)
I: 2018-11-16 14:21:09.283     TX Frequency: 435000000Hz (435000000Hz)
M: 2018-11-16 14:21:09.283 Opening the MMDVM
I: 2018-11-16 14:21:11.302 MMDVM protocol version: 1, description: MMDVM 20180723 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG) 12.2880 MHz (Build: 12:21:05 Aug 27 2018)			
			
			

/dev/ttyUSB0 启动成功,并找到设备 MMDVM protocol version: 1, description: MMDVM 20180723 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG) 12.2880 MHz (Build: 12:21:05 Aug 27 2018)

3.3.5. MMDVMCal

MMDVMCal 是用来调试 DMR 的工具

		
cd /usr/local/src 
git clone https://github.com/g4klx/MMDVMCal.git
cd MMDVMCal
make

sudo cp MMDVMCal /srv/mmdvm/bin

# sudo /srv/mmdvm/bin/MMDVMCal /dev/ttyACM0		
		
		
		
neo@netkiller /usr/local/src/MMDVMCal % ./MMDVMCal /dev/ttyUSB0 
Version: 1, description: MMDVM 20180723 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG) 12.2880 MHz (Build: 12:21:05 Aug 27 2018)
The commands are:
    H/h      Display help
    Q/q      Quit
    W/w      Enable/disable modem debug messages
    I        Toggle transmit inversion
    i        Toggle receive inversion
    O        Increase TX DC offset level
    o        Decrease TX DC offset level
    C        Increase RX DC offset level
    c        Decrease RX DC offset level
    P/p      Toggle PTT inversion
    R        Increase receive level
    r        Decrease receive level
    T        Increase transmit level
    t        Decrease transmit level
    d        D-Star Mode
    D        DMR Deviation Mode (Adjust for 2.75Khz Deviation)
    L/l      DMR Low Frequency Mode (80 Hz square wave)
    A        DMR Duplex 1031 Hz Test Pattern (TS2 CC1 ID1 TG9)
    M/m      DMR Simplex 1031 Hz Test Pattern (CC1 ID1 TG9)
    a        P25 1011 Hz Test Pattern (NAC293 ID1 TG1)
    N        NXDN 1031 Hz Test Pattern (RAN1 ID1 TG1)
    K/k      BER Test Mode (FEC) for D-Star
    b        BER Test Mode (FEC) for DMR Simplex (CC1)
    B        BER Test Mode (1031 Hz Test Pattern) for DMR Simplex (CC1 ID1 TG9)
    J        BER Test Mode (FEC) for YSF
    j        BER Test Mode (FEC) for P25
    n        BER Test Mode (FEC) for NXDN
    S/s      RSSI Mode
    V/v      Display version of MMDVMCal
    <space>  Toggle transmit
Levels: inverted: no, max: 436, min: -325, diff: 761, centre: 55		
		
		

设置好后按空格键 MMDVM 板开始发射,使用 SDR 软件观察,反复调试。

3.3.6. Pi-Star Digital Voice Dashboard

Pi-Star_DV_Dash 是 pi-star 的 Dashboard,就是我们通过IP地址进入的界面。

项目地址是: https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash

		
git clone https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash.git		
		
		

3.3.7. MMDVM firmware

			
sudo apt install -y gcc-arm-none-eabi	
		
		
		
neo@netkiller /usr/local/src/MMDVM % arm-none-eabi-gcc -v                    
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/6.3.1/lto-wrapper
Target: arm-none-eabi
Configured with: ../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/lib/include' --mandir='/usr/lib/share/man' --infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir='/usr/lib/lib/x86_64-linux-gnu' --libexecdir='/usr/lib/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --mandir=/usr/share/man --enable-languages=c,c++,lto --enable-multilib --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib --with-gnu-as --with-gnu-ld --with-pkgversion=15:6.3.1+svn253039-1build1 --without-included-gettext --prefix=/usr/lib --infodir=/usr/share/doc/gcc-arm-none-eabi/info --htmldir=/usr/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3 --host=x86_64-linux-gnu --with-headers=no --without-newlib --with-multilib-list=rmprofile CFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' CXXFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' FCFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' FFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' GCJFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro' OBJCFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' OBJCXXFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-arm-none-eabi-iopiMw/gcc-arm-none-eabi-6.3.1+svn253039=. -fstack-protector-strong' INHIBIT_LIBC_CFLAGS=-DUSE_TM_CLONE_REGISTRY=0 AR_FOR_TARGET=arm-none-eabi-ar AS_FOR_TARGET=arm-none-eabi-as LD_FOR_TARGET=arm-none-eabi-ld NM_FOR_TARGET=arm-none-eabi-nm OBJDUMP_FOR_TARGET=arm-none-eabi-objdump RANLIB_FOR_TARGET=arm-none-eabi-ranlib READELF_FOR_TARGET=arm-none-eabi-readelf STRIP_FOR_TARGET=arm-none-eabi-strip
Thread model: single
gcc version 6.3.1 20170620 (15:6.3.1+svn253039-1build1)		
		
		
		
cd /usr/local/src
git clone https://github.com/g4klx/MMDVM.git
cd MMDVM
./mmdvmmenu.sh
		
		
		

3.3.8. FAQ

3.3.8.1. What is the difference between FCS and YSF?

https://forum.sharkrf.com/viewtopic.php?t=1750

3.3.8.2. Trying to find non existent YSF reflector with a name of CN China 1

连接 CN China 1 失败,日志如下:

			
neo@netkiller /tmp % /srv/mmdvm/bin/YSFGateway /srv/mmdvm/etc/YSFGateway.ini 
M: 2018-11-16 14:19:55.563 Opening YSF network connection
I: 2018-11-16 14:19:55.564 Opening UDP port on 4200
M: 2018-11-16 14:19:55.564 Opening YSF network connection
I: 2018-11-16 14:19:55.564 Opening UDP port on 42000
M: 2018-11-16 14:19:55.564 Resolving FCS00x addresses
M: 2018-11-16 14:20:00.582 Opening FCS network connection
I: 2018-11-16 14:20:00.582 Opening UDP port on 42001
I: 2018-11-16 14:20:00.582 The ID of this repeater is 88575
I: 2018-11-16 14:20:00.583 Loaded 229 FCS room descriptions
I: 2018-11-16 14:20:00.584 Loaded 285 YSF reflectors
I: 2018-11-16 14:20:00.584 Loaded YSF parrot
I: 2018-11-16 14:20:00.584 Loaded YSF2DMR
I: 2018-11-16 14:20:00.584 Loaded YSF2NXDN
I: 2018-11-16 14:20:00.584 Loaded YSF2P25
M: 2018-11-16 14:20:00.587 Trying to find non existent YSF reflector with a name of CN China 1
M: 2018-11-16 14:20:00.587 Starting YSFGateway-20180509
M: 2018-11-16 14:20:00.587 Starting the APRS Writer thread
M: 2018-11-16 14:20:01.246 Received login banner : # aprsc 2.1.4-g408ed49

M: 2018-11-16 14:20:01.733 Response from APRS server: # logresp BG7NYT-N unverified, server T2JKTP

M: 2018-11-16 14:20:01.733 Connected to the APRS server
M: 2018-11-16 14:21:16.342 Link successful to MMDVM					
			
			

在 YSFHosts.txt 查找中国反射器

			
neo@netkiller /tmp % cat /srv/mmdvm/etc/YSFHosts.txt | grep China
80337;CN China #1;W24166/TG46001;120.234.41.144;42000;044;http://ysf.sz790.com:8081/
82442;CN China #2;W24269/TG46072;116.6.107.115;42006;000;http://ufozhuzi.tpddns.cn:8081/
86319;CN China #3;C4FM;123.58.6.137;42000;002;http://123.58.6.137:8088/
08408;CN CN-China-4;P25;47.105.33.47;42003;001;http://www.bg3hbr.cn/xiuno			
			
			

发现名字已经改为 CN China #1,使用这个名字重连即可。