开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

XLX reflectors - X shell script option


 

While messaging with another D-STAR admin, about the coexistence of dplus and g2_link and how it used to be with a single command structure. Oh well. It did give me an idea.... dplus supports using 0-9 and A-Z in the 7th position and X in the 8th spot to execute a shell script. So maybe we can make it easier for users to use dplus to change to an XRF/DCS reflector?

I created a test script, exec-U.sh in the /dstar/scripts directory, made it executable with the chmod +x command:
===========================
#!/bin/bash
# script to automatically connect
# A port connect to DCS351D using the g2_link tool
# disconnect first
/usr/bin/nc -u -w 1 10.0.0.2 30003 <<EOF
um A
EOF
#
sleep 3
# disconnect dplus
echo "?????? U" >/dstar/tmp/link-a
#
sleep 3
# first connect with netcat to port
# then connect to DCS351D
/usr/bin/nc -u -w 1 10.0.0.2 30003 <<EOF
lm ADCS351D
EOF

exit 0
=====================
I then added a new entry in to the DV memory of my ID-51A with a NAME of whatever you want and then the CALL SIGN:______UX (6 spaces, the U and then an X)

Transmitted to the repeater:

==> dplus.log <==
User update (KA8SCP? ) rpt (WB1GOF C) 2022/09/22 12:51:16.303
Remote client forward start streamid 3932? 2022/09/22 12:51:16.312
?? rpt2 (WB1GOF G) rpt1 (WB1GOF C) urcall (????? UX) mycall (KA8SCP? /ID51)
Exec start streamid 3932? 2022/09/22 12:51:16.312
?? rpt2 (WB1GOF G) rpt1 (WB1GOF C) urcall (????? UX) mycall (KA8SCP? /ID51)
?? user message (Terry - Westford MA ) mycall (KA8SCP? ) streamid 3932
Stream end?? streamid 3932 cnt 45 missed 0 elapsed 00:01? 2022/09/22 12:51:17.165
exec file /dstar/scripts/exec-U.sh submitted

==> g2_link.log <==
092222 at 12:51:17:Received command [um A] from [10.0.0.2]
092222 at 12:51:17:cmd=[um], parameter=[A]
092222 at 12:51:17:Unlinking from [DCS351? ] mod D
092222 at 12:51:20:sending File:[/root/g2_link/unlinked.dat], mod:[A], RADIO_ID=[UNLINKED??????????? ]

==> dplus.log <==
Reading link file /dstar/tmp/link-a for 'A' streamid 2e4d? 2022/09/22 12:51:20.464
Reflector/Gateway unlink request streamid 2e4d? 2022/09/22 12:51:20.464
?? rpt2 (WB1GOF G) rpt1 (WB1GOF A) urcall (?????? U) mycall (WB1GOF? /??? )
playfile /dstar/dv/alreadyunlinked.dvtool to A
Adding message >Not Linked????????? < to /dstar/tmp/play-a.dvmsg
playfile mod 0 tvs/u 1663865481/465050 tvps/u 0/699660 timediff 1713137214
Reading file /dstar/tmp/play-a.dvtool to 'A' streamid 2b71? 2022/09/22 12:51:21.465
Read msg file for playback
?? rpt2 (WB1GOF A) rpt1 (WB1GOF G) urcall (CQCQCQ? ) mycall (WB1GOF? /RPTR)
Finished reading file /dstar/tmp/play-a.dvtool to 'A' streamid 2b71? 2022/09/22 12:51:21.465
Play file recall to module A stream 2b71

==> g2_link.log <==
092222 at 12:51:21:finished sending File to mod:[A]
092222 at 12:51:23:Received command [lm ADCS351D] from [10.0.0.2]
092222 at 12:51:23:cmd=[lm], parameter=[ADCS351D]
092222 at 12:51:23:sending link request from mod A to link with: [DCS351? ] mod D [45.33.127.97]

==> dplus.log <==
OK

==> g2_link.log <==
092222 at 12:51:23:Connected from: DCS351
092222 at 12:51:26:sending File:[/root/g2_link/linked.dat], mod:[A], RADIO_ID=[LINKED DCS351 D???? ]
092222 at 12:51:27:finished sending File to mod:[A]
================================================

Still working on trying to figure out why an XLX reflector request times out.


--
Terry Stader - KA8SCP
D-STAR Gateway & Reflector Admin


 

