MMDVM != Pi-Star
說起MMDVM大家就會想到Pi-Star,但是 MMDVM 不等於 Pi-Star。MMDVM是一套獨立系統,Pi-Star 是一套封裝好的MMDVM套件(包含了 MMDVMHost , Dashboard 等軟件)。
首先你需要
事實上,我們可以單獨部署 MMDVMHost,目前已知 MMDVMHost 可以運行在 Linux,Mac OS,Windows系統上。
創建 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
因為 MMDVMHost 需要連接到 YSFGateway 才能工作。所以我們先安裝 YSFGateway。
git clone https://github.com/g4klx/YSFClients.git
編譯安裝 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
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
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
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
通用配置 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
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)
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 軟件觀察,反覆調試。
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
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
連接 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,使用這個名字重連即可。