(Switch to ACTIVE mode)
(Switch to IDLE mode)
Line 9: Line 9:
 
==== Switch to IDLE mode ====
 
==== Switch to IDLE mode ====
  
REWIND_TYPE_TERMINAL_IDLE
+
REWIND_TYPE_TERMINAL_IDLE, ''data'' should contain ASCII string of device token.<br/>
 +
Server will respond with REWIND_TYPE_TERMINAL_IDLE having no content.
  
 
==== Switch to ACTIVE mode ====
 
==== Switch to ACTIVE mode ====

Revision as of 16:15, 6 June 2018

This is suggestion to new Simple Terminal Client protocol. The protocol is based on Simple External Application protocol.

Link establishment

REWIND_SERVICE_SIMPLE_TERMINAL should be used as a service type

New messages

Switch to IDLE mode

REWIND_TYPE_TERMINAL_IDLE, data should contain ASCII string of device token.
Server will respond with REWIND_TYPE_TERMINAL_IDLE having no content.

Switch to ACTIVE mode

REWIND_TYPE_TERMINAL_WAKE

Text message data

REWIND_TYPE_MESSAGE_TEXT, data should contain struct RewindTextMessageData, where data has normal text in UTF-16LE format.
Server will respond to this message as REWIND_TYPE_MESSAGE_STATUS when message will processed.

Text message status

REWIND_TYPE_MESSAGE_STATUS, data should contain struct RewindTextMessageStatus, where status has same enumeration as normal DMR response data header.
Server will not respond to this message.

Location report

REWIND_TYPE_LOCATION_REPORT, data is NMEA RMC message
Server will not respond to this message.

Cloud Messaging extension (push notifications)

One of the targets of the Simple Terminal Client is mobile devices such as mobile phones. This kind of devices have very strong requirements for power saving (Power Management for Mobile Devices). To make access for these devices more comfortable we added support of a native activation mechanism to Simple Terminal Client. Now we can activate devices via Google's Firebase Cloud Messaging which is a native mechanism for Android devices.

Managing connection state

To do this, the BrandMeister DMR Server supports the following new messages that may be sent by the client:

TBD

  • Switch connection state to idle. In the idle state the server stops sending any messages to the client via UDP (keep-alive messages are not required).
    • Message format:
      RPTIDLE01234567-393838907279:bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...
      Where 01234567 is the repeater ID (hexadecimal string of 8 characters) then application token ID (393838907279), deimeter (":") and the last part is the device token. We recommend to send this message several times (i.e. 3 times), and the server will respond with MSTACK
  • Switch connection state back to active.
    • Message format:
      RPTWAKE01234567-393838907279:bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...
      Where 01234567 is the repeater ID (hexadecimal string of 8 characters) then application token ID (393838907279), deimeter (":") and the last part is the device token. Upon success the server will respond with MSTACK.

Downstream message

In the connection's idle state the server will send any data such as the headers of any voice calls, data calls, and CSBK (but not voice frames) via Cloud Messaging. Client applications should then go back and switch the connection to an active state to get a stream over UDP.

{
  "data" :
   {
     "type" : "Simpel Terminal Client",
     "data" : "010203040506070809..."
   },
   "to" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1..."
}

data/data field contains normal DMRD message of Homebrew Protocol in hexadecimal representation.

Application IDs and keys

We strongly recommended to use your own application token ID. In that case please provide us your application token ID and authorisation key. Both will be hardcoded in the source code. Default application token ID is 393838907279

This is suggestion to new Simple Terminal Client protocol. The protocol is based on Simple External Application protocol.

Link establishment[edit]

REWIND_SERVICE_SIMPLE_TERMINAL should be used as a service type

New messages[edit]

Switch to IDLE mode[edit]

REWIND_TYPE_TERMINAL_IDLE, data should contain ASCII string of device token.
Server will respond with REWIND_TYPE_TERMINAL_IDLE having no content.

Switch to ACTIVE mode[edit]

REWIND_TYPE_TERMINAL_WAKE

Text message data[edit]

REWIND_TYPE_MESSAGE_TEXT, data should contain struct RewindTextMessageData, where data has normal text in UTF-16LE format.
Server will respond to this message as REWIND_TYPE_MESSAGE_STATUS when message will processed.

Text message status[edit]

REWIND_TYPE_MESSAGE_STATUS, data should contain struct RewindTextMessageStatus, where status has same enumeration as normal DMR response data header.
Server will not respond to this message.

Location report[edit]

REWIND_TYPE_LOCATION_REPORT, data is NMEA RMC message
Server will not respond to this message.

Cloud Messaging extension (push notifications)[edit]

One of the targets of the Simple Terminal Client is mobile devices such as mobile phones. This kind of devices have very strong requirements for power saving (Power Management for Mobile Devices). To make access for these devices more comfortable we added support of a native activation mechanism to Simple Terminal Client. Now we can activate devices via Google's Firebase Cloud Messaging which is a native mechanism for Android devices.

Managing connection state[edit]

To do this, the BrandMeister DMR Server supports the following new messages that may be sent by the client:

TBD

  • Switch connection state to idle. In the idle state the server stops sending any messages to the client via UDP (keep-alive messages are not required).
    • Message format:
      RPTIDLE01234567-393838907279:bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...
      Where 01234567 is the repeater ID (hexadecimal string of 8 characters) then application token ID (393838907279), deimeter (":") and the last part is the device token. We recommend to send this message several times (i.e. 3 times), and the server will respond with MSTACK
  • Switch connection state back to active.
    • Message format:
      RPTWAKE01234567-393838907279:bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...
      Where 01234567 is the repeater ID (hexadecimal string of 8 characters) then application token ID (393838907279), deimeter (":") and the last part is the device token. Upon success the server will respond with MSTACK.

Downstream message[edit]

In the connection's idle state the server will send any data such as the headers of any voice calls, data calls, and CSBK (but not voice frames) via Cloud Messaging. Client applications should then go back and switch the connection to an active state to get a stream over UDP.

{
  "data" :
   {
     "type" : "Simpel Terminal Client",
     "data" : "010203040506070809..."
   },
   "to" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1..."
}

data/data field contains normal DMRD message of Homebrew Protocol in hexadecimal representation.

Application IDs and keys[edit]

We strongly recommended to use your own application token ID. In that case please provide us your application token ID and authorisation key. Both will be hardcoded in the source code. Default application token ID is 393838907279