# UDR2 Digirule 2U Firmware Updater User Manual
8 January 2021
---
## Introduction
UDR2 is a utility used to install firmware updates on the Digirule 2U. Versions are available for Linux, Mac OS and Windows. This manual should be considered a supplement to the *Digirule 2U User Manual*.
---
## Getting Started
Before running the utility, you need to download from the Digirule 2U website the hex file for the firmware you want to install.
Example firmware file: `dr2u.firmware.22sep2020.hex`
You also need to know the name of the USB device on your computer to which the Digirule 2U is connected.
### Linux
`ls /dev/tty*`
Example device name: `/dev/ttyUSB0`
### Mac
`ls /dev/tty.*`
Example device name: `/dev/tty.usbserial-DM038QQY`
### Windows
`mode` , or use Device Manager
Example device name: `COM3`
And finally, the Digirule 2U must be in the proper mode to receive the firmware. Please refer to the *Digirule 2U User Manual* section *Updating the Firmware* for details on the exact procedure.
---
## Running the Utility
The general syntax to invoke the utility is:
`udr2 [options] <file device`
The utility supports the following command-line options:
| Option | Function |
| ------ | -------- |
| `--program` | program and verify (default) |
| `--verify` | verify only (do not update) |
Invoking the utility is slightly different depending on which operating system you use. All of these examples assume that the utility resides in the current working directory.
### Linux
```
pi@rpi0:~ $ ./udr2 < dr2u.firmware.22sep2020.hex /dev/ttyUSB0
Digirule 2U Firmware Updater | 18 Dec 2020 | KD0GLS
Loading hex file... OK
Opening port... OK
Erasing flash... OK
Writing flash............................... OK
Verifying flash................................ OK
Restarting Digirule... OK
Closing port... OK
```
### Mac
```
User@imac:~ $ ./udr2 < dr2u.firmware.22sep2020.hex /dev/tty.usbserial-DM038QQY
Digirule 2U Firmware Updater | 18 Dec 2020 | KD0GLS
Loading hex file... OK
Opening port... OK
Erasing flash... OK
Writing flash............................... OK
Verifying flash................................ OK
Restarting Digirule... OK
Closing port... OK
```
### Windows
```
C:\> udr2 < dr2u.firmware.22sep2020.hex COM3
Digirule 2U Firmware Updater | 18 Dec 2020 | KD0GLS
Loading hex file... OK
Opening port... OK
Erasing flash... OK
Writing flash............................... OK
Verifying flash................................ OK
Restarting Digirule... OK
Closing port... OK
```
> Tip: If the port device name is `COM10` or greater, it must be specified as `\\.\COMnn`
---
<center>
<img "height=50" src="https://i.imgur.com/WSqeSrI.png">
</center>