(REWIND_TYPE_MESSAGE_TEXT)
(REWIND_TYPE_MESSAGE_STATUS)
Line 119: Line 119:
 
==== REWIND_TYPE_MESSAGE_STATUS ====
 
==== REWIND_TYPE_MESSAGE_STATUS ====
  
Message indicates the status of message delivery (please check '''struct RewindTextMessageStatus''').
+
Message indicates the status of message delivery (please check '''struct RewindTextMessageStatus'''). '''Should be used only in case of private message!'''
* '''sourceID'''
+
* '''sourceID''' - should have the value of destinationID passed in RewindTextMessageData
* '''destinationID'''
+
* '''destinationID'''' - should have the value of sourceID passed in RewindTextMessageData
 
* '''status''' - delivery status, the value of this field correspond to status octet of normal header of DMR Data Call Report (0b00001000 = success)
 
* '''status''' - delivery status, the value of this field correspond to status octet of normal header of DMR Data Call Report (0b00001000 = success)
  

Revision as of 10:52, 16 October 2018

DRAFT

Open DMR Terminal Protocol is a new interface of BrandMeister DMR Server. This link provides light access for IP-based terminals. It's designed to cover many specific requirements such as:

  • Good NAT traversial
  • Decoded CCL-layter messages for DMR transportation
  • Capabilities to Push-technology (at least Google Cloud Messaging) to save battery power and traffic

This is incomplete version of specification!

The protocol is based on out Rewind Protocol and very close to our [Simple Application Protocol].

Rewind Protocol

Rewind is our under-layer protocol required for communication with BrandMeister DMR Server. It is based on UDP. Byte-order is LE.

Note: protocol uses two sequence counters. One for routine messages and another one for real-time data (from REWIND_TYPE_DMR_DATA_BASE to REWIND_TYPE_DMR_AUDIO_FRAME). For real-time data you also should set flag REWIND_FLAG_REAL_TIME_1.

Protocol definition header is now available here

Messages for External Application

Link establishment

REWIND_TYPE_KEEP_ALIVE

Keep-alive messages should be sent by client every 5 seconds. struct RewindVersionData should follow after Rewind header.

  • number - DMR ID of terminal
  • service - should be set to REWIND_SERVICE_OPEN_TERMINAL
  • version - UTF-8 encoded message contains application name and version

Server respond to this message with the same type but without content (just header).

REWIND_TYPE_CLOSE

Simple message to close connection, has no parameters and confirmations.

REWIND_TYPE_CHALLENGE

There is no special login message, new connection should be established by REWIND_TYPE_KEEP_ALIVE. REWIND_TYPE_CHALLENGE will be send by BrandMeister Server when it detects new connection. The parameter of this message is salt value (please check example bellow).

REWIND_TYPE_AUTHENTICATION

This message is result of processing message REWIND_TYPE_CHALLENGE by client. The parameter is value of calculation SHA256 hash function (please check example bellow). A result of successful authentication procedure will be empty message REWIND_TYPE_KEEP_ALIVE.

Operational support

REWIND_TYPE_REPORT

Some kind of debugging extension. This message will be send by BrandMeister Server. Parameter of message is UTF-8 encoded text (please check example bellow).

Call control and subscription management

REWIND_TYPE_BUSY_NOTICE

Use this message to drop incoming call from the server. Message has no content.

REWIND_TYPE_SUBSCRIPTION

To simplify the process of administration and reduce amount of administrative work an application could make subscription to DMR data by itself immediately after authentication procedure. struct RewindSubscriptionData should follow after Rewind header.

  • type - set to 7 for group voice call
  • number - ID of talking group

On success BrandMeister Server will respond with REWIND_TYPE_SUBSCRIPTION without content.

You can make several subscriptions for connection. Subscription procedure is optional, all routing stuff can be done by LUA on the server side.

REWIND_TYPE_CANCELLING

This message cancels subscriptions created by REWIND_TYPE_SUBSCRIPTION.

This message has two options:

  • To cancel all active subscriptions - the message has no content.
  • To cancel particular subscription - use the same syntax as REWIND_TYPE_SUBSCRIPTION

On success BrandMeister Server will respond with REWIND_TYPE_CANCELLING without content.

REWIND_TYPE_TERMINAL_IDLE

REWIND_TYPE_TERMINAL_WAKE

Call transmission

REWIND_TYPE_DMR_DATA_BASE

This is a base number for group of messages:

  • REWIND_TYPE_DMR_DATA_BASE + 1 is Voice Header (Full LC).
    This is normal structure of DMR Voice Header, 12 bytes in length (ETSI TS 102 361-1). You can skip calculation of CRC.
  • REWIND_TYPE_DMR_DATA_BASE + 2 is transmission terminator. No content required or sent.

Both messages may be sent several times at once (2-3 times with same sequence number) to be sure on successful delivery.

REWIND_TYPE_DMR_AUDIO_FRAME

This message should contain triple AMBE frames of mode 33. Each of 9 bytes, 27 bytes total.

REWIND_TYPE_DMR_EMBEDDED_DATA

This message contains value of LC (10 bytes), which can be transferred via embedded signalling during voice call. Suitable to transfer Talker Alias and in-call GPS.

Additional Services

REWIND_TYPE_MESSAGE_TEXT

Message responds to message delivery (please check struct RewindTextMessageData).

  • sourceID
  • destinationID
  • option - indicates type of message destination, private or group
  • length - length of message in bytes
  • data - message text, UTF-16LE

REWIND_TYPE_MESSAGE_STATUS

