Skip to content

RadioID.net Databases

Jacob McSwain edited this page Feb 2, 2023 · 2 revisions

DMRHub embeds the RadioID.net DMR repeater and user databases into the binary.

These databases are automatically updated in memory on server startup and every day at midnight UTC if internet is available.

The users database is used to validate user registration and that callsigns match, and in the future provide details for unregistered DMR users in lastheard.

The repeaters database is used to validate 6-digit repeater IDs for validity and ownership.

In the future, site administrators will be able to view the current date of the databases and optionally update them on the fly.

Using Custom Databases

If a custom DMR repeater or user database is required, the JSON structure is an array of objects.

User:

[
  {
    "fname": "Baptiste",
    "name": "Baptiste",
    "country": "France",
    "callsign": "F4JCG",
    "city": "Bonneval Sur Arc",
    "surname": "Isnard",
    "radio_id": 2080831,
    "id": 2080831,
    "state": "Auvergne-Rhône-Alpes"
  }
]

Repeater:

[
  {
    "locator": "740001",
    "id": "740001",
    "callsign": "HC2DR",
    "city": "GUAYAQUIL",
    "state": null,
    "country": "Ecuador",
    "frequency": "147.30000",
    "color_code": 1,
    "offset": "+0.600",
    "assigned": "Peer",
    "ts_linked": "TS1 TS2",
    "trustee": "HC2DR",
    "map_info": "",
    "map": 1,
    "ipsc_network": "BM"
  }
]

To use the database in the binary, replace internal/repeaterdb/repeaters.json.xz or internal/userdb/users.json.xz for repeaters or users, respectively. With the .json files in those directories, xz -e users.json or xz -e repeaters.json can be used to compress these files to XZ for embedding into the binary.

Clone this wiki locally