Home Tutto sul DSTAR SysOP DSTAR TO XRF008
DSTAR TO XRF008 PDF Stampa E-mail
Scritto da Maurizio Spanio (IZ3CYW)   
Sabato 24 Ottobre 2009 22:43

Per collegare il proprio ripetitore D-STAR al xReflector è necessario procurarsi il file  dextra_linux_v267.zip

Vi consiglio di scaricare sempre l’ultima versione direttamente dalla sezione file del  sito D-STAR_Open_source .  Per accedere alla sezione file bisogna però essere registrati  .

 Create una nuova directory  all’interno  /root/dextra  , copiate dentro  il file  dextra_linux_v267.zip e scompattatelo

 

 [root@localhost dextra]# unzip dextra_linux_v267.zip

Archive:  dextra_linux_v267.zip

  inflating: dextra_send.cpp

  inflating: dextra_send.doit

  inflating: dextra_srv.cfg

  inflating: dextra_srv.cpp

  inflating: dextra_srv.doit

  inflating: dextra_srv.sh

  inflating: dextra_reflect.cfg

  inflating: dextra_reflect.sh

  inflating: dextra_reflect.doit

  inflating: dextra_reflect.cpp

  inflating: already_linked.dat

  inflating: already_unlinked.dat

  inflating: linked.dat

  inflating: unlinked.dat

  inflating: dextra_srv_notify.sh

  inflating: failed_linked.dat

  inflating: dextra_send_text.doit

  inflating: dextra_send_text.cpp

  inflating: xref_status_help_file.txt

  inflating: xref_status.pl

  inflating: dstar_dextra_srv_reflect_README.txt

  inflating: dstar_audio_streaming_to_a_web_site.txt

  inflating: dstar_XRF_reflectors.txt

  inflating: mp3_wav_files_dstar_gwy_repeater_announcements.txt

  inflating: dstar_XRF_Reflector_local_or_remote_DB_access.txt

  inflating: dextra_srv_dstar_ADDON_as_a_Linux_service.txt

  inflating: dextra_reflect_dstar_reflector_as_a_Linux_service.txt

 

Create la tabella che conterrà gli indirizzi dei xREFLECTOR a cui il ripetitore potrà collegarsi e inseriamo l’indirizzo del XRF008 .

Entrate  nel DB

psql -U postgres -d dstar_global

dstar_global=#

 

Create la tabella

create table xrfdata (

xrf_name character(8) NOT NULL,

xrf_domain character varying(40) NOT NULL,

PRIMARY KEY (xrf_name) );

 

Inserite nella tabella l'indirizzo

dstar_global=# insert into xrfdata values ('XRF008','88.32.99.139');

 

 

Se avete fatto tutto nel modo giusto  inviando la query qui sotto riportata otterete questo risultato  

 

dstar_global=# select * from xrfdata;

 xrf_name | xrf_domain

 xrf_name |  xrf_domain

----------+--------------

 XRF008   | 88.32.99.139

(1 row)

 

Ritorna ora in /root/dextra ed eseguiamo uno alla volta i seguenti comandi  :

 

   chmod +x *.doit

   chmod +x dextra_srv.sh

   chmod +x dextra_srv_notify.sh

 

   ./dextra_srv.doit

   ./dextra_send.doit

   ./dextra_send_text.doit

 

[root@localhost dextra]# ldd dextra_srv

linux-gate.so.1 =>  (0x00585000)

        libpq.so.5 => /opt/products/dstar/pgsql/lib/libpq.so.5 (0x00266000)

        librt.so.1 => /lib/librt.so.1 (0x00773000)

        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x04547000)

        libm.so.6 => /lib/libm.so.6 (0x0072b000)

        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x004f5000)

        libc.so.6 => /lib/libc.so.6 (0x005e5000)

        libcrypt.so.1 => /lib/libcrypt.so.1 (0x04634000)

        libpthread.so.0 => /lib/libpthread.so.0 (0x0075a000)

        /lib/ld-linux.so.2 (0x005c2000)

 

[root@localhost dextra]#  ldd dextra_send

        linux-gate.so.1 =>  (0x00b52000)

        librt.so.1 => /lib/librt.so.1 (0x00773000)

        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x04547000)

        libm.so.6 => /lib/libm.so.6 (0x0072b000)

        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x004f5000)

        libc.so.6 => /lib/libc.so.6 (0x005e5000)

        libpthread.so.0 => /lib/libpthread.so.0 (0x0075a000)

        /lib/ld-linux.so.2 (0x005c2000)

 

