What problem are you trying to solve? Writing DALI commissioning without access to IEC 62386-102 is going to be difficult, and it takes some effort to, ahem, find a copy of the required PDF on one of those websites which take copyright protection with a big grain of salt. In my experience it was easier to rely on the vendor SW to do the provisioning, and once it's been done, focus on writing code for actually using these devices instead of starting with the provisioning process.
That said, the commissioning process requires the INITIALIZE
command first (which has to be sent twice in a short time as usual for these "special" commands). Then, you issue RANDOMISE
(again twice within 100ms), and only then do the SEARCHADDRH
, SEARCHADDRM
, SEARCHADDRL
followed by COMPARE
and detecting a collision or response to that command. Once you've identified the randomAddress
of your first device (by repeatedly setting the searchAddress
and detecting a response or a collision through COMPARE
), you proceed with the PROGRAM SHORT ADDRESS
and WITHDRAW
. Then you continue until all of your devices have been already addressed. Also as an optimization, you can QUERY CONTROL GEAR PRESENT
either as a broadcast, or with an address meaning "devices without short address" to see if there's something on the bus which still needs addressing.