Message indicates the status of message delivery (please check struct RewindTextMessageStatus). Should be used only in case of private message!

  • sourceID - should have the value of destinationID passed in RewindTextMessageData
  • destinationID' - should have the value of sourceID passed in RewindTextMessageData
  • status - delivery status, the value of this field correspond to status octet of normal header of DMR Data Call Report (0b00001000 = success)

REWIND_TYPE_LOCATION_REPORT

This message should be sent by terminal to server and should indicate current terminal position (please check struct RewindLocationReport).

  • format - should be LOCATION_FORMAT_NMEA
  • length - length of NMEA string data in bytes
  • data - NMEA ASCII string terminated by 0

REWIND_TYPE_LOCATION_REQUEST

This message should be sent by server to terminal to initiate one short or periodical reports (please check struct RewindLocationRequest).

  • type field means type of request (LOCATION_REQUEST_SHOT, LOCATION_REQUEST_TIMED_START, LOCATION_REQUEST_TIMED_STOP)
  • interval field should be used to pass report interval for LOCATION_REQUEST_TIMED_START message

Client Library and Example applications

Our DigestPlay is supplied with client library that implements transport layer and login procedure.

DigestPlay written in C

Call recorder written in Go

DRAFT[edit]

Open DMR Terminal Protocol is a new interface of BrandMeister DMR Server. This link provides light access for IP-based terminals. It's designed to cover many specific requirements such as:

This is incomplete version of specification!

The protocol is based on out Rewind Protocol and very close to our [Simple Application Protocol].

Rewind Protocol[edit]

Rewind is our under-layer protocol required for communication with BrandMeister DMR Server. It is based on UDP. Byte-order is LE.

Note: protocol uses two sequence counters. One for routine messages and another one for real-time data (from REWIND_TYPE_DMR_DATA_BASE to REWIND_TYPE_DMR_AUDIO_FRAME). For real-time data you also should set flag REWIND_FLAG_REAL_TIME_1.

Protocol definition header is now available here

Messages for External Application[edit]

Link establishment[edit]

REWIND_TYPE_KEEP_ALIVE[edit]

Keep-alive messages should be sent by client every 5 seconds. struct RewindVersionData should follow after Rewind header.

Server respond to this message with the same type but without content (just header).

REWIND_TYPE_CLOSE[edit]

Simple message to close connection, has no parameters and confirmations.

REWIND_TYPE_CHALLENGE[edit]

There is no special login message, new connection should be established by REWIND_TYPE_KEEP_ALIVE. REWIND_TYPE_CHALLENGE will be send by BrandMeister Server when it detects new connection. The parameter of this message is salt value (please check example bellow).

REWIND_TYPE_AUTHENTICATION[edit]

This message is result of processing message REWIND_TYPE_CHALLENGE by client. The parameter is value of calculation SHA256 hash function (please check example bellow). A result of successful authentication procedure will be empty message REWIND_TYPE_KEEP_ALIVE.

Operational support[edit]

REWIND_TYPE_REPORT[edit]

Some kind of debugging extension. This message will be send by BrandMeister Server. Parameter of message is UTF-8 encoded text (please check example bellow).

Call control and subscription management[edit]

REWIND_TYPE_BUSY_NOTICE[edit]

Use this message to drop incoming call from the server. Message has no content.

REWIND_TYPE_SUBSCRIPTION[edit]

To simplify the process of administration and reduce amount of administrative work an application could make subscription to DMR data by itself immediately after authentication procedure. struct RewindSubscriptionData should follow after Rewind header.

On success BrandMeister Server will respond with REWIND_TYPE_SUBSCRIPTION without content.

You can make several subscriptions for connection. Subscription procedure is optional, all routing stuff can be done by LUA on the server side.

REWIND_TYPE_CANCELLING[edit]

This message cancels subscriptions created by REWIND_TYPE_SUBSCRIPTION.

This message has two options:

On success BrandMeister Server will respond with REWIND_TYPE_CANCELLING without content.

REWIND_TYPE_TERMINAL_IDLE[edit]

REWIND_TYPE_TERMINAL_WAKE[edit]

Call transmission[edit]

REWIND_TYPE_DMR_DATA_BASE[edit]

This is a base number for group of messages:

Both messages may be sent several times at once (2-3 times with same sequence number) to be sure on successful delivery.

REWIND_TYPE_DMR_AUDIO_FRAME[edit]

This message should contain triple AMBE frames of mode 33. Each of 9 bytes, 27 bytes total.

REWIND_TYPE_DMR_EMBEDDED_DATA[edit]

This message contains value of LC (10 bytes), which can be transferred via embedded signalling during voice call. Suitable to transfer Talker Alias and in-call GPS.

Additional Services[edit]

REWIND_TYPE_MESSAGE_TEXT[edit]

Message responds to message delivery (please check struct RewindTextMessageData).

REWIND_TYPE_MESSAGE_STATUS[edit]

Message indicates the status of message delivery (please check struct RewindTextMessageStatus). Should be used only in case of private message!

REWIND_TYPE_LOCATION_REPORT[edit]

This message should be sent by terminal to server and should indicate current terminal position (please check struct RewindLocationReport).

REWIND_TYPE_LOCATION_REQUEST[edit]

This message should be sent by server to terminal to initiate one short or periodical reports (please check struct RewindLocationRequest).

Client Library and Example applications[edit]

Our DigestPlay is supplied with client library that implements transport layer and login procedure.

DigestPlay written in C

Call recorder written in Go