The idea is not just that he is just transmitting the code across space when he is in the Tesseract within the black-hole.
The idea is that he is transmitting across both space and time.
The Tesseract he floats around within the black hole is an artificial construct to allow Cooper to find the right moment in space and time to communicate with Murph the information she needs to save humanity.
He sees her at various stages in her life in that bedroom, as a child, and even himself before he leaves the planet. He is able to weakly interact with the past by manipulating the dust, the watch-hand and even pushing the books off the shelves in frustration. He is the ghost behind her shelves at the start of the movie.
Cooper finds the right time when she is present in the room and old enough to understand the meaning of what he is transmitting.