You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


You can view and copy the source of this page:

Return to Open DMR Terminal Protocol/Push Service.

DRAFT[edit]

Conditions[edit]

Assumptions[edit]

Scenario[edit]

  1. Terminal sends to BM a messasge REWIND_TYPE_TERMINAL_IDLE that contains string in next format: <URL of token service> <device token>
  2. BM checks local database for suitable access token and application ID *A1
  3. BM sends push message to terminal using suitable access token and application ID

A1. Token information not found:

  1. BM queries <URL of token service> for application and token info
  2. Token Service does authentication at Google OAuth 2.0 service using its private key
  3. Token Service passes application-id, access-token and expiration-time to BM
  4. BM stores access token and application ID in its database

BM-FCM.png

Security[edit]

Examples[edit]

Termiinal requests BM to switch to IDLE[edit]

[REWIND_TYPE_TERMINAL_IDLE] http://my-dmr-vendor.com/token/?code=123456 jhsdfjasdfsdfeTERTcxvvxerSR

Please check main article!

BM requests Token Service[edit]

GET http://my-dmr-vendor.com/token/?code=123456

Token Service responds to BM[edit]

{
  type: 'FCM-HTTP-v1',
  application: 'mydmrapp-jaso42',
  token: 'isdmlifdlWERWdsfWsdfsfsdfWER',
  expires: 3600
}

BM sends Push to an application[edit]

{
  "message":
  {
    "token" : "jhsdfjasdfsdfeTERTcxvvxerSR",
    "data" :
    {
      "type" : "Open DMR Terminal",
      "body" : "<hexadecimal string of normal REWIND datagram>"
    },
    "android":
    {
      "priority": "high",
      "ttl": "0"
    }
  }
}

Links[edit]