These lights are quite cheap and can produce fairly good effect. Made by the Chinese Company XLTC: http://xl12345.com/ as model XL-10. However if using in a proper DMX setup there is a strange problem: only the address 1 seems to work no other. As I had 3, first I tried to map them to separate addresses.
Then experimenting a bit more turned out if i set the address below 6 (the device has 5 channels), then it will work-- sort of -- but only from the start address (set on the device) up to DMX address 5. For example setting the start address to 3 only allows control for channel 3, 4 and 5.
Opening up reveals that is has an STM8 microcontroller and has headers for programming. The programmer needed for it is a cheap ST-Link, so why not try with it?!
Luckily, the code is not protected and can be read out. On the other hand the disassembly is not supported by IDA pro by default -- however there is a plugin for it -- which had errors.
After fixing the plugin (available on my git page) and fiddling in IDA, I have found the crucial part:
Regardless of how wasteful the address-matching is (instead of using just the start address, it stores every channel's address independently, while setting new start-address sets all the other too) you can see where the problem comes from. To fix it the following lines has to be altered:
ld a, (1,sp) ldw x, DMX_loc_addrw
to the following:
clrw x ld xl, a ld a, (1,sp)because A still holds the index, it can be used before overwritten (just swapping places). LDW is 2 byte long, so it can be replaced by two 1 byte long instruction, luckily both 'clrw x' and 'ld xl, a' are of that.
Again, the A is the index in arrays but in log_CH_address it needs doubling (in Y register) as that array contains words, not bytes; while the dev_CH_parameter is of bytes so no further arithmetic required.
As I said before, I have 3 of these, 2 with remote control (sjq-new-yk), and one older without one (sjq-new-a). All 3 has quite similar code decoding the DMX so fixing can be done regardless of version.
So to fix the addressing only need to change 4 bytes which can be done in the ST visual programmer alone, no need to disassembly and assembly again. Thanks to the STVP search hex and editing functions it can be done as follows.
Search for hex values ' 7B 01 BE '
there should be only one match
(why not 4 bytes as mentioned? because the DMX_loc_addrw can be on different memory-address, but we don't need that anyways)
and replace/overwrite from (including) 7B to ' 5F 97 7B 01 '
Now you can write the code back and use your disco effect at any 5 DMX address.