[root@localhost dextra]#  ldd dextra_send_text

        linux-gate.so.1 =>  (0x004d7000)

        librt.so.1 => /lib/librt.so.1 (0x00773000)

        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x04547000)

        libm.so.6 => /lib/libm.so.6 (0x0072b000)

        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x004f5000)

        libc.so.6 => /lib/libc.so.6 (0x005e5000)

        libpthread.so.0 => /lib/libpthread.so.0 (0x0075a000)

        /lib/ld-linux.so.2 (0x005c2000)

 

Adesso editiamo  il file di configurazionein /root/dextra

 

Sono quattro i campi da modificare :

OWNER , inserite il nominativo del vostro ripetitore D_STAR

OWNER=IR3DA

 

ADMIN , inserite in nominativo dell’OM che amministra il sistema

ADMIN=IZ3CYW

 

LINK_ON_STARTUP=BXRF008A

In questo campo si indicano le porte di connessione da collegare :

-          la prima lettera indica la porta del ripetitore che sarà collegata al xRF , nel nostro caso la porta B ( 430 ) sarà utilizzata per i collegamenti al xReflector

-          L’ultima lettera indica la porta del xReflector da utilizzare . Per la conferenza Italiana utilizziamo la porta A

 

DIFF=Y

 

[root@localhost dextra]# vi dextra_srv.cfg

# dextra_srv.cfg configuration file for dextra_srv

# Lines starting with a pound sign are discarded.

# Lines containing a pound sign are also discarded.

# Information on each line must start in the left-most position.

# dextra_srv will not block dongle serial numbers.

# It does NOT use dongle serial numbers.

# It requires just the User's callsign.

 

# The Gateway callsign assigned to the D-Star Gateway.

# The callsign can be up to 6 characters

OWNER=IR3DA

 

# Administrator callsigns that are always allowed

#    to link/unlink a repeater module using a dstar radio.

# Each callsign on a separate line

# Up to 8 charactrers for a callsign.

ADMIN=IZ3CYW

 

# Are other radio users allowed to link/unlink a repeater module?

LINK_BY_USERS=N

 

# The dstar gateway listens on voice port 40000

GW_PORT=40000

 

# The repeater controller port

CTRL_PORT=20000

 

# What is your setup ?

# There are two valid setups.

# First valid setup:

#   For ICOM hardware, set DIFF=Y

#   For home-made stuff where you have two different Linux machines,

#    where one Linux machine runs the repeater/GMSK program

#    and another Linux machine runs the home-made G2 dstar Gateway, set DIFF=Y

#

# Second valid setup:

#   Everything runs on one machine:

#      home-made G2 dstar gateway, repeater program and GMSK modem, all on one machine.

#   If you have this setup, set DIFF=N

#

DIFF=Y

# The following two options are more IMPORTANT than others.

# Some dstar installations have reverse settings

 

# The INTERNAL ethernet interface is usually eth1

INTERNAL_IF=eth1

 

# The EXTERNAL ethernet interface is usually eth0

EXTERNAL_IF=eth0

 

# dextra server will listen on this IP address for user connections

# Use 0.0.0.0 for most cases

LISTEN_IP=0.0.0.0

 

# dextra_srv listens on this UDP port for user connections.

LISTEN_PORT=30001

 

# dextra_srv will listen on this IP address for admin commands

# Use 0.0.0.0 for most cases

COMMAND_IP=0.0.0.0

 

# dextra_srv listens on the command port for admin commands

COMMAND_PORT=30003

 

# Max number of users connected, this is the capacity of dextra_srv

MAX_USERS=20

 

# Do you want CQ data to go to the log file?

QSO_DETAILS=Y

 

# Announce links/unlinks

# If you set ANNOUNCE_LINK=Y

#  then you must create the directory pointed to

#  by the next configuration variable ANNOUNCE_DIR_NOTIFY

ANNOUNCE_LINK=Y

 

# The directory where the empty notification files are created by dextra_srv

# You must create this directory if you set ANNOUNCE_LINK=Y

ANNOUNCE_DIR_NOTIFY=/root/dextra/tmp

 

# STATUS FILE

# Full pathname must be given

STATUS_FILE=/root/dextra/RPT_STATUS.txt

 

# LINK_CODE that users must use on their dstar HT radios

#   for LINKING a repeater module to a reflector module:

#

#  Example of linking  a repeater module to Reflector XRF005 module A

#

#  URCALL set to:   XRF005AO

#

#  LINK_CODE is always in the 8th position of URCALL

#

# As you can see the LINK_CODE is the letter O

# Since O may be used by other software, you may want to change it to something else.

#

LINK_CODE=O

 

#  RELINK_CODE has the same functionality as the LINK_CODE

#  except it will try to create a PERSISTENT link from

#  the repeater module to the reflector module

#  This means that whenever we get a timeout to our link request from the remote system

#  and the RELINK_CODE was used initially to request the link,

