Try this firmware:
All modules in a chain must be powered simultaneously. A master module will have it's id set to 0 (unless it was previously set manually). Each subsequent child module will have it's id set to "parent id + 1". The id assignment will happen within 255 ms of powering up.