(Command line)
(Command line)
Line 152: Line 152:
 
#                                                |- Context UUID                  -|
 
#                                                |- Context UUID                  -|
 
</pre>
 
</pre>
 +
 +
==== Subscribe to XLX Module ====
 +
 +
<pre>
 +
dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
 +
  me.burnaway.BrandMeister.invokeCommand string:'ccd1bca2-596f-4e70-9622-00263bfad37e' string:'subscribe 4001 2501'
 +
#                                                |- Context UUID                  -|              Module -| |-Group ID
 +
</pre>
 +
  
 
==== Remove context (disconnect from server / repeater) ====
 
==== Remove context (disconnect from server / repeater) ====

Revision as of 00:35, 23 January 2021

  • Interface name: me.burnaway.BrandMeister
  • Service path: /me/burnaway/BrandMeister
  • Service name: me.burnaway.BrandMeister.N<Network ID>


List of methods

  • getContextList
  • getContextData
  • removeContext
  • invokeCommand
  • dropCallRoute
  • setStoredValue
  • getStoredValue
  • getStationData
  • getRepeaterData
  • getTerminalData
  • setSpecificValue
  • getDiagnosticData
  • getLockInformation
  • getSubscriptionList
  • getObjectInformation
  • getSystemInformation
  • publishExternalEvent

Full list and descriptions can be retrieved using D-BUS Introspection

Examples

Keep in mind these examples are for master id 2501 if used please change N2501 to NXXX for you master.

Command line

Connect to C-Bridge

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'CBridge CC-CC Link' string:'connect 87.106.84.53'
  3. # |-C-Bridge Address

Connect to D-STAR D-Extra reflector

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'D-Extra Link' string:'connect 250 D XRF250 D xrf250.dstar.su'
  3. # Group ID-| | |-XRF--| |-XRF Address-|
  4. # Local Module-+

Connect to WIRES-X Room

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'WIRES-X Link' string:'connect 250 44.11.22.33'
  3. # Talkgoup-| |-room

Connect to YSF Reflector

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'YSF Client' string:'connect 250 44.11.22.33 42000'
  3. # Group ID-| |-Address |-Port

Register RP2C gateway

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'RP2C Link' string:'register 2509 gate.dstar.su'
  3. # Network ID-| |-Gateway Address

Connect to XLX Reflector

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'XLX Interlink' string:'connect 192.0.2.1 1'
  3. # XLX Address -| |-options

Get list of contexts

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.getContextList
  3.  
  4. Optional parameters:
  5. #1 (optional) string:<name> - specific name
  6. #1 (optional) uint32:<mask> - specific type, where bit 0 - applications, bit 1 - repeaters, bit 2 - networks
  7. #2 (optional) uint32:<number> - identifier of link
  8.  
  9. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  10. me.burnaway.BrandMeister.getContextList uint32:2
  11. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  12. me.burnaway.BrandMeister.getContextList uint32:2 uint32:250301
  13.  
  14. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  15. me.burnaway.BrandMeister.getContextList string:'XLX Interlink'

Get context information

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.getContextData string:'15bb100a-a08e-11e4-9ef2-52540089c90b'
  3. # |- Context UUID -|

Get repeater information

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.getRepeaterData string:'15bb100a-a08e-11e4-9ef2-52540089c90b'
  3. # |- Context UUID -|

Clear repeater alarms (IP Site Connect)

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'clear alarms'
  3. # |- Context UUID -|

Turn repeating on (IP Site Connect)

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'turn repeater on'
  3. # |- Context UUID -|

Turn repeating off (IP Site Connect)

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'turn repeater off'
  3. # |- Context UUID -|

Subscribe to C-Bridge talking group

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'subscribe 1 1'
  3. # |- Context UUID -| Link ID-| |-Group ID
  4.  
  5. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  6. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'transmit configuration'
  7. # |- Context UUID -|

Subscribe to XLX Module

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'ccd1bca2-596f-4e70-9622-00263bfad37e' string:'subscribe 4001 2501'
  3. # |- Context UUID -| Module -| |-Group ID


Remove context (disconnect from server / repeater)

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.removeContext string:'15bb100a-a08e-11e4-9ef2-52540089c90b'
  3. # |- Context UUID -|

Drop call route

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.dropCallRoute string:'15bb100a-a08e-11e4-9ef2-52540089c90b' uint32:1
  3. # |- Context UUID -| Slot -|

Please note: this method can be applied to channels having channel lock such as repeaters, SmartPTT, etc.

Get subscription list (embedded database)

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.getSubscriptionList string:'15bb100a-a08e-11e4-9ef2-52540089c90b'
  3. # |- Context UUID -|

List contains four numbers per record:

  • slot number
  • call type (e.g. 5 - private voice call, 7 - group voice call)
  • destination ID
  • tag (least significant 32-bits)

Publish (handle) external event

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.publishExternalEvent string:'configuration changed'

PHP

<syntaxhighlight lang="php"> <?php

  1. $array = array();
  1. $connection = new DBus(DBus::BUS_SYSTEM, true);
  2. $proxy = $connection->createProxy("me.burnaway.BrandMeister.N2501", "/me/burnaway/BrandMeister", "me.burnaway.BrandMeister");
  1. $result = $proxy->getContextList();
  2. if ((is_object($result)) &&
  3. (get_class($result) == "DbusArray"))
  4. {
  5. $list = $result->getData();
  6. foreach ($list as $banner)
  7. {
  8. $result = $proxy->getContextData($banner);
  9. if ((is_object($result)) &&
  10. (get_class($result) == "DbusSet"))
  11. {
  12. $set = $result->getData();
  13. $values = $set[6]->getData();
  14. $address = $set[4];
  1. $array[] = array(
  2. "banner" => $set[0],
  3. "name" => $set[1],
  4. "type" => $set[2],
  5. "number" => $set[3],
  6. "state" => $set[5],
  7. "values" => $values);
  8. }
  9. }
  10. }
  1. $data = json_encode($array);
  1. if (array_key_exists("callback", $_GET))
  2. {
  3. header("Content-Type: application/javascript");
  4. print($_GET["callback"] . "(" . $data . ")");
  5. }
  6. else
  7. {
  8. header("Content-Type: application/json");
  9. print($data);
  10. }