#  dextra_srv will try to resend the link request,

#  if it does not see the link established in REMOTE_REPLY seconds.

#  While dextra_srv is trying to establish the link, the module will be

#  considered  LOCKED/LINKED and can not be used to link to something else,

#  unless the radio user or the administrator stops this process

#  with the UNLINK_CODE command or using the NETCAT request.

#  Example(netcat command): break the link on module B:  um B

#

#  Example of linking in persistent mode  a repeater module to Reflector XRF005 module A

#

#  URCALL set to:   XRF005AW

#

# As you can see the RELINK_CODE is the letter W

# Since W may be used by other software, you may want to change it to something else.

#

RELINK_CODE=W

 

# UNLINK_CODE that users must use on their dstar HT radios

#   for UNLINKING an already linked repeater module.

#

#

#  Example of unlinking an already linked module.

#

#  URCALL set to:   "XRF005AX"   or

#  URCALL set to:   "       X"

#

#

#     ONLY the 8th position is examined

#

#   As you can see the UNLINK_CODE is the letter X

#   Since X may be used by other software, you may want to change it to something else.

#

UNLINK_CODE=X

 

# IS_IT_LINKED_CODE can be used in the 8th position of URCALL to

#   ask the repeater module if it is linked

#

#   As you can see the IS_IT_LINKED_CODE is the letter Z

#   Since Z may be used by other software, you may want to change it to something else.

#

IS_IT_LINKED_CODE=Z

 

# Each connected station to dextra_srv/dstar repeater/gateway

#   sends to dextra_srv a KEEPALIVE signal

#   every 10 seconds. That is the heartbeat.

# If after (10*TIMEOUT) seconds, dextra_srv has

#   not received that signal from a specific station,

# then that station is considered a DEAD station and dextra_srv

# will take it off the "CONNECTED STATIONS" list.

# Do NOT make TIMEOUT a small number.

# TIMEOUT should be at least 5

# That means that you are giving the remote station

#   5 chances to respond.

# If you set TIMEOUT to less than 5, then dextra_srv will set it

#    to the minimum required to function correctly and that

# minimum TIMEOUT value is 5

# You can make it a big number if you have a lot of stations connected

# and expect a heavy load on your system or your Internet connectivity

#  is not high speed.

# dextra_srv was designed to run even on a dstar repeater

#   that was installed on a Linux system with a dial-up line,

# because the bandwidth requirements of dextra_srv are 1/100 of

#   the bandwidth requirements of other ADDON software.

#

# If the remote station times out, then any persistent linked modules will be re-tried

#   if the link was requested with the RELINK_CODE initially.

#

# Give each remote station 9 chances to respond

TIMEOUT=9

 

# When we link our repeater module to a reflector module,

#   how many seconds to give the reflector to reply back to us

#   that everything is OK and it accepted our link request

# If you set it to less than 10 seconds, dextra_srv will set it to

#   the minimum of 10 seconds so that the system functions correctly

# This is in seconds, do not make it a very big number.

REMOTE_REPLY=20

 

# One of our repeater modules to link to a reflector on startup

# LINK_ON_STARTUP=BXRF005A means that we want

#   to link our repeater module B to Reflector XRF005 module A on startup

# If you do not want that, leave it blank, example: LINK_ON_STARTUP=

#

LINK_ON_STARTUP=BXRF008A

 

# The dstar database is mostly in sync with other remote dstar databases

#    but there are occassions where the synchronization between dstar gateways

#    was not completed.

# In such cases, dextra_srv will reject the incoming LINK if the IP address of

#    the incoming LINK does not match the IP address in the local dstar database.

# Leave it at IP_CHECK=Y

#    But you may get a failure to link if your dstar database is slow to synchronize

# For those rare occasions, set it to IP_CHECK=N

#

# WARNING: Still I prefer that you set IP_CHECK=Y and I will explain why:

# Some dstar repeater or dstar reflector may accidentally use an incorrect call for their IP address

#   and it will get access to your network and you will think that the remote system

#   is one of your trusted dstar repeaters or dstar reflectors.

# So, I highly recommend that you set IP_CHECK=Y

#

IP_CHECK=Y

 

 

Adesso possiamo attivare il servizio

 ./dextra_srv.sh

 

Perchè il tutto funzioni dovete aprire le porte UDP 30001 e 30003

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 30001 -j ACCEPT

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 30003 -j ACCEPT

 

Se avete fatto tutto , vedrete che il vostro sito si aggiungerà a quelli presenti nella dashboard del XRF008 .

 

73 de iz3cyw

 

 

 

 

 

 

 

 

 

 

 

 

Ultimo aggiornamento Sabato 28 Novembre 2009 17:54