Sometimes there is a trade-off doing it "low level", but how much I learn everyday!
I eventually discovered, the hard way, why radio receivers with automatic gain control (AGC) do need compulsory seemingly "useless" preambles for them to adjust their volume properly, for the real data to come.
Once I re-think about it, it is plain obvious... a receiver does not know whether someone is really transmitting or not. So when nothing is transmitted, it acts just as anybody on a audio system who wants to check if the source is plugged or not: the receiver increases the volume (gain) until it catches something. But when nobody really is transmitting, increasing gain eventually ends up amplifying noise, i.e. seemingly random 0s and 1s. As humans, we know we are hearing static and the input device is not transmitting. But the receiver is not able to know.
Without proper calibration, the start of real data then gets buried in the noise, until the receiver manages to set its gain, back to actual transmission levels (i.e. it reduces the amplification until signal is just below saturation -- again, like a human who quickly turns the volume down after the source is plugged).
I eventually discovered, the hard way, why radio receivers with automatic gain control (AGC) do need compulsory seemingly "useless" preambles for them to adjust their volume properly, for the real data to come.
First: send a calibrating preamble (alternating zeros/ones)
No signal? The gain is adjusted to get one. So we read radio noise! By the way, this radio module took about 30ms to fully adjust its gain. |
Without proper calibration, the start of real data then gets buried in the noise, until the receiver manages to set its gain, back to actual transmission levels (i.e. it reduces the amplification until signal is just below saturation -- again, like a human who quickly turns the volume down after the source is plugged).