DataBridge is a special data application which allows you to create DMR data applications without care about DMR data transportation, BrandMeister servers perform assembling, transmitting, retrying whole DMR data blocks for you.

Access to DataBridge can be done via MQTT API. There two special group of topics:

  • Master/<Network ID>/Incoming/Data/<Source ID>/<Destination ID> - incoming queue
  • Master/<Network ID>/Outgoing/Data/<Source ID>/<Destination ID> - outgoing queue

Please note: DataBridge supports only private data calls as an input from the air.

More datails about available options to transfer the data are available at article DMR Data Transport.

Configuration

// DataBridge Application
DataBridge :
{
  // List of mapped service IDs:
  // <Private ID>, <Responding Mode>
  numbers =
  [
    250970, 8,    // 8 means data stack will respond with success code automatically
    250971, 255   // 255 means external application will respond with Response Packet
  ];
};

Data Transport

Unlike to all other MQTT API functions you have to provide an extra header having transmission information to BrandMeister. Fortunately BrandMeister sends absolutely the same header to inform application of incoming transmission details.

#ifdef __cplusplus
extern "C"
{
#endif
 
#pragma pack(push, 1)
 
#define TRANSMITTER_PRIORITY_NORMAL  0
 
struct DataTransportHeader
{
  uint8_t version;      // Header version, 1
  uint8_t length;       // sizeof(struct DataTransportHeader)
 
  uint8_t priority;     // TRANSMITTER_PRIORITY_*
 
  uint8_t format;       // DPF_*
  uint8_t application;  // SAP_*
  uint8_t options;      // Depends on format
  uint8_t type;         // Depends on format
  uint8_t code;         // Depends on format
 
  uint8_t rate;         // TYPE_RATE_*
 
  uint8_t reserved[7];  // Align to 16 bytes
};
 
#pragma pack(pop)
 
#ifdef __cplusplus
}
#endif

All emunerations are standard for DMR:

#define TYPE_RATE_12_DATA      0b0111
#define TYPE_RATE_34_DATA      0b1000
#define TYPE_RATE_1_DATA       0b1010
 
// Data Packet Format
 
#define DPF_UNIFIED_DATA_TRANSPORT   0b0000
#define DPF_RESPONSE_PACKET          0b0001
#define DPF_UNCONFIRMED_PACKET       0b0010
#define DPF_CONFIRMED_PACKET         0b0011
#define DPF_SHORT_DATA_DEFINED       0b1101
#define DPF_SHORT_DATA_RAW_STATUS    0b1110
#define DPF_PROPRIETARY              0b1111
 
// SAP Identifier
 
#define SAP_UNIFIED_DATA_TRANSPORT   0b0000
#define SAP_UDP_HEADER_COMPRESSION   0b0011
#define SAP_IP_BASED_PACKET_DATA     0b0100
#define SAP_PROPRIETARY              0b1001
#define SAP_SHORT_DATA               0b1010
 
// Options
 
#define CHEAD_GROUP_DESTINATION      0b10000000
#define CHEAD_RESPONSE_REQUIRED      0b01000000

All reserved filds should be filled with 0!

Format Specific

Please keep in mind: options CHEAD_GROUP_DESTINATION and CHEAD_RESPONSE_REQUIRED cannot be applied both at the same time.

To keep transmissions compatible with most of repeaters and radios it is highly recommended to use:

  • TYPE_RATE_34_DATA when using tormat DPF_CONFIRMED_PACKET or option CHEAD_RESPONSE_REQUIRED
  • TYPE_RATE_12_DATA otherwise

DPF_CONFIRMED_PACKET

Normally you have to fill following fields:

  • application - set proper application type
  • rate - set proper data rate

DPF_UNCONFIRMED_PACKET

Normally you have to fill following fields:

  • application - set proper application type
  • rate - set proper data rate

You can use:

  • group transmission mode by setting `options` to CHEAD_GROUP_DESTINATION

DPF_SHORT_DATA_DEFINED

  • application - set proper application type
  • rate - set proper data rate
  • type - encoding code

You can use:

  • group transmission mode by setting `options` to CHEAD_GROUP_DESTINATION
  • confirmed transmission mode by setting `options` to CHEAD_RESPONSE_REQUIRED

DPF_SHORT_DATA_RAW_STATUS

  • application - set proper application type
  • rate - set proper data rate
  • type - SP-DP pair

You can use:

  • group transmission mode by setting `options` to CHEAD_GROUP_DESTINATION
  • confirmed transmission mode by setting `options` to CHEAD_RESPONSE_REQUIRED

DPF_UNIFIED_DATA_TRANSPORT

  • application - set proper application type
  • type - set UDT format
  • code - set UDTO code

DPF_RESPONSE_PACKET

  • application - set proper application type
  • code - set response code