Converting a Radio/Group ID to an IP address


Background

In a DMR system, each radio must have a unique Radio ID. This is a number between 1 and 16776415 (or 65535 for Capacity Plus systems) and is used to identify the radio when transmitting; allow other radios to call it and act as a source or destination address for data.

The radio therefore also has an IP address. This address is made up of the CAI address (by default 12) and the Radio ID. So for example, a Radio with ID 1 will have an IP address of 12.0.0.1. However, a radio with ID 3175 will not have an IP address of 12.0.3.175 but rather 12.0.12.103 this is because the Radio ID is in decimal and the IP address is related to Hexadecimal.

MOTOTRBO uses IPv4. An IP address therefore contains four octets (numbers) that range from (theoretically) 0 to 255.

Method

The method to convert the radio's ID to it's IP address, is as follows:

  • What is the CAI? It's 12.
  • Convert 3175 to HEX: C67 (or 0C67)
  • Split the HEX number into single (8-bit) bytes: 0C.67
  • Convert each byte back to a decimal number: So 0C becomes 12 and 67 becomes 103 - hence 12.103.
  • The CAI is the first octet and the single byte decimal values from the previous step become the 2nd, 3rd and 4th octets.
  • Therefore 12.0.12.103


There are a number of online tools to do the conversion. You just need to substitute the CAI number into the first octet.

Here's one more example: Radio ID 2626054.

CAI = 12 (1st octet)
2626054d = 281206h
28 12 06
28h = 40d
12h = 18d
06h = 06d
12.40.18.6

Groups

The same rule can be applied to Talkgroups, just replace the CAI with GCAI (which is by default 225). So Talkgroup 100 would have an IP address of 225.0.0.100.

Purpose

Knowing the radio's IP address can be useful. For example, you can ping it. But, be aware that a DMR network isn't suited to carry ICMP (ping) messages, so to be safe you should use the -w switch with a value of 5000 (at least in Windows) as this increases the timeout value to 5 seconds.
Pinging a radio can tell you whether the radio is on and reachable on the current channel and whether there is connectivity between the back-haul IP network and radio cloud - you do however, need to set up a route between the two networks.

You would not be able to ping a Talkgroup.

No comments

Powered by Blogger.