Get Adobe Flash player
Benvenuto, Ospite
Username: Password: Ricordami
  • Pagina:
  • 1

ARGOMENTO: Formato dei files e stream UDP del D-STAR

Formato dei files e stream UDP del D-STAR 01 Nov 2011 18:13 #21

  • IZ0QWM
  • IZ0QWM's Avatar
  • Offline
  • Amministratore
  • Messaggi: 28
  • Thank you received: 5
  • Karma: 4
Vi riporto questa bella carrellata di informazioni scritta da Kristoff ON1ARF:
(scusate è in inglese)
Format of files and UDP-streams used on D-STAR

The goal of this document is to describe the format of file-formats and UDP network-streams used on D-STAR.

* D-STAR STREAM-FORMAT

Sending a voice-message to a repeater is achieved by sending a UDP-stream to the “dsgwd” process on the repeater gateway-PC. This application listens by default on UDP port 40000. Packets needs to be send every 20 ms.

The format of this UDP-stream to be send is described below. This stream-format is very simular to the file-format of the .dvtool files. The differences between these two formats are described further down in this text.

1/ The configuration-frame:

The first frame of the UDP-stream is a start-frame and is 56 bytes in length. It contains addressing information about the stream:

octets 0 to 3: “DSVT”
octet 4: 0×10 (= frame is configuration-frame)
octets 5 to 7: 0×00, 0×00, 0×00
octet 8: 0×20 (= stream is voice-stream)
octets 9 to 11: 0×00, 0×01, 0×01
octets 12 to 13: streamid (random, 16 bits)
octet 14: 0×80
octets 15 to 17: 0×00, 0×00, 0×00 (flag1, flag2, flag3) (*)
octets 18 to 25: destination = repeatername + destination module
octets 26 to 33: departure = repeatername + ‘G’
octets 34 to 41: companion = “CQCQCQ ”
octets 42 to 49: own1 = repeatername
octets 50 to 53: own2 = “RPTR”
octets 54 to 55: packet frame checksum

(*) The exact description of the flags can be found in the “shogen” DSTAR documentation. Some D-STAR applications set flag1 to “0×40″. This sets the “repeater” bit (bit 6) to 1.

2/ A voice-packet

The concequative frames in the UDP-stream are 27 byte voice-packet. They contains 20 ms of voice-data. The frame-format is described below:

octets 0 to 3 : “DSVT”
octet 4: 0×20 (= frame is voice-frame)
octets 5 to 7 : 0×00, 0×00, 0×00
octet 8: 0×20 (= stream is voice-stream)
octets 9 to 11: 0×00, 0×01, 0×01
octets 12 to 13: streamid (random, 16 bits, same as in header)
octet 14: framecounter (goes from 0 to 20)
octets 15 to 23: ambe-data
octets 24 to 26: slow-speed data

In the last frame of a stream, the frame-counter is increased by 0×40.

The .dvtool file format

As already mentioned, the format of the .dvtool files (binary files containing AMBE-encoded audio) is very simular to the network stream-format used to transport D-STAR DV-streams.

In fact, the only difference between these two formats, are 10 bytes which are added in front of the configuration-frame. They contain the following information:

6 octets containt “DVTOOL”
A 4 octet length-indication (in little-endian format), indicating the number of frames present in frame (startframe + voiceframes)
In front of each frame, a 2 byte length field is added, formated in small-endian format. It contains {0×38 0×00} for a configuraton-frame or {0x1b 0×00} for a voice-frame.

Note that, when converting a .dvtool to an actual UDP-stream send to the repeater, some parts of the information in the .dvtool file is overwritten:

In the configuration-frame

all repeater-information (like the name of the repeater and the module) is replaced by the actual name and module that is used.
A new streamid is generated
A new packet checksum is calculated.

In the voice-frames:

the streamid is replaced to match the one chosen in the configuration-frame.

The .AMBE file format

The .ambe files are designed to hold AMBE pre-encodec audio-fragments; like individual words or parts of sentences.

These files can be easily concatenated together to make up a complete voice-announcement. This is possible as .ambe-files are just plain text-files.

The format-description of the .ambe format is as follows:

