Dali Commissioning Without Randomise
When using DTR to program a short address, there is a special format. The value needs to be left shifted one place and then the least significant bit set. Command 128 (opcode byte 0x80) STORE DTR AS SHORT ADDRESS gives the bitwise structure of the DTR for this as 0AAA AAA1 where the A bits are bits of the short address, or to clear the short address, use MASK (all bits 1).

In C, this would be written

DTR = (addr &lt;&lt; 1) | 0x01;

This is equivalent to multiplying the address by two then adding one. So working backwards from your case of DTR = 0x05, addr is 2.

The DTR is set by sending command 257 (address byte 0xA3). All control gears will set their DTR, this command is not addressed, but Command 128 STORE DTR AS SHORT ADDRESS is addressed, and is a Configuration command so needs to be sent twice within 100ms.