# Programming the radio

Once the code plug is finished, it can be programmed onto the radio. Just select the write cod plug button in the tool-bar at the top of the window or select write from the device menu.

In a first step, qdmr will try to detect a connected radio. This will be done automatically (unless disabled in the settings menu) if there is only one radio connected and it is safe to access the USB device. Some radios use some generic USB to serial chips in their cable instead of connecting the micro controller of the radio directly to the computer. This way, it is not possible for qdmr to safely assume, that the found serial port is actually a radio. If such a generic interface is detected, qdmr will ask which interface the radio is connected to.

Once a radio is found it will verify the code plug with that radio. That is, it will check whether any limits are exceeded. For example the number of channels, contacts, group lists, etc.

There are several levels of issues that can be detected when verifying a code plug with a radio. The lowest level is the Information. These are just messages generated to inform you about minor changes made to the code plug to fit it into the specific radio. For example when zones are split. These information are usually ignored and qdmr will proceed writing the code plug.

Warnings are one level more severe. They are issued if changes are made that may change the behavior of the code plug. The result, however, will still be a working code plug. They are usually issued when names are too long. When warnings are issued, qdmr will not automatically proceed writing the code plug. The user, however, can ignore the warnings and continue. In the application settings (see guiSettingsDialog), you may choose to always ignore verification warnings. In this case, qdmr will write the code plug automatically, even if there were some warnings.

Finally Errors are the most severe verification issues. They simply prevent writing the code plug to the device. The user cannot ignore errors as they would result in invalid and even damaging code plugs being written to the device.

If, however, everything fits into the radio, qdmr will start writing the binary code plug to the device.

Writing the code plug is a two-step process. First, the current code plug is read from the radio. This includes all settings. Then the device-specific code plug is updated and then re-uploaded to the device. This two-step process will maintain all device-specific settings made earlier unless explicitly set within qdmr.

During the reading or writing, the qdmr GUI will turn gray (inactive) to prevent any changes to the code plug during the transfer. However, a progress-bar is shown in the bottom-right to indicate the progress.

When running qdmr or `dmrconf` under Linux, you may need to change the permissions to access USB devices. Along with the software, a `udev` rules file was installed. This file specifies that members of the `dialout` group have access to the radios. Consequently, you need to be a member of this group.

You can check your group membership with `groups`. This command lists all groups your user is a member of. This list should contain `dialout`.

If your user is not yet a member of the `dialout` group, you can add your user to it by calling

      sudo adduser YOUR_USER dialout