?> </syntaxhighlight>


List of methods[edit]

Full list and descriptions can be retrieved using D-BUS Introspection

Examples[edit]

Keep in mind these examples are for master id 2501 if used please change N2501 to NXXX for you master.

Command line[edit]

Connect to C-Bridge[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'CBridge CC-CC Link' string:'connect 87.106.84.53'
  3. # |-C-Bridge Address

Connect to D-STAR D-Extra reflector[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'D-Extra Link' string:'connect 250 D XRF250 D xrf250.dstar.su'
  3. # Group ID-| | |-XRF--| |-XRF Address-|
  4. # Local Module-+

Connect to WIRES-X Room[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'WIRES-X Link' string:'connect 250 44.11.22.33'
  3. # Talkgoup-| |-room

Connect to YSF Reflector[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'YSF Client' string:'connect 250 44.11.22.33 42000'
  3. # Group ID-| |-Address |-Port

Register RP2C gateway[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'RP2C Link' string:'register 2509 gate.dstar.su'
  3. # Network ID-| |-Gateway Address

Connect to XLX Reflector[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'XLX Interlink' string:'connect 192.0.2.1 1'
  3. # XLX Address -| |-options

Get list of contexts[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.getContextList
  3.  
  4. Optional parameters:
  5. #1 (optional) string:<name> - specific name
  6. #1 (optional) uint32:<mask> - specific type, where bit 0 - applications, bit 1 - repeaters, bit 2 - networks
  7. #2 (optional) uint32:<number> - identifier of link
  8.  
  9. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  10. me.burnaway.BrandMeister.getContextList uint32:2
  11. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  12. me.burnaway.BrandMeister.getContextList uint32:2 uint32:250301
  13.  
  14. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  15. me.burnaway.BrandMeister.getContextList string:'XLX Interlink'

Get context information[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.getContextData string:'15bb100a-a08e-11e4-9ef2-52540089c90b'
  3. # |- Context UUID -|

Get repeater information[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.getRepeaterData string:'15bb100a-a08e-11e4-9ef2-52540089c90b'
  3. # |- Context UUID -|

Clear repeater alarms (IP Site Connect)[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'clear alarms'
  3. # |- Context UUID -|

Turn repeating on (IP Site Connect)[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'turn repeater on'
  3. # |- Context UUID -|

Turn repeating off (IP Site Connect)[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'turn repeater off'
  3. # |- Context UUID -|

Subscribe to C-Bridge talking group[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'subscribe 1 1'
  3. # |- Context UUID -| Link ID-| |-Group ID
  4.  
  5. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  6. me.burnaway.BrandMeister.invokeCommand string:'15bb100a-a08e-11e4-9ef2-52540089c90b' string:'transmit configuration'
  7. # |- Context UUID -|

Remove context (disconnect from server / repeater)[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.removeContext string:'15bb100a-a08e-11e4-9ef2-52540089c90b'
  3. # |- Context UUID -|

Drop call route[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.dropCallRoute string:'15bb100a-a08e-11e4-9ef2-52540089c90b' uint32:1
  3. # |- Context UUID -| Slot -|

Please note: this method can be applied to channels having channel lock such as repeaters, SmartPTT, etc.

Get subscription list (embedded database)[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.getSubscriptionList string:'15bb100a-a08e-11e4-9ef2-52540089c90b'
  3. # |- Context UUID -|

List contains four numbers per record:

Publish (handle) external event[edit]

  1. dbus-send --system --dest=me.burnaway.BrandMeister.N2501 --type=method_call --print-reply /me/burnaway/BrandMeister \
  2. me.burnaway.BrandMeister.publishExternalEvent string:'configuration changed'

PHP[edit]

<syntaxhighlight lang="php"> <?php

  1. $array = array();
  1. $connection = new DBus(DBus::BUS_SYSTEM, true);
  2. $proxy = $connection->createProxy("me.burnaway.BrandMeister.N2501", "/me/burnaway/BrandMeister", "me.burnaway.BrandMeister");
  1. $result = $proxy->getContextList();
  2. if ((is_object($result)) &&
  3. (get_class($result) == "DbusArray"))
  4. {
  5. $list = $result->getData();
  6. foreach ($list as $banner)
  7. {
  8. $result = $proxy->getContextData($banner);
  9. if ((is_object($result)) &&
  10. (get_class($result) == "DbusSet"))
  11. {
  12. $set = $result->getData();
  13. $values = $set[6]->getData();
  14. $address = $set[4];
  1. $array[] = array(
  2. "banner" => $set[0],
  3. "name" => $set[1],
  4. "type" => $set[2],
  5. "number" => $set[3],
  6. "state" => $set[5],
  7. "values" => $values);
  8. }
  9. }
  10. }
  1. $data = json_encode($array);
  1. if (array_key_exists("callback", $_GET))
  2. {
  3. header("Content-Type: application/javascript");
  4. print($_GET["callback"] . "(" . $data . ")");
  5. }
  6. else
  7. {
  8. header("Content-Type: application/json");
  9. print($data);
  10. }

?> </syntaxhighlight>