I was looking around for something to test g2_link on the gateway console (ie no radio) or for a potential cron...
?
I realise this script below was a while back, but have there been any refinements to below since, to make it more flexible , or for the Alma9 era, or even a webpage panel ?
?
73
?
?Murray G6JYB
?
(for Dplus i have a simple Linlker / unlinker scripts with my favourite reflectors uiult in)
?
On Thu, Sep 22, 2022 at 06:13 PM, Terry M. Stader wrote:

While messaging with another D-STAR admin, about the coexistence of dplus and g2_link and how it used to be with a single command structure. Oh well. It did give me an idea.... dplus supports using 0-9 and A-Z in the 7th position and X in the 8th spot to execute a shell script. So maybe we can make it easier for users to use dplus to change to an XRF/DCS reflector?

I created a test script, exec-U.sh in the /dstar/scripts directory, made it executable with the chmod +x command:
===========================
#!/bin/bash
# script to automatically connect
# A port connect to DCS351D using the g2_link tool
# disconnect first
/usr/bin/nc -u -w 1 10.0.0.2 30003 <<EOF
um A
EOF
#
sleep 3
# disconnect dplus
echo "?????? U" >/dstar/tmp/link-a
#
sleep 3
# first connect with netcat to port
# then connect to DCS351D
/usr/bin/nc -u -w 1 10.0.0.2 30003 <<EOF
lm ADCS351D
EOF

exit 0
=====================
I then added a new entry in to the DV memory of my ID-51A with a NAME of whatever you want and then the CALL SIGN:______UX (6 spaces, the U and then an X)

Transmitted to the repeater:

==> dplus.log <==
User update (KA8SCP? ) rpt (WB1GOF C) 2022/09/22 12:51:16.303
Remote client forward start streamid 3932? 2022/09/22 12:51:16.312
?? rpt2 (WB1GOF G) rpt1 (WB1GOF C) urcall (????? UX) mycall (KA8SCP? /ID51)
Exec start streamid 3932? 2022/09/22 12:51:16.312
?? rpt2 (WB1GOF G) rpt1 (WB1GOF C) urcall (????? UX) mycall (KA8SCP? /ID51)
?? user message (Terry - Westford MA ) mycall (KA8SCP? ) streamid 3932
Stream end?? streamid 3932 cnt 45 missed 0 elapsed 00:01? 2022/09/22 12:51:17.165
exec file /dstar/scripts/exec-U.sh submitted

==> g2_link.log <==
092222 at 12:51:17:Received command [um A] from [10.0.0.2]
092222 at 12:51:17:cmd=[um], parameter=[A]
092222 at 12:51:17:Unlinking from [DCS351? ] mod D
092222 at 12:51:20:sending File:[/root/g2_link/unlinked.dat], mod:[A], RADIO_ID=[UNLINKED??????????? ]

==> dplus.log <==
Reading link file /dstar/tmp/link-a for 'A' streamid 2e4d? 2022/09/22 12:51:20.464
Reflector/Gateway unlink request streamid 2e4d? 2022/09/22 12:51:20.464
?? rpt2 (WB1GOF G) rpt1 (WB1GOF A) urcall (?????? U) mycall (WB1GOF? /??? )
playfile /dstar/dv/alreadyunlinked.dvtool to A
Adding message >Not Linked????????? < to /dstar/tmp/play-a.dvmsg
playfile mod 0 tvs/u 1663865481/465050 tvps/u 0/699660 timediff 1713137214
Reading file /dstar/tmp/play-a.dvtool to 'A' streamid 2b71? 2022/09/22 12:51:21.465
Read msg file for playback
?? rpt2 (WB1GOF A) rpt1 (WB1GOF G) urcall (CQCQCQ? ) mycall (WB1GOF? /RPTR)
Finished reading file /dstar/tmp/play-a.dvtool to 'A' streamid 2b71? 2022/09/22 12:51:21.465
Play file recall to module A stream 2b71

==> g2_link.log <==
092222 at 12:51:21:finished sending File to mod:[A]
092222 at 12:51:23:Received command [lm ADCS351D] from [10.0.0.2]
092222 at 12:51:23:cmd=[lm], parameter=[ADCS351D]
092222 at 12:51:23:sending link request from mod A to link with: [DCS351? ] mod D [45.33.127.97]

==> dplus.log <==
OK

==> g2_link.log <==
092222 at 12:51:23:Connected from: DCS351
092222 at 12:51:26:sending File:[/root/g2_link/linked.dat], mod:[A], RADIO_ID=[LINKED DCS351 D???? ]
092222 at 12:51:27:finished sending File to mod:[A]
================================================

Still working on trying to figure out why an XLX reflector request times out.


--
Terry Stader - KA8SCP
D-STAR Gateway & Reflector Admin