-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsection.mmdvm.setup.xml
More file actions
990 lines (941 loc) · 30 KB
/
Copy pathsection.mmdvm.setup.xml
File metadata and controls
990 lines (941 loc) · 30 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
<?xml version="1.0" encoding="UTF-8"?>
<section id="mmdvmhost">
<title>手工编译安装 MMDVM</title>
<para>MMDVM != Pi-Star</para>
<para>说起MMDVM大家就会想到Pi-Star,但是 MMDVM 不等于 Pi-Star。MMDVM是一套独立系统,Pi-Star 是一套封装好的MMDVM套件(包含了 MMDVMHost , Dashboard 等软件)。</para>
<para>首先你需要</para>
<graphic format="png" fileref="images/mmdvm/MMDVM.png" />
<para>事实上,我们可以单独部署 MMDVMHost,目前已知 MMDVMHost 可以运行在 Linux,Mac OS,Windows系统上。</para>
<section id="mmdvm.user">
<title>创建 MMDVM 用户</title>
<para>创建 mmdvm 用户,添加 mmdvm 用户到 dialout 组</para>
<screen>
<![CDATA[
useradd mmdvm -s /sbin/nologin
usermod mmdvm -G dialout
]]>
</screen>
<para>因为 /dev/ttyAMA0 和 /dev/ttyUSB0 设备文件,需要设置成 dialout 组的用户才能访问。</para>
<screen>
<![CDATA[
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
]]>
</screen>
<para>如果你想使用费 dialout 用户访问,可以这样设置</para>
<screen>
<![CDATA[
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
]]>
</screen>
</section>
<section id="YSFClients">
<title>YSFClients</title>
<para>因为 MMDVMHost 需要连接到 YSFGateway 才能工作。所以我们先安装 YSFGateway。</para>
<screen>
<![CDATA[
git clone https://github.com/g4klx/YSFClients.git
]]>
</screen>
<section id="YSFGateway">
<title>YSFGateway</title>
<para>编译安装 YSFGateway</para>
<screen>
<![CDATA[
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
]]>
</screen>
<para>查找中国反射器</para>
<screen>
<![CDATA[
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
]]>
</screen>
<para>YSFHosts.txt 需要定时更新,使用 YSFHostsupdate.sh 脚本,需要简单配置一下</para>
<screen>
<![CDATA[
sudo vim /srv/mmdvm/bin/YSFHostsupdate.sh
# Full path to YSFHosts
YSFHOSTS=/path/to/YSFHosts.txt
改为
YSFHOSTS=/srv/mmdvm/etc/YSFHosts.txt
]]>
</screen>
<para>也可以在 crontab 中更新</para>
<screen>
<![CDATA[
# sudo crontab -e
*/5 * * * * wget -O /srv/mmdvm/etc/YSFHosts.txt http://register.ysfreflector.de/export_csv.php
]]>
</screen>
<para>配置 YSFGateway</para>
<screen>
<![CDATA[
[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
]]>
</screen>
<para>启动 YSFGateway</para>
<screen>
<![CDATA[
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
]]>
</screen>
</section>
<section id="YSFParrot">
<title>YSFParrot</title>
<para></para>
<screen>
<![CDATA[
cd YSFClients/YSFParrot
make
sudo cp YSFParrot /srv/mmdvm/bin
]]>
</screen>
</section>
<section id="YSFReflector">
<title>YSFReflector</title>
<screen>
<![CDATA[
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
]]>
</screen>
</section>
</section>
<section id="DMRGateway">
<title>DMRGateway</title>
<screen>
<![CDATA[
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
]]>
</screen>
</section>
<section id="MMDVMHost">
<title>MMDVMHost</title>
<section>
<title>编译安装 MMDVMHost</title>
<screen>
<![CDATA[
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
]]>
</screen>
<para>启动 MMDVMHost</para>
<screen>
<![CDATA[
neo@netkiller ~ % MMDVMHost /srv/mmdvm/etc/MMDVM.ini
]]>
</screen>
<para>启动前确认 YSFGateway 已经启动, YSFGateway 日志中已经输出 M: 2018-11-16 14:40:58.974 Link successful to MMDVM 表示启动成功,然后再启动MMDVMHost。</para>
<screen>
<![CDATA[
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
]]>
</screen>
</section>
<section>
<title>systemd</title>
<para></para>
<screen>
<![CDATA[
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
]]>
</screen>
<para>定时器单元配置</para>
<screen>
<![CDATA[
neo@netkiller ~ % sudo vim /lib/systemd/system/mmdvmhost.timer
[Timer]
OnStartupSec=60
[Install]
WantedBy=multi-user.target
]]>
</screen>
<para>mmdvmhost.timer 主要的功能是延迟启动,因为MMDVM主板也需要初始化时间</para>
<screen>
<![CDATA[
neo@netkiller ~ % sudo systemctl daemon-reload
neo@netkiller ~ % sudo systemctl enable mmdvmhost.timer
neo@netkiller ~ % sudo systemctl enable mmdvmhost
]]>
</screen>
<para>启动和停止</para>
<screen>
<![CDATA[
neo@netkiller ~ % systemctl enable mmdvmhost
]]>
</screen>
<screen>
<![CDATA[
neo@netkiller ~ % systemctl start mmdvmhost
]]>
</screen>
<screen>
<![CDATA[
neo@netkiller ~ % systemctl stop mmdvmhost
]]>
</screen>
<screen>
<![CDATA[
neo@netkiller ~ % systemctl restart mmdvmhost
]]>
</screen>
<screen>
<![CDATA[
neo@netkiller ~ % systemctl status mmdvmhost
]]>
</screen>
<para>禁用 mmdvmhost 下一次开机时将不会自动启动</para>
<screen>
<![CDATA[
neo@netkiller ~ % systemctl disable mmdvmhost
]]>
</screen>
</section>
<section id="MMDVM.ini">
<title>配置 MMDVMHost</title>
<para>通用配置 General</para>
<screen>
<![CDATA[
[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 守护进程(后台运行)
]]>
</screen>
<para>Info 个人信息配置</para>
<screen>
<![CDATA[
[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
]]>
</screen>
<para>Log 日志配置</para>
<screen>
<![CDATA[
[Log]
# Logging levels, 0=No logging
DisplayLevel=1
FileLevel=1
FilePath=. # 日志目录,默认是当前目录
FileRoot=MMDVM
]]>
</screen>
<para>CW Id 这是 DMR 配置</para>
<screen>
<![CDATA[
[CW Id]
Enable=0 # 设置为 0 禁用
Time=10
# Callsign=
]]>
</screen>
<para>DMR 呼号映射表</para>
<screen>
<![CDATA[
[DMR Id Lookup]
File=/srv/mmdvm/etc/DMRIds.dat
Time=24
]]>
</screen>
<para>NXDN 呼号映射表</para>
<screen>
<![CDATA[
[NXDN Id Lookup]
File=/srv/mmdvm/etc/NXDN.csv
Time=24
]]>
</screen>
<para>调制解调器配置</para>
<screen>
<![CDATA[
[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
]]>
</screen>
<para>等我搞明白的</para>
<screen>
<![CDATA[
[Transparent Data]
Enable=0
RemoteAddress=127.0.0.1
RemotePort=40094
LocalPort=40095
# SendFrameType=0
]]>
</screen>
<para>不懂</para>
<screen>
<![CDATA[
[UMP]
Enable=0
# Port=\\.\COM4
Port=/dev/ttyACM1
]]>
</screen>
<para>D-Star 配置</para>
<screen>
<![CDATA[
[D-Star]
Enable=0 # 0 禁用, 1 启用
Module=C
SelfOnly=0
AckReply=1
AckTime=750
AckMessage=0
ErrorReply=1
RemoteGateway=0
# ModeHang=10
]]>
</screen>
<para>DMR 配置</para>
<screen>
<![CDATA[
[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
]]>
</screen>
<para>YSF C4FM</para>
<screen>
<![CDATA[
[System Fusion]
Enable=1 # 0 禁用, 1 启用
LowDeviation=0
SelfOnly=0
TXHang=4
#DGID=1
RemoteGateway=0
# ModeHang=10
]]>
</screen>
<para>P25 和 NXDN 比较少用,这里不讲</para>
<screen>
<![CDATA[
[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
]]>
</screen>
<para>网络配置,需要就开启,不需要旧关闭。</para>
<screen>
<![CDATA[
[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
]]>
</screen>
<para>跟屏幕有关的配置</para>
<screen>
<![CDATA[
[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
]]>
</screen>
<para>GPS 配置</para>
<screen>
<![CDATA[
[Mobile GPS]
Enable=0
Address=127.0.0.1
Port=7834
]]>
</screen>
<para></para>
<screen>
<![CDATA[
]]>
</screen>
</section>
<section id="mmdvm.usb">
<title>通过 USB 接入 MMDVM</title>
<para>TTL 下载线定义</para>
<screen>
<![CDATA[
红-VCC
黑-GND
白-TXD
绿-RXD
PL2303 树莓派
--------------------
VCC +5V
GND Ground
TX RXD(GPIO14)
RX TXD(GPIO15)
]]>
</screen>
<para>将TTL USB线插入USB口,查看 USB 设备</para>
<screen>
<![CDATA[
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
]]>
</screen>
<screen>
<![CDATA[
neo@netkiller ~ % lsmod | egrep "usbserial|pl2303"
pl2303 20480 0
usbserial 45056 1 pl2303
]]>
</screen>
<para>查找设备</para>
<screen>
<![CDATA[
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
]]>
</screen>
<para>修改 MMDVM.ini 配置文件 Port 改为 ttyUSB0 即可,然后重启 MMDVMHost 程序。</para>
<screen>
<![CDATA[
[Modem]
# Port=/dev/ttyACM0
# Port=/dev/ttyAMA0
# Port=\\.\COM3
Port=/dev/ttyUSB0
]]>
</screen>
<para>为了观察启动日志输出,关闭 Daemon=0</para>
<screen>
<![CDATA[
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)
]]>
</screen>
<para>/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)</para>
</section>
</section>
<section id="MMDVMCal">
<title>MMDVMCal</title>
<para>MMDVMCal 是用来调试 DMR 的工具</para>
<screen>
<![CDATA[
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
]]>
</screen>
<screen>
<![CDATA[
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
]]>
</screen>
<para>设置好后按空格键 MMDVM 板开始发射,使用 SDR 软件观察,反复调试。</para>
</section>
<section id="mmdvm.dashboard">
<title>Pi-Star Digital Voice Dashboard</title>
<para>Pi-Star_DV_Dash 是 pi-star 的 Dashboard,就是我们通过IP地址进入的界面。</para>
<para>
项目地址是:
<ulink url="https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash" />
</para>
<screen>
<![CDATA[
git clone https://github.com/AndyTaylorTweet/Pi-Star_DV_Dash.git
]]>
</screen>
</section>
<section id="mmdvm.firmware">
<title>MMDVM firmware</title>
<para></para>
<!-- sudo apt install gcc-arm-linux-gnueabi g++-arm-linux-gnueabihf -->
<screen>
<![CDATA[
sudo apt install -y gcc-arm-none-eabi
]]>
</screen>
<screen>
<![CDATA[
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)
]]>
</screen>
<screen>
<![CDATA[
cd /usr/local/src
git clone https://github.com/g4klx/MMDVM.git
cd MMDVM
./mmdvmmenu.sh
]]>
</screen>
</section>
<section id="mmdvm.faq">
<title>FAQ</title>
<section>
<title>What is the difference between FCS and YSF? </title>
<para>
<ulink url="https://forum.sharkrf.com/viewtopic.php?t=1750" />
</para>
</section>
<section>
<title>Trying to find non existent YSF reflector with a name of CN China 1</title>
<para>连接 CN China 1 失败,日志如下:</para>
<screen>
<![CDATA[
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
]]>
</screen>
<para>在 YSFHosts.txt 查找中国反射器</para>
<screen>
<![CDATA[
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
]]>
</screen>
<para>发现名字已经改为 CN China #1,使用这个名字重连即可。</para>
</section>
</section>
</section>