.ambe files are plain ascii
any line beginning with ‘#’ is concidered to be comment and is ignored
Althou comments-lines are ignored, some lines are reserved for future expansion:
Lines beginning with “#C Version: ” contain the version of the protocol.
The current protocol-version is 1.0
Lines beginning with “#C Name: ” contain the name of the ambe-file
Lines beginning with “#C Info: ” contain any additional information

Currently, all these three lines are optional
Lines containing actual AMBE-data use this format: 00000 00 AABBCCDDEEFF001122
The 1ste and 2nd are purely informational. They field contain sequencing-information of ambe frame. The 1ste field contain the seconds (digits from 00000 to 99999) the 2nd field contains hunderds of seconds (digits from 00 to 99) since the beginning the encoding-process.

As DSTAR sends and receives a AMBE-frame every 1/50th of a second, the 2nd field will go up by 2 for every frame.

As .ambe files are intended to be used to build voice-messages containing multiple smaller .ambe files; this timing-information is not used in the actual process of producing the resulting .dvtool file. They are only there for informational reason, so give some idea of the length of the resulting audio-message.
The 3th field contains the actual AMBE data.

As D-STAR uses AMBE voice-encoding at 3600 bps (2400 bps audio + 1200 bps FEC), any .ambe frame of 1/50 of a second contains 9 bytes of .ambe audio. (3600 bps = 450 bytes per second -> divide that by 50 frame per second and you get 9 bytes per frame)

The AMBE-data is encoded as 18 hex-characters.
.ambe-files do NOT contain slow-speed data information.

The slow-speed-data part

The slow speed data is stored in the 3 last octets of every DV-frame (hereafter called a “packet”) just behind the 9 AMBE octets of voice-data. The “shogen” DSTAR documentation only specifies two things:

slow-speed data is organisated in a “superframe” structure of 21 packets of 3 bytes (the 3 octets at the end of 21 consequative DV-frame).
The 1ste packets contains a 24 bit syncronisation-pattern:

twice the “7 bit-sequence maximum-lenght sequence” 1101000 (read from LEFT to RIGHT, so 0001011)
A 10 bit syncronisation-pattern “1010101010″ (read from LEFT to RIGHT, so 0101010101)
In addition to that, the order of the 3 octets is reversed.
Before sending, the default D-STAR scrambler is applied to the slow-speed data. This can be emulated by doing a exor operation on the 3 bytes of the slow-speed data in every DV-frame with the values 0×70, 0x4f and 0×93 (for octets 1 to 3 of the slow-speed packet)
Note that the D-STAR scrambler is NOT applied to the syncronisation-packet (i.e. the slow-speed data present of the first packet of a superframe)

ICOM has implemented an extension to the slow-speed data protocol, which has been reverse-engineered by Jonathan G4KLX and Denis Bederov DL3OCK. See this URL for more info: www.qsl.net/kb9mwr/projects/voip/dstar/Slow%20Data.pdf

In the current version of the voice-announcement package, only the ”20 bytes free-text” extension is implemented. This extensions allows for a 20-byte text to be send along in a DV-stream. That text will be shown on the display of the tranceiver.

The specifications are as follows:

The 20 bytes of data are divided in 4 “groups” of 5 octets each.
Each group is distributed over two 3-bytes slow-speed packets in a DV-frame
The 5 bytes of text-data are proceeded by 1 octet containing 0×40 up to 0×43.
If the message is less then 20 bytes, it is filled up with spaces
The remaining part of the slow-data superframe is filled up with a filler (containing “0×66″).

73

Kristoff ON1ARF

IZ0QWM - Raffaello Di Martino
www.kwos.org
Ultima modifica: 01 Nov 2011 18:25 Da IZ0QWM.
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
  • Pagina:
  • 1
Time to create page: 0.304 seconds

Accedi

Accedi al portale per interagire con la comunità!

Chiacchiere

