Princeton - 2262/1527/2260/2242 Bit-formating calculator / partial decoder, that use special algo to prevent weak signal or noise causing URH decoding OOK codes in wrong way
^ in this screenshot you can see that same signal which been captured different times causing URH outputting different binary, which could been corrected back to correct one with this tool.
^ you can use the most elegant way to diff 2262/1527/2260/2242.
^ the most stable way to decode binary into 2262/1527/2260/2242
OOK.MP4
git clone https://github.com/zxkmm/OOKFormatCalculate.git
cd OOKFormatCalculate
mkdir build
cd build
cmake ..
make
./OOKFormatCalculate
AKA 4Bits data <---> 2Bits data
e.g.
H0FF1FHFHH0100
<--->100001011101100110100100
AKA Data demodulated by URH ----> 4Bits data of 1527
e.g.
111010001000100010001110100011101110111010001110111010001000111011101000111010000111010001000100010
---> H0FF1FHFHH 1000
Data demodulated by URH ----> 3Bits data AKA common 2262 code
or do diff
e.g.
100010001110111010001001001110100010001000100100010001000100011101110100010001000100010001000100
---->010F000010000
Data demodulated by URH ----> 2Bits general data
or do diff
e.g. 101010101010101010101010100010101100101100110010110011001100110011001011010011010010110101001010110100110100110010101011010010110001010110010110011001011001100110011001100101101001101001011010100101011010011010011001010101101001011000101011001011001100101100110011001100110010110100110100101101010010101101001101001100101010110100101
--->
NNNNNNNNNNNNNNNWNWWNWWWWWNWNWNNWNNNNWNWNWNNNWNNWNNWNWWNWWWWWNWNWNNWNNNNWNWNWNNNWNNWNNWNWWNWWWWWNWNWNNWNNNNWNWNWNNNWNN
There is a sync code in the end of each frame of 2262/2260/1527 Signal. It makes Samy's De-Bruijn attack not working on these encoders.
If your are trying to put your code that decoded by this script into a DIP switch fob, you should check that if your data code
is one of them: 0001
0010
0100
1000
, and if NOT, then the DIP switch fob won't work correctly. In this case you should buy a fob that able to replay.
If your fob is 1527/2242 but accidently doesn't contain H
in it, it might be recongnized as 2262. It's not preventable but the sync bit is different among of them, which means they have different waveform. So if you decoded something as 2262 and it doesn't work, you should try same code but in 1527/2242 protocol.
This repo is just a tool to decode data from URH or calculate data/code/waveform in different format, which mainly operates strings, if you are looking for a tool to operate/demodulate raw files or HEX datas like .complex
or .C16
, pls refer to these project below:
URH
rtl-433
ooktools
RFQuack
If you are trying to brute-force an OOK device, please try these project below:
OpenSesame
PortapackMayhem
2262Scan
flipper-unleashed
Flipper Momentum former known as flipper-xtreme
C++11 or Python 3 or both
PickedItMate
jimilinuxguy
GoblinGe
You are free to use the code in this repository, whether it's part of paid software or not. However, I have incorporated these additional requests into the license of this repository. If you use the code, design, text, algorithms, or anything else from this repository, you must include my username "zxkmm" and the link to this repository in three places:
- In the code comments.
- In the settings interface related to my code.
- On the 'About' page of your software/website/and or any other format of computer production.