I recorded an OOK transmission (of a temperature sensor) and I'm trying to reverse engineer the recording to get the binary out with python.

First I searched for the length of a bit. Therefore I search all zones where the value is high and then mean it to get the sample count of one bit. This works well, and I can get a bitlength and a bitrate.

enter image description here

My problem is about the first peak in the preamble. As you see it is much shorter than all other "bits". All other bits have about the same length.

  • what could be a reason behind the a short bit at the beginning, which is just about 1/3 of a "regular bit
  • How to process: should I treat the shortest peak as default bitlength or should I treat this short bit as a regular bit?

Perhaps the reason for the shortness is to not confuse it with actual data. This short "bit" signals a receiving device to start monitoring for data, and could be ignored as recording of data. It is essentially a "start recording" marker not relevant to the data. However, if you are repeating this signal or sending it, then you most likely need to include it to initiate the receiving device to start "listening" for "data". But it is not "data" per say.

| improve this answer | |
  • $\begingroup$ Thanks for your remarks. When i read your answer correctly, would that mean, i have to split the transmission in two, the first one has a bitlenght of the first bit, and after the peramble i would use an other bitlenght $\endgroup$ – endo.anaconda Sep 26 '16 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.