Accendi Spegni Suono Emoticon Storia FAQ Kide Chat
16:35-- is0aaj-p: saluti da is0aaj,purtroppo al momento isolato IR0UBT -------offline
20:42-- iw2fut: Buonasera a tutti !
20:47-- iz7nqn: come configuro il mio id.51 plus 2
20:47-- iz7nqn: buona sera prima di tutto...
17:38-- IZ6OUF: AUGURI A TUTTI DI BUON ANNO 2020 73
11:22-- IK2ISX: Il NODO a 144.937,5 di IK1JNS è operativo ? che copertura ha ?
9:36-- IK2ISX: Vedo che questo sito è MORTO . . . . .o nessuno ha risposte ?
9:29-- iu0cml: ciao a roma ci sta un d-star che funziona?
21:50-- IZ8TXC: buonasera da IZ8TXC
10:23-- IZ1RDO: Grazie delle info del sito.
10:23-- IZ1RDO: 73s de IZ1RDO
23:02-- IK0XUF: 73 de IK0XUF Luciano
13:55-- ik1vhm: Ciao a tutti, dopo 3 lunghi anni sono tornato. Spero di riuscire a sistemare nuovamente il mio hotspot.
8:50-- it9stg: Buongiorno
14:13-- IZ0NNJ: salve, volevo sapere se il ripetitore iroma funziona ancora
15:15-- IU7EZJ: 73 de IU7EZJ
13:57-- iu0cml: CIAO A TUTTI
16:04-- iu0cml: BUONA SERA SEIL RIP IR0MA SE FUNZIONA?
17:36-- iz8ujv: buona sera sono iz8ujv ciro chiedo aiuto per iscrizione del mio nominati su rete dstar compilo il modulo ma il Captcha non si genera come posso fare non riesco neanche a contattare il webmaster per lo stesso problema aiutatemi grazie
22:24-- is0hza: Buonasera a tutti, sono di nuovo dentro. SCusate la domanda ma i parametri da usare per utilizzare il sistema su un portatile quali sono
2:01-- is0hza: Buonasera o anzi buona mattinata, grazie per la registrazione.
10:32-- iu0cml: buongiorno a tutti come mai ci sono tanti sistemi d-star e non funzionano xchè nn vengono tolti dalle mappe
13:49-- is0hza: Buona sera all'amministratore, volevo gentiolemnete sapere quali siano i ponti dstar in Sardegna e come funzionano, grazie mille
20:30-- iv3upe: Buonasera Comunico che il Ponte IR3UBK è OffLine per Attività di Manutenzione.Appena ritornerà Operativo verrete informati.Scusate per il Disagio.Grazie.
17:39-- iz7djv: Buonasera a tutti
7:42-- iz1plh: Buon giorno volevo chiedere quando connetto ir1uii g mi viene fuori nella stringa rpt? ir1uii g che vuol dire quel punto interrogativo grazie
12:08-- i7wan: Il ponte ripetitore D-Star IR7UBA della nostra Sezione ARI di Bari è stato appena ripristinato dopo un lungo periodo di mancanza di connettività. I soci Domingo IZ7OIX e Tommy IZ7ECL sono riusciti a raggiungere il sito di installazione e sostituire la Raspberry Pi che aveva cessato di funzionare con una nuova, modello Pi 4, più performante e con un opportuno sistema di raffreddamento. La dashboard del ponte è raggiungibile all’indirizzo: http://ir7uba.aribari.it
16:19-- IZ6FGP: Ciao a tutti gli utilizzatori voglio comunicare che la pagine di registrazione e tornata operativa. Ci scusiamo per il disservizio creato dovuto da innumerevoli attacchi che ora sono stati risolti. Se dovessero presentarsi ancora vi chiediamo la cortesia di segnalarcelo. 73'
9:02-- iu8cwn: Buon giorno e buona domenica a TUTTI ....Speriamo bene :-)
8:21-- iv3upe: IR3UBK e ritornato operativo.
14:28-- PU7MKI: 73 de PU7MKI
14:28-- PU7MKI: Tgif 88990
14:28-- PU7MKI: 73 de PU7MKI
14:29-- PU7MKI: AllstarLink 54499
13:58-- IN3AVB: Buongiorno mi sono dimenticato la pass di D-Star come posso ritrovare.
13:58-- IN3AVB: Grazie

Soltanto gli utenti registrati possono inviare messaggi, Registrati o Login