I ordered a 444MHZ remote and receiver with some buttons on it. The remote has rolling code but when I tested I saw that every button has 8 fixed different possibility and repeat it self.
Button1: (Decimal results)
1- 3899572514 / 32bit PulseLength: 251 microseconds Protocol: 1
2- 3899580674 / 32bit PulseLength: 251 microseconds Protocol: 1
3- 3899523362 / 32bit PulseLength: 251 microseconds Protocol: 1
4- 3899531522 / 32bit PulseLength: 251 microseconds Protocol: 1
5- 3899539746 / 32bit PulseLength: 251 microseconds Protocol: 1
6- 3899547906 / 32bit PulseLength: 251 microseconds Protocol: 1
7- 3899556130 / 32bit PulseLength: 251 microseconds Protocol: 1
8- 3899564290 / 32bit PulseLength: 251 microseconds Protocol: 1
So, I'm tyring to figure out what is the best method for developing the receiver code. I tought different ideas but I did not like them at all so I want to take your opinions.
My ideas are:
1- I will record all of these possibilities and use them like "if any one of these" method but this is not secure and I don't want to that.
2- I will record all of these possibilities and expecting other then previous lenght. This is also not suitable because it is not secure either. There are 7 different possibilities and if I have multiple device in a room, remotes goes mixed with this method.
3- If I'm gonna put them order and expect only for the next possibility it could work and it will reduce to mixing with other same device. Thats nice but I can not put them in order because when the device misses a push then it will not work at all. Also there are no ways to know the current lenght when the device rebooted.
P.S: Security is not too much needed. It is gonna a home light system but I want to code the receiver to reach (close as) paired devices for in a case having multiple devices in the room.
Any idea or example will be awesome!
After researching all over the internet finally I've find the data type illusturation.
As you can see the below. The first 16bits is the transmitter ID and it is unique for every remote to prevent mixed signals. the 17-24bits are the button keycode. If it is fixed code then you should only have 1 keycode for each button. If it's rolling code then as you can see mine is incremented by 1. The rest is the control mark and checksum.
So now I know that I should create a sync function for taking the transmitter ID and when I have a transmitter ID I will filter it and grab the keycode information from 17-24bits and call the desired function